Crazy Eddie's GUI System
0.8.7
|
29 #ifndef _CEGUIListbox_h_
30 #define _CEGUIListbox_h_
33 #include "../Window.h"
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
51 class CEGUIEXPORT ListboxWindowRenderer :
public WindowRenderer
58 ListboxWindowRenderer(
const String& name);
65 virtual Rectf getListRenderArea(
void)
const = 0;
73 virtual void resizeListToContent(
bool fit_width,
74 bool fit_height)
const = 0;
81 class CEGUIEXPORT Listbox :
public Window
84 static const String EventNamespace;
85 static const String WidgetTypeName;
95 static const String EventListContentsChanged;
102 static const String EventSelectionChanged;
108 static const String EventSortModeChanged;
114 static const String EventMultiselectModeChanged;
121 static const String EventVertScrollbarModeChanged;
128 static const String EventHorzScrollbarModeChanged;
133 static const String VertScrollbarName;
146 size_t getItemCount(
void)
const {
return d_listItems.
size();}
156 size_t getSelectedCount(
void)
const;
199 ListboxItem* getListboxItemFromIndex(
size_t index)
const;
214 size_t getItemIndex(
const ListboxItem* item)
const;
224 bool isSortEnabled(
void)
const {
return d_sorted;}
233 bool isMultiselectEnabled(
void)
const {
return d_multiselect;}
235 bool isItemTooltipsEnabled(
void)
const {
return d_itemTooltips;}
249 bool isItemSelected(
size_t index)
const;
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);
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);
545 virtual Rectf getListRenderArea(
void)
const;
579 float getTotalItemsHeight(
void)
const;
586 float getWidestItemWidth(
void)
const;
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;
752 bool d_forceVertScroll;
753 bool d_forceHorzScroll;
755 LBItemList d_listItems;
765 void addListboxProperties(
void);
787 #if defined(_MSC_VER)
788 # pragma warning(pop)
791 #endif // end of guard _CEGUIListbox_h_
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: Element.h:237
bool lbi_greater(const ListboxItem *a, const ListboxItem *b)
Helper function used in sorting to compare two list box item text strings via the ListboxItem pointer...
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
EventArgs based class that is used for objects passed to input event handlers concerning mouse input.
Definition: InputEvent.h:306
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: InputEvent.h:277
bool lbi_less(const ListboxItem *a, const ListboxItem *b)
Helper function used in sorting to compare two list box item text strings via the ListboxItem pointer...
Base class for Listbox window renderer.
Definition: widgets/Listbox.h:77
size_type size(void) const
Returns the size of the String in code points.
Definition: String.h:635
Base-class for the assignable WindowRenderer object.
Definition: WindowRenderer.h:76
String class used within the GUI system.
Definition: String.h:88
Base class used as the argument to all subscribers Event object.
Definition: EventArgs.h:73
Base class for list box items.
Definition: ListboxItem.h:77
Base class for standard Listbox widget.
Definition: widgets/Listbox.h:107