30 #ifndef _CEGUIItemListBase_h_
31 #define _CEGUIItemListBase_h_
33 #include "../CEGUIBase.h"
34 #include "../CEGUIWindow.h"
35 #include "CEGUIItemListBaseProperties.h"
36 #include "CEGUIItemEntry.h"
42 # pragma warning(push)
43 # pragma warning(disable : 4251)
73 virtual Rect getItemRenderArea(
void)
const = 0;
147 ItemEntry* getItemFromIndex(
size_t index)
const;
162 size_t getItemIndex(
const ItemEntry* item)
const;
192 bool isItemInList(
const ItemEntry* item)
const;
238 virtual void initialiseComponents(
void);
247 void resetList(
void);
315 void handleUpdatedItemData(
bool resort=
false);
328 void setAutoResizeEnabled(
bool setting);
348 virtual void endInitialisation(
void);
361 virtual void performChildWindowLayout(
void);
373 Rect getItemRenderArea(
void)
const;
403 void setSortEnabled(
bool setting);
411 void setSortMode(SortMode mode);
420 void setSortCallback(SortCallback cb);
433 void sortList(
bool relayout=
true);
465 virtual void sizeToContent_impl(
void);
475 virtual Size getContentSize()
const = 0;
497 virtual void layoutItemWidgets() = 0;
514 bool resetList_impl(
void);
528 if (class_name==
"ItemListBase")
return true;
535 return (name == EventNamespace);
542 SortCallback getRealSortCallback(
void)
const;
576 typedef std::vector<ItemEntry*> ItemEntryList;
605 void addItemListBaseProperties(
void);
612 virtual void addChild_impl(
Window* wnd);
619 bool handle_PaneChildRemoved(
const EventArgs& e);
625 #if defined(_MSC_VER)
626 # pragma warning(pop)
629 #endif // end of guard _CEGUIItemListBase_h_
virtual void notifyItemSelectState(ItemEntry *, bool)
Notify this ItemListBase that the given item just changed selection state. Internal function - NOT to...
Definition: CEGUIItemListBase.h:397
ItemEntryList d_listItems
list of items in the list.
Definition: CEGUIItemListBase.h:577
SortCallback d_sortCallback
True if the list needs to be resorted.
Definition: CEGUIItemListBase.h:590
virtual bool testClassName_impl(const String &class_name) const
Return whether this window was inherited from the given class name at some point in the inheritance h...
Definition: CEGUIItemListBase.h:526
Window * d_pane
True if this ItemListBase is sorted. False if not.
Definition: CEGUIItemListBase.h:583
Base class for item type widgets.
Definition: CEGUIItemEntry.h:78
virtual void notifyItemClicked(ItemEntry *)
Notify this ItemListBase that the given item was just clicked. Internal function - NOT to be used fro...
Definition: CEGUIItemListBase.h:390
Base class used as the argument to all subscribers Event object.
Definition: CEGUIEventArgs.h:52
Class that holds the size (width & height) of something.
Definition: CEGUISize.h:43
virtual bool testClassName_impl(const String &class_name) const
Return whether this window was inherited from the given class name at some point in the inheritance h...
Definition: CEGUIWindow.h:3928
static const String EventListContentsChanged
Definition: CEGUIItemListBase.h:108
Property to access the state of the auto resize enabled setting.
Definition: CEGUIItemListBaseProperties.h:55
SortCallback getSortCallback(void) const
Get user sorting callback.
Definition: CEGUIItemListBase.h:223
bool isSortEnabled(void) const
Returns 'true' if the list is sorted.
Definition: CEGUIItemListBase.h:209
Property to access the sorting mode.
Definition: CEGUIItemListBaseProperties.h:108
virtual void sizeToContent(void)
Resize the ItemListBase to exactly fit the content that is attached to it. Return a Rect object descr...
Definition: CEGUIItemListBase.h:340
Base class for ItemListBase window renderer.
Definition: CEGUIItemListBase.h:55
Base-class for the assignable WindowRenderer object.
Definition: CEGUIWindowRenderer.h:51
bool d_autoResize
Pointer to the content pane (for items), 0 if we're not using one.
Definition: CEGUIItemListBase.h:580
bool d_sortEnabled
The current sorting mode applied if sorting is enabled.
Definition: CEGUIItemListBase.h:586
virtual bool validateWindowRenderer(const String &name) const
Function used in checking if a WindowRenderer is valid for this window.
Definition: CEGUIItemListBase.h:533
size_t getItemCount(void) const
Return number of items attached to the list.
Definition: CEGUIItemListBase.h:132
Property to access the state of the sorting enabled setting.
Definition: CEGUIItemListBaseProperties.h:80
SortMode d_sortMode
The user sort callback or 0 if none.
Definition: CEGUIItemListBase.h:588
bool isAutoResizeEnabled() const
Return whether this window is automatically resized to fit its content.
Definition: CEGUIItemListBase.h:202
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: CEGUIWindow.h:138
SortMode getSortMode(void) const
Get sort mode.
Definition: CEGUIItemListBase.h:216
static const String EventSortModeChanged
Definition: CEGUIItemListBase.h:120
static const String EventNamespace
Namespace for global events.
Definition: CEGUIItemListBase.h:83
static const String EventSortEnabledChanged
Definition: CEGUIItemListBase.h:114
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: CEGUIInputEvent.h:245
SortMode
Sort modes for ItemListBase.
Definition: CEGUIItemListBase.h:89
Base class for item list widgets.
Definition: CEGUIItemListBase.h:80
Window * getContentPane(void) const
Returns a pointer to the window that all items are directed too.
Definition: CEGUIItemListBase.h:383
Class encapsulating operations on a Rectangle.
Definition: CEGUIRect.h:44
String class used within the GUI system.
Definition: CEGUIString.h:57