Commit graph

6 commits

Author SHA1 Message Date
Andreas Kling
3873c51781 LibCore: Add CObject::for_each_child_of_type<T>()
Use this to iterate over all the GRadioButtons in a group.
2019-05-27 04:18:24 +02:00
Andreas Kling
0c85d3dba9 LibCore+LibGUI: Add is<T>(CObject&) and to<T>(CObject&) helpers. 2019-05-27 04:06:01 +02:00
Andreas Kling
906fde8f8c LibCore: Add CObject::for_each_child(callback). 2019-05-27 03:52:19 +02:00
Andreas Kling
9e6b0ccc0e LibCore+LibGUI: Make CObject child events synchronous.
...and then make GWidget layout invalidation lazy. This way we coalesce
multiple invalidations into a single relayout and we don't have to worry
about child widgets not being fully constructed.
2019-04-18 22:57:24 +02:00
Andreas Kling
04500c1ae2 GWidget: Add some new child z-ordering facilities.
- child_at(Point)
- move_to_front()
- move_to_back()
- is_frontmost()
- is_backmost()

This patch also makes it possible to receive the mouse event that triggers
a context menu before the context menu is shown. I'm not sure this is the
best design for context menus but it works for now.
2019-04-16 03:47:55 +02:00
Andreas Kling
2f1f51b8ab LibCore: Move LibGUI/GObject to LibCore/CObject. 2019-04-10 17:01:54 +02:00
Renamed from LibGUI/GObject.h (Browse further)