DropDownList.pkg 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. $#include "DropDownList.h"
  2. class DropDownList : public Menu
  3. {
  4. public:
  5. // Methods:
  6. DropDownList(Context* context);
  7. ~DropDownList();
  8. void AddItem(UIElement* item);
  9. void InsertItem(unsigned index, UIElement* item);
  10. void RemoveItem(UIElement* item);
  11. void RemoveItem(unsigned index);
  12. void RemoveAllItems();
  13. void SetSelection(unsigned index);
  14. void SetPlaceholderText(const String& text);
  15. void SetResizePopup(bool enable);
  16. unsigned GetNumItems() const;
  17. UIElement* GetItem(unsigned index) const;
  18. unsigned GetSelection() const;
  19. UIElement* GetSelectedItem() const;
  20. ListView* GetListView() const;
  21. UIElement* GetPlaceholder() const;
  22. const String& GetPlaceholderText() const;
  23. bool GetResizePopup() const;
  24. // Properties:
  25. tolua_readonly tolua_property__get_set unsigned numItems;
  26. tolua_property__get_set unsigned selection;
  27. tolua_readonly tolua_property__get_set UIElement* selectedItem;
  28. tolua_readonly tolua_property__get_set ListView* listView;
  29. tolua_readonly tolua_property__get_set UIElement* placeholder;
  30. tolua_property__get_set String& placeholderText;
  31. tolua_property__get_set bool resizePopup;
  32. };