29 #ifndef _CEGUIListbox_h_
30 #define _CEGUIListbox_h_
33 #include "../Window.h"
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
65 virtual Rectf getListRenderArea(
void)
const = 0;
73 virtual void resizeListToContent(
bool fit_width,
74 bool fit_height)
const = 0;
156 size_t getSelectedCount(
void)
const;
199 ListboxItem* getListboxItemFromIndex(
size_t index)
const;
214 size_t getItemIndex(
const ListboxItem* item)
const;
235 bool isItemTooltipsEnabled(
void)
const {
return d_itemTooltips;}
249 bool isItemSelected(
size_t index)
const;
269 ListboxItem* findItemWithText(
const String& text,
const ListboxItem* start_item);
279 bool isListboxItemInList(
const ListboxItem* item)
const;
290 bool isVertScrollbarAlwaysShown(
void)
const;
301 bool isHorzScrollbarAlwaysShown(
void)
const;
317 virtual void initialiseComponents(
void);
326 void resetList(
void);
340 void addItem(ListboxItem* item);
366 void insertItem(ListboxItem* item,
const ListboxItem* position);
380 void removeItem(
const ListboxItem* item);
390 void clearAllSelections(
void);
403 void setSortingEnabled(
bool setting);
417 void setMultiselectEnabled(
bool setting);
431 void setShowVertScrollbar(
bool setting);
445 void setShowHorzScrollbar(
bool setting);
447 void setItemTooltipsEnabled(
bool setting);
467 void setItemSelectState(ListboxItem* item,
bool state);
489 void setItemSelectState(
size_t item_index,
bool state);
504 void handleUpdatedItemData(
void);
518 void ensureItemIsVisible(
size_t item_index);
533 void ensureItemIsVisible(
const ListboxItem* item);
545 virtual Rectf getListRenderArea(
void)
const;
559 Scrollbar* getVertScrollbar()
const;
572 Scrollbar* getHorzScrollbar()
const;
579 float getTotalItemsHeight(
void)
const;
586 float getWidestItemWidth(
void)
const;
599 ListboxItem* getItemAtPoint(
const Vector2f& pt)
const;
609 Listbox(
const String& type,
const String& name);
616 virtual ~Listbox(
void);
642 void configureScrollbars(
void);
649 void selectRange(
size_t start,
size_t end);
659 bool clearAllSelections_impl(
void);
673 bool resetList_impl(
void);
679 bool handle_scrollChange(
const EventArgs& args);
683 virtual bool validateWindowRenderer(
const WindowRenderer* renderer)
const;
698 virtual void onListContentsChanged(WindowEventArgs& e);
705 virtual void onSelectionChanged(WindowEventArgs& e);
712 virtual void onSortModeChanged(WindowEventArgs& e);
719 virtual void onMultiselectModeChanged(WindowEventArgs& e);
726 virtual void onVertScrollbarModeChanged(WindowEventArgs& e);
733 virtual void onHorzScrollbarModeChanged(WindowEventArgs& e);
739 virtual void onSized(ElementEventArgs& e);
740 virtual void onMouseButtonDown(MouseEventArgs& e);
741 virtual void onMouseWheel(MouseEventArgs& e);
742 virtual void onMouseMove(MouseEventArgs& e);
748 typedef std::vector<ListboxItem*
749 CEGUI_VECTOR_ALLOC(ListboxItem*)> LBItemList;
765 void addListboxProperties(
void);
787 #if defined(_MSC_VER)
788 # pragma warning(pop)
791 #endif // end of guard _CEGUIListbox_h_