Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# text_painter Class Reference

Painter for background_wnd. Draws a text which fits vertically in the drawing rect. More...

Inheritance diagram for text_painter:

List of all members.

## Public Types
typedef const std::string & | param0
typedef const font_info & | param1
## Public Member Functions
| text_painter (const std::string &str, const font_info &info)
text_painter * | clone () const
void | draw (HDC hDC, int cx, int cy)
void | text (const std::string &str)
std::string | text () const
void | info (const font_info &info)
font_info | info () const
void | draw_text_options (unsigned flags)
unsigned | draw_text_options () const
int | last_used_text_height () const
virtual bool | is_opaque (int cx, int cy) const

## Detailed Description

Painter for background_wnd. Draws a text which fits vertically in the drawing rect.

See also:
  Description of text_painter

  background_wnd

## Member Function Documentation

unsigned draw_text_options | ( |  | ) | const

| Returns the additional flags for DrawText().

void draw_text_options | ( | unsigned | flags | ) |

| Sets additional flags for DrawText() . The text is drawn with DrawText(). This function sets additional flags passed to DrawText(). Note: The font size is calculated by providing DT_WORDBREAK and DT_CALCRECT to DrawText() so some flags can't be used (take a look at MSDN)

text_painter::font_info info | ( |  | ) | const

| Returns the font_info.

void info | ( | const font_info & | info | ) |

| Sets the font_info.

int last_used_text_height | ( |  | ) | const

| Returns the last text height used to draw the text.

std::string text | ( |  | ) | const

| Returns the string to draw.

void text | ( | const std::string & | str | ) |

| Sets the string to draw.

| by Steven Weiss. You can contact me at steven11@gmx.de.