29#ifndef _CEGUIListbox_h_
30#define _CEGUIListbox_h_
39# pragma warning(disable : 4251)
235 bool isItemTooltipsEnabled(
void)
const {
return d_itemTooltips;}
447 void setItemTooltipsEnabled(
bool setting);
765 void addListboxProperties(
void);
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition Element.h:211
Base class used as the argument to all subscribers Event object.
Definition EventArgs.h:51
Base class for list box items.
Definition ListboxItem.h:53
Base class for Listbox window renderer.
Definition widgets/Listbox.h:52
virtual void resizeListToContent(bool fit_width, bool fit_height) const =0
virtual Rectf getListRenderArea(void) const =0
Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used fo...
ListboxWindowRenderer(const String &name)
Constructor.
Base class for standard Listbox widget.
Definition widgets/Listbox.h:82
virtual bool validateWindowRenderer(const WindowRenderer *renderer) const
Function used in checking if a WindowRenderer is valid for this window.
virtual void onMultiselectModeChanged(WindowEventArgs &e)
Handler called internally when the multi-select mode setting changes.
void ensureItemIsVisible(size_t item_index)
Ensure the item at the specified index is visible within the list box.
void setShowHorzScrollbar(bool setting)
Set whether the horizontal scroll bar should always be shown.
void insertItem(ListboxItem *item, const ListboxItem *position)
Insert an item into the list box before a specified item already in the list.
void setItemSelectState(ListboxItem *item, bool state)
Set the select state of an attached ListboxItem.
virtual ~Listbox(void)
Destructor for Listbox base class.
virtual void onMouseButtonDown(MouseEventArgs &e)
Handler called when a mouse button has been depressed within this window's area.
virtual void onSized(ElementEventArgs &e)
Handler called when the window's size changes.
bool isHorzScrollbarAlwaysShown(void) const
Return whether the horizontal scroll bar is always shown.
virtual void initialiseComponents(void)
Initialise the Window based object ready for use.
bool isListboxItemInList(const ListboxItem *item) const
Return whether the specified ListboxItem is in the List.
LBItemList d_listItems
list of items in the list box.
Definition widgets/Listbox.h:755
ListboxItem * getNextSelected(const ListboxItem *start_item) const
Return a pointer to the next selected item after item start_item.
void resetList(void)
Remove all items from the list.
void removeItem(const ListboxItem *item)
Removes the given item from the list box. If the item is has the auto delete state set,...
static const String VertScrollbarName
Widget name for the vertical scrollbar component.
Definition widgets/Listbox.h:133
static const String EventListContentsChanged
Definition widgets/Listbox.h:95
Scrollbar * getHorzScrollbar() const
Return a pointer to the horizontal scrollbar component widget for this Listbox.
bool d_itemTooltips
true if each item should have an individual tooltip
Definition widgets/Listbox.h:754
ListboxItem * getListboxItemFromIndex(size_t index) const
Return the item at index position index.
ListboxItem * getItemAtPoint(const Vector2f &pt) const
Return a pointer to the ListboxItem attached to this Listbox at the given screen pixel co-ordinate.
void ensureItemIsVisible(const ListboxItem *item)
Ensure the item at the specified index is visible within the list box.
size_t getSelectedCount(void) const
Return the number of selected items in the list box.
float getTotalItemsHeight(void) const
Return the sum of all item heights.
virtual void onListContentsChanged(WindowEventArgs &e)
Handler called internally when the list contents are changed.
bool isVertScrollbarAlwaysShown(void) const
Return whether the vertical scroll bar is always shown.
bool handle_scrollChange(const EventArgs &args)
Internal handler that is triggered when the user interacts with the scrollbars.
float getWidestItemWidth(void) const
Return the width of the widest item.
void configureScrollbars(void)
Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used fo...
static const String WidgetTypeName
Window factory name.
Definition widgets/Listbox.h:85
virtual void onVertScrollbarModeChanged(WindowEventArgs &e)
Handler called internally when the forced display of the vertical scroll bar setting changes.
static const String HorzScrollbarName
Widget name for the horizontal scrollbar component.
Definition widgets/Listbox.h:134
void setSortingEnabled(bool setting)
Set whether the list should be sorted.
void clearAllSelections(void)
Clear the selected state for all items.
void addItem(ListboxItem *item)
Add the given ListboxItem to the list.
void handleUpdatedItemData(void)
Causes the list box to update it's internal state after changes have been made to one or more attache...
void setItemSelectState(size_t item_index, bool state)
Set the select state of an attached ListboxItem.
ListboxItem * getFirstSelectedItem(void) const
Return a pointer to the first selected item.
bool isSortEnabled(void) const
return whether list sorting is enabled
Definition widgets/Listbox.h:224
size_t getItemIndex(const ListboxItem *item) const
Return the index of ListboxItem item.
void setShowVertScrollbar(bool setting)
Set whether the vertical scroll bar should always be shown.
virtual void onHorzScrollbarModeChanged(WindowEventArgs &e)
Handler called internally when the forced display of the horizontal scroll bar setting changes.
static const String EventMultiselectModeChanged
Definition widgets/Listbox.h:114
void resortList()
Causes the internal list to be (re)sorted.
Scrollbar * getVertScrollbar() const
Return a pointer to the vertical scrollbar component widget for this Listbox.
bool d_forceHorzScroll
true if horizontal scrollbar should always be displayed
Definition widgets/Listbox.h:753
bool d_sorted
true if list is sorted
Definition widgets/Listbox.h:750
bool d_multiselect
true if multi-select is enabled
Definition widgets/Listbox.h:751
static const String EventVertScrollbarModeChanged
Definition widgets/Listbox.h:121
bool resetList_impl(void)
Remove all items from the list.
virtual Rectf getListRenderArea(void) const
Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used fo...
ListboxItem * d_lastSelected
holds pointer to the last selected item (used in range selections)
Definition widgets/Listbox.h:756
static const String EventHorzScrollbarModeChanged
Definition widgets/Listbox.h:128
Listbox(const String &type, const String &name)
Constructor for Listbox base class.
ListboxItem * findItemWithText(const String &text, const ListboxItem *start_item)
Search the list for an item with the specified text.
bool clearAllSelections_impl(void)
Clear the selected state for all items (implementation)
virtual void onSortModeChanged(WindowEventArgs &e)
Handler called internally when the sort mode setting changes.
static const String EventNamespace
Namespace for global events.
Definition widgets/Listbox.h:84
virtual void onMouseWheel(MouseEventArgs &e)
Handler called when the mouse wheel (z-axis) position changes within this window's area.
bool isMultiselectEnabled(void) const
return whether multi-select is enabled
Definition widgets/Listbox.h:233
bool isItemSelected(size_t index) const
return whether the string at index position index is selected
void selectRange(size_t start, size_t end)
select all strings between positions start and end. (inclusive) including end.
virtual void onMouseMove(MouseEventArgs &e)
Handler called when the mouse cursor has been moved within this window's area.
bool d_forceVertScroll
true if vertical scrollbar should always be displayed
Definition widgets/Listbox.h:752
static const String EventSortModeChanged
Definition widgets/Listbox.h:108
size_t getItemCount(void) const
Return number of items attached to the list box.
Definition widgets/Listbox.h:146
static const String EventSelectionChanged
Definition widgets/Listbox.h:102
virtual void onSelectionChanged(WindowEventArgs &e)
Handler called internally when the currently selected item or items changes.
void setMultiselectEnabled(bool setting)
Set whether the list should allow multiple selections or just a single selection.
EventArgs based class that is used for objects passed to input event handlers concerning mouse input.
Definition InputEvent.h:281
String class used within the GUI system.
Definition String.h:64
base class for properties able to do native set/get
Definition TypedProperty.h:50
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition InputEvent.h:252
Base-class for the assignable WindowRenderer object.
Definition WindowRenderer.h:52
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition Window.h:151
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1
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...
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...