mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
LibGUI: Add a GStackWidget for many widgets sharing a single location.
Call set_active_widget(GWidget*) to put a new widget on top.
This commit is contained in:
parent
ab92252ee6
commit
497300c492
10 changed files with 157 additions and 5 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <AK/Weakable.h>
|
||||
|
||||
class GEvent;
|
||||
class GChildEvent;
|
||||
class GTimerEvent;
|
||||
|
||||
class GObject : public Weakable<GObject> {
|
||||
|
@ -29,12 +30,14 @@ public:
|
|||
|
||||
void delete_later();
|
||||
|
||||
private:
|
||||
virtual bool is_widget() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual void timer_event(GTimerEvent&);
|
||||
virtual void child_event(GChildEvent&);
|
||||
|
||||
private:
|
||||
GObject* m_parent { nullptr };
|
||||
|
||||
int m_timer_id { 0 };
|
||||
|
||||
Vector<GObject*> m_children;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue