mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:47:45 +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:
parent
2dd7fa2d44
commit
b79be56bed
2 changed files with 32 additions and 1 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue