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;
153 size_t getSelectedCount(
void)
const;
196 ListboxItem* getListboxItemFromIndex(
size_t index)
const;
211 size_t getItemIndex(
const ListboxItem* item)
const;
232 bool isItemTooltipsEnabled(
void)
const {
return d_itemTooltips;}
246 bool isItemSelected(
size_t index)
const;
266 ListboxItem* findItemWithText(
const String& text,
const ListboxItem* start_item);
276 bool isListboxItemInList(
const ListboxItem* item)
const;
287 bool isVertScrollbarAlwaysShown(
void)
const;
298 bool isHorzScrollbarAlwaysShown(
void)
const;
314 virtual void initialiseComponents(
void);
323 void resetList(
void);
337 void addItem(ListboxItem* item);
363 void insertItem(ListboxItem* item,
const ListboxItem* position);
377 void removeItem(
const ListboxItem* item);
387 void clearAllSelections(
void);
400 void setSortingEnabled(
bool setting);
414 void setMultiselectEnabled(
bool setting);
428 void setShowVertScrollbar(
bool setting);
442 void setShowHorzScrollbar(
bool setting);
444 void setItemTooltipsEnabled(
bool setting);
464 void setItemSelectState(ListboxItem* item,
bool state);
486 void setItemSelectState(
size_t item_index,
bool state);
501 void handleUpdatedItemData(
void);
515 void ensureItemIsVisible(
size_t item_index);
530 void ensureItemIsVisible(
const ListboxItem* item);
542 virtual Rect getListRenderArea(
void)
const;
556 Scrollbar* getVertScrollbar()
const;
569 Scrollbar* getHorzScrollbar()
const;
576 float getTotalItemsHeight(
void)
const;
583 float getWidestItemWidth(
void)
const;
596 ListboxItem* getItemAtPoint(
const Point& pt)
const;
606 Listbox(
const String& type,
const String& name);
613 virtual ~Listbox(
void);
639 void configureScrollbars(
void);
646 void selectRange(
size_t start,
size_t end);
656 bool clearAllSelections_impl(
void);
670 bool resetList_impl(
void);
683 virtual bool testClassName_impl(
const String& class_name)
const
685 if (class_name==
"Listbox")
return true;
693 bool handle_scrollChange(
const EventArgs& args);
697 virtual bool validateWindowRenderer(
const String& name)
const
699 return (name ==
"Listbox");
765 typedef std::vector<ListboxItem*> LBItemList;
789 void addListboxProperties(
void);
811 #if defined(_MSC_VER)
812 # pragma warning(pop)
815 #endif // end of guard _CEGUIListbox_h_