Functions | |
void | column_widths (const int *i) |
const int * | column_widths () |
void | drawtext (const char *, int length, const Rectangle &, Flags) |
void | fltk::drawtext (const char *, const Rectangle &, Flags) |
void | fltk::drawtext (const char *, int length, float x, float y) |
void | fltk::drawtext (const char *, float x, float y) |
void | fltk::drawtext_transformed (const char *, int n, float x, float y) |
const char * | fltk::get_encoding () |
float | fltk::getascent () |
float | fltk::getdescent () |
Font * | fltk::getfont () |
float | fltk::getsize () |
float | fltk::getwidth (const char *, int length) |
float | fltk::getwidth (const char *) |
void | measure (const char *, int length, int &w, int &h, Flags) |
void | fltk::measure (const char *, int &w, int &h, Flags=0) |
void | fltk::set_encoding (const char *) |
void | setfont (const char *, int attributes, float size) |
void | setfont (const char *, float size) |
void | fltk::setfont (Font *, float size) |
Variables | |
const int * | column_widths_ |
Font * | current_font_ |
float | current_size_ |
const char * | encoding_ |
|
Set the current font and font scaling so the size is size pixels. The size is unaffected by the current transformation matrix (you may be able to use fltk::transform() to get the size to get a properly scaled font). The size is given in pixels. Many pieces of software express sizes in "points" (for mysterious reasons, since everything else is measured in pixels!). To convert these point sizes to pixel sizes use the following code: const fltk::Monitor& monitor = fltk::Monitor::all(); float pixels_per_point = monitor.dpi_y()/72.0; float font_pixel_size = font_point_size*pixels_per_point; |
|
Returns the string sent to the most recent set_encoding(). |
|
Obsolete function to encourage FLTK to choose a 256-glyph font with the given encoding. You must call setfont() after changing this for it to have any effect. Notice that this is obsolete! Only the non-Xft X version actually uses it and that may be eliminated as well. In addition FLTK uses UTF-8 internally, and assummes that any font it prints with is using Unicode encoding (or ISO-8859-1 if there are only 256 characters). The default is "iso10646-1" |
|
|
Return the size sent to the last setfont(). You should use this as a minimum line spacing (using ascent()+descent() will produce oddly spaced lines for many fonts). |
|
Return the width of a nul-terminated UTF-8 string drawn in the font set by the most recent setfont(). |
|
Return the width of the first n bytes of this UTF-8 string drawn in the font set by the most recent setfont(). |
|
Return the distance from the baseline to the top of letters in the current font. |
|
Return the distance from the baseline to the bottom of letters in the current font. |
|
Draw text starting at a point returned by fltk::transform(). This is needed for complex text layout when the current transform may not match the transform being used by the font. |
|
Draw a nul-terminated string. |
|
Draw the first n bytes (not characters if utf8 is used) starting at the given position. |
|
Measure the size of box necessary for drawtext() to draw the given string inside of it. The flags are used to set the alignment, though this should not make a difference except for fltk::ALIGN_WRAP. To correctly measure wrap w must be preset to the width you want to wrap at if fltk::ALIGN_WRAP is on in the flags! w and h are changed to the size of the resulting box. |
|
This is the fancy string-drawing function that is used to draw all labels in fltk. The string is formatted and aligned inside the passed rectangle. This also:
|