summaryrefslogtreecommitdiff
path: root/LibGUI/GStackWidget.h
blob: f695928aa4008a4b700b940b525218d43a51cf3b (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(CChildEvent&) override;
    virtual void resize_event(GResizeEvent&) override;

private:
    GWidget* m_active_widget { nullptr };
};