blob: 536d64b61d5acb341b2777faff0c65e092f7d270 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include <LibGUI/GWidget.h>
class GStackWidget : public GWidget {
C_OBJECT(GStackWidget)
public:
virtual ~GStackWidget() override;
GWidget* active_widget() { return m_active_widget.ptr(); }
const GWidget* active_widget() const { return m_active_widget.ptr(); }
void set_active_widget(GWidget*);
Function<void(GWidget*)> on_active_widget_change;
protected:
explicit GStackWidget(GWidget* parent);
virtual void child_event(CChildEvent&) override;
virtual void resize_event(GResizeEvent&) override;
private:
RefPtr<GWidget> m_active_widget;
};
|