29 #ifndef _CEGUIItemListBase_h_
30 #define _CEGUIItemListBase_h_
33 #include "../Window.h"
34 #include "./ItemEntry.h"
40 # pragma warning(push)
41 # pragma warning(disable : 4251)
71 virtual Rectf getItemRenderArea(
void)
const = 0;
145 ItemEntry* getItemFromIndex(
size_t index)
const;
160 size_t getItemIndex(
const ItemEntry* item)
const;
190 bool isItemInList(
const ItemEntry* item)
const;
236 virtual void initialiseComponents(
void);
245 void resetList(
void);
313 void handleUpdatedItemData(
bool resort=
false);
326 void setAutoResizeEnabled(
bool setting);
346 virtual void endInitialisation(
void);
350 void performChildWindowLayout(
bool nonclient_sized_hint =
false,
351 bool client_sized_hint =
false);
363 Rectf getItemRenderArea(
void)
const;
393 void setSortEnabled(
bool setting);
401 void setSortMode(SortMode mode);
410 void setSortCallback(SortCallback cb);
423 void sortList(
bool relayout=
true);
455 virtual void sizeToContent_impl(
void);
465 virtual Sizef getContentSize()
const = 0;
487 virtual void layoutItemWidgets() = 0;
504 bool resetList_impl(
void);
507 virtual bool validateWindowRenderer(
const WindowRenderer* renderer)
const;
513 SortCallback getRealSortCallback(
void)
const;
553 virtual bool handle_PaneChildRemoved(
const EventArgs& e);
559 CEGUI_VECTOR_ALLOC(
ItemEntry*)> ItemEntryList;
560 ItemEntryList d_listItems;
573 SortCallback d_sortCallback;
581 void addItemListBaseProperties(
void);
587 virtual void addChild_impl(
Element* element);
600 static const String& getDataTypeName()
602 static String type(
"SortMode");
609 if (str ==
"Ascending")
611 return ItemListBase::Ascending;
613 else if (str ==
"Descending")
615 return ItemListBase::Descending;
619 return ItemListBase::UserSort;
625 if (val == ItemListBase::UserSort)
629 else if (val == ItemListBase::Ascending)
633 else if (val == ItemListBase::Descending)
639 assert(
false &&
"Invalid sort mode");
649 #if defined(_MSC_VER)
650 # pragma warning(pop)
653 #endif // end of guard _CEGUIItemListBase_h_