Rocket::Controls::WidgetDropDown Class Reference
#include <WidgetDropDown.h>
Detailed Description
Widget for drop-down functionality.
- Author:
- Lloyd Weehuizen
Member Function Documentation
Sets the value of the widget.
- Parameters:
-
| [in] | value | The new value to set. |
Returns the current value of the widget.
- Returns:
- The current value of the widget.
| void Rocket::Controls::WidgetDropDown::SetSelection |
( |
int |
selection, |
|
|
bool |
force = false | |
|
) |
| | |
Sets the index of the selection. If the new index lies outside of the bounds, the selection index will be set to -1.
- Parameters:
-
| [in] | selection | The new selection index. |
| [in] | force | Forces the new selection, even if the widget believes the selection to not have changed. |
| int Rocket::Controls::WidgetDropDown::GetSelection |
( |
|
) |
const |
Returns the index of the currently selected item.
- Returns:
- The index of the currently selected item.
Adds a new option to the select control.
- Parameters:
-
| [in] | rml | The RML content used to represent the option. |
| [in] | value | The value of the option. |
| [in] | before | The index of the element to insert the new option before. |
| [in] | select | True to select the new option. |
| [in] | selectable | If true this option can be selected. If false, this option is not selectable. |
- Returns:
- The index of the new option.
| void Rocket::Controls::WidgetDropDown::RemoveOption |
( |
int |
index |
) |
|
Removes an option from the select control.
- Parameters:
-
| [in] | index | The index of the option to remove. |
| SelectOption * Rocket::Controls::WidgetDropDown::GetOption |
( |
int |
index |
) |
|
Returns on of the widget's options.
- Parameters:
-
| [in] | The | index of the desired option. |
- Returns:
- The option. This may be NULL if the index was out of bounds.
| int Rocket::Controls::WidgetDropDown::GetNumOptions |
( |
|
) |
const |
Returns the number of options in the widget.
- Returns:
- The number of options.
The documentation for this class was generated from the following files: