TextItem Class Reference

#include <menu.h>

Inheritance diagram for TextItem:

Inheritance graph
[legend]
Collaboration diagram for TextItem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TextItem ()
virtual ~TextItem ()
virtual void set_bounds (const coord_def &min_coord, const coord_def &max_coord)
virtual void set_bounds_no_multiply (const coord_def &min_coord, const coord_def &max_coord)
virtual void render ()
void set_text (const std::string &text)
const std::stringget_text () const

Protected Member Functions

void _wrap_text ()

Protected Attributes

std::string m_text
std::string m_render_text


Detailed Description

Basic Item with std::string unformatted text that can be selected

Constructor & Destructor Documentation

TextItem::TextItem (  ) 

TextItem::~TextItem (  )  [virtual]


Member Function Documentation

void TextItem::set_bounds ( const coord_def min_coord,
const coord_def max_coord 
) [virtual]

Rewrap the text if bounds changes

Reimplemented from MenuItem.

Here is the call graph for this function:

void TextItem::set_bounds_no_multiply ( const coord_def min_coord,
const coord_def max_coord 
) [virtual]

Rewrap the text if bounds changes

Reimplemented from MenuItem.

Here is the call graph for this function:

void TextItem::render (  )  [virtual]

Implements MenuItem.

Reimplemented in FormattedTextItem.

Here is the call graph for this function:

void TextItem::set_text ( const std::string text  ) 

Here is the call graph for this function:

const std::string & TextItem::get_text (  )  const

void TextItem::_wrap_text (  )  [protected]

Wraps and chops the m_text variable and saves the chopped text to m_render_text. This is done to preserve the old text in case the text item changes size and could fit more text Override if you use font with different sizes than CRTRegion font

Here is the call graph for this function:


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Thu Jan 13 13:42:36 2011 by  doxygen 1.5.6