DropDownList.pkg 1.2 KB

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