mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
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:
@@ -651,7 +651,7 @@ public:
|
|||||||
/** \defgroup fl_attributes Color & Font functions
|
/** \defgroup fl_attributes Color & Font functions
|
||||||
fl global color, font functions
|
fl global color, font functions
|
||||||
@{ */
|
@{ */
|
||||||
|
|
||||||
// color map:
|
// color map:
|
||||||
static void set_color(Fl_Color, uchar, uchar, uchar);
|
static void set_color(Fl_Color, uchar, uchar, uchar);
|
||||||
/**
|
/**
|
||||||
@@ -718,6 +718,11 @@ public:
|
|||||||
static Fl_Font set_fonts(const char* = 0); // platform dependent
|
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:
|
// labeltypes:
|
||||||
static void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);
|
static void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);
|
||||||
|
|||||||
+24
-8
@@ -42,6 +42,9 @@ class Fl_Image;
|
|||||||
// Label flags...
|
// Label flags...
|
||||||
FL_EXPORT extern char fl_draw_shortcut;
|
FL_EXPORT extern char fl_draw_shortcut;
|
||||||
|
|
||||||
|
/** \addtogroup fl_attributes
|
||||||
|
@{
|
||||||
|
*/
|
||||||
// Colors:
|
// Colors:
|
||||||
FL_EXPORT void fl_color(Fl_Color i); // select indexed color
|
FL_EXPORT void fl_color(Fl_Color i); // select indexed color
|
||||||
/** for back compatibility - use fl_color(Fl_Color c) instead */
|
/** 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.
|
This can be used for state save/restore.
|
||||||
*/
|
*/
|
||||||
inline Fl_Color fl_color() {return fl_color_;}
|
inline Fl_Color fl_color() {return fl_color_;}
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/** \addtogroup fl_drawings
|
||||||
|
@{
|
||||||
|
*/
|
||||||
// clip:
|
// clip:
|
||||||
FL_EXPORT void fl_push_clip(int x, int y, int w, int h);
|
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 */
|
/** 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_dx(double x, double y);
|
||||||
FL_EXPORT double fl_transform_dy(double x, double y);
|
FL_EXPORT double fl_transform_dy(double x, double y);
|
||||||
FL_EXPORT void fl_transformed_vertex(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 */
|
/* NOTE: doxygen comments here to avoid triplication in os-specific sources */
|
||||||
/**
|
/**
|
||||||
Set the current font, which is then used in various drawing routines,
|
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".
|
The size of the font is measured in pixels and not "points".
|
||||||
Lines should be spaced \a size pixels apart or more.
|
Lines should be spaced \a size pixels apart or more.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Fonts:
|
||||||
FL_EXPORT void fl_font(Fl_Font face, Fl_Fontsize size);
|
FL_EXPORT void fl_font(Fl_Font face, Fl_Fontsize size);
|
||||||
/** current font index */
|
extern FL_EXPORT Fl_Font fl_font_; ///< current font index
|
||||||
extern FL_EXPORT Fl_Font fl_font_;
|
|
||||||
/**
|
/**
|
||||||
Returns the \a face set by the most recent call to fl_font().
|
Returns the \a face set by the most recent call to fl_font().
|
||||||
Tgis can be used to save/restore the 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 */
|
/** 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);
|
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.
|
Draw a nul-terminated string starting at the given location.
|
||||||
Text is aligned to the left and to the baseline of the font.
|
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),
|
void (*callthis)(const char *,int,int,int),
|
||||||
Fl_Image* img=0, int draw_symbols = 1);
|
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:
|
// boxtypes:
|
||||||
FL_EXPORT void fl_frame(const char* s, int x, int y, int w, int h);
|
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);
|
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:
|
// 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_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);
|
FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scalable);
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user