Lomse library. API documentation
0.30.0
|
#include <lomse_command.h>
A command for adding a note to an existing note and thus to create a chord, or for adding a note to an existing chord.
See constructor for details.
Public Member Functions | |
CmdAddChordNote (const std::string &pitch, const std::string &name="Add chord note") | |
int | get_cursor_update_policy () override |
int | get_undo_policy () override |
int | get_selection_update_policy () override |
Public Member Functions inherited from DocCmdSimple | |
virtual | ~DocCmdSimple () |
bool | is_composite () override |
Public Member Functions inherited from DocCommand | |
virtual | ~DocCommand () |
std::string | get_name () |
bool | is_reversible () |
bool | is_recordable () |
std::string | get_error () |
Additional Inherited Members | |
Public Types inherited from DocCommand | |
enum | ECmdCursorPolicy |
enum | ECmdUndoPolicy |
enum | ECmdSelectionPolicy |
CmdAddChordNote::CmdAddChordNote | ( | const std::string & | pitch, |
const std::string & | name = "Add chord note" |
||
) |
This command adds a new note to an existing note or chord. If the selected note prior to executing this command is not in a chord, a new chord will be created by combining this new note with the existing one. Otherwise, if the selected note is part of a chord, the new note is also added to the existing chord.
pitch | A string with the pitch for the note to insert. The pitch must be in LDP format (step letter followed by octave, e.g. "c4", "b6", "f3"). Octave numbers are the same than in MIDI format, that is, octave 4 is the central one (a4 is 440Hz). |
name | The displayable name for the command. If not specified will default to "Add chord note". |
Remarks
Example
Consider an edition application in which the expected user interaction pattern is as follows:
|
inlineoverridevirtual |
Returns a value from ECmdCursorPolicy that indicates the update policy followed by this command.
Implements DocCommand.
|
inlineoverridevirtual |
Returns a value from ECmdSelectionPolicy that indicates the undo policy followed by this command.
Implements DocCommand.
|
inlineoverridevirtual |
Returns a value from ECmdUndoPolicy that indicates the undo policy followed by this command.
Implements DocCommand.