#include <action.h>
Collaboration diagram for Action:
Public Types | |
enum | Type { INTERN, EXTERN, SEQUENCE, UNKNOWN } |
Public Member Functions | |
Action (string id, ToPerform toPerform, IsValid isValid, Type type=INTERN, char *argument=0) | |
~Action () | |
string | id () const |
unsigned int | promptsCount () const |
void | perform () |
bool | isValid () |
IsValid | getIsValid () const |
void | setShortcut (Shortcut *shortcut) |
Shortcut * | shortcut () const |
void | setArgument (char *argument) |
char * | argument () const |
Type | type () const |
void | setType (Type type) |
Prompt * | prompt (unsigned int index) |
LPrompt * | prompts () |
ToPerform | getToPerform () const |
void | setListenOn (Shortcut *listenOn) |
Shortcut * | listenOn () const |
Private Attributes | |
string | id_ |
ToPerform | toPerform_ |
IsValid | isValid_ |
Shortcut * | shortcut_ |
Shortcut * | listenOn_ |
char * | argument_ |
Type | type_ |
LPrompt | prompts_ |
Definition at line 30 of file action.h.
enum Action::Type |
Action::Action | ( | string | id, | |
ToPerform | toPerform, | |||
IsValid | isValid, | |||
Type | type = INTERN , |
|||
char * | argument = 0 | |||
) |
Definition at line 17 of file action.cpp.
References argument_, id_, isValid_, listenOn_, shortcut_, toPerform_, and type_.
Referenced by perform().
Action::~Action | ( | ) |
string Action::id | ( | ) | const |
Definition at line 88 of file action.cpp.
References id_.
Referenced by Actions::createAction(), Launcher::execSeq(), and Binder::handleShortcutChains().
unsigned int Action::promptsCount | ( | ) | const |
Definition at line 92 of file action.cpp.
References prompts_.
Referenced by Launcher::execSeq(), InputBar::handlePressedReturn(), and Binder::handleShortcutChains().
void Action::perform | ( | ) |
Performs the action.
Definition at line 35 of file action.cpp.
References Action(), argument_, Actions::cycleClientNext(), Actions::cycleClientPrev(), Actions::endChainRecord(), Actions::endScriptRecord(), id_, Actions::inputMode(), Singleton< Actions >::instance(), Monitor::isThingMaximized(), isValid(), KERNEL, Actions::toggleBar(), Actions::toggleMaximization(), Monitor::toggleThingMaximization(), toPerform_, and type_.
Referenced by Launcher::execSeq(), Menu::handleButtonPress(), InputBar::handlePressedReturn(), Binder::handleShortcutChains(), and Kernel::start().
Here is the call graph for this function:
bool Action::isValid | ( | ) |
Returns true
if the actions is possible.
Definition at line 66 of file action.cpp.
References Singleton< Validators >::instance(), and isValid_.
Referenced by Launcher::execSeq(), Menu::handleButtonPress(), perform(), and InputBar::runArgument().
Here is the call graph for this function:
IsValid Action::getIsValid | ( | ) | const |
Returns the is possible method pointer.
Definition at line 97 of file action.cpp.
References isValid_.
Referenced by Kernel::endChainRecording(), and Kernel::initActionBindings().
void Action::setShortcut | ( | Shortcut * | shortcut | ) |
Definition at line 101 of file action.cpp.
References listenOn_, shortcut(), and shortcut_.
Referenced by Kernel::bindShortcut(), and Kernel::initActionBindings().
Here is the call graph for this function:
Shortcut * Action::shortcut | ( | ) | const |
Definition at line 106 of file action.cpp.
References shortcut_.
Referenced by Kernel::bindShortcut(), and setShortcut().
void Action::setArgument | ( | char * | argument | ) |
Definition at line 110 of file action.cpp.
References argument_.
Referenced by Launcher::execSeq(), InputBar::handlePressedReturn(), and Kernel::handlePropertyNotify().
char * Action::argument | ( | ) | const |
Action::Type Action::type | ( | ) | const |
Definition at line 118 of file action.cpp.
References type_.
Referenced by Kernel::bindShortcut(), Actions::destroyAction(), and Binder::queryExternChainActionsForPattern().
void Action::setType | ( | Type | type | ) |
Prompt * Action::prompt | ( | unsigned int | index | ) |
Returns prompt for argument at position 'index'.
Definition at line 72 of file action.cpp.
References prompts_.
Referenced by InputBar::handlePressedReturn(), and InputBar::runArgument().
LPrompt * Action::prompts | ( | ) |
Definition at line 127 of file action.cpp.
References prompts_.
Referenced by Actions::initInternActions().
ToPerform Action::getToPerform | ( | ) | const |
Definition at line 131 of file action.cpp.
References toPerform_.
Referenced by InputBar::handlePressedReturn().
void Action::setListenOn | ( | Shortcut * | listenOn | ) |
Definition at line 135 of file action.cpp.
References listenOn(), and listenOn_.
Referenced by Binder::handleShortcutChains().
Here is the call graph for this function:
Shortcut * Action::listenOn | ( | ) | const |
Definition at line 139 of file action.cpp.
References listenOn_.
Referenced by Kernel::bindShortcut(), Binder::handleShortcutChains(), and setListenOn().
string Action::id_ [private] |
ToPerform Action::toPerform_ [private] |
IsValid Action::isValid_ [private] |
Shortcut* Action::shortcut_ [private] |
Shortcut* Action::listenOn_ [private] |
Definition at line 86 of file action.h.
Referenced by Action(), listenOn(), setListenOn(), and setShortcut().
char* Action::argument_ [private] |
Definition at line 89 of file action.h.
Referenced by Action(), argument(), perform(), setArgument(), and ~Action().
Type Action::type_ [private] |
LPrompt Action::prompts_ [private] |