gltk 0.3
a C++ widget library built on GLUT
Public Member Functions | Protected Member Functions
gltk::TextDraw Class Reference

a single line text drawing object More...

#include <textdraw.hh>

Inheritance diagram for gltk::TextDraw:
gltk::ComboBoxText gltk::Frame gltk::Label gltk::Scale gltk::HScale gltk::VScale

List of all members.

Public Member Functions

void set_text (std::string const &text)
 set the text
std::string const & get_text () const
 get the text
void * get_font () const
 get used font
int get_ascent () const
 get the ascent of font used

Protected Member Functions

void draw_text (Align xalign=ALIGN_START, Align yalign=ALIGN_START, int width_limit=0)
 draw the text at the current raster position
int text_height () const
 get height of text
int text_width () const
 get width of text
int text_width (std::string const &string) const
 get width of a given string

Detailed Description

a single line text drawing object


Member Function Documentation

void TextDraw::draw_text ( Align  xalign = ALIGN_START,
Align  yalign = ALIGN_START,
int  width_limit = 0 
) [protected]

draw the text at the current raster position

Parameters:
xalignhorizontal alignment
yalignvertical alignment
width_limitwidth limit of drawn text
int TextDraw::text_width ( std::string const &  string) const [protected]

get width of a given string

Parameters:
stringstring whoes width is to be calculated
 All Classes Namespaces Files Functions Variables Enumerations Enumerator