summaryrefslogtreecommitdiff
path: root/Userland/Applications/FontEditor/FontEditor.h
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2021-04-10 13:40:59 -0400
committerAndreas Kling <kling@serenityos.org>2021-04-11 01:16:34 +0200
commitcdfa2614b958b4e70987cbb3e4c51136f60f70d9 (patch)
tree4f611324036dc4715dc099f52c338dc98159a175 /Userland/Applications/FontEditor/FontEditor.h
parentc283429196502ba011c4bb9c469146666ff65f81 (diff)
downloadserenity-cdfa2614b958b4e70987cbb3e4c51136f60f70d9.zip
FontEditor: Move menu bar into editor and tweak several widgets
Actions are now shared between menu bar and toolbar. Adds an edit menu to complement toolbar actions. Glyphs are now passed as ints instead of u8s; fixes Latin Extended+ glyphs failing to update in real time on map. Converts weight and type to more human-readable combo box lists. Selected glyph now scrolls into view on load.
Diffstat (limited to 'Userland/Applications/FontEditor/FontEditor.h')
-rw-r--r--Userland/Applications/FontEditor/FontEditor.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/Userland/Applications/FontEditor/FontEditor.h b/Userland/Applications/FontEditor/FontEditor.h
index 0f2a55041c..98131b9412 100644
--- a/Userland/Applications/FontEditor/FontEditor.h
+++ b/Userland/Applications/FontEditor/FontEditor.h
@@ -42,6 +42,7 @@ public:
const String& path() { return m_path; }
const Gfx::BitmapFont& edited_font() { return *m_edited_font; }
void initialize(const String& path, RefPtr<Gfx::BitmapFont>&&);
+ void initialize_menubar(GUI::MenuBar&);
bool is_showing_font_metadata() { return m_font_metadata; }
void set_show_font_metadata(bool b);
@@ -55,10 +56,24 @@ private:
RefPtr<GlyphMapWidget> m_glyph_map_widget;
RefPtr<GlyphEditorWidget> m_glyph_editor_widget;
+ RefPtr<GUI::Action> m_new_action;
+ RefPtr<GUI::Action> m_open_action;
+ RefPtr<GUI::Action> m_save_action;
+ RefPtr<GUI::Action> m_save_as_action;
+
+ RefPtr<GUI::Action> m_cut_action;
+ RefPtr<GUI::Action> m_copy_action;
+ RefPtr<GUI::Action> m_paste_action;
+ RefPtr<GUI::Action> m_delete_action;
+
+ RefPtr<GUI::Action> m_open_preview_action;
+ RefPtr<GUI::Action> m_show_metadata_action;
+
RefPtr<GUI::Window> m_font_preview_window;
RefPtr<GUI::Widget> m_left_column_container;
RefPtr<GUI::Widget> m_glyph_editor_container;
- RefPtr<GUI::SpinBox> m_weight_spinbox;
+ RefPtr<GUI::ComboBox> m_weight_combobox;
+ RefPtr<GUI::ComboBox> m_type_combobox;
RefPtr<GUI::SpinBox> m_spacing_spinbox;
RefPtr<GUI::SpinBox> m_baseline_spinbox;
RefPtr<GUI::SpinBox> m_mean_line_spinbox;
@@ -70,5 +85,7 @@ private:
RefPtr<GUI::GroupBox> m_font_metadata_groupbox;
String m_path;
+ Vector<String> m_font_weight_list;
+ Vector<String> m_font_type_list;
bool m_font_metadata { true };
};