diff options
| author | engelsman <engelsman> | 2008-10-28 20:58:44 +0000 |
|---|---|---|
| committer | engelsman <engelsman> | 2008-10-28 20:58:44 +0000 |
| commit | 13267ea186068caecb63b2fa89e0c620222e0469 (patch) | |
| tree | 7988fd79d55bb5d49042878c30a431ef4be52bc0 /src | |
| parent | 642d8e63fbe321759988395d407d775945b86b13 (diff) | |
added doxygen comments for more font/text functions in fl_draw.{H,cxx}
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_draw.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index d321a875e..e4a617b85 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -119,6 +119,11 @@ fl_expand_text(const char* from, char* buf, int maxbuf, double maxw, int& n, return p; } +/** + The same as fl_draw(const char*,int,int,int,int,Fl_Align,Fl_Image*,int) with + the addition of the \a callthis parameter, which is a pointer to text drawing + function such as fl_draw(const char*, int, int, int) to do the real work +*/ void fl_draw( const char* str, // the (multi-line) string int x, int y, int w, int h, // bounding box @@ -265,6 +270,19 @@ void fl_draw( } } +/** + Fancy string drawing function which is used to draw all the labels. + The string is formatted and aligned inside the passed box. + Handles '\\t' and '\\n', exapands all other control characters to '^X', + and aligns inside or against the edges of the box. + See Fl_Widget::align() for values of \a align. The value FL_ALIGN_INSIDE + is ignored, as this functon always prints inside the box. + If \a img is provided and is not \a NULL, the image is drawn above or + below the text as specified by the \a align value. + The \a draw_symbols argument specifies whether or not to look for symbol + names starting with the '\@' character' + The text length is limited to 1024 characters per line. +*/ void fl_draw( const char* str, // the (multi-line) string int x, int y, int w, int h, // bounding box @@ -278,6 +296,14 @@ void fl_draw( if (align & FL_ALIGN_CLIP) fl_pop_clip(); } +/** + Measure how wide and tall the string will be when printed by the + fl_draw() function with \a align parameter. If the incoming \a w + is non-zero it will wrap to that width. + \param[in] str nul-terminated string + \param[out] w,h width and height of string in current font + \param[in] draw_symbols non-zero to enable @symbol handling [default=1] +*/ void fl_measure(const char* str, int& w, int& h, int draw_symbols) { if (!str || !*str) {w = 0; h = 0; return;} h = fl_height(); |
