Public Member Functions
GUI::ListboxItem Class Reference

Base class for list box items. More...

Inherited by GUI::ListboxTextItem.

List of all members.

Public Member Functions

string getText ()
 return the text string set for this list box item.
int getID ()
 Return the current ID assigned to this list box item.
bool isSelected ()
 return whether this item is selected.
bool isDisabled ()
 return whether this item is disabled.
bool isAutoDeleted ()
 return whether this item will be automatically deleted when the list box it is attached to is destroyed, or when the item is removed from the list box.
Window getOwnerWindow ()
 Get the owner window for this ListboxItem.
ColourRect getSelectionColours ()
 Return the current colours used for selection highlighting.
Image getSelectionBrushImage ()
 Return the current selection highlighting brush.
void setText (string text)
 set the text string for this list box item.
void setID (int item_id)
 Set the ID assigned to this list box item.
void setSelected (bool setting)
 set whether this item is selected.
void setDisabled (bool setting)
 set whether this item is disabled.
void setAutoDeleted (bool setting)
 Set whether this item will be automatically deleted when the list box it is attached to is destroyed, or when the item is removed from the list box.
void setOwnerWindow (Window owner)
 Set the owner window for this ListboxItem. This is called by all the list box widgets when an item is added or inserted.
void setSelectionColours (ColourRect cols)
 Set the colours used for selection highlighting.
void setSelectionColours (Colour top_left_colour, Colour top_right_colour, Colour bottom_left_colour, Colour bottom_right_colour)
 Set the colours used for selection highlighting.
void setSelectionColours (Colour col)
 Set the colours used for selection highlighting.
void setSelectionBrushImage (Image image)
 Set the selection highlighting brush image.
void setSelectionBrushImage (string imageset, string image)
 Set the selection highlighting brush image.
Size getPixelSize ()
 Return the rendered pixel size of this list box item.

Detailed Description

Base class for list box items.


Member Function Documentation

string GUI::ListboxItem::getText ( )

return the text string set for this list box item.

Note that even if the item does not render text, the text string can still be useful, since it is used for sorting list box items.

Returns:
String object containing the current text for the list box item.
int GUI::ListboxItem::getID ( )

Return the current ID assigned to this list box item.

Note that the system does not make use of this value, client code can assign any meaning it wishes to the ID.

Returns:
ID code currently assigned to this list box item
bool GUI::ListboxItem::isSelected ( )

return whether this item is selected.

Returns:
true if the item is selected, false if the item is not selected.
bool GUI::ListboxItem::isDisabled ( )

return whether this item is disabled.

Returns:
true if the item is disabled, false if the item is enabled.
bool GUI::ListboxItem::isAutoDeleted ( )

return whether this item will be automatically deleted when the list box it is attached to is destroyed, or when the item is removed from the list box.

Returns:
true if the item object will be deleted by the system when the list box it is attached to is destroyed, or when the item is removed from the list. false if client code must destroy the item after it is removed from the list.
Window GUI::ListboxItem::getOwnerWindow ( )

Get the owner window for this ListboxItem.

The owner of a ListboxItem is typically set by the list box widgets when an item is added or inserted.

Returns:
Ponter to the window that is considered the owner of this ListboxItem.
ColourRect GUI::ListboxItem::getSelectionColours ( )

Return the current colours used for selection highlighting.

Returns:
ColourRect object describing the currently set colours
Image GUI::ListboxItem::getSelectionBrushImage ( )

Return the current selection highlighting brush.

Returns:
Pointer to the Image object currently used for selection highlighting.
void GUI::ListboxItem::setText ( string  text)

set the text string for this list box item.

Note that even if the item does not render text, the text string can still be useful, since it is used for sorting list box items.

Parameters:
textString object containing the text to set for the list box item.
Returns:
Nothing.
void GUI::ListboxItem::setID ( int  item_id)

Set the ID assigned to this list box item.

Note that the system does not make use of this value, client code can assign any meaning it wishes to the ID.

Parameters:
item_idID code to be assigned to this list box item
Returns:
Nothing.
void GUI::ListboxItem::setSelected ( bool  setting)

set whether this item is selected.

Parameters:
settingtrue if the item is selected, false if the item is not selected.
Returns:
Nothing.
void GUI::ListboxItem::setDisabled ( bool  setting)

set whether this item is disabled.

Parameters:
settingtrue if the item is disabled, false if the item is enabled.
Returns:
Nothing.
void GUI::ListboxItem::setAutoDeleted ( bool  setting)

Set whether this item will be automatically deleted when the list box it is attached to is destroyed, or when the item is removed from the list box.

Parameters:
settingtrue if the item object should be deleted by the system when the list box it is attached to is destroyed, or when the item is removed from the list. false if client code will destroy the item after it is removed from the list.
Returns:
Nothing.
void GUI::ListboxItem::setOwnerWindow ( Window  owner)

Set the owner window for this ListboxItem. This is called by all the list box widgets when an item is added or inserted.

Parameters:
ownerPonter to the window that should be considered the owner of this ListboxItem.
Returns:
Nothing
void GUI::ListboxItem::setSelectionColours ( ColourRect  cols)

Set the colours used for selection highlighting.

Parameters:
colsColourRect object describing the colours to be used.
Returns:
Nothing.
void GUI::ListboxItem::setSelectionColours ( Colour  top_left_colour,
Colour  top_right_colour,
Colour  bottom_left_colour,
Colour  bottom_right_colour 
)

Set the colours used for selection highlighting.

Parameters:
top_left_colourColour (as ARGB value) to be applied to the top-left corner of the selection area.
top_right_colourColour (as ARGB value) to be applied to the top-right corner of the selection area.
bottom_left_colourColour (as ARGB value) to be applied to the bottom-left corner of the selection area.
bottom_right_colourColour (as ARGB value) to be applied to the bottom-right corner of the selection area.
Returns:
Nothing.
void GUI::ListboxItem::setSelectionColours ( Colour  col)

Set the colours used for selection highlighting.

Parameters:
colcolour value to be used when rendering.
Returns:
Nothing.
void GUI::ListboxItem::setSelectionBrushImage ( Image  image)

Set the selection highlighting brush image.

Parameters:
imagePointer to the Image object to be used for selection highlighting.
Returns:
Nothing.
void GUI::ListboxItem::setSelectionBrushImage ( string  imageset,
string  image 
)

Set the selection highlighting brush image.

Parameters:
imagesetName of the imagest containing the image to be used.
imageName of the image to be used
Returns:
Nothing.
Size GUI::ListboxItem::getPixelSize ( )

Return the rendered pixel size of this list box item.

Returns:
Size object describing the size of the list box item in pixels.