ElementFormControlSelect.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ROCKETCONTROLSELEMENTFORMCONTROLSELECT_H
00029 #define ROCKETCONTROLSELEMENTFORMCONTROLSELECT_H
00030
00031 #include <Rocket/Controls/Header.h>
00032 #include <Rocket/Controls/ElementFormControl.h>
00033 #include <Rocket/Controls/SelectOption.h>
00034
00035 namespace Rocket {
00036 namespace Controls {
00037
00038 class WidgetDropDown;
00039
00046 class ROCKETCONTROLS_API ElementFormControlSelect : public ElementFormControl
00047 {
00048 public:
00052 ElementFormControlSelect(const Rocket::Core::String& tag);
00053 virtual ~ElementFormControlSelect();
00054
00057 virtual Rocket::Core::String GetValue() const;
00060 virtual void SetValue(const Rocket::Core::String& value);
00061
00064 void SetSelection(int selection);
00067 int GetSelection() const;
00068
00072 SelectOption* GetOption(int index);
00075 int GetNumOptions();
00076
00083 int Add(const Rocket::Core::String& rml, const Rocket::Core::String& value, int before = -1, bool selectable = true);
00086 void Remove(int index);
00087
00089 void RemoveAll();
00090
00091 protected:
00093 virtual void OnUpdate();
00095 virtual void OnRender();
00096
00098 virtual void OnLayout();
00099
00103 virtual bool GetIntrinsicDimensions(Rocket::Core::Vector2f& intrinsic_dimensions);
00104
00105 WidgetDropDown* widget;
00106 };
00107
00108 }
00109 }
00110
00111 #endif