Rocket::Controls::ElementFormControlSelect Class Reference
#include <ElementFormControlSelect.h>
Detailed Description
A drop-down select form control.
- Author:
- Peter Curry
Constructor & Destructor Documentation
| Rocket::Controls::ElementFormControlSelect::ElementFormControlSelect |
( |
const Rocket::Core::String & |
tag |
) |
|
Constructs a new ElementFormControlSelect. This should not be called directly; use the Factory instead.
- Parameters:
-
| [in] | tag | The tag the element was declared as in RML. |
Member Function Documentation
| void Rocket::Controls::ElementFormControlSelect::SetValue |
( |
const Rocket::Core::String & |
value |
) |
[virtual] |
| void Rocket::Controls::ElementFormControlSelect::SetSelection |
( |
int |
selection |
) |
|
Sets the index of the selection. If the new index lies outside of the bounds, it will be clamped.
- Parameters:
-
| [in] | selection | The new selection index. |
| int Rocket::Controls::ElementFormControlSelect::GetSelection |
( |
|
) |
const |
Returns the index of the currently selected item.
- Returns:
- The index of the currently selected item.
| SelectOption * Rocket::Controls::ElementFormControlSelect::GetOption |
( |
int |
index |
) |
|
Returns one of the select control's option elements.
- Parameters:
-
| [in] | The | index of the desired option element. |
- Returns:
- The option element at the given index. This will be NULL if the index is out of bounds.
| int Rocket::Controls::ElementFormControlSelect::GetNumOptions |
( |
|
) |
|
Returns the number of options in the select control.
- Returns:
- The number of options.
Adds a new option to the select control.
- Parameters:
-
| [in] | rml | The RML content used to represent the option. This is usually a simple string, but can include RML tags. |
| [in] | value | The value of the option. This is used to identify the option, but does not necessarily need to be unique. |
| [in] | before | The index of the element to insert the new option before. If out of bounds of the control's option list (the default) the new option will be added at the end of the list. |
| [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::ElementFormControlSelect::Remove |
( |
int |
index |
) |
|
Removes an option from the select control.
- Parameters:
-
| [in] | index | The index of the option to remove. If this is outside of the bounds of the control's option list, no option will be removed. |
| bool Rocket::Controls::ElementFormControlSelect::GetIntrinsicDimensions |
( |
Rocket::Core::Vector2f & |
intrinsic_dimensions |
) |
[protected, virtual] |
Returns true to mark this element as replaced.
- Parameters:
-
| [out] | intrinsic_dimensions | Set to the arbitrary dimensions of 128 x 16 just to give this element a size. Resize with the 'width' and 'height' properties. |
- Returns:
- True.
Reimplemented from Rocket::Core::Element.
The documentation for this class was generated from the following files: