$#include "ListView.h" enum HighlightMode { HM_NEVER, HM_FOCUS, HM_ALWAYS }; class ListView : public ScrollView { public: // Methods: ListView(Context* context); virtual ~ListView(); void AddItem(UIElement* item); void InsertItem(unsigned index, UIElement* item, UIElement* parentItem = 0); void InsertItem(unsigned index, UIElement* item); void RemoveItem(UIElement* item, unsigned index = 0); void RemoveItem(UIElement* item); void RemoveItem(unsigned index); void RemoveAllItems(); void SetSelection(unsigned index); void AddSelection(unsigned index); void RemoveSelection(unsigned index); void ToggleSelection(unsigned index); void ChangeSelection(int delta, bool additive = false); void ChangeSelection(int delta); void ClearSelection(); void SetHighlightMode(HighlightMode mode); void SetMultiselect(bool enable); void SetHierarchyMode(bool enable); void SetBaseIndent(int baseIndent); void SetClearSelectionOnDefocus(bool enable); void SetDoubleClickInterval(float interval); void Expand(unsigned index, bool enable, bool recursive = false); void Expand(unsigned index, bool enable); void ToggleExpand(unsigned index, bool recursive = false); void ToggleExpand(unsigned index); unsigned GetNumItems() const; UIElement* GetItem(unsigned index) const; unsigned FindItem(UIElement* item) const; unsigned GetSelection() const; UIElement* GetSelectedItem() const; bool IsSelected(unsigned index) const; bool IsExpanded(unsigned index) const; HighlightMode GetHighlightMode() const; bool GetMultiselect() const; bool GetClearSelectionOnDefocus() const; bool GetHierarchyMode() const; int GetBaseIndent() const; float GetDoubleClickInterval() 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_property__get_set HighlightMode highlightMode; tolua_property__get_set bool multiselect; tolua_property__get_set bool clearSelectionOnDefocus; tolua_property__get_set bool hierarchyMode; tolua_property__get_set int baseIndent; tolua_property__get_set float doubleClickInterval; };