Public Member Functions
GUI::ListboxTextItem Class Reference

Class used for textual items in a list box. More...

Inherits GUI::ListboxItem.

List of all members.

Public Member Functions

Font getFont ()
 Return a pointer to the font being used by this ListboxTextItem.
ColourRect getTextColours ()
 Return the current colours used for text rendering.
void setFont (Font font)
 Set the font to be used by this ListboxTextItem.
void setFont (string font_name)
 Set the font to be used by this ListboxTextItem.
void setTextColours (ColourRect cols)
 Set the colours used for text rendering.
void setTextColours (Colour top_left_colour, Colour top_right_colour, Colour bottom_left_colour, Colour bottom_right_colour)
 Set the colours used for text rendering.
void setTextColours (Colour col)
 Set the colours used for text rendering.
- Public Member Functions inherited from GUI::ListboxItem
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

Class used for textual items in a list box.


Member Function Documentation

Font GUI::ListboxTextItem::getFont ( )

Return a pointer to the font being used by this ListboxTextItem.

This method will try a number of places to find a font to be used. If no font can be found, NULL is returned.

Returns:
Font to be used for rendering this item
ColourRect GUI::ListboxTextItem::getTextColours ( )

Return the current colours used for text rendering.

Returns:
ColourRect object describing the currently set colours
void GUI::ListboxTextItem::setFont ( Font  font)

Set the font to be used by this ListboxTextItem.

Parameters:
fontFont to be used for rendering this item
Returns:
Nothing
void GUI::ListboxTextItem::setFont ( string  font_name)

Set the font to be used by this ListboxTextItem.

Parameters:
font_nameString object containing the name of the Font to be used for rendering this item
Returns:
Nothing
void GUI::ListboxTextItem::setTextColours ( ColourRect  cols)

Set the colours used for text rendering.

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

Set the colours used for text rendering.

Parameters:
top_left_colourColour (as ARGB value) to be applied to the top-left corner of each text glyph rendered.
top_right_colourColour (as ARGB value) to be applied to the top-right corner of each text glyph rendered.
bottom_left_colourColour (as ARGB value) to be applied to the bottom-left corner of each text glyph rendered.
bottom_right_colourColour (as ARGB value) to be applied to the bottom-right corner of each text glyph rendered.
Returns:
Nothing.
void GUI::ListboxTextItem::setTextColours ( Colour  col)

Set the colours used for text rendering.

Parameters:
colcolour value to be used when rendering.
Returns:
Nothing.