30 #ifndef _CEGUIListbox_h_
31 #define _CEGUIListbox_h_
33 #include "CEGUIBase.h"
34 #include "CEGUIWindow.h"
35 #include "elements/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);
327 void insertItem(ListboxItem* item,
const ListboxItem* position);
341 void removeItem(
const ListboxItem* item);
351 void clearAllSelections(
void);
364 void setSortingEnabled(
bool setting);
378 void setMultiselectEnabled(
bool setting);
392 void setShowVertScrollbar(
bool setting);
406 void setShowHorzScrollbar(
bool setting);
408 void setItemTooltipsEnabled(
bool setting);
428 void setItemSelectState(ListboxItem* item,
bool state);
450 void setItemSelectState(
size_t item_index,
bool state);
465 void handleUpdatedItemData(
void);
479 void ensureItemIsVisible(
size_t item_index);
494 void ensureItemIsVisible(
const ListboxItem* item);
506 virtual Rect getListRenderArea(
void)
const;
520 Scrollbar* getVertScrollbar()
const;
533 Scrollbar* getHorzScrollbar()
const;
540 float getTotalItemsHeight(
void)
const;
547 float getWidestItemWidth(
void)
const;
557 Listbox(
const String& type,
const String& name);
564 virtual ~Listbox(
void);
590 void configureScrollbars(
void);
597 void selectRange(
size_t start,
size_t end);
607 bool clearAllSelections_impl(
void);
618 ListboxItem* getItemAtPoint(
const Point& pt)
const;
632 bool resetList_impl(
void);
645 virtual bool testClassName_impl(
const String& class_name)
const
647 if (class_name==
"Listbox")
return true;
655 bool handle_scrollChange(
const EventArgs& args);
659 virtual bool validateWindowRenderer(
const String& name)
const
661 return (name ==
"Listbox");
727 typedef std::vector<ListboxItem*> LBItemList;
751 void addListboxProperties(
void);
773 #if defined(_MSC_VER)
774 # pragma warning(pop)
777 #endif // end of guard _CEGUIListbox_h_