| 123456789101112131415161718192021222324252627282930313233343536 |
- $#include "DropDownList.h"
- class DropDownList : public Menu
- {
- public:
- // Methods:
- DropDownList(Context* context);
- ~DropDownList();
-
- void AddItem(UIElement* item);
- void InsertItem(unsigned index, UIElement* item);
- void RemoveItem(UIElement* item);
- void RemoveItem(unsigned index);
- void RemoveAllItems();
- void SetSelection(unsigned index);
- void SetPlaceholderText(const String& text);
- void SetResizePopup(bool enable);
-
- unsigned GetNumItems() const;
- UIElement* GetItem(unsigned index) const;
- unsigned GetSelection() const;
- UIElement* GetSelectedItem() const;
- ListView* GetListView() const;
- UIElement* GetPlaceholder() const;
- const String& GetPlaceholderText() const;
- bool GetResizePopup() const;
-
- // Properties:
- tolua_readonly tolua_property__get_set unsigned numItems;
- tolua_property__get_set unsigned selection;
- tolua_readonly tolua_property__get_set UIElement* selectedItem;
- tolua_readonly tolua_property__get_set ListView* listView;
- tolua_readonly tolua_property__get_set UIElement* placeholder;
- tolua_property__get_set String& placeholderText;
- tolua_property__get_set bool resizePopup;
- };
|