30 #ifndef _CEGUIListbox_h_
31 #define _CEGUIListbox_h_
33 #include "../CEGUIBase.h"
34 #include "../CEGUIWindow.h"
35 #include "CEGUIListboxProperties.h"
40 # pragma warning(push)
41 # pragma warning(disable : 4251)
71 virtual Rect getListRenderArea(
void)
const = 0;
121 size_t getSelectedCount(
void)
const;
164 ListboxItem* getListboxItemFromIndex(
size_t index)
const;
179 size_t getItemIndex(
const ListboxItem* item)
const;
200 bool isItemTooltipsEnabled(
void)
const {
return d_itemTooltips;}
214 bool isItemSelected(
size_t index)
const;
234 ListboxItem* findItemWithText(
const String& text,
const ListboxItem* start_item);
244 bool isListboxItemInList(
const ListboxItem* item)
const;
255 bool isVertScrollbarAlwaysShown(
void)
const;
266 bool isHorzScrollbarAlwaysShown(
void)
const;
282 virtual void initialiseComponents(
void);
291 void resetList(
void);
305 void addItem(ListboxItem* item);
331 void insertItem(ListboxItem* item,
const ListboxItem* position);
345 void removeItem(
const ListboxItem* item);
355 void clearAllSelections(
void);
368 void setSortingEnabled(
bool setting);
382 void setMultiselectEnabled(
bool setting);
396 void setShowVertScrollbar(
bool setting);
410 void setShowHorzScrollbar(
bool setting);
412 void setItemTooltipsEnabled(
bool setting);
432 void setItemSelectState(ListboxItem* item,
bool state);
454 void setItemSelectState(
size_t item_index,
bool state);
469 void handleUpdatedItemData(
void);
483 void ensureItemIsVisible(
size_t item_index);
498 void ensureItemIsVisible(
const ListboxItem* item);
510 virtual Rect getListRenderArea(
void)
const;
524 Scrollbar* getVertScrollbar()
const;
537 Scrollbar* getHorzScrollbar()
const;
544 float getTotalItemsHeight(
void)
const;
551 float getWidestItemWidth(
void)
const;
561 Listbox(
const String& type,
const String& name);
568 virtual ~Listbox(
void);
594 void configureScrollbars(
void);
601 void selectRange(
size_t start,
size_t end);
611 bool clearAllSelections_impl(
void);
622 ListboxItem* getItemAtPoint(
const Point& pt)
const;
636 bool resetList_impl(
void);
649 virtual bool testClassName_impl(
const String& class_name)
const
651 if (class_name==
"Listbox")
return true;
659 bool handle_scrollChange(
const EventArgs& args);
663 virtual bool validateWindowRenderer(
const String& name)
const
665 return (name ==
"Listbox");
731 typedef std::vector<ListboxItem*> LBItemList;
755 void addListboxProperties(
void);
777 #if defined(_MSC_VER)
778 # pragma warning(pop)
781 #endif // end of guard _CEGUIListbox_h_