Lomse library. API documentation
0.30.0
|
#include <lomse_command.h>
A command for inserting a new block level object (e.g. paragraph, music score, header, etc.).
See constructors for details.
Public Member Functions | |
CmdInsertBlockLevelObj (int type, const std::string &name="") | |
CmdInsertBlockLevelObj (const std::string &source, const std::string &name="") | |
int | get_cursor_update_policy () override |
int | get_undo_policy () override |
int | get_selection_update_policy () override |
Public Member Functions inherited from CmdInsert | |
ImoId | last_inserted_id () |
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 |
CmdInsertBlockLevelObj::CmdInsertBlockLevelObj | ( | int | type, |
const std::string & | name = "" |
||
) |
This command inserts a new block level object (e.g. paragraph, music score, header, etc.).
type | Type of block level object to insert. Must be one of the values for block level objects in enum #EImoObjType. |
name | The displayable name for the command. If not specified or empty will be replaced by the string "Insert " followed by the name of the object, as implied by param type. |
Remarks
Example
Consider an edition application in which the expected user interaction pattern is as follows:
CmdInsertBlockLevelObj::CmdInsertBlockLevelObj | ( | const std::string & | source, |
const std::string & | name = "" |
||
) |
This command inserts a new block level object (e.g. paragraph, music score, header, image, etc.).
source | The source code of the element to insert. It must be in LDP format. |
name | The displayable name for the command. If not specified or empty will be replaced by "Insert block". |
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.