Lomse library. API documentation  0.30.0
CmdDeleteBlockLevelObj Class Reference

#include <lomse_command.h>

Inheritance diagram for CmdDeleteBlockLevelObj:
CmdDelete DocCmdSimple DocCommand

Detailed Description

A command for deleting a block level object (e.g. paragraph, music score, header, etc.).

See constructor for details.

Public Member Functions

 CmdDeleteBlockLevelObj (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 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
 

Constructor & Destructor Documentation

◆ CmdDeleteBlockLevelObj()

CmdDeleteBlockLevelObj::CmdDeleteBlockLevelObj ( const std::string &  name = "")

This command deletes the block level object (e.g. paragraph, music score, header, etc.) pointed by the cursor.

Parameters
nameThe displayable name for the command. If not specified or empty will default to string "Delete " followed by the name of the object to delete.

Remarks

  • If object pointed by cursor is not valid (e.g. nullptr or not block level object), the command will not be executed and will return a failure code.
  • After executing the command:
    • the selection will not be changed.
    • the cursor will point to the object after the deleted one.

Member Function Documentation

◆ get_cursor_update_policy()

int CmdDeleteBlockLevelObj::get_cursor_update_policy ( )
inlineoverridevirtual

Returns a value from ECmdCursorPolicy that indicates the update policy followed by this command.

Implements DocCommand.

◆ get_selection_update_policy()

int CmdDeleteBlockLevelObj::get_selection_update_policy ( )
inlineoverridevirtual

Returns a value from ECmdSelectionPolicy that indicates the undo policy followed by this command.

Implements DocCommand.

◆ get_undo_policy()

int CmdDeleteBlockLevelObj::get_undo_policy ( )
inlineoverridevirtual

Returns a value from ECmdUndoPolicy that indicates the undo policy followed by this command.

Implements DocCommand.