Changeset bcc29ca for src/Actions/CommandAction
- Timestamp:
- Aug 13, 2025, 8:24:42 AM (2 months ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- 780bfa
- Parents:
- 1c355bf
- git-author:
- Frederik Heber <frederik.heber@…> (08/13/25 08:17:04)
- git-committer:
- Frederik Heber <frederik.heber@…> (08/13/25 08:24:42)
- Location:
- src/Actions/CommandAction
- Files:
-
- 3 added
- 9 moved
-
RedoAction.cpp (moved) (moved from src/Actions/RedoAction.cpp ) (1 diff)
-
RedoAction.def (moved) (moved from src/Actions/RedoAction.def )
-
RedoAction.hpp (moved) (moved from src/Actions/RedoAction.hpp )
-
SetUndoMarkAction.cpp (moved) (moved from src/Actions/CommandAction/UndoMarkAction.cpp ) (5 diffs)
-
SetUndoMarkAction.def (moved) (moved from src/Actions/CommandAction/UndoMarkAction.def ) (3 diffs)
-
SetUndoMarkAction.hpp (moved) (moved from src/Actions/CommandAction/UndoMarkAction.hpp ) (3 diffs)
-
UndoAction.cpp (moved) (moved from src/Actions/UndoAction.cpp ) (2 diffs)
-
UndoAction.def (moved) (moved from src/Actions/UndoAction.def ) (2 diffs)
-
UndoAction.hpp (moved) (moved from src/Actions/UndoAction.hpp )
-
UndoTillMarkAction.cpp (added)
-
UndoTillMarkAction.def (added)
-
UndoTillMarkAction.hpp (added)
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/CommandAction/RedoAction.cpp
r1c355bf rbcc29ca 44 44 using namespace MoleCuilder; 45 45 46 #include "Actions/ RedoAction.hpp"46 #include "Actions/CommandAction/RedoAction.hpp" 47 47 48 48 // and construct the stuff -
src/Actions/CommandAction/SetUndoMarkAction.cpp
r1c355bf rbcc29ca 2 2 * Project: MoleCuilder 3 3 * Description: creates and alters molecular systems 4 * Copyright (C) 202 1Frederik Heber. All rights reserved.4 * Copyright (C) 2025 Frederik Heber. All rights reserved. 5 5 * 6 6 * … … 22 22 23 23 /* 24 * UndoMarkAction.cpp24 * SetUndoMarkAction.cpp 25 25 * 26 26 * Created on: Apr 06, 2021 … … 35 35 //#include "CodePatterns/MemDebug.hpp" 36 36 37 #include "Actions/CommandAction/ UndoMarkAction.hpp"37 #include "Actions/CommandAction/SetUndoMarkAction.hpp" 38 38 39 39 #include "Actions/ActionQueue.hpp" … … 42 42 43 43 // and construct the stuff 44 #include " UndoMarkAction.def"44 #include "SetUndoMarkAction.def" 45 45 #include "Action_impl_pre.hpp" 46 46 /** =========== define the function ====================== */ 47 ActionState::ptr Command UndoMarkAction::performCall() {47 ActionState::ptr CommandSetUndoMarkAction::performCall() { 48 48 // set ActionQueue on to last element (hence skipping all in between) 49 49 … … 59 59 } 60 60 61 ActionState::ptr Command UndoMarkAction::performUndo(ActionState::ptr _state) {61 ActionState::ptr CommandSetUndoMarkAction::performUndo(ActionState::ptr _state) { 62 62 return Action::success; 63 63 } 64 64 65 ActionState::ptr Command UndoMarkAction::performRedo(ActionState::ptr _state){65 ActionState::ptr CommandSetUndoMarkAction::performRedo(ActionState::ptr _state){ 66 66 return Action::success; 67 67 } 68 68 69 bool Command UndoMarkAction::canUndo() {69 bool CommandSetUndoMarkAction::canUndo() { 70 70 return false; 71 71 } 72 72 73 bool Command UndoMarkAction::shouldUndo() {73 bool CommandSetUndoMarkAction::shouldUndo() { 74 74 return false; 75 75 } -
src/Actions/CommandAction/SetUndoMarkAction.def
r1c355bf rbcc29ca 1 1 /* 2 * UndoMarkAction.def2 * SetUndoMarkAction.def 3 3 * 4 4 * Created on: Apr 06, 2021 … … 14 14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 15 #define paramtypes (bool) 16 #define paramtokens (" undo-mark")16 #define paramtokens ("set-undo-mark") 17 17 #define paramdescriptions ("whether to set (true) the undo mark or reset (false)") 18 18 #undef paramdefaults … … 27 27 #define MENUNAME "command" 28 28 #define MENUPOSITION 8 29 #define ACTIONNAME UndoMark30 #define TOKEN " undo-mark"29 #define ACTIONNAME SetUndoMark 30 #define TOKEN "set-undo-mark" 31 31 32 32 -
src/Actions/CommandAction/SetUndoMarkAction.hpp
r1c355bf rbcc29ca 1 1 /* 2 * UndoMarkAction.hpp2 * SetUndoMarkAction.hpp 3 3 * 4 4 * Created on: Apr 06, 2021 … … 6 6 */ 7 7 8 #ifndef UNDOMARKACTION_HPP_9 #define UNDOMARKACTION_HPP_8 #ifndef SETUNDOMARKACTION_HPP_ 9 #define SETUNDOMARKACTION_HPP_ 10 10 11 11 // include config.h … … 17 17 #include "Actions/Action.hpp" 18 18 19 #include " UndoMarkAction.def"19 #include "SetUndoMarkAction.def" 20 20 #include "Action_impl_header.hpp" 21 21 22 #endif /* UNDOMARKACTION_HPP_ */22 #endif /* SETUNDOMARKACTION_HPP_ */ -
src/Actions/CommandAction/UndoAction.cpp
r1c355bf rbcc29ca 43 43 using namespace MoleCuilder; 44 44 45 #include "Actions/ UndoAction.hpp"45 #include "Actions/CommandAction/UndoAction.hpp" 46 46 47 47 // and construct the stuff … … 52 52 ActionState::ptr UndoAction::performCall(){ 53 53 // std::cout << "Undo" << std::endl; 54 if (params.undoTillMark.get()) 55 ActionQueue::getInstance().undoTillMark(); 56 else 57 ActionQueue::getInstance().undoLast(); 54 ActionQueue::getInstance().undoLast(); 58 55 return Action::success; 59 56 } -
src/Actions/CommandAction/UndoAction.def
r1c355bf rbcc29ca 13 13 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 14 14 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 15 #define paramtypes (bool) 16 #define paramtokens ("till-mark") 17 #define paramdescriptions ("whether to undo just a single step (false) or until a previously set mark (true)") 18 #define paramdefaults (PARAM_DEFAULT(false)) 19 #define paramreferences (undoTillMark) 20 #define paramvalids (DummyValidator<bool>()) 15 #undef paramtypes 16 #undef paramreferences 17 #undef paramtokens 18 #undef paramdescriptions 19 #undef paramdefaults 21 20 22 21 // some defines for all the names, you may use ACTION, STATE and PARAMS … … 28 27 29 28 // finally the information stored in the ActionTrait specialization 30 #define DESCRIPTION "undo last action or until a given mark"29 #define DESCRIPTION "undo last action" 31 30 #undef SHORTFORM
Note:
See TracChangeset
for help on using the changeset viewer.
