summaryrefslogtreecommitdiff
path: root/LibGUI/GStackWidget.h
blob: 0cac5936824bd241103dda71c5ae7e213e629229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <LibGUI/GWidget.h>

class GStackWidget : public GWidget {
public:
    explicit GStackWidget(GWidget* parent);
    virtual ~GStackWidget() override;

    GWidget* active_widget() const { return m_active_widget; }
    void set_active_widget(GWidget*);

    virtual const char* class_name() const override { return "GStackWidget"; }

protected:
    virtual void child_event(GChildEvent&) override;
    virtual void resize_event(GResizeEvent&) override;

private:
    GWidget* m_active_widget { nullptr };
};