diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-11-28 17:49:10 -0500 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2022-11-29 15:39:13 +0000 |
commit | 3c4a563415f053e1b51e52938c782137775f182b (patch) | |
tree | e036bd78f4965e53212dc716fa8fdcee8d835668 /Userland/Libraries/LibGUI/AbstractScrollableWidget.h | |
parent | c2cc01c920ebb4eaea0917186f8a571669739dfa (diff) | |
download | serenity-3c4a563415f053e1b51e52938c782137775f182b.zip |
LibGUI: Add Banner concept to AbstractScrollableWidget
Banners are abstract widgets which can house additional controls
and information on a temporary basis, popping in from the top of
their parent when needed.
Diffstat (limited to 'Userland/Libraries/LibGUI/AbstractScrollableWidget.h')
-rw-r--r-- | Userland/Libraries/LibGUI/AbstractScrollableWidget.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractScrollableWidget.h b/Userland/Libraries/LibGUI/AbstractScrollableWidget.h index 4c521ecae2..7f16066093 100644 --- a/Userland/Libraries/LibGUI/AbstractScrollableWidget.h +++ b/Userland/Libraries/LibGUI/AbstractScrollableWidget.h @@ -50,6 +50,10 @@ public: Widget& corner_widget() { return *m_corner_widget; } Widget const& corner_widget() const { return *m_corner_widget; } + void set_banner_widget(Widget*); + Widget* banner_widget() { return m_banner_widget; } + Widget const* banner_widget() const { return m_banner_widget; } + void scroll_to_top(); void scroll_to_bottom(); @@ -58,6 +62,7 @@ public: int width_occupied_by_vertical_scrollbar() const; int height_occupied_by_horizontal_scrollbar() const; + int height_occupied_by_banner_widget() const; virtual Margins content_margins() const override; @@ -111,6 +116,7 @@ private: RefPtr<AbstractScrollableWidgetScrollbar> m_vertical_scrollbar; RefPtr<AbstractScrollableWidgetScrollbar> m_horizontal_scrollbar; RefPtr<Widget> m_corner_widget; + WeakPtr<Widget> m_banner_widget; Gfx::IntSize m_content_size; Gfx::IntSize m_min_content_size; Gfx::IntSize m_size_occupied_by_fixed_elements; |