Can now undo/redo styles
This commit is contained in:
parent
94438c7b97
commit
b0b04a28c8
6 changed files with 79 additions and 20 deletions
|
|
@ -32,6 +32,14 @@ class TextBoxEditTool : public DrawingProgramEditToolBase {
|
|||
|
||||
uint8_t get_new_decoration_value();
|
||||
void set_styles_at_selection(const std::shared_ptr<DrawTextBox>& a);
|
||||
void add_undo_if_selecting_area(const std::shared_ptr<DrawTextBox>& a, const std::function<void()>& func);
|
||||
void add_undo(const std::function<void()>& func);
|
||||
|
||||
void hold_undo_data(const std::string& undoName, const std::shared_ptr<DrawTextBox>& a);
|
||||
void release_undo_data(const std::string& undoName);
|
||||
|
||||
std::unordered_map<std::string, std::pair<RichText::TextBox::Cursor, RichText::TextData>> undoHeldData;
|
||||
|
||||
RichText::TextStyleModifier::ModifierMap currentMods;
|
||||
|
||||
std::vector<std::string> sortedFontList;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue