![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEUndoList.h>
Data Structures | |
class | CommandGroup |
Public Member Functions | |
GNEUndoList (GNEApplicationWindow *parent) | |
constructor More... | |
bool | hasCommandGroup () const |
void | p_abort () |
reverts and discards ALL active command groups More... | |
void | p_add (GNEChange_Attribute *cmd) |
special method, avoid empty changes, always execute More... | |
void | p_begin (const std::string &description) |
void | p_clear () |
void | p_end () |
long | p_onUpdRedo (FXObject *, FXSelector, void *) |
long | p_onUpdUndo (FXObject *, FXSelector, void *) |
void | redo () |
redo the last command group More... | |
void | undo () |
undo the last command group More... | |
Private Attributes | |
std::stack< CommandGroup * > | myCommandGroups |
GNEApplicationWindow *const | myParent |
Definition at line 55 of file GNEUndoList.h.
|
inline |
constructor
Definition at line 63 of file GNEUndoList.h.
References p_abort(), p_add(), p_begin(), p_clear(), p_end(), p_onUpdRedo(), p_onUpdUndo(), redo(), and undo().
|
inline |
Definition at line 111 of file GNEUndoList.h.
References myCommandGroups.
Referenced by GNEJunction::invalidateTLS(), GNEViewNet::onLeftBtnPress(), p_abort(), p_onUpdRedo(), p_onUpdUndo(), and GNEJunction::setLogicValid().
void GNEUndoList::p_abort | ( | ) |
reverts and discards ALL active command groups
Definition at line 96 of file GNEUndoList.cpp.
References hasCommandGroup(), and myCommandGroups.
Referenced by GNEViewNet::abortOperation(), GNEUndoList(), GNEConnector::onCmdCancel(), GNETLSEditor::onCmdCancel(), and p_clear().
void GNEUndoList::p_add | ( | GNEChange_Attribute * | cmd | ) |
special method, avoid empty changes, always execute
Definition at line 120 of file GNEUndoList.cpp.
References GNEChange_Attribute::trueChange().
Referenced by GNEUndoList(), GNELane::setAttribute(), and GNEEdge::setAttribute().
void GNEUndoList::p_begin | ( | const std::string & | description | ) |
Begin undo command sub-group. This begins a new group of commands that are treated as a single command. Must eventually be followed by a matching end() after recording the sub-commands. The new sub-group will be appended to its parent group's undo list when end() is called.
Definition at line 75 of file GNEUndoList.cpp.
Referenced by GNENet::addReversedEdge(), GNEEdge::copyTemplate(), GNENet::createEdge(), GNENet::deleteEdge(), GNENet::deleteJunction(), GNENet::deleteLane(), GNEViewNet::deleteSelectedEdges(), GNEViewNet::deleteSelectedJunctions(), GNENet::duplicateLane(), GNETLSEditor::editJunction(), GNENet::finishMoveSelection(), GNEUndoList(), GNESelector::handleIDs(), GNEConnector::handleLaneClick(), GNEViewNet::hotkeyDel(), GNENet::joinSelectedJunctions(), GNENet::mergeJunctions(), GNEConnector::onCmdClearSelectedConnections(), GNEViewNet::onCmdDuplicateLane(), GNEConnector::onCmdResetSelectedConnections(), GNEInspector::AttrInput::onCmdSetAttribute(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onLeftBtnPress(), GNENet::removeSolitaryJunctions(), GNENet::replaceJunctionByGeometry(), GNENet::reverseEdge(), GNEJunction::setAttribute(), GNEEdge::setAttribute(), GNEEdge::setEndpoint(), GNEEdge::setNumLanes(), GNENet::splitEdge(), and GNENet::splitEdgesBidi().
void GNEUndoList::p_clear | ( | ) |
clears the undo list (implies abort)
Definition at line 89 of file GNEUndoList.cpp.
References p_abort().
Referenced by GNEApplicationWindow::closeAllWindows(), GNEApplicationWindow::continueWithUnsavedChanges(), and GNEUndoList().
void GNEUndoList::p_end | ( | ) |
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
Definition at line 82 of file GNEUndoList.cpp.
References myCommandGroups.
Referenced by GNENet::addReversedEdge(), GNEEdge::copyTemplate(), GNENet::createEdge(), GNENet::deleteEdge(), GNENet::deleteJunction(), GNENet::deleteLane(), GNEViewNet::deleteSelectedEdges(), GNEViewNet::deleteSelectedJunctions(), GNENet::duplicateLane(), GNENet::finishMoveSelection(), GNEUndoList(), GNESelector::handleIDs(), GNEViewNet::hotkeyDel(), GNENet::joinSelectedJunctions(), GNENet::mergeJunctions(), GNEConnector::onCmdClearSelectedConnections(), GNEViewNet::onCmdDuplicateLane(), GNEConnector::onCmdOK(), GNETLSEditor::onCmdOK(), GNEConnector::onCmdResetSelectedConnections(), GNEInspector::AttrInput::onCmdSetAttribute(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onLeftBtnPress(), GNENet::removeSolitaryJunctions(), GNENet::replaceJunctionByGeometry(), GNEJunction::setAttribute(), GNEEdge::setAttribute(), GNEEdge::setEndpoint(), GNEEdge::setNumLanes(), and GNENet::splitEdgesBidi().
long GNEUndoList::p_onUpdRedo | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
Definition at line 147 of file GNEUndoList.cpp.
References hasCommandGroup(), and myCommandGroups.
Referenced by GNEUndoList().
long GNEUndoList::p_onUpdUndo | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
Definition at line 129 of file GNEUndoList.cpp.
References hasCommandGroup(), and myCommandGroups.
Referenced by GNEUndoList().
void GNEUndoList::redo | ( | ) |
redo the last command group
Definition at line 113 of file GNEUndoList.cpp.
References myParent, and GNEApplicationWindow::updateControls().
Referenced by GNEUndoList().
void GNEUndoList::undo | ( | ) |
undo the last command group
Definition at line 106 of file GNEUndoList.cpp.
References myParent, and GNEApplicationWindow::updateControls().
Referenced by GNEUndoList().
|
private |
Definition at line 136 of file GNEUndoList.h.
Referenced by hasCommandGroup(), p_abort(), p_end(), p_onUpdRedo(), and p_onUpdUndo().
|
private |
Definition at line 139 of file GNEUndoList.h.