AspectSelection Class Template Reference
[Aspect Classes]

item(s). More...

Inherited by WidgetComboBox, WidgetDataGrid, WidgetTabSheet, and WidgetTreeView.

List of all members.

Public Member Functions

virtual int getSelectedIndex () const =0
 Return the selected index of the Widget.
void onSelectionChanged (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler)
 Setting the event handler for the "selection changed" event.
virtual void setSelectedIndex (int idx)=0
 Sets the selected index of the Widget.


Detailed Description

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

item(s).

E.g. the WidgetComboBox have a "selected" Aspect therefore it realizes the AspectSelection through inheritance.


Member Function Documentation

virtual int getSelectedIndex (  )  const [pure virtual]

Return the selected index of the Widget.

The return value is the selected items index of the Widget, if no item is selected the return value will be -1.
Note!
Some Widgets have the possibillity of selecting multiple items, if so you should not use this function but rather the multiple selection value getter.

Implemented in WidgetComboBox, WidgetDataGrid, WidgetTabSheet, and WidgetTreeView.

virtual void setSelectedIndex ( int  idx  )  [pure virtual]

Sets the selected index of the Widget.

The idx parameter is the (zero indexed) value of the item to set as the selected item. You must add the items before you set the selected index.

Implemented in WidgetComboBox, WidgetDataGrid, WidgetTabSheet, and WidgetTreeView.

Back to SmartWin website
SourceForge.net Logo