CEGUI::ListboxTextItem Class Reference

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

Inheritance diagram for CEGUI::ListboxTextItem:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::ListboxTextItem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ListboxTextItem (const String &text, uint item_id=0, void *item_data=0, bool disabled=false, bool auto_delete=true)
 base class constructor
virtual ~ListboxTextItem (void)
 base class destructor
FontgetFont (void) const
 Return a pointer to the font being used by this ListboxTextItem.
ColourRect getTextColours (void) const
 Return the current colours used for text rendering.
void setFont (Font *font)
 Set the font to be used by this ListboxTextItem.
void setFont (const String &font_name)
 Set the font to be used by this ListboxTextItem.
void setTextColours (const 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.
Size getPixelSize (void) const
 Return the rendered pixel size of this list box item.
void draw (const Vector3 &position, float alpha, const Rect &clipper) const
 Draw the list box item in its current state.
void draw (RenderCache &cache, const Rect &targetRect, float zBase, float alpha, const Rect *clipper) const

Static Public Attributes

static const colour DefaultTextColour = 0xFFFFFFFF
 Default text colour.

Protected Attributes

ColourRect d_textCols
 Colours used for rendering the text.
Fontd_font
 Font used for rendering text.


Detailed Description

Class used for textual items in a list box.

Member Function Documentation

void CEGUI::ListboxTextItem::draw ( const Vector3 position,
float  alpha,
const Rect clipper 
) const [virtual]

Draw the list box item in its current state.

Parameters:
position Vecor3 object describing the upper-left corner of area that should be rendered in to for the draw operation.
alpha Alpha value to be used when rendering the item (between 0.0f and 1.0f).
clipper Rect object describing the clipping rectangle for the draw operation.
Returns:
Nothing.

Implements CEGUI::ListboxItem.

References CEGUI::ListboxItem::d_itemText, CEGUI::ListboxItem::d_selectBrush, CEGUI::ListboxItem::d_selectCols, CEGUI::ListboxItem::d_selected, d_textCols, CEGUI::Vector3::d_y, CEGUI::Vector3::d_z, CEGUI::Image::draw(), CEGUI::Font::drawText(), getFont(), CEGUI::Font::getFontHeight(), CEGUI::Font::getLineSpacing(), and CEGUI::ListboxItem::getModulateAlphaColourRect().

Font * CEGUI::ListboxTextItem::getFont ( void   )  const

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

References d_font, CEGUI::ListboxItem::d_owner, CEGUI::System::getDefaultFont(), CEGUI::Window::getFont(), and CEGUI::System::getSingleton().

Referenced by draw(), getPixelSize(), and setFont().

Size CEGUI::ListboxTextItem::getPixelSize ( void   )  const [virtual]

Return the rendered pixel size of this list box item.

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

Implements CEGUI::ListboxItem.

References CEGUI::Size::d_height, CEGUI::ListboxItem::d_itemText, CEGUI::Size::d_width, getFont(), CEGUI::Font::getLineSpacing(), and CEGUI::Font::getTextExtent().

ColourRect CEGUI::ListboxTextItem::getTextColours ( void   )  const [inline]

Return the current colours used for text rendering.

Returns:
ColourRect object describing the currently set colours

void CEGUI::ListboxTextItem::setFont ( const String font_name  ) 

Set the font to be used by this ListboxTextItem.

Parameters:
font_name String object containing the name of the Font to be used for rendering this item
Returns:
Nothing

References getFont(), and setFont().

void CEGUI::ListboxTextItem::setFont ( Font font  )  [inline]

Set the font to be used by this ListboxTextItem.

Parameters:
font Font to be used for rendering this item
Returns:
Nothing

Referenced by setFont().

void CEGUI::ListboxTextItem::setTextColours ( colour  col  )  [inline]

Set the colours used for text rendering.

Parameters:
col colour value to be used when rendering.
Returns:
Nothing.

References setTextColours().

Referenced by setTextColours().

void CEGUI::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_colour Colour (as ARGB value) to be applied to the top-left corner of each text glyph rendered.
top_right_colour Colour (as ARGB value) to be applied to the top-right corner of each text glyph rendered.
bottom_left_colour Colour (as ARGB value) to be applied to the bottom-left corner of each text glyph rendered.
bottom_right_colour Colour (as ARGB value) to be applied to the bottom-right corner of each text glyph rendered.
Returns:
Nothing.

References CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, d_textCols, CEGUI::ColourRect::d_top_left, and CEGUI::ColourRect::d_top_right.

void CEGUI::ListboxTextItem::setTextColours ( const ColourRect cols  )  [inline]

Set the colours used for text rendering.

Parameters:
cols ColourRect object describing the colours to be used.
Returns:
Nothing.


Generated on Thu Nov 27 20:34:35 2008 for Crazy Eddies GUI System by  doxygen 1.5.7.1