Action Class Reference

#include <action.h>

Collaboration diagram for Action:

Collaboration graph
[legend]
List of all members.

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)
Shortcutshortcut () const
void setArgument (char *argument)
char * argument () const
Type type () const
void setType (Type type)
Promptprompt (unsigned int index)
LPromptprompts ()
ToPerform getToPerform () const
void setListenOn (Shortcut *listenOn)
ShortcutlistenOn () const

Private Attributes

string id_
ToPerform toPerform_
IsValid isValid_
Shortcutshortcut_
ShortcutlistenOn_
char * argument_
Type type_
LPrompt prompts_

Detailed Description

Interface for all actions which will be performed by NCWM.

Definition at line 30 of file action.h.


Member Enumeration Documentation

enum Action::Type

Enumerator:
INTERN 
EXTERN 
SEQUENCE 
UNKNOWN 

Definition at line 35 of file action.h.


Constructor & Destructor Documentation

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 (  ) 

Definition at line 29 of file action.cpp.

References argument_.


Member Function Documentation

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

Definition at line 114 of file action.cpp.

References argument_.

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  ) 

Definition at line 122 of file action.cpp.

References 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().


Member Data Documentation

string Action::id_ [private]

Definition at line 80 of file action.h.

Referenced by Action(), id(), and perform().

ToPerform Action::toPerform_ [private]

Definition at line 81 of file action.h.

Referenced by Action(), getToPerform(), and perform().

IsValid Action::isValid_ [private]

Definition at line 82 of file action.h.

Referenced by Action(), getIsValid(), and isValid().

Shortcut* Action::shortcut_ [private]

Definition at line 85 of file action.h.

Referenced by Action(), setShortcut(), and shortcut().

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]

Definition at line 90 of file action.h.

Referenced by Action(), perform(), setType(), and type().

LPrompt Action::prompts_ [private]

Definition at line 91 of file action.h.

Referenced by prompt(), prompts(), and promptsCount().


The documentation for this class was generated from the following files:
Generated on Thu May 24 15:19:46 2007 for ncwm by  doxygen 1.5.1