mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibGUI: Add AbstractView::move_cursor() and share some movement logic
A view can now be told to move its cursor in one of multiple directions as specified by the CursorMovement enum. View subclasses can override move_cursor(CursorMovement) to implement their own cursor behavior. By default, AbstractView::move_cursor() is a no-op. This patch improves code sharing between TableView and TreeView. :^)
This commit is contained in:
@@ -52,8 +52,10 @@ protected:
|
||||
virtual void paint_event(PaintEvent&) override;
|
||||
virtual void doubleclick_event(MouseEvent&) override;
|
||||
virtual void keydown_event(KeyEvent&) override;
|
||||
|
||||
virtual void did_update_selection() override;
|
||||
virtual void did_update_model(unsigned flags) override;
|
||||
virtual void move_cursor(CursorMovement) override;
|
||||
|
||||
private:
|
||||
virtual ModelIndex index_at_event_position(const Gfx::IntPoint&, bool& is_toggle) const override;
|
||||
|
||||
Reference in New Issue
Block a user