1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

Spreadsheet: Add support for multiple sheets

This also refactors the js integration stuff to allow sheets to
reference each other safely.
This commit is contained in:
AnotherTest 2020-08-26 07:32:38 +04:30 committed by Andreas Kling
parent e1f5f709ee
commit cb7fe4fe7c
11 changed files with 365 additions and 126 deletions

View file

@ -41,6 +41,7 @@ public:
void save(const StringView& filename);
void load(const StringView& filename);
void add_sheet();
const String& current_filename() const { return m_workbook->current_filename(); }
void set_filename(const String& filename);
@ -48,7 +49,7 @@ public:
private:
explicit SpreadsheetWidget(NonnullRefPtrVector<Sheet>&& sheets = {}, bool should_add_sheet_if_empty = true);
void setup_tabs();
void setup_tabs(NonnullRefPtrVector<Sheet> new_sheets);
SpreadsheetView* m_selected_view { nullptr };
RefPtr<GUI::Label> m_current_cell_label;