mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibGUI: Add optional grid and cursor styles to TableView
This commit is contained in:
parent
6614ee703b
commit
2222fc5e08
2 changed files with 47 additions and 0 deletions
|
@ -35,6 +35,24 @@ class TableView : public AbstractTableView {
|
|||
public:
|
||||
virtual ~TableView() override;
|
||||
|
||||
enum class GridStyle {
|
||||
None,
|
||||
Horizontal,
|
||||
Vertical,
|
||||
Both,
|
||||
};
|
||||
|
||||
enum class CursorStyle {
|
||||
None,
|
||||
Item,
|
||||
};
|
||||
|
||||
GridStyle grid_style() const { return m_grid_style; }
|
||||
void set_grid_style(GridStyle);
|
||||
|
||||
CursorStyle cursor_style() const { return m_cursor_style; }
|
||||
void set_cursor_style(CursorStyle);
|
||||
|
||||
protected:
|
||||
TableView();
|
||||
|
||||
|
@ -42,6 +60,10 @@ protected:
|
|||
|
||||
virtual void keydown_event(KeyEvent&) override;
|
||||
virtual void paint_event(PaintEvent&) override;
|
||||
|
||||
private:
|
||||
GridStyle m_grid_style { GridStyle::None };
|
||||
CursorStyle m_cursor_style { CursorStyle::None };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue