1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 15:25:06 +00:00

LibGUI: Move most of mouse event handling to GAbstractView

This deduplicates existing code, and also gives all the model-backed widgets
selection manipulation and drag support for free :^)
This commit is contained in:
Sergey Bugaev 2020-01-22 21:12:05 +03:00 committed by Andreas Kling
parent fd11c96e8e
commit d3ce7ae0e3
9 changed files with 197 additions and 185 deletions

View file

@ -61,8 +61,6 @@ private:
virtual void mousemove_event(GMouseEvent&) override;
virtual void mouseup_event(GMouseEvent&) override;
virtual void keydown_event(GKeyEvent&) override;
virtual void doubleclick_event(GMouseEvent&) override;
virtual void context_menu_event(GContextMenuEvent&) override;
int item_count() const;
Rect item_rect(int item_index) const;
@ -75,10 +73,6 @@ private:
int m_visual_column_count { 0 };
int m_visual_row_count { 0 };
bool m_might_drag { false };
Point m_left_mousedown_position;
Size m_effective_item_size { 80, 80 };
bool m_rubber_banding { false };