| Linderdaum Engine: clEditor Class Reference | ![]() |
High-level editing process control. More...
#include <Edit.h>
Public Member Functions | |
| clEditor () | |
| virtual | ~clEditor () |
| bool | SelectByName (const std::string &ID) |
| Select a single object by name. False if object not found. | |
| void | Select (iObject *Obj) |
| Select a single object. | |
| void | Unselect () |
| Clear current selection. | |
| iObject * | GetSelection () const |
| Get current selection as it is (iObject or SelectionGroup) | |
| iObject * | GetEditableObject () const |
| If the group is selected, an editable proxy is returned. | |
| bool | SelectGroup (const std::vector< std::string > &IDs) |
| Create a group selection object. False if some objects are not found. | |
| clSelectionGroup * | CreateSelectionGroup () |
| Shortcut to the Linker->Create() for SelectionGroup. Also assigns owner for the created group. | |
| void | ObjectChanged (iObject *Obj) |
| Inform the editor about some unregistered object change. | |
| void | SetToolType (const std::string &ToolType) |
| Change current tool. | |
| void | SetTool (iObject *T) |
| Set concrete tool using current selection. | |
| iTool * | GetTool () const |
| Return active tool. | |
| bool | CanUndo () |
| Can the "Undo" action be done. | |
| bool | CanRedo () |
| Can the "Redo" action be done. | |
| void | Undo () |
| Undo last transaction. | |
| void | Redo () |
| Redo last transaction. | |
| int | GetCurrentTransaction () const |
| Current transaction index. | |
| size_t | GetTransactionCount () const |
| iTransaction * | GetTransaction (int i) const |
| iTransaction * | MakeTransaction (const std::string &TransType) |
| Make a transaction and store it in internal list. | |
Private Member Functions | |
| void | RegisterCommands () |
| void | UnregisterCommands () |
| void | SelectC (const std::string &Cmd) |
| Command handlers. No script yet, so we just use old-school cmds. | |
| void | UnselectC (const std::string &Cmd) |
| void | SetToolC (const std::string &Cmd) |
Private Attributes | |
| iObject * | FSelectedObject |
| Currently selected object. | |
| iTool * | FCurrentTool |
| Currently active tool. | |
| LArray< iTransaction * > | FTransactions |
| List of transactions made. | |
| int | FCurrentTransaction |
High-level editing process control.
This class controls changes of any property and provides facilities for object selection.
LEditor is not a visual component, it is just a selection/tool state holder
| clEditor::clEditor | ( | ) |
| clEditor::~clEditor | ( | ) | [virtual] |
| bool clEditor::CanRedo | ( | ) |
Can the "Redo" action be done.
| bool clEditor::CanUndo | ( | ) |
Can the "Undo" action be done.
| clSelectionGroup * clEditor::CreateSelectionGroup | ( | ) |
Shortcut to the Linker->Create() for SelectionGroup. Also assigns owner for the created group.
| int clEditor::GetCurrentTransaction | ( | ) | const [inline] |
Current transaction index.
| iObject * clEditor::GetEditableObject | ( | ) | const |
If the group is selected, an editable proxy is returned.
| iObject* clEditor::GetSelection | ( | ) | const [inline] |
Get current selection as it is (iObject or SelectionGroup)
| iTool* clEditor::GetTool | ( | ) | const [inline] |
Return active tool.
| iTransaction* clEditor::GetTransaction | ( | int | i | ) | const [inline] |
| size_t clEditor::GetTransactionCount | ( | ) | const [inline] |
| iTransaction * clEditor::MakeTransaction | ( | const std::string & | TransType | ) |
Make a transaction and store it in internal list.
| void clEditor::ObjectChanged | ( | iObject * | Obj | ) |
Inform the editor about some unregistered object change.
handle object change. maybe inform the owner ?
| void clEditor::Redo | ( | ) |
Redo last transaction.
| void clEditor::RegisterCommands | ( | ) | [private] |
| void clEditor::Select | ( | iObject * | Obj | ) |
Select a single object.
| bool clEditor::SelectByName | ( | const std::string & | ID | ) |
Select a single object by name. False if object not found.
| void clEditor::SelectC | ( | const std::string & | Cmd | ) | [private] |
Command handlers. No script yet, so we just use old-school cmds.
| bool clEditor::SelectGroup | ( | const std::vector< std::string > & | IDs | ) |
Create a group selection object. False if some objects are not found.
| void clEditor::SetTool | ( | iObject * | T | ) |
Set concrete tool using current selection.
| void clEditor::SetToolC | ( | const std::string & | Cmd | ) | [private] |
| void clEditor::SetToolType | ( | const std::string & | ToolType | ) |
Change current tool.
| void clEditor::Undo | ( | ) |
Undo last transaction.
| void clEditor::UnregisterCommands | ( | ) | [private] |
| void clEditor::Unselect | ( | ) |
Clear current selection.
| void clEditor::UnselectC | ( | const std::string & | Cmd | ) | [private] |
iTool* clEditor::FCurrentTool [private] |
Currently active tool.
int clEditor::FCurrentTransaction [private] |
iObject* clEditor::FSelectedObject [private] |
Currently selected object.
LArray<iTransaction*> clEditor::FTransactions [private] |
List of transactions made.