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) 53 class CEGUIEXPORT ItemListBaseWindowRenderer :
public WindowRenderer
60 ItemListBaseWindowRenderer(
const String& name);
71 virtual Rectf getItemRenderArea(
void)
const = 0;
78 class CEGUIEXPORT ItemListBase :
public Window
81 static const String EventNamespace;
106 static const String EventListContentsChanged;
112 static const String EventSortEnabledChanged;
118 static const String EventSortModeChanged;
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);
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);
596 typedef return_type safe_method_return_type;
598 typedef String string_return_type;
600 static const String& getDataTypeName()
602 static String type(
"SortMode");
607 static return_type fromString(
const String& str)
609 if (str ==
"Ascending")
611 return ItemListBase::Ascending;
613 else if (str ==
"Descending")
615 return ItemListBase::Descending;
619 return ItemListBase::UserSort;
623 static string_return_type toString(pass_type val)
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_ virtual void notifyItemSelectState(ItemEntry *, bool)
Notify this ItemListBase that the given item just changed selection state. Internal function - NOT to...
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:387
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
A positioned and sized rectangular node in a tree graph.
Definition: cegui/include/CEGUI/Element.h:242
Base class for item type widgets.
Definition: cegui/include/CEGUI/widgets/ItemEntry.h:76
virtual void notifyItemClicked(ItemEntry *)
Notify this ItemListBase that the given item was just clicked. Internal function - NOT to be used fro...
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:380
Base class used as the argument to all subscribers Event object.
Definition: cegui/include/CEGUI/EventArgs.h:49
SortCallback getSortCallback(void) const
Get user sorting callback.
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:221
bool isSortEnabled(void) const
Returns 'true' if the list is sorted.
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:207
virtual void sizeToContent(void)
Resize the ItemListBase to exactly fit the content that is attached to it. Return a Rect object descr...
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:338
Base-class for the assignable WindowRenderer object.
Definition: cegui/include/CEGUI/WindowRenderer.h:50
size_t getItemCount(void) const
Return number of items attached to the list.
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:130
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: cegui/include/CEGUI/Window.h:149
bool isAutoResizeEnabled() const
Return whether this window is automatically resized to fit its content.
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:200
Helper class used to convert various data types to and from the format expected in Property strings...
Definition: cegui/include/CEGUI/ForwardRefs.h:84
SortMode getSortMode(void) const
Get sort mode.
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:214
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: cegui/include/CEGUI/Element.h:210
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: cegui/include/CEGUI/InputEvent.h:251
SortMode
Sort modes for ItemListBase.
Definition: cegui/include/CEGUI/widgets/ItemListBase.h:87
Base class for item list widgets.
Definition: cegui/include/CEGUI/widgets/ItemListBase.h:78
Window * getContentPane(void) const
Returns a pointer to the window that all items are directed too.
Definition: debian/tmp/usr/include/cegui-0.8.5/CEGUI/widgets/ItemListBase.h:373
String class used within the GUI system.
Definition: cegui/include/CEGUI/String.h:62