8 #ifndef __VRV_EDITOR_TOOLKIT_CMN_H__
9 #define __VRV_EDITOR_TOOLKIT_CMN_H__
19 #include "editortoolkit_shared.h"
26 class EditorTreeObject;
38 #ifndef NO_EDIT_SUPPORT
39 bool ParseEditorCMNAction(
const jsonxx::Object &json_editorAction);
42 enum CursorInsertType : int8_t {
43 CURSOR_INSERT_NONE = 0,
49 enum CursorContainer : int8_t { CURSOR_CONTAINER_NONE = 0, CURSOR_CONTAINER_TUPLET, CURSOR_CONTAINER_GRACEGRP };
56 bool ParseInsertCursorByPitchAction(
57 const jsonxx::Object ¶m, data_PITCHNAME &pname,
int &oct, data_ACCIDENTAL_WRITTEN &accid,
int &midi);
58 bool ParseInsertCursorByTypeAction(
const jsonxx::Object ¶m, CursorInsertType &insertType);
59 bool ParseInsertCursorContainerAction(
const jsonxx::Object ¶m, CursorContainer &container);
60 bool ParseInsertMeasureAction(
const jsonxx::Object ¶m, std::string &elementId,
int &number,
bool &insertBefore);
61 bool ParseInsertNoteAction(
const jsonxx::Object ¶m, std::string &elementId, data_PITCHNAME &pname,
int &oct,
62 data_ACCIDENTAL_WRITTEN &accid, data_ACCIDENTAL_GESTURAL &accidGes, data_DURATION &dur,
int &dots,
64 bool ParseInsertRestAction(
const jsonxx::Object ¶m, std::string &elementId, data_DURATION &dur,
int &dots);
65 bool ParseResetCursorContainerAction(
const jsonxx::Object ¶m, CursorContainer &container);
67 bool InsertCursorByDur(data_DURATION dur,
int dots);
68 bool InsertCursorByPitch(data_PITCHNAME pname,
int oct, data_ACCIDENTAL_WRITTEN accid,
int midi);
69 bool InsertCursorByType(CursorInsertType insertType);
70 bool InsertCursorContainer(CursorContainer container);
71 bool InsertMeasure(std::string &elementId,
int number,
bool insertBefore);
72 bool InsertNote(
const std::string &elementId, data_PITCHNAME pname,
int oct, data_ACCIDENTAL_WRITTEN accid,
73 data_ACCIDENTAL_GESTURAL accidGes, data_DURATION dur,
int dots,
bool chordMode);
74 bool InsertRest(
const std::string &elementId, data_DURATION dur,
int dots);
75 bool ResetCursorContainer(CursorContainer container);
78 bool InsertNoteInChordMode(
const std::string &elementId, data_PITCHNAME pname,
int oct,
79 data_ACCIDENTAL_WRITTEN accid, data_ACCIDENTAL_GESTURAL accidGes);
80 void SetNoteAttributes(
81 Note *note, data_PITCHNAME pname,
int oct, data_ACCIDENTAL_WRITTEN accid, data_ACCIDENTAL_GESTURAL accidGes);
83 bool CopyCursorPosition(data_DURATION dur,
int dots,
bool tie);
84 std::pair<Object *, Object *> GetTargetContainerFor(
Object *target);
85 void TieElements(
const Object *start,
const Object *end);
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition: doc.h:41
This class is a base class for the Layer (<layer>) content.
Definition: layerelement.h:51
This class models the MEI <note> element.
Definition: note.h:69
This class represents a basic object.
Definition: object.h:66
This class is a drawing context and corresponds to the view of a MVC design pattern.
Definition: view.h:109