mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
GTreeView: A bunch of work on the tree view.
This commit is contained in:
parent
d02238af48
commit
474340b9cd
5 changed files with 215 additions and 9 deletions
|
@ -9,8 +9,22 @@ public:
|
|||
|
||||
virtual const char* class_name() const override { return "GTreeView"; }
|
||||
|
||||
GModelIndex index_at_content_position(const Point&) const;
|
||||
|
||||
protected:
|
||||
virtual void paint_event(GPaintEvent&) override;
|
||||
virtual void mousedown_event(GMouseEvent&) override;
|
||||
|
||||
private:
|
||||
int item_height() const { return 16; }
|
||||
int max_item_width() const { return frame_inner_rect().width(); }
|
||||
int indent_width_in_pixels() const { return 12; }
|
||||
int icon_size() const { return 16; }
|
||||
int icon_spacing() const { return 4; }
|
||||
|
||||
struct MetadataForIndex;
|
||||
|
||||
MetadataForIndex& ensure_metadata_for_index(const GModelIndex&) const;
|
||||
|
||||
mutable HashMap<void*, OwnPtr<MetadataForIndex>> m_view_metadata;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue