Doxygen Documentation:

- Added a new Drawing module, re-ordered it to follow color and fonts
    module by ading a little defgroup hack in Fl.H
  - Completed color and fonts module with global functions found in fl_draw.H
Modules should be quite exhaustive now, please review and add missing modules/ functions if any.
 


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6607 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Fabien Costantini 2008-12-28 11:21:03 +00:00
parent 1cfa95ae79
commit 79838655ba
2 changed files with 30 additions and 9 deletions

View File

@ -651,7 +651,7 @@ public:
/** \defgroup fl_attributes Color & Font functions
fl global color, font functions
@{ */
// color map:
static void set_color(Fl_Color, uchar, uchar, uchar);
/**
@ -718,6 +718,11 @@ public:
static Fl_Font set_fonts(const char* = 0); // platform dependent
/** @} */
/** \defgroup fl_drawings Drawing functions
fl global graphics and gui drawing functions
@{ */
// <Hack to re-order the 'Drawing functions' group>
/** @} */
// labeltypes:
static void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);

View File

@ -42,6 +42,9 @@ class Fl_Image;
// Label flags...
FL_EXPORT extern char fl_draw_shortcut;
/** \addtogroup fl_attributes
@{
*/
// Colors:
FL_EXPORT void fl_color(Fl_Color i); // select indexed color
/** for back compatibility - use fl_color(Fl_Color c) instead */
@ -53,7 +56,11 @@ extern FL_EXPORT Fl_Color fl_color_;
This can be used for state save/restore.
*/
inline Fl_Color fl_color() {return fl_color_;}
/** @} */
/** \addtogroup fl_drawings
@{
*/
// clip:
FL_EXPORT void fl_push_clip(int x, int y, int w, int h);
/** The fl_clip() name is deprecated and will be removed from future releases */
@ -149,7 +156,10 @@ FL_EXPORT double fl_transform_y(double x, double y);
FL_EXPORT double fl_transform_dx(double x, double y);
FL_EXPORT double fl_transform_dy(double x, double y);
FL_EXPORT void fl_transformed_vertex(double x, double y);
/** @} */
/** \addtogroup fl_attributes
@{ */
/* NOTE: doxygen comments here to avoid triplication in os-specific sources */
/**
Set the current font, which is then used in various drawing routines,
@ -160,9 +170,11 @@ FL_EXPORT void fl_transformed_vertex(double x, double y);
The size of the font is measured in pixels and not "points".
Lines should be spaced \a size pixels apart or more.
*/
// Fonts:
FL_EXPORT void fl_font(Fl_Font face, Fl_Fontsize size);
/** current font index */
extern FL_EXPORT Fl_Font fl_font_;
extern FL_EXPORT Fl_Font fl_font_; ///< current font index
/**
Returns the \a face set by the most recent call to fl_font().
Tgis can be used to save/restore the font.
@ -208,6 +220,15 @@ FL_EXPORT void fl_text_extents(const char*, int& dx, int& dy, int& w, int& h); /
/** Determine the minimum pixel dimensions of a sequence of \a n characters */
FL_EXPORT void fl_text_extents(const char*, int n, int& dx, int& dy, int& w, int& h);
// font encoding:
FL_EXPORT const char *fl_latin1_to_local(const char *, int n=-1);
FL_EXPORT const char *fl_local_to_latin1(const char *, int n=-1);
FL_EXPORT const char *fl_mac_roman_to_local(const char *, int n=-1);
FL_EXPORT const char *fl_local_to_mac_roman(const char *, int n=-1);
/** @} */
/** \addtogroup fl_drawings
@{ */
/**
Draw a nul-terminated string starting at the given location.
Text is aligned to the left and to the baseline of the font.
@ -236,12 +257,6 @@ FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h,
void (*callthis)(const char *,int,int,int),
Fl_Image* img=0, int draw_symbols = 1);
// font encoding:
FL_EXPORT const char *fl_latin1_to_local(const char *, int n=-1);
FL_EXPORT const char *fl_local_to_latin1(const char *, int n=-1);
FL_EXPORT const char *fl_mac_roman_to_local(const char *, int n=-1);
FL_EXPORT const char *fl_local_to_mac_roman(const char *, int n=-1);
// boxtypes:
FL_EXPORT void fl_frame(const char* s, int x, int y, int w, int h);
FL_EXPORT void fl_frame2(const char* s, int x, int y, int w, int h);
@ -286,6 +301,7 @@ FL_EXPORT void fl_reset_spot(void);
// XForms symbols:
FL_EXPORT int fl_draw_symbol(const char* label,int x,int y,int w,int h, Fl_Color);
FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scalable);
/** @} */
#endif