Lomse library. API documentation
0.30.0
|
#include <lomse_command.h>
A command for changing the value of an attribute.
See constructors for details. There is a constructor for each type of value (string, double, int or colour).
Public Member Functions | |
CmdChangeAttribute (ImoObj *pImo, EImoAttribute attrb, const std::string &value, const std::string &cmdName="") | |
CmdChangeAttribute (ImoObj *pImo, EImoAttribute attrb, double value, const std::string &cmdName="") | |
CmdChangeAttribute (ImoObj *pImo, EImoAttribute attrb, int value, const std::string &cmdName="") | |
CmdChangeAttribute (ImoObj *pImo, EImoAttribute attrb, Color value, const std::string &cmdName="") | |
virtual | ~CmdChangeAttribute () |
int | get_cursor_update_policy () override |
int | get_undo_policy () override |
int | get_selection_update_policy () override |
CmdChangeAttribute (EImoAttribute attrb, const std::string &value, const std::string &cmdName="") | |
CmdChangeAttribute (EImoAttribute attrb, double value, const std::string &cmdName="") | |
CmdChangeAttribute (EImoAttribute attrb, int value, const std::string &cmdName="") | |
CmdChangeAttribute (EImoAttribute attrb, Color value, const std::string &cmdName="") | |
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 |
CmdChangeAttribute::CmdChangeAttribute | ( | EImoAttribute | attrb, |
const std::string & | value, | ||
const std::string & | cmdName = "" |
||
) |
This command changes the value of an attribute on cursor pointed object.
attrb | The attribute whose value is going to be changed. It must be a value from enum EImoAttribute. |
value | The new value for the attribute. |
cmdName | The displayable name for the command. If not specified or empty will default to "Change attribute". |
Remarks
CmdChangeAttribute::CmdChangeAttribute | ( | EImoAttribute | attrb, |
double | value, | ||
const std::string & | cmdName = "" |
||
) |
This command changes the value of an attribute on cursor pointed object.
attrb | The attribute whose value is going to be changed. It must be a value from enum EImoAttribute. |
value | The new value for the attribute. |
cmdName | The displayable name for the command. If not specified or empty will default to "Change attribute". |
Remarks
CmdChangeAttribute::CmdChangeAttribute | ( | EImoAttribute | attrb, |
int | value, | ||
const std::string & | cmdName = "" |
||
) |
This command changes the value of an attribute on cursor pointed object.
attrb | The attribute whose value is going to be changed. It must be a value from enum EImoAttribute. |
value | The new value for the attribute. |
cmdName | The displayable name for the command. If not specified or empty will default to "Change attribute". |
Remarks
CmdChangeAttribute::CmdChangeAttribute | ( | EImoAttribute | attrb, |
Color | value, | ||
const std::string & | cmdName = "" |
||
) |
This command changes the value of an attribute on cursor pointed object.
attrb | The attribute whose value is going to be changed. It must be a value from enum EImoAttribute. |
value | The new value for the attribute. |
cmdName | The displayable name for the command. If not specified or empty will default to "Change attribute". |
Remarks
CmdChangeAttribute::CmdChangeAttribute | ( | ImoObj * | pImo, |
EImoAttribute | attrb, | ||
const std::string & | value, | ||
const std::string & | cmdName = "" |
||
) |
This command changes the value of an attribute in the passed object.
pImo | Pointer to the object whose attribute is going to be changed. |
attrb | The attribute whose value is going to be changed. It must be a value from enum EImoAttribute. |
value | An string with the new value for the attribute. |
cmdName | The displayable name for the command. If not specified or empty will default to "Change attribute". |
Remarks
Example
CmdChangeAttribute::CmdChangeAttribute | ( | ImoObj * | pImo, |
EImoAttribute | attrb, | ||
double | value, | ||
const std::string & | cmdName = "" |
||
) |
This command changes the value of an attribute in the passed object.
pImo | Pointer to the object whose attribute is going to be changed. |
attrb | The attribute whose value is going to be changed. It must be a value from enum EImoAttribute. |
value | A double number with the new value for the attribute. |
cmdName | The displayable name for the command. If not specified or empty will default to "Change attribute". |
Remarks
CmdChangeAttribute::CmdChangeAttribute | ( | ImoObj * | pImo, |
EImoAttribute | attrb, | ||
int | value, | ||
const std::string & | cmdName = "" |
||
) |
This command changes the value of an attribute in the passed object.
pImo | Pointer to the object whose attribute is going to be changed. |
attrb | The attribute whose value is going to be changed. It must be a value from enum EImoAttribute. |
value | An int number with the new value for the attribute. |
cmdName | The displayable name for the command. If not specified or empty will default to "Change attribute". |
Remarks
CmdChangeAttribute::CmdChangeAttribute | ( | ImoObj * | pImo, |
EImoAttribute | attrb, | ||
Color | value, | ||
const std::string & | cmdName = "" |
||
) |
This command changes the value of an attribute in the passed object.
pImo | Pointer to the object whose attribute is going to be changed. |
attrb | The attribute whose value is going to be changed. It must be a value from enum EImoAttribute. |
value | The new Color value for the attribute. |
cmdName | The displayable name for the command. If not specified or empty will default to "Change attribute". |
Remarks
|
inlinevirtual |
Destructor.
|
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.