summaryrefslogtreecommitdiff
path: root/LibGUI/GWidget.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-15 16:12:06 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-15 16:12:06 +0100
commit497300c492c6272df14b0190f19848a25ab6b0de (patch)
treef6bbba43100045cde823576614ffc518af22bb01 /LibGUI/GWidget.h
parentab92252ee641cb5c6eb4f188b3ad403bb4db5caa (diff)
downloadserenity-497300c492c6272df14b0190f19848a25ab6b0de.zip
LibGUI: Add a GStackWidget for many widgets sharing a single location.
Call set_active_widget(GWidget*) to put a new widget on top.
Diffstat (limited to 'LibGUI/GWidget.h')
-rw-r--r--LibGUI/GWidget.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/LibGUI/GWidget.h b/LibGUI/GWidget.h
index a7fa50c8b7..b9a65598b2 100644
--- a/LibGUI/GWidget.h
+++ b/LibGUI/GWidget.h
@@ -122,7 +122,12 @@ public:
void notify_layout_changed(Badge<GLayout>);
+ bool is_visible() const { return m_visible; }
+ void set_visible(bool);
+
private:
+ virtual bool is_widget() const final { return true; }
+
void handle_paint_event(GPaintEvent&);
void handle_resize_event(GResizeEvent&);
void do_layout();
@@ -141,4 +146,5 @@ private:
Size m_preferred_size;
bool m_fill_with_background_color { false };
+ bool m_visible { true };
};