DigitalSpaces::DICEGUIItemListBase Struct Reference
[CEGUI]

#include <CEGUIInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

unsigned long getItemCount ()
 Return number of items attached to the list.
DICEGUIItemEntrygetItemFromIndex (unsigned long index)
 Return the item at index position index.
unsigned long getItemIndex (DICEGUIItemEntry *item)
 Return the index of ItemEntry item.
DICEGUIItemEntryfindItemWithText (const char *text, DICEGUIItemEntry *start_item)
 Search the list for an item with the specified text.
bool isItemInList (DICEGUIItemEntry *item)
 Return whether the specified ItemEntry is in the List.
bool isAutoResizeEnabled ()
 Return whether this window is automatically resized to fit its content.
bool isSortEnabled ()
 Returns 'true' if the list is sorted.
CEGUIItemListBaseSortMode getSortMode ()
 Get sort mode.
void resetList ()
 Get user sorting callback.
void addItem (DICEGUIItemEntry *item)
 Add the given ItemEntry to the list.
void insertItem (DICEGUIItemEntry *item, DICEGUIItemEntry *position)
 Insert an item into the list after a specified item already in the list.
void removeItem (DICEGUIItemEntry *item)
 Removes the given item from the list. If the item is has the 'DestroyedByParent' property set to 'true', the item will be deleted.
void handleUpdatedItemData ()
 Causes the list to update it's internal state after changes have been made to one or more attached ItemEntry objects.
void handleUpdatedItemData (bool resort)
void setAutoResizeEnabled (bool setting)
 Set whether or not this ItemListBase widget should automatically resize to fit its content.
void sizeToContent ()
 Resize the ItemListBase to exactly fit the content that is attached to it. Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used for rendering items.
void endInitialisation ()
 Triggers a ListContentsChanged event. These are not fired during initialisation for optimization purposes.
void performChildWindowLayout ()
 method called to perform extended laying out of attached child windows.
void getItemRenderArea (out_Vector4f *area)
 Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used for rendering list items.
DICEGUIWindowgetContentPane ()
 Returns a pointer to the window that all items are directed too.
void notifyItemClicked (DICEGUIItemEntry *li)
 Notify this ItemListBase that the given item was just clicked. Internal function - NOT to be used from client code.
void notifyItemSelectState (DICEGUIItemEntry *li, bool state)
 Notify this ItemListBase that the given item just changed selection state. Internal function - NOT to be used from client code.
void setSortEnabled (bool setting)
 Set whether the list should be sorted (by text).
void setSortMode (CEGUIItemListBaseSortMode mode)
 Set mode to be used when sorting the list.
void sortList ()
 Set a user callback as sorting function.
void sortList (bool relayout)

Member Function Documentation

unsigned long DigitalSpaces::DICEGUIItemListBase::getItemCount (  ) 

Return number of items attached to the list.

Returns:
the number of items currently attached to this list.

DICEGUIItemEntry* DigitalSpaces::DICEGUIItemListBase::getItemFromIndex ( unsigned long  index  ) 

Return the item at index position index.

Parameters:
index Zero based index of the item to be returned.
Returns:
Pointer to the ItemEntry at index position index in the list.
Exceptions:
InvalidRequestException thrown if index is out of range.

unsigned long DigitalSpaces::DICEGUIItemListBase::getItemIndex ( DICEGUIItemEntry item  ) 

Return the index of ItemEntry item.

Parameters:
item Pointer to a ItemEntry whos zero based index is to be returned.
Returns:
Zero based index indicating the position of ItemEntry item in the list.
Exceptions:
InvalidRequestException thrown if item is not attached to this list.

DICEGUIItemEntry* DigitalSpaces::DICEGUIItemListBase::findItemWithText ( const char *  text,
DICEGUIItemEntry start_item 
)

Search the list for an item with the specified text.

Parameters:
text String object containing the text to be searched for.
start_item ItemEntry where the search is to begin, the search will not include item. If item is NULL, the search will begin from the first item in the list.
Returns:
Pointer to the first ItemEntry in the list after item that has text matching text. If no item matches the criteria NULL is returned.
Exceptions:
InvalidRequestException thrown if item is not attached to this list box.

bool DigitalSpaces::DICEGUIItemListBase::isItemInList ( DICEGUIItemEntry item  ) 

Return whether the specified ItemEntry is in the List.

Returns:
true if ItemEntry item is in the list, false if ItemEntry item is not in the list.

bool DigitalSpaces::DICEGUIItemListBase::isAutoResizeEnabled (  ) 

Return whether this window is automatically resized to fit its content.

Returns:
true if automatic resizing is enabled, false if it is disabled.

bool DigitalSpaces::DICEGUIItemListBase::isSortEnabled (  ) 

Returns 'true' if the list is sorted.

