[2608] | 1 | /*********************************************************************** |
---|
| 2 | Listbox |
---|
| 3 | ***********************************************************************/ |
---|
| 4 | class Listbox : public Window |
---|
| 5 | { |
---|
| 6 | unsigned long getItemCount() const; |
---|
| 7 | unsigned long getSelectedCount() const; |
---|
| 8 | ListboxItem* getFirstSelectedItem() const; |
---|
| 9 | ListboxItem* getNextSelected(const ListboxItem* start_item) const; |
---|
| 10 | ListboxItem* getListboxItemFromIndex(unsigned long index) const; |
---|
| 11 | unsigned long getItemIndex(const ListboxItem* item) const; |
---|
| 12 | ListboxItem* findItemWithText(string text, const ListboxItem* start_item); |
---|
| 13 | bool isSortEnabled() const; |
---|
| 14 | bool isMultiselectEnabled() const; |
---|
| 15 | bool isItemSelected(unsigned long index) const; |
---|
| 16 | bool isListboxItemInList(const ListboxItem* item) const; |
---|
| 17 | bool isVertScrollbarAlwaysShown() const; |
---|
| 18 | bool isHorzScrollbarAlwaysShown() const; |
---|
| 19 | |
---|
| 20 | void resetList(void); |
---|
| 21 | void addItem(ListboxItem* item); |
---|
| 22 | void insertItem(ListboxItem* item, const ListboxItem* position); |
---|
| 23 | void removeItem(const ListboxItem* item); |
---|
| 24 | void clearAllSelections(void); |
---|
| 25 | void setSortingEnabled(bool setting); |
---|
| 26 | void setMultiselectEnabled(bool setting); |
---|
| 27 | void setShowVertScrollbar(bool setting); |
---|
| 28 | void setShowHorzScrollbar(bool setting); |
---|
| 29 | void setItemSelectState(ListboxItem* item, bool state); |
---|
| 30 | void setItemSelectState(unsigned long item_index, bool state); |
---|
| 31 | void handleUpdatedItemData(void); |
---|
| 32 | void ensureItemIsVisible(unsigned long item_index); |
---|
| 33 | void ensureItemIsVisible(const ListboxItem* item); |
---|
| 34 | |
---|
| 35 | Rect getListRenderArea() const; |
---|
| 36 | Scrollbar* getVertScrollbar() const; |
---|
| 37 | Scrollbar* getHorzScrollbar() const; |
---|
| 38 | float getWidestItemWidth() const; |
---|
| 39 | float getTotalItemsHeight() const; |
---|
| 40 | }; |
---|