30 #ifndef _CEGUIItemListBase_h_
31 #define _CEGUIItemListBase_h_
34 #include "../Window.h"
35 #include "./ItemEntry.h"
41 # pragma warning(push)
42 # pragma warning(disable : 4251)
72 virtual Rectf getItemRenderArea(
void)
const = 0;
146 ItemEntry* getItemFromIndex(
size_t index)
const;
161 size_t getItemIndex(
const ItemEntry* item)
const;
191 bool isItemInList(
const ItemEntry* item)
const;
237 virtual void initialiseComponents(
void);
246 void resetList(
void);
314 void handleUpdatedItemData(
bool resort=
false);
327 void setAutoResizeEnabled(
bool setting);
347 virtual void endInitialisation(
void);
351 void performChildWindowLayout(
bool nonclient_sized_hint =
false,
352 bool client_sized_hint =
false);
364 Rectf getItemRenderArea(
void)
const;
394 void setSortEnabled(
bool setting);
402 void setSortMode(SortMode mode);
411 void setSortCallback(SortCallback cb);
424 void sortList(
bool relayout=
true);
456 virtual void sizeToContent_impl(
void);
466 virtual Sizef getContentSize()
const = 0;
488 virtual void layoutItemWidgets() = 0;
505 bool resetList_impl(
void);
508 virtual bool validateWindowRenderer(
const WindowRenderer* renderer)
const;
514 SortCallback getRealSortCallback(
void)
const;
554 virtual bool handle_PaneChildRemoved(
const EventArgs& e);
560 CEGUI_VECTOR_ALLOC(
ItemEntry*)> ItemEntryList;
561 ItemEntryList d_listItems;
574 SortCallback d_sortCallback;
582 void addItemListBaseProperties(
void);
588 virtual void addChild_impl(
Element* element);
601 static const String& getDataTypeName()
603 static String type(
"SortMode");
610 if (str ==
"Ascending")
612 return ItemListBase::Ascending;
614 else if (str ==
"Descending")
616 return ItemListBase::Descending;
620 return ItemListBase::UserSort;
626 if (val == ItemListBase::UserSort)
630 else if (val == ItemListBase::Ascending)
634 else if (val == ItemListBase::Descending)
640 assert(
false &&
"Invalid sort mode");
650 #if defined(_MSC_VER)
651 # pragma warning(pop)
654 #endif // end of guard _CEGUIItemListBase_h_