1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:37:46 +00:00

LibGUI: Add modified bool to TabWidget

This will allow application with multiple tabs to track modifications
per-tab, not just if the entire window has been modified
This commit is contained in:
meiskam 2022-11-04 04:48:47 -04:00 committed by Andrew Kaster
parent 2dd7fa2d44
commit b79be56bed
2 changed files with 32 additions and 1 deletions

View file

@ -79,6 +79,10 @@ public:
void set_tab_title(Widget& tab, StringView title);
void set_tab_icon(Widget& tab, Gfx::Bitmap const*);
bool is_tab_modified(Widget& tab);
void set_tab_modified(Widget& tab, bool modified);
bool is_any_tab_modified();
void activate_next_tab();
void activate_previous_tab();
void activate_last_tab();
@ -139,6 +143,7 @@ private:
DeprecatedString title;
RefPtr<Gfx::Bitmap> icon;
Widget* widget { nullptr };
bool modified { false };
};
Vector<TabData> m_tabs;
TabPosition m_tab_position { TabPosition::Top };