ApplicationCommandTarget::InvocationInfo Struct Reference

List of all members.

Public Types

enum  InvocationMethod { direct = 0, fromKeyPress, fromMenu, fromButton }
 The types of context in which the command might be called. More...

Public Member Functions

 InvocationInfo (const CommandID commandID) throw ()

Public Attributes

CommandID commandID
 The UID of the command that should be performed.
int commandFlags
 The command's flags.
InvocationMethod invocationMethod
 The type of event that triggered this command.
ComponentoriginatingComponent
 If triggered by a keypress or menu, this will be the component that had the keyboard focus at the time.
KeyPress keyPress
 The keypress that was used to invoke it.
bool isKeyDown
 True if the callback is being invoked when the key is pressed, false if the key is being released.
int millisecsSinceKeyPressed
 If the key is being released, this indicates how long it had been held down for.

Member Enumeration Documentation

enum ApplicationCommandTarget::InvocationInfo::InvocationMethod
 

The types of context in which the command might be called.

Enumerator:
direct  The command is being invoked directly by a piece of code.
fromKeyPress  The command is being invoked by a key-press.
fromMenu  The command is being invoked by a menu selection.
fromButton  The command is being invoked by a button click.


Constructor & Destructor Documentation

ApplicationCommandTarget::InvocationInfo::InvocationInfo const CommandID  commandID  )  throw ()
 


Member Data Documentation

CommandID ApplicationCommandTarget::InvocationInfo::commandID
 

The UID of the command that should be performed.

int ApplicationCommandTarget::InvocationInfo::commandFlags
 

The command's flags.

See ApplicationCommandInfo for a description of these flag values.

InvocationMethod ApplicationCommandTarget::InvocationInfo::invocationMethod
 

The type of event that triggered this command.

Component* ApplicationCommandTarget::InvocationInfo::originatingComponent
 

If triggered by a keypress or menu, this will be the component that had the keyboard focus at the time.

If triggered by a button, it may be set to that component, or it may be null.

KeyPress ApplicationCommandTarget::InvocationInfo::keyPress
 

The keypress that was used to invoke it.

Note that this will be an invalid keypress if the command was invoked by some other means than a keyboard shortcut.

bool ApplicationCommandTarget::InvocationInfo::isKeyDown
 

True if the callback is being invoked when the key is pressed, false if the key is being released.

See also:
KeyPressMappingSet::addCommand()

int ApplicationCommandTarget::InvocationInfo::millisecsSinceKeyPressed
 

If the key is being released, this indicates how long it had been held down for.

(Only relevant if isKeyDown is false.)


The documentation for this struct was generated from the following file: