1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

FontEditor: Add undo and redo commands

This commit is contained in:
thankyouverycool 2021-04-22 14:12:53 -04:00 committed by Andreas Kling
parent 2785e12b76
commit 44cd121e30
6 changed files with 149 additions and 1 deletions

View file

@ -6,6 +6,9 @@
#pragma once
#include "UndoGlyph.h"
#include <LibGUI/ActionGroup.h>
#include <LibGUI/UndoStack.h>
#include <LibGUI/Widget.h>
#include <LibGfx/BitmapFont.h>
@ -31,6 +34,11 @@ public:
private:
FontEditorWidget(const String& path, RefPtr<Gfx::BitmapFont>&&);
void undo();
void redo();
void did_change_undo_stack();
RefPtr<Gfx::BitmapFont> m_edited_font;
RefPtr<GlyphMapWidget> m_glyph_map_widget;
@ -46,6 +54,11 @@ private:
RefPtr<GUI::Action> m_paste_action;
RefPtr<GUI::Action> m_delete_action;
RefPtr<GUI::Action> m_undo_action;
RefPtr<GUI::Action> m_redo_action;
RefPtr<UndoGlyph> m_undo_glyph;
OwnPtr<GUI::UndoStack> m_undo_stack;
RefPtr<GUI::Action> m_open_preview_action;
RefPtr<GUI::Action> m_show_metadata_action;