30 #ifndef _CEGUIListbox_h_
31 #define _CEGUIListbox_h_
34 #include "../Window.h"
39 # pragma warning(push)
40 # pragma warning(disable : 4251)
66 virtual Rectf getListRenderArea(
void)
const = 0;
74 virtual void resizeListToContent(
bool fit_width,
75 bool fit_height)
const = 0;
157 size_t getSelectedCount(
void)
const;
200 ListboxItem* getListboxItemFromIndex(
size_t index)
const;
215 size_t getItemIndex(
const ListboxItem* item)
const;
236 bool isItemTooltipsEnabled(
void)
const {
return d_itemTooltips;}
250 bool isItemSelected(
size_t index)
const;
270 ListboxItem* findItemWithText(
const String& text,
const ListboxItem* start_item);
280 bool isListboxItemInList(
const ListboxItem* item)
const;
291 bool isVertScrollbarAlwaysShown(
void)
const;
302 bool isHorzScrollbarAlwaysShown(
void)
const;
318 virtual void initialiseComponents(
void);
327 void resetList(
void);
341 void addItem(ListboxItem* item);
367 void insertItem(ListboxItem* item,
const ListboxItem* position);
381 void removeItem(
const ListboxItem* item);
391 void clearAllSelections(
void);
404 void setSortingEnabled(
bool setting);
418 void setMultiselectEnabled(
bool setting);
432 void setShowVertScrollbar(
bool setting);
446 void setShowHorzScrollbar(
bool setting);
448 void setItemTooltipsEnabled(
bool setting);
468 void setItemSelectState(ListboxItem* item,
bool state);
490 void setItemSelectState(
size_t item_index,
bool state);
505 void handleUpdatedItemData(
void);
519 void ensureItemIsVisible(
size_t item_index);
534 void ensureItemIsVisible(
const ListboxItem* item);
546 virtual Rectf getListRenderArea(
void)
const;
560 Scrollbar* getVertScrollbar()
const;
573 Scrollbar* getHorzScrollbar()
const;
580 float getTotalItemsHeight(
void)
const;
587 float getWidestItemWidth(
void)
const;
600 ListboxItem* getItemAtPoint(
const Vector2f& pt)
const;
610 Listbox(
const String& type,
const String& name);
617 virtual ~Listbox(
void);
643 void configureScrollbars(
void);
650 void selectRange(
size_t start,
size_t end);
660 bool clearAllSelections_impl(
void);
674 bool resetList_impl(
void);
680 bool handle_scrollChange(
const EventArgs& args);
684 virtual bool validateWindowRenderer(
const WindowRenderer* renderer)
const;
699 virtual void onListContentsChanged(WindowEventArgs& e);
706 virtual void onSelectionChanged(WindowEventArgs& e);
713 virtual void onSortModeChanged(WindowEventArgs& e);
720 virtual void onMultiselectModeChanged(WindowEventArgs& e);
727 virtual void onVertScrollbarModeChanged(WindowEventArgs& e);
734 virtual void onHorzScrollbarModeChanged(WindowEventArgs& e);
740 virtual void onSized(ElementEventArgs& e);
741 virtual void onMouseButtonDown(MouseEventArgs& e);
742 virtual void onMouseWheel(MouseEventArgs& e);
743 virtual void onMouseMove(MouseEventArgs& e);
749 typedef std::vector<ListboxItem*
750 CEGUI_VECTOR_ALLOC(ListboxItem*)> LBItemList;
766 void addListboxProperties(
void);
788 #if defined(_MSC_VER)
789 # pragma warning(pop)
792 #endif // end of guard _CEGUIListbox_h_