CEGUIItemListBaseSortMode DigitalSpaces::DICEGUIItemListBase::getSortMode (  ) 

Get sort mode.

void DigitalSpaces::DICEGUIItemListBase::resetList (  ) 

Get user sorting callback.

Remove all items from the list. Note that this will cause items, which does not have the 'DestroyedByParent' property set to 'false', to be deleted.

void DigitalSpaces::DICEGUIItemListBase::addItem ( DICEGUIItemEntry item  ) 

Add the given ItemEntry to the list.

Parameters:
item Pointer to the ItemEntry to be added to the list. Note that it is the passed object that is added to the list, a copy is not made. If this parameter is NULL, nothing happens.
Returns:
Nothing.

void DigitalSpaces::DICEGUIItemListBase::insertItem ( DICEGUIItemEntry item,
DICEGUIItemEntry position 
)

Insert an item into the list after a specified item already in the list.

Note that if the list is sorted, the item may not end up in the requested position.

Parameters:
item Pointer to the ItemEntry to be inserted. Note that it is the passed object that is added to the list, a copy is not made. If this parameter is NULL, nothing happens.
position Pointer to a ItemEntry that item is to be inserted after. If this parameter is NULL, the item is inserted at the start of the list.
Returns:
Nothing.

void DigitalSpaces::DICEGUIItemListBase::removeItem ( DICEGUIItemEntry item  ) 

Removes the given item from the list. If the item is has the 'DestroyedByParent' property set to 'true', the item will be deleted.

Parameters:
item Pointer to the ItemEntry that is to be removed. If item is not attached to this list then nothing will happen.
Returns:
Nothing.

void DigitalSpaces::DICEGUIItemListBase::handleUpdatedItemData (  ) 

Causes the list to update it's internal state after changes have been made to one or more attached ItemEntry objects.

It should not be necessary to call this from client code, as the ItemEntries themselves call it if their parent is an ItemListBase.

Parameters:
resort 'true' to redo the list sorting as well. 'false' to only do layout and perhaps auto resize. (defaults to 'false')
Returns:
Nothing.

void DigitalSpaces::DICEGUIItemListBase::handleUpdatedItemData ( bool  resort  ) 

void DigitalSpaces::DICEGUIItemListBase::setAutoResizeEnabled ( bool  setting  ) 

Set whether or not this ItemListBase widget should automatically resize to fit its content.

Parameters:
setting Boolean value that if true enables automatic resizing, if false disables automatic resizing.
Returns:
Nothing.

void DigitalSpaces::DICEGUIItemListBase::sizeToContent (  ) 

Resize the ItemListBase to exactly fit the content that is attached to it. Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used for rendering items.

Returns:
Nothing

void DigitalSpaces::DICEGUIItemListBase::endInitialisation (  ) 

Triggers a ListContentsChanged event. These are not fired during initialisation for optimization purposes.

void DigitalSpaces::DICEGUIItemListBase::performChildWindowLayout (  ) 

method called to perform extended laying out of attached child windows.

The system may call this at various times (like when it is resized for example), and it may be invoked directly where required.

Returns:
Nothing.

void DigitalSpaces::DICEGUIItemListBase::getItemRenderArea ( out_Vector4f area  ) 

Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used for rendering list items.

Returns:
Rect object describing the window relative area of the that is to be used for rendering the items.

DICEGUIWindow* DigitalSpaces::DICEGUIItemListBase::getContentPane (  ) 

Returns a pointer to the window that all items are directed too.

Returns:
A pointer to the content pane window, or 'this' if children are added directly to this window.

void DigitalSpaces::DICEGUIItemListBase::notifyItemClicked ( DICEGUIItemEntry li  ) 

Notify this ItemListBase that the given item was just clicked. Internal function - NOT to be used from client code.

void DigitalSpaces::DICEGUIItemListBase::notifyItemSelectState ( DICEGUIItemEntry li,
bool  state 
)

Notify this ItemListBase that the given item just changed selection state. Internal function - NOT to be used from client code.

void DigitalSpaces::DICEGUIItemListBase::setSortEnabled ( bool  setting  ) 

Set whether the list should be sorted (by text).

void DigitalSpaces::DICEGUIItemListBase::setSortMode ( CEGUIItemListBaseSortMode  mode  ) 

Set mode to be used when sorting the list.

Parameters:
mode SortMode enum.

void DigitalSpaces::DICEGUIItemListBase::sortList (  ) 

Set a user callback as sorting function.

Parameters:
mode SortCallback
Sort the list.
Parameters:
relayout True if the item layout should be redone after the sorting. False to only sort the internal list. Nothing more.
This parameter defaults to true and should generally not be used in client code.

void DigitalSpaces::DICEGUIItemListBase::sortList ( bool  relayout  ) 


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:30 2008 for Digital Spaces by  doxygen 1.5.6