AspectFocus Class Template Reference
[Aspect Classes]

Aspect class used by Widgets that have the possibility of retrieving the focus. More...

Inherited by WidgetButton, WidgetCheckBox, WidgetComboBox, WidgetCoolbar, WidgetDataGrid, WidgetDateTimePicker, WidgetGroupBox, WidgetMDIParent, WidgetRadioButton, WidgetSlider, WidgetSpinner, WidgetStatic, WidgetTabSheet, WidgetTextBox, WidgetTextBox< EventHandlerClass, MessageMapPolicy >, WidgetTextBox< EventHandlerClass, MessageMapPolicy, SmartWin::RichTextBox< EventHandlerClass, MessageMapPolicy > >, WidgetTextBox< Parent, MessageMapPolicy >, WidgetToolbar, WidgetTreeView, WidgetWindowBase, WidgetWindowBase< EventHandlerClass, SmartWin::MessageMapPolicyDialogWidget >, WidgetWindowBase< EventHandlerClass, SmartWin::MessageMapPolicyModalDialogWidget >, and WidgetWindowBase< EventHandlerClass, unUsed >.

List of all members.

Public Member Functions

bool getFocus () const
 Retrieves the focus property of the Widget.
void onFocus (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler)
 Sets the event handler for what function to be called when control loses focus.
void onKillFocus (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler)
 Sets the event handler for what function to be called when control loses focus.
void setFocus ()
 Gives the Widget the keyboard focus.


Detailed Description

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

Aspect class used by Widgets that have the possibility of retrieving the focus.

E.g. the WidgetDataGrid have a Focus Aspect to it therefore WidgetDataGrid realize the AspectFocus through inheritance. This Aspect is closely related to the AspectActivate and when a Widget is being activated it means that it is the "active" Widget meaning that it receives keyboard input for one and normally if it is a text Widget gets to own the carret.


Member Function Documentation

bool getFocus (  )  const

Retrieves the focus property of the Widget.

Use this function to check if the Widget has focus or not. If the Widget has focus this function will return true.

void setFocus (  ) 

Gives the Widget the keyboard focus.

Use this function if you wish to give the Focus to a specific Widget

Back to SmartWin website
SourceForge.net Logo