AspectKeyPressed Class Template Reference
[Aspect Classes]

Aspect class used by Widgets that have the possibility of trapping "key pressed events". More...

Inherited by WidgetComboBox, WidgetDataGrid, WidgetDateTimePicker, WidgetSlider, WidgetSpinner, WidgetTextBox, WidgetTextBox< EventHandlerClass, MessageMapPolicy >, WidgetTextBox< EventHandlerClass, MessageMapPolicy, SmartWin::RichTextBox< EventHandlerClass, MessageMapPolicy > >, WidgetTextBox< Parent, MessageMapPolicy >, WidgetWindowBase, WidgetWindowBase< EventHandlerClass, SmartWin::MessageMapPolicyDialogWidget >, WidgetWindowBase< EventHandlerClass, SmartWin::MessageMapPolicyModalDialogWidget >, and WidgetWindowBase< EventHandlerClass, unUsed >.

List of all members.

Public Member Functions

bool getCapsLockOn ()
 Checks if Caps Lock is on.
bool getControlPressed ()
 Checks if control is pressed.
bool getShiftPressed ()
 Checks if shift is pressed.
void onKeyPressed (typename MessageMapType::itsBoolFunctionTakingInt eventHandler)
 Setting the event handler for the "key pressed" event.

Static Public Member Functions

static char virtualKeyToChar (int vkey)
 Get ascii character from a Virtual Key.


Detailed Description

template<class EventHandlerClass, class WidgetType, class MessageMapType>
class SmartWin::AspectKeyPressed< EventHandlerClass, WidgetType, MessageMapType >

Aspect class used by Widgets that have the possibility of trapping "key pressed events".

E.g. the WidgetDataGrid can trap "key pressed events" therefore they realize the AspectKeyPressed through inheritance.


Member Function Documentation

bool getCapsLockOn (  ) 

Checks if Caps Lock is on.

Use this function if you need to determine if Caps Lock is ON

bool getControlPressed (  ) 

Checks if control is pressed.

Use this function if you need to determine if any of the CTRL keys are pressed.

bool getShiftPressed (  ) 

Checks if shift is pressed.

Use this function if you need to determine if any of the SHIFT keys are pressed.

char virtualKeyToChar ( int  vkey  )  [static]

Get ascii character from a Virtual Key.

Use this to convert from the input to the response to onKeyPressed to a character.
Virtual Keys do not take into account the shift status of the keyboard, and always report UPPERCASE letters.

Back to SmartWin website
SourceForge.net Logo