Verovio
Source code documentation
vrv::EditorToolkitCMN Class Reference
Inheritance diagram for vrv::EditorToolkitCMN:
vrv::EditorToolkit

Public Member Functions

 EditorToolkitCMN (Doc *doc, View *view)
 
bool ParseEditorAction (const std::string &json_editorAction) override
 In child classes, this parses the provided editor action and then performs the correct action.
 
bool ParseEditorAction (const std::string &json_editorAction, bool commitOnly=false)
 
std::string EditInfo () override
 Get information on the last editor function used.
 
- Public Member Functions inherited from vrv::EditorToolkit
 EditorToolkit (Doc *doc, View *view)
 

Protected Member Functions

void PrepareUndo ()
 
std::string GetCurrentState ()
 
bool ReloadState (const std::string &data)
 
void TrimUndoMemory ()
 
bool CanUndo () const
 
bool CanRedo () const
 
bool Undo ()
 
bool Redo ()
 
bool InsertNote (Object *object)
 
bool DeleteNote (Note *note)
 
void ClearContext ()
 
bool ContextForElement (std::string &elementId)
 
bool ContextForScores (bool editInfo)
 
bool ContextForSections (bool editInfo)
 
ObjectGetElement (std::string &elementId)
 
void ContextForObject (const Object *object, jsonxx::Object &element, bool recursive=false)
 
void ContextForObjects (const ArrayOfConstObjects &objects, jsonxx::Array &siblings)
 
void ContextForReferences (const ListOfObjectAttNamePairs &objects, jsonxx::Array &links)
 
ArrayOfConstObjects GetScoreBasedChildrenFor (const Object *object)
 
bool Chain (jsonxx::Array actions)
 Parse JSON instructions for experimental editor functions.
 
bool ParseContextAction (jsonxx::Object param, std::string &elementId, bool &scores, bool &sections)
 
bool ParseDeleteAction (jsonxx::Object param, std::string &elementId)
 
bool ParseDragAction (jsonxx::Object param, std::string &elementId, int &x, int &y)
 
bool ParseKeyDownAction (jsonxx::Object param, std::string &elementid, int &key, bool &shiftKey, bool &ctrlKey)
 
bool ParseInsertAction (jsonxx::Object param, std::string &elementType, std::string &startid, std::string &endid)
 
bool ParseSetAction (jsonxx::Object param, std::string &elementId, std::string &attribute, std::string &value)
 
bool Delete (std::string &elementId)
 Experimental editor functions.
 
bool Drag (std::string &elementId, int x, int y)
 
bool KeyDown (std::string &elementId, int key, bool shiftKey, bool ctrlKey)
 
bool Insert (std::string &elementType, std::string const &startid, std::string const &endid)
 
bool Insert (std::string &elementType, std::string const &startid)
 
bool Set (std::string &elementId, std::string const &attribute, std::string const &value)
 

Protected Attributes

std::string m_chainedId
 
bool m_undoPrepared
 
std::deque< std::string > m_undoStack
 
std::deque< std::string > m_redoStack
 
size_t m_undoMemoryUsage = 0
 
EditorTreeObjectm_scoreContext
 
EditorTreeObjectm_sectionContext
 
EditorTreeObjectm_currentContext
 
- Protected Attributes inherited from vrv::EditorToolkit
Docm_doc
 
Viewm_view
 
jsonxx::Object m_editInfo
 

The documentation for this class was generated from the following file: