AspectChar Class Template Reference
[Aspect Classes]

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

Inherited by 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

void onChar (typename MessageMapType::itsBoolFunctionTakingInt eventHandler)
 Setting the event handler for the "char" event.


Detailed Description

template<class WindowOriginalType, class WidgetType, class MessageMapType>
class SmartWin::AspectChar< WindowOriginalType, WidgetType, MessageMapType >

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

E.g. the WidgetTextBox can trap "char events" therefore they realize the AspectChar through inheritance.


Member Function Documentation

void onChar ( typename MessageMapType::itsBoolFunctionTakingInt  eventHandler  ) 

Setting the event handler for the "char" event.

If supplied event handler is called when control has the focus and character event occurs
parameter passed is int which is the character of the nonsystem key being pressed. Return value must be of type bool, if event handler returns true event is defined as "handled" meaning the system will not try itself to handle the event.
Certain widgets, such as WidgetTextBox, will not report VK_RETURN unless you include ES_WANTRETURN in the style field of of the creational structure passed when you createTextBox( cs ).

Back to SmartWin website
SourceForge.net Logo