mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibGUI: Add remove_tab and on_change to TabWidget
This commit is contained in:
parent
c0a4cf5e8d
commit
12c7375cdd
2 changed files with 15 additions and 0 deletions
|
@ -53,6 +53,7 @@ public:
|
|||
int container_padding() const { return 2; }
|
||||
|
||||
void add_widget(const StringView&, Widget&);
|
||||
void remove_widget(Widget&);
|
||||
|
||||
template<class T, class... Args>
|
||||
T& add_tab(const StringView& title, Args&&... args)
|
||||
|
@ -62,6 +63,10 @@ public:
|
|||
return *t;
|
||||
}
|
||||
|
||||
void remove_tab(Widget& tab) { remove_widget(tab); }
|
||||
|
||||
Function<void(const Widget&)> on_change;
|
||||
|
||||
protected:
|
||||
TabWidget();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue