mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
LibGUI+FontEditor: Add context menu for editor actions
GlyphMapWidget now reports context menu requests when secondary clicking the map. This also adds a new Select All action and updates the Copy Character action to work on multi-glyph selections. Glyph navigation actions have been moved to a separate Go menu, as is common in other apps.
This commit is contained in:
parent
42284a1550
commit
b8cc18896f
4 changed files with 59 additions and 9 deletions
|
@ -68,6 +68,7 @@ public:
|
|||
|
||||
Function<void(int)> on_active_glyph_changed;
|
||||
Function<void(int)> on_glyph_double_clicked;
|
||||
Function<void(ContextMenuEvent&)> on_context_menu_request;
|
||||
|
||||
private:
|
||||
GlyphMapWidget();
|
||||
|
@ -79,6 +80,7 @@ private:
|
|||
virtual void keydown_event(KeyEvent&) override;
|
||||
virtual void resize_event(ResizeEvent&) override;
|
||||
virtual void did_change_font() override;
|
||||
virtual void context_menu_event(ContextMenuEvent&) override;
|
||||
|
||||
Gfx::IntRect get_outer_rect(int glyph) const;
|
||||
Optional<int> glyph_at_position(Gfx::IntPoint) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue