#include <uchoice.hpp>
Inheritance diagram for URadioSelect:

Public Member Functions | |
| URadioSelect (UIntg &index) | |
| constructor | |
| virtual | ~URadioSelect () |
| destructor. | |
| virtual void | setCanUnselectMode (bool) |
| virtual bool | isCanUnselectMode () const |
| clicking on a selected item will unselect it if true (default is false). | |
| virtual UGroup * | getItem () const |
| returns the selected item (null if none selected) | |
| virtual void | setItem (UGroup *) |
| virtual void | setItem (UGroup &) |
| virtual void | select (UGroup &) |
| selects this item (deselects all items if null given as an arg). | |
| virtual void | unselect () |
| unselects all items | |
| UIntg & | index () const |
| virtual int | getIndex () const |
| returns the index of the selected item (-1 if nothing selected; 0 if first item selected). | |
| virtual void | setIndex (int) |
| virtual void | setIndex (const UIntg &) |
| virtual void | select (int) |
| selects the item at this index in the list (0 is first item, -1 last item). | |
| virtual void | update () |
| updates graphics (this function must be called when adding or removing items). | |
| virtual void | changed (bool update_now) |
| called when the selection is changed | |
Friends | |
| URadioSelect & | uradioSelect () |
| creator shortcut (see constructor for details). | |
This selector must be a child of the items it selects. These items are automatically made selectable (for instance an UButton will becone selectable if an USelect is added to it as a child).
Exemple:
URadioSelect& sel = uradioSelect();
ubox( ubutton(sel + "One" + UMode::selected)
+ ucheckbox(sel + "Two")
+ utextbox(sel + "Three")
)
|
|
constructor Notes:
|
|
|
called when the selection is changed This function:
Reimplemented from UProp. |
1.4.1