summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/Widget.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-25 21:24:45 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-26 00:51:35 +0200
commita265d40d6e2300cb008f73c627ed43fda1fa17eb (patch)
tree6154ce89ca82b5e14220a404fefc90a6e9f0e66c /Libraries/LibGUI/Widget.h
parent965ccf5242452dd2ffe296522a789463744ed9da (diff)
downloadserenity-a265d40d6e2300cb008f73c627ed43fda1fa17eb.zip
LibGUI: Allow widgets to clip their child widgets
This patch adds Widget::children_clip_rect() which can be overridden to tighten clipping of a widget's children. The default implementation simply returns Widget::rect().
Diffstat (limited to 'Libraries/LibGUI/Widget.h')
-rw-r--r--Libraries/LibGUI/Widget.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibGUI/Widget.h b/Libraries/LibGUI/Widget.h
index 712c7e789d..c158cea697 100644
--- a/Libraries/LibGUI/Widget.h
+++ b/Libraries/LibGUI/Widget.h
@@ -274,6 +274,8 @@ public:
void set_accepts_emoji_input(bool b) { m_accepts_emoji_input = b; }
bool accepts_emoji_input() const { return m_accepts_emoji_input; }
+ virtual Gfx::IntRect children_clip_rect() const;
+
protected:
Widget();