diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-18 22:27:14 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-18 22:27:14 +0200 |
commit | 0e6b27362045c8f6511cec27c2e2108dd95c105a (patch) | |
tree | 5d3843266a8abe1bc31a06e7c032d160022755fa /LibGUI/GTableView.h | |
parent | 9ef06e2117fbf7aa34e66c95b4935ed768ac8559 (diff) | |
download | serenity-0e6b27362045c8f6511cec27c2e2108dd95c105a.zip |
LibGUI: Start working on GTableView inline editing.
This is pretty shaky still, but the basic idea is that you subclass GModel
and return true for editable indices. The table view also needs to have its
editable flag set.
Diffstat (limited to 'LibGUI/GTableView.h')
-rw-r--r-- | LibGUI/GTableView.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/LibGUI/GTableView.h b/LibGUI/GTableView.h index ea75381056..3900e164a5 100644 --- a/LibGUI/GTableView.h +++ b/LibGUI/GTableView.h @@ -30,6 +30,9 @@ public: bool is_column_hidden(int) const; void set_column_hidden(int, bool); + void begin_editing(const GModelIndex&); + void stop_editing(); + virtual const char* class_name() const override { return "GTableView"; } private: @@ -45,6 +48,8 @@ private: Rect header_rect(int) const; int column_width(int) const; void update_content_size(); + Rect cell_content_rect(const GModelIndex&) const; + Rect cell_content_rect(int row, int column) const; Vector<bool> m_column_visibility; int m_horizontal_padding { 5 }; |