diff --git a/FL/Enumerations.H b/FL/Enumerations.H index 3ca344b0f..7690306ea 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -595,6 +595,10 @@ enum Fl_Labeltype { // labeltypes: FL_FREE_LABELTYPE ///< first free labeltype to use for creating own labeltypes }; +/** + Sets the current label type end return its corresponding Fl_Labeltype value. + @{ +*/ #define FL_SYMBOL_LABEL FL_NORMAL_LABEL extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL(); #define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL() @@ -602,6 +606,7 @@ extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL(); #define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL() extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL(); #define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL() +/** @} */ /** \name Alignment Flags */ /*@{*/ diff --git a/FL/Fl.H b/FL/Fl.H index 58a155464..bbd1e92d9 100644 --- a/FL/Fl.H +++ b/FL/Fl.H @@ -93,19 +93,22 @@ public: // should be private! static void damage(int d) {damage_ = d;} static void (*idle)(); + +#ifndef FL_DOXYGEN static Fl_Awake_Handler *awake_ring_; static void **awake_data_; static int awake_ring_size_; static int awake_ring_head_; static int awake_ring_tail_; - - static int add_awake_handler_(Fl_Awake_Handler, void*); - static int get_awake_handler_(Fl_Awake_Handler&, void*&); - static const char* scheme_; static Fl_Image* scheme_bg_; static int e_original_keysym; // late addition +#endif + + + static int add_awake_handler_(Fl_Awake_Handler, void*); + static int get_awake_handler_(Fl_Awake_Handler&, void*&); public: diff --git a/FL/Fl_Button.H b/FL/Fl_Button.H index ded1dfe9e..05b1b7585 100644 --- a/FL/Fl_Button.H +++ b/FL/Fl_Button.H @@ -36,10 +36,12 @@ #endif // values for type() -#define FL_NORMAL_BUTTON 0 -#define FL_TOGGLE_BUTTON 1 -#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) -#define FL_HIDDEN_BUTTON 3 // for Forms compatibility +#define FL_NORMAL_BUTTON 0 ///< value() remains unchanged after button press. +#define FL_TOGGLE_BUTTON 1 ///< value() is inverted after button press. +#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 after button press, and all other + buttons in the current group with type() == FL_RADIO_BUTTON + are set to zero.*/ +#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility extern FL_EXPORT int fl_old_shortcut(const char*); @@ -76,7 +78,6 @@ extern FL_EXPORT int fl_old_shortcut(const char*); (when the user pushes and releases the button, and as the mouse is dragged around in and out of the button). */ - class FL_EXPORT Fl_Button : public Fl_Widget { int shortcut_; diff --git a/FL/Fl_Fill_Dial.H b/FL/Fl_Fill_Dial.H index da5aa3fd7..db56c885f 100644 --- a/FL/Fl_Fill_Dial.H +++ b/FL/Fl_Fill_Dial.H @@ -33,8 +33,10 @@ #include "Fl_Dial.H" +/** Draws a dial with a filled arc */ class Fl_Fill_Dial : public Fl_Dial { public: + /** Creates a filled dial, also setting its type to FL_FILL_DIAL. */ Fl_Fill_Dial(int x,int y,int w,int h, const char *l = 0) : Fl_Dial(x,y,w,h,l) {type(FL_FILL_DIAL);} }; diff --git a/FL/Fl_Fill_Slider.H b/FL/Fl_Fill_Slider.H index 43cf2bffe..4ecf786ae 100644 --- a/FL/Fl_Fill_Slider.H +++ b/FL/Fl_Fill_Slider.H @@ -32,9 +32,10 @@ #define Fl_Fill_Slider_H #include "Fl_Slider.H" - +/** Widget that draws a filled horizontal slider, useful as a progress or value meter*/ class Fl_Fill_Slider : public Fl_Slider { public: + /** Creates the slider from its position,size and optional title. */ Fl_Fill_Slider(int x,int y,int w,int h,const char *l=0) : Fl_Slider(x,y,w,h,l) {type(FL_VERT_FILL_SLIDER);} }; diff --git a/FL/Fl_FormsBitmap.H b/FL/Fl_FormsBitmap.H index 33ea92a46..308a2eda9 100644 --- a/FL/Fl_FormsBitmap.H +++ b/FL/Fl_FormsBitmap.H @@ -33,6 +33,9 @@ #include "Fl_Bitmap.H" +/** + Forms compatibility Bitmap Image Widget +*/ class FL_EXPORT Fl_FormsBitmap : public Fl_Widget { Fl_Bitmap *b; protected: @@ -40,7 +43,9 @@ protected: public: Fl_FormsBitmap(Fl_Boxtype, int, int, int, int, const char * = 0); void set(int W, int H, const uchar *bits); + /** Sets a new bitmap. */ void bitmap(Fl_Bitmap *B) {b = B;} + /** Gets a the current associated Fl_Bitmap objects. */ Fl_Bitmap *bitmap() const {return b;} }; diff --git a/FL/Fl_Help_View.H b/FL/Fl_Help_View.H index 0e798db32..a2f48fa8c 100644 --- a/FL/Fl_Help_View.H +++ b/FL/Fl_Help_View.H @@ -72,25 +72,22 @@ struct Fl_Help_Block // // Fl_Help_Link structure... // - +/** Definition of a link for the html viewer*/ struct Fl_Help_Link { - char filename[192], // Reference filename - name[32]; // Link target (blank if none) - int x, // X offset of link text - y, // Y offset of link text - w, // Width of link text - h; // Height of link text + char filename[192], ///< Reference filename + name[32]; ///< Link target (blank if none) + int x, ///< X offset of link text + y, ///< Y offset of link text + w, ///< Width of link text + h; ///< Height of link text }; -// -// Fl_Help_Target structure... -// - +/** Fl_Help_Target structure */ struct Fl_Help_Target { - char name[32]; // Target name - int y; // Y offset of target + char name[32]; ///< Target name + int y; ///< Y offset of target }; /** @@ -100,43 +97,43 @@ struct Fl_Help_Target */ class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget { - enum { RIGHT = -1, CENTER, LEFT }; // Alignments + enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments - char title_[1024]; // Title string - Fl_Color defcolor_, // Default text color - bgcolor_, // Background color - textcolor_, // Text color - linkcolor_; // Link color - Fl_Font textfont_; // Default font for text - Fl_Fontsize textsize_; // Default font size - const char *value_; // HTML text value + char title_[1024]; ///< Title string + Fl_Color defcolor_, ///< Default text color + bgcolor_, ///< Background color + textcolor_, ///< Text color + linkcolor_; ///< Link color + Fl_Font textfont_; ///< Default font for text + Fl_Fontsize textsize_; ///< Default font size + const char *value_; ///< HTML text value - int nblocks_, // Number of blocks/paragraphs - ablocks_; // Allocated blocks - Fl_Help_Block *blocks_; // Blocks + int nblocks_, ///< Number of blocks/paragraphs + ablocks_; ///< Allocated blocks + Fl_Help_Block *blocks_; ///< Blocks - int nfonts_; // Number of fonts in stack - Fl_Font fonts_[100]; // Font stack - Fl_Fontsize font_sizes_[100]; // Font Size stack + int nfonts_; ///< Number of fonts in stack + Fl_Font fonts_[100]; ///< Font stack + Fl_Fontsize font_sizes_[100]; ///< Font Size stack - Fl_Help_Func *link_; // Link transform function + Fl_Help_Func *link_; ///< Link transform function - int nlinks_, // Number of links - alinks_; // Allocated links - Fl_Help_Link *links_; // Links + int nlinks_, ///< Number of links + alinks_; ///< Allocated links + Fl_Help_Link *links_; ///< Links - int ntargets_, // Number of targets - atargets_; // Allocated targets - Fl_Help_Target *targets_; // Targets + int ntargets_, ///< Number of targets + atargets_; ///< Allocated targets + Fl_Help_Target *targets_; ///< Targets - char directory_[1024]; // Directory for current file - char filename_[1024]; // Current filename - int topline_, // Top line in document - leftline_, // Lefthand position - size_, // Total document length - hsize_; // Maximum document width - Fl_Scrollbar scrollbar_, // Vertical scrollbar for document - hscrollbar_; // Horizontal scrollbar + char directory_[1024]; ///< Directory for current file + char filename_[1024]; ///< Current filename + int topline_, ///< Top line in document + leftline_, ///< Lefthand position + size_, ///< Total document length + hsize_; ///< Maximum document width + Fl_Scrollbar scrollbar_, ///< Vertical scrollbar for document + hscrollbar_; ///< Horizontal scrollbar static int selection_first; static int selection_last; diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index 8b8fdcabd..b0aeb3b69 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -114,15 +114,15 @@ class Fl_Menu_; releases of FLTK. */ struct FL_EXPORT Fl_Menu_Item { - const char *text; // label() - int shortcut_; - Fl_Callback *callback_; - void *user_data_; - int flags; - uchar labeltype_; - Fl_Font labelfont_; - Fl_Fontsize labelsize_; - unsigned labelcolor_; + const char *text; ///< menu item text, returned by label() + int shortcut_; ///< menu item shortcut + Fl_Callback *callback_; ///< menu item callback + void *user_data_; ///< menu item user_data for 3rd party apps + int flags; ///< menu item flags like FL_MENU_TOGGLE,FL_MENU_RADIO + uchar labeltype_; ///< how the menu item text looks like + Fl_Font labelfont_; ///< which font for this menu item text + Fl_Fontsize labelsize_; ///< size of menu item text + unsigned labelcolor_; ///< menu item text color // advance N items, skipping submenus: const Fl_Menu_Item *next(int=1) const; diff --git a/FL/Fl_Preferences.H b/FL/Fl_Preferences.H index 7ff43e9f5..950d155ca 100644 --- a/FL/Fl_Preferences.H +++ b/FL/Fl_Preferences.H @@ -458,7 +458,7 @@ public: operator const char *() { return data_; } ~Name(); }; - + /** An entry associates a preference name to its corresponding value */ struct Entry { char *name, *value; diff --git a/FL/Fl_Round_Clock.H b/FL/Fl_Round_Clock.H index cffed6a9d..33ad726ba 100644 --- a/FL/Fl_Round_Clock.H +++ b/FL/Fl_Round_Clock.H @@ -33,8 +33,10 @@ #include "Fl_Clock.H" +/** A clock widget of type FL_ROUND_CLOCK. Has no box. */ class Fl_Round_Clock : public Fl_Clock { public: + /** Creates the clock widget, setting his type and box. */ Fl_Round_Clock(int x,int y,int w,int h, const char *l = 0) : Fl_Clock(x,y,w,h,l) {type(FL_ROUND_CLOCK); box(FL_NO_BOX);} }; diff --git a/FL/Fl_Simple_Counter.H b/FL/Fl_Simple_Counter.H index 1b0c1a80d..0e1e1a4ef 100644 --- a/FL/Fl_Simple_Counter.H +++ b/FL/Fl_Simple_Counter.H @@ -32,7 +32,7 @@ #define Fl_Simple_Counter_H #include "Fl_Counter.H" - +/** This widget creates a counter with only 2 arrow buttons */ class Fl_Simple_Counter : public Fl_Counter { public: Fl_Simple_Counter(int x,int y,int w,int h, const char *l = 0) diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H index 8fb746690..1aafb5228 100644 --- a/FL/Fl_Text_Buffer.H +++ b/FL/Fl_Text_Buffer.H @@ -276,36 +276,36 @@ class FL_EXPORT Fl_Text_Buffer { void update_selections(int pos, int nDeleted, int nInserted); - Fl_Text_Selection mPrimary; /* highlighted areas */ - Fl_Text_Selection mSecondary; - Fl_Text_Selection mHighlight; - int mLength; /* length of the text in the buffer (the length + Fl_Text_Selection mPrimary; /**< highlighted areas */ + Fl_Text_Selection mSecondary; /**< highlighted areas */ + Fl_Text_Selection mHighlight; /**< highlighted areas */ + int mLength; /**< length of the text in the buffer (the length of the buffer itself must be calculated: gapEnd - gapStart + length) */ - char* mBuf; /* allocated memory where the text is stored */ - int mGapStart; /* points to the first character of the gap */ - int mGapEnd; /* points to the first char after the gap */ + char* mBuf; /**< allocated memory where the text is stored */ + int mGapStart; /**< points to the first character of the gap */ + int mGapEnd; /**< points to the first char after the gap */ // The hardware tab distance used by all displays for this buffer, // and used in computing offsets for rectangular selection operations. - int mTabDist; /* equiv. number of characters in a tab */ - int mUseTabs; /* True if buffer routines are allowed to use + int mTabDist; /**< equiv. number of characters in a tab */ + int mUseTabs; /**< True if buffer routines are allowed to use tabs for padding in rectangular operations */ - int mNModifyProcs; /* number of modify-redisplay procs attached */ - Fl_Text_Modify_Cb* /* procedures to call when buffer is */ - mNodifyProcs; /* modified to redisplay contents */ - void** mCbArgs; /* caller arguments for modifyProcs above */ - int mNPredeleteProcs; /* number of pre-delete procs attached */ - Fl_Text_Predelete_Cb* /* procedure to call before text is deleted */ - mPredeleteProcs; /* from the buffer; at most one is supported. */ - void **mPredeleteCbArgs; /* caller argument for pre-delete proc above */ - int mCursorPosHint; /* hint for reasonable cursor position after + int mNModifyProcs; /**< number of modify-redisplay procs attached */ + Fl_Text_Modify_Cb* /**< procedures to call when buffer is */ + mNodifyProcs; /**< modified to redisplay contents */ + void** mCbArgs; /**< caller arguments for modifyProcs above */ + int mNPredeleteProcs; /**< number of pre-delete procs attached */ + Fl_Text_Predelete_Cb* /**< procedure to call before text is deleted */ + mPredeleteProcs; /**< from the buffer; at most one is supported. */ + void **mPredeleteCbArgs; /**< caller argument for pre-delete proc above */ + int mCursorPosHint; /**< hint for reasonable cursor position after a buffer modification operation */ - char mNullSubsChar; /* NEdit is based on C null-terminated strings, + char mNullSubsChar; /**< NEdit is based on C null-terminated strings, so ascii-nul characters must be substituted with something else. This is the else, but of course, things get quite messy when you use it */ - char mCanUndo; /* if this buffer is used for attributes, it must + char mCanUndo; /**< if this buffer is used for attributes, it must not do any undo calls */ }; diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H index 08286e79d..87230084d 100644 --- a/FL/Fl_Text_Display.H +++ b/FL/Fl_Text_Display.H @@ -48,6 +48,7 @@ */ class FL_EXPORT Fl_Text_Display: public Fl_Group { public: + /** text display cursor shapes enumeration */ enum { NORMAL_CURSOR, CARET_CURSOR, DIM_CURSOR, BLOCK_CURSOR, HEAVY_CURSOR @@ -57,9 +58,10 @@ class FL_EXPORT Fl_Text_Display: public Fl_Group { CURSOR_POS, CHARACTER_POS }; - // drag types- they match Fl::event_clicks() so that single clicking to - // start a collection selects by character, double clicking selects by - // word and triple clicking selects by line. + /** drag types- they match Fl::event_clicks() so that single clicking to + start a collection selects by character, double clicking selects by + word and triple clicking selects by line. + */ enum { DRAG_CHAR = 0, DRAG_WORD = 1, DRAG_LINE = 2 }; @@ -67,13 +69,14 @@ class FL_EXPORT Fl_Text_Display: public Fl_Group { typedef void (*Unfinished_Style_Cb)(int, void *); - // style attributes - currently not implemented! + /** style attributes - currently not implemented! */ enum { ATTR_NONE = 0, ATTR_UNDERLINE = 1, ATTR_HIDDEN = 2 }; - + /** This structure associates the color,font,size of a string to draw + with an attribute mask matching attr */ struct Style_Table_Entry { Fl_Color color; Fl_Font font; diff --git a/FL/Fl_Text_Editor.H b/FL/Fl_Text_Editor.H index 75f72a35b..1c7ba221c 100644 --- a/FL/Fl_Text_Editor.H +++ b/FL/Fl_Text_Editor.H @@ -48,13 +48,15 @@ */ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { public: + /** Key function binding callback type */ typedef int (*Key_Func)(int key, Fl_Text_Editor* editor); + /** Simple linked list associating a key/state to a function */ struct Key_Binding { - int key; - int state; - Key_Func function; - Key_Binding* next; + int key; ///< the key pressed + int state; ///< the state of key modifiers + Key_Func function; ///< associated function + Key_Binding* next; ///< next key binding in the list }; Fl_Text_Editor(int X, int Y, int W, int H, const char* l = 0); @@ -121,10 +123,12 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { int handle_key(); void maybe_do_callback(); +#ifndef FL_DOXYGEN int insert_mode_; Key_Binding* key_bindings; static Key_Binding* global_key_bindings; Key_Func default_key_function_; +#endif }; #endif diff --git a/FL/Fl_Valuator.H b/FL/Fl_Valuator.H index eb2d8a814..89dce8503 100644 --- a/FL/Fl_Valuator.H +++ b/FL/Fl_Valuator.H @@ -36,8 +36,8 @@ #endif // shared type() values for classes that work in both directions: -#define FL_VERTICAL 0 -#define FL_HORIZONTAL 1 +#define FL_VERTICAL 0 ///< The valuator can work vertically +#define FL_HORIZONTAL 1 ///< The valuator can work horizontally /** The Fl_Valuator class controls a single floating-point value @@ -59,16 +59,19 @@ class FL_EXPORT Fl_Valuator : public Fl_Widget { double A; int B; // rounds to multiples of A/B, or no rounding if A is zero protected: - - int horizontal() const {return type()&1;} + /** Tells if the valuator is an FL_HORIZONTAL one */ + int horizontal() const {return type()& FL_HORIZONTAL;} Fl_Valuator(int X, int Y, int W, int H, const char* L); + /** Gets the previous floating point value before an event changed it */ double previous_value() const {return previous_value_;} + /** Stores the current value in the previous value */ void handle_push() {previous_value_ = value_;} double softclamp(double); void handle_drag(double newvalue); void handle_release(); // use drag() value virtual void value_damage(); // cause damage() due to value() changing + /** Sets the current floating point value. */ void set_value(double v) {value_ = v;} public: diff --git a/FL/Fl_Value_Input.H b/FL/Fl_Value_Input.H index f64a76b58..f17adcd06 100644 --- a/FL/Fl_Value_Input.H +++ b/FL/Fl_Value_Input.H @@ -63,6 +63,8 @@ */ class FL_EXPORT Fl_Value_Input : public Fl_Valuator { public: + /* This is the encapsulated Fl_input attribute to which + this class delegates the value font, color and shortcut */ Fl_Input input; private: char soft_; diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 6992cd905..a0eba9e3a 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -38,9 +38,13 @@ class Fl_Window; class Fl_Group; class Fl_Image; +/** Default callback type definition for all fltk widgets (by far the most used) */ typedef void (Fl_Callback )(Fl_Widget*, void*); +/** Default callback type pointer definition for all fltk widgets */ typedef Fl_Callback* Fl_Callback_p; // needed for BORLAND +/** One parameter Callback type definition passing only the widget */ typedef void (Fl_Callback0)(Fl_Widget*); +/** Callback type definition passing the widget and a long data value */ typedef void (Fl_Callback1)(Fl_Widget*, long); @@ -133,16 +137,28 @@ protected: void w(int v) {w_ = v;} /** Internal use only. Use position(int,int), size(int, int) or resize(int,int,int,int) instead. */ void h(int v) {h_ = v;} - + /** Gets the widget flags mask */ int flags() const {return flags_;} + /** Sets a flag in the flags mask */ void set_flag(int c) {flags_ |= c;} + /** Clears a flag in the flags mask */ void clear_flag(int c) {flags_ &= ~c;} - enum {INACTIVE=1, INVISIBLE=2, OUTPUT=4, SHORTCUT_LABEL=64, - CHANGED=128, VISIBLE_FOCUS=512, COPIED_LABEL = 1024}; - + /** flags possible values enumeration. + See activate(),output(), visible(), changed(), set_visible_focus() + */ + enum { + INACTIVE=1, ///< the widget can't receive focus, and is disabled but potentially visible + INVISIBLE=2, ///< the widget is not drawn but can receive events + OUTPUT=4, ///< for output only + SHORTCUT_LABEL=64, ///< the label contains a shortcut we need to draw + CHANGED=128, ///< the widget value changed + VISIBLE_FOCUS=512, ///< accepts keyboard focus navigation if the widget can have the focus + COPIED_LABEL = 1024 ///< the widget label is internally copied, its destruction is handled by the widget + }; void draw_box() const; void draw_box(Fl_Boxtype, Fl_Color) const; void draw_box(Fl_Boxtype, int,int,int,int, Fl_Color) const; + /** draws a focus rectangle around the widget */ void draw_focus() {draw_focus(box(),x(),y(),w(),h());} void draw_focus(Fl_Boxtype, int,int,int,int) const; void draw_label() const; @@ -864,9 +880,11 @@ public: void color2(unsigned a) {color2_ = a;} }; -// reserved type numbers (necessary for my cheapo RTTI) start here. -// grep the header files for "RESERVED_TYPE" to find the next available -// number. +/** + Reserved type numbers (necessary for my cheapo RTTI) start here. + grep the header files for "RESERVED_TYPE" to find the next available + number. +*/ #define FL_RESERVED_TYPE 100 #endif diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index f6561741e..19284d551 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -33,8 +33,8 @@ #include "Fl_Group.H" -#define FL_WINDOW 0xF0 // all subclasses have type() >= this -#define FL_DOUBLE_WINDOW 0xF1 +#define FL_WINDOW 0xF0 ///< window type id all subclasses have type() >= this +#define FL_DOUBLE_WINDOW 0xF1 ///< double window type id class Fl_X; @@ -85,6 +85,7 @@ class FL_EXPORT Fl_Window : public Fl_Group { protected: + /** Stores the last window that was made current. See current() const */ static Fl_Window *current_; virtual void draw(); /** Forces the window to be drawn, this window is also made current and calls draw(). */ @@ -165,9 +166,7 @@ public: off. It only works before show() is called. */ void clear_border() {set_flag(FL_NOBORDER);} - /** - See int Fl_Window::border(int) - */ + /** See int Fl_Window::border(int) */ int border() const {return !(flags() & FL_NOBORDER);} /** Activate the flags FL_NOBORDER|FL_OVERRIDE */ void set_override() {set_flag(FL_NOBORDER|FL_OVERRIDE);} @@ -183,9 +182,7 @@ public: Fl::modal(). */ void set_modal() {set_flag(FL_MODAL);} - /** - Returns true if this window is modal. - */ + /** Returns true if this window is modal. */ int modal() const {return flags() & FL_MODAL;} /** A "non-modal" window (terminology borrowed from Microsoft Windows) @@ -194,9 +191,7 @@ public: window: modal, non-modal, and normal. */ void set_non_modal() {set_flag(FL_NON_MODAL);} - /** - Returns true if this window is modal or non-modal. - */ + /** Returns true if this window is modal or non-modal. */ int non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);} /** @@ -207,13 +202,9 @@ public: does not work with some X window managers). \see position() */ void hotspot(int x, int y, int offscreen = 0); - /** - See void Fl_Window::hotspot(int x, int y, int offscreen = 0) - */ + /** See void Fl_Window::hotspot(int x, int y, int offscreen = 0) */ void hotspot(const Fl_Widget*, int offscreen = 0); - /** - See void Fl_Window::hotspot(int x, int y, int offscreen = 0) - */ + /** See void Fl_Window::hotspot(int x, int y, int offscreen = 0) */ void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);} /** Undoes the effect of a previous resize() or show() @@ -258,27 +249,18 @@ public: void size_range(int a, int b, int c=0, int d=0, int e=0, int f=0, int g=0) { minw=a; minh=b; maxw=c; maxh=d; dw=e; dh=f; aspect=g; size_range_();} - /** - See void Fl_Window::label(const char*) - */ + /** See void Fl_Window::label(const char*) */ const char* label() const {return Fl_Widget::label();} - /** - See void Fl_Window::iconlabel(const char*) - */ + /** See void Fl_Window::iconlabel(const char*) */ const char* iconlabel() const {return iconlabel_;} - /** - Gets or sets the window title bar label. - */ + /** Sets the window title bar label. */ void label(const char*); - /** - Gets or sets the icon label. - */ + /** Sets the icon label. */ void iconlabel(const char*); - void label(const char* label, const char* iconlabel); + /** Gets or sets the icon label. */ + void label(const char* label, const char* iconlabel); // platform dependent void copy_label(const char* a); - /** - See void Fl_Window::xclass(const char*) - */ + /** See void Fl_Window::xclass(const char*) */ const char* xclass() const {return xclass_;} /** A string used to tell the system what type of window this is. Mostly @@ -353,7 +335,7 @@ public: int x_root() const ; int y_root() const ; - static Fl_Window *current(); + static Fl_Window *current(); /** Sets things up so that the drawing functions in <FL/fl_draw.H> will go into this window. This is useful for incremental update of windows, such as in an @@ -370,14 +352,15 @@ public: Changes the cursor for this window. This always calls the system, if you are changing the cursor a lot you may want to keep track of how you set it in a static varaible and call this only if the new cursor - is different. - + is different. +

The type Fl_Cursor is an enumeration defined in <Enumerations.H>. (Under X you can get any XC_cursor value by passing Fl_Cursor((XC_foo/2)+1)). The colors only work on X, they are not implemented on WIN32. +

For back compatibility only. */ - void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); + void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); // platform dependent void default_cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); static void default_callback(Fl_Window*, void* v); diff --git a/FL/glut.H b/FL/glut.H index 1cc242c26..dcd5b311d 100644 --- a/FL/glut.H +++ b/FL/glut.H @@ -408,7 +408,10 @@ FL_EXPORT GLUTproc glutGetProcAddress(const char *procName); //inline void glutVideoPan(int x, int y, int width, int height); // Font argument must be a void* for compatability, so... -extern FL_EXPORT struct Fl_Glut_Bitmap_Font {Fl_Font font; Fl_Fontsize size;} +/** fltk glut font/size attributes used in the glutXXX functions */ +Fl_Glut_Bitmap_Font {Fl_Font font; Fl_Fontsize size;} + +extern FL_EXPORT struct Fl_Glut_Bitmap_Font glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10, glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12, glutBitmapHelvetica18; diff --git a/FL/mac.H b/FL/mac.H index fad685102..384501a60 100644 --- a/FL/mac.H +++ b/FL/mac.H @@ -28,8 +28,9 @@ // Do not directly include this file, instead use . It will // include this file if "__APPLE__" is defined. This is to encourage // portability of even the system-specific code... +#ifndef FL_DOXYGEN -#ifndef Fl_X_H +#if !defined(Fl_X_H) # error "Never use directly; include instead." #endif // !Fl_X_H @@ -129,7 +130,7 @@ extern void fl_open_display(); extern void fl_open_callback(void (*cb)(const char *)); extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); - +#endif // FL_DOXYGEN // // End of "$Id$". // diff --git a/FL/win32.H b/FL/win32.H index ad1b69369..e58dbfb39 100644 --- a/FL/win32.H +++ b/FL/win32.H @@ -29,6 +29,7 @@ // include this file if WIN32 is defined. This is to encourage // portability of even the system-specific code... +#ifndef FL_DOXYGEN #ifndef Fl_X_H # error "Never use directly; include instead." #endif // !Fl_X_H @@ -146,7 +147,7 @@ extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm); inline void fl_open_callback(void (*)(const char *)) {} extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); - +#endif // FL_DOXYGEN // // End of "$Id$". // diff --git a/FL/x.H b/FL/x.H index 1c23ee520..2049d5bd3 100644 --- a/FL/x.H +++ b/FL/x.H @@ -30,7 +30,7 @@ // need to call Xlib directly. These symbols may not exist on non-X // systems. -#ifndef Fl_X_H +#if !defined(Fl_X_H) && !defined(FL_DOXYGEN) # define Fl_X_H # include "Enumerations.H" diff --git a/documentation/Doxyfile b/documentation/Doxyfile index 4e02d8c1e..19c3c7a04 100644 --- a/documentation/Doxyfile +++ b/documentation/Doxyfile @@ -549,7 +549,6 @@ RECURSIVE = YES # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = ../src/fl_font_win32.cxx ../src/fl_font_mac.cxx \ - ../src/forms_compatability.cxx # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded diff --git a/src/Fl.cxx b/src/Fl.cxx index 1d02f4006..667380c2a 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -56,7 +56,7 @@ void fl_cleanup_dc_list(void); // // Globals... // - +#ifndef FL_DOXYGEN Fl_Widget *Fl::belowmouse_, *Fl::pushed_, *Fl::focus_, @@ -79,12 +79,13 @@ int Fl::e_length; int Fl::visible_focus_ = 1, Fl::dnd_text_ops_ = 1; - Fl_Window *fl_xfocus; // which window X thinks has focus Fl_Window *fl_xmousewin;// which window X thinks has FL_ENTER Fl_Window *Fl::grab_; // most recent Fl::grab() Fl_Window *Fl::modal_; // topmost modal() window +#endif // FL_DOXYGEN + // // 'Fl::version()' - Return the API version number... // diff --git a/src/Fl_Font.H b/src/Fl_Font.H index 43045266c..f69b74f3c 100644 --- a/src/Fl_Font.H +++ b/src/Fl_Font.H @@ -30,11 +30,6 @@ // Fl_Fontdesc: an entry into the fl_font() table. There is one of these // for each fltk font number. // -// Fl_Font_Descriptor: a structure for an actual system font, with junk to -// help choose it and info on character sizes. Each Fl_Fontdesc has a -// linked list of these. These are created the first time each system -// font/size combination is used. - #ifndef FL_FONT_ #define FL_FONT_ @@ -46,9 +41,17 @@ typedef struct _XftFont XftFont; # include # endif // USE_XFT +/** + This a structure for an actual system font, with junk to + help choose it and info on character sizes. Each Fl_Fontdesc has a + linked list of these. These are created the first time each system + font/size combination is used. +*/ class Fl_Font_Descriptor { public: - Fl_Font_Descriptor *next; // linked list for this Fl_Fontdesc + /** linked list for this Fl_Fontdesc */ + Fl_Font_Descriptor *next; +#ifndef FL_DOXYGEN // don't bother with platorm dependant details in the doc. # ifdef WIN32 HFONT fid; int *width[64]; @@ -84,7 +87,10 @@ public: unsigned int listbase;// base of display list, 0 = none char glok[64]; # endif + FL_EXPORT ~Fl_Font_Descriptor(); + +#endif // FL_DOXYGEN }; extern FL_EXPORT Fl_Font_Descriptor *fl_fontsize; // the currently selected one diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index c92ff272d..dbf37d39c 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -275,10 +275,7 @@ void Fl_Help_View::hv_draw(const char *t, int x, int y) } -// -// 'Fl_Help_View::add_block()' - Add a text block to the list. -// - +/** Add a text block to the list. */ Fl_Help_Block * // O - Pointer to new block Fl_Help_View::add_block(const char *s, // I - Pointer to start of block text int xx, // I - X position of block @@ -319,12 +316,8 @@ Fl_Help_View::add_block(const char *s, // I - Pointer to start of block text } -// -// 'Fl_Help_View::add_link()' - Add a new link to the list. -// - -void -Fl_Help_View::add_link(const char *n, // I - Name of link +/** Add a new link to the list. */ +void Fl_Help_View::add_link(const char *n, // I - Name of link int xx, // I - X position of link int yy, // I - Y position of link int ww, // I - Width of link text @@ -365,12 +358,8 @@ Fl_Help_View::add_link(const char *n, // I - Name of link } -// -// 'Fl_Help_View::add_target()' - Add a new target to the list. -// - -void -Fl_Help_View::add_target(const char *n, // I - Name of target +/** Adds a new target to the list. */ +void Fl_Help_View::add_target(const char *n, // I - Name of target int yy) // I - Y position of target { Fl_Help_Target *temp; // New target @@ -394,11 +383,7 @@ Fl_Help_View::add_target(const char *n, // I - Name of target ntargets_ ++; } - -// -// 'Fl_Help_View::compare_targets()' - Compare two targets. -// - +/** Compare two targets.*/ int // O - Result of comparison Fl_Help_View::compare_targets(const Fl_Help_Target *t0, // I - First target const Fl_Help_Target *t1) // I - Second target @@ -406,11 +391,7 @@ Fl_Help_View::compare_targets(const Fl_Help_Target *t0, // I - First target return (strcasecmp(t0->name, t1->name)); } - -// -// 'Fl_Help_View::do_align()' - Compute the alignment for a line in a block. -// - +/** Compute the alignment for a line in a block.*/ int // O - New line Fl_Help_View::do_align(Fl_Help_Block *block, // I - Block to add to int line, // I - Current line @@ -449,11 +430,7 @@ Fl_Help_View::do_align(Fl_Help_Block *block, // I - Block to add to return (line); } - -// -// 'Fl_Help_View::draw()' - Draw the Fl_Help_View widget. -// - +/** Draw the Fl_Help_View widget.*/ void Fl_Help_View::draw() { @@ -1003,7 +980,8 @@ Fl_Help_View::draw() -/** Find the specified string s at starting position p, return the matching pos or -1 if not found */ +/** Find the specified string s at starting position p, return the matching pos + or -1 if not found */ int // O - Matching position or -1 if not found Fl_Help_View::find(const char *s, // I - String to find int p) // I - Starting position @@ -1061,14 +1039,8 @@ Fl_Help_View::find(const char *s, // I - String to find return (-1); } - -// -// 'Fl_Help_View::format()' - Format the help text. -// - -void -Fl_Help_View::format() -{ +/** Format the help text.*/ +void Fl_Help_View::format() { int i; // Looping var int done; // Are we done yet? Fl_Help_Block *block, // Current block @@ -1878,10 +1850,7 @@ Fl_Help_View::format() } -// -// 'Fl_Help_View::format_table()' - Format a table... -// - +/** Format a table */ void Fl_Help_View::format_table(int *table_width, // O - Total table width int *columns, // O - Column widths @@ -2315,10 +2284,7 @@ Fl_Help_View::format_table(int *table_width, // O - Total table width } -// -// 'Fl_Help_View::free_data()' - Free memory used for the document. -// - +/** Free memory used for the document. */ void Fl_Help_View::free_data() { // Release all images... @@ -2424,10 +2390,7 @@ Fl_Help_View::free_data() { } } -// -// 'Fl_Help_View::get_align()' - Get an alignment attribute. -// - +/** Get an alignment attribute. */ int // O - Alignment Fl_Help_View::get_align(const char *p, // I - Pointer to start of attrs int a) // I - Default alignment @@ -2447,10 +2410,7 @@ Fl_Help_View::get_align(const char *p, // I - Pointer to start of attrs } -// -// 'Fl_Help_View::get_attr()' - Get an attribute value from the string. -// - +/** Get an attribute value from the string. */ const char * // O - Pointer to buf or NULL Fl_Help_View::get_attr(const char *p, // I - Pointer to start of attributes const char *n, // I - Name of attribute @@ -2522,10 +2482,7 @@ Fl_Help_View::get_attr(const char *p, // I - Pointer to start of attributes } -// -// 'Fl_Help_View::get_color()' - Get an alignment attribute. -// - +/** Get an alignment attribute. */ Fl_Color // O - Color value Fl_Help_View::get_color(const char *n, // I - Color name Fl_Color c) // I - Default color value @@ -2584,10 +2541,7 @@ Fl_Help_View::get_color(const char *n, // I - Color name } -// -// 'Fl_Help_View::get_image()' - Get an inline image. -// - +/** Gets an inline image. */ Fl_Shared_Image * Fl_Help_View::get_image(const char *name, int W, int H) { const char *localname; // Local filename @@ -2635,10 +2589,7 @@ Fl_Help_View::get_image(const char *name, int W, int H) { } -// -// 'Fl_Help_View::get_length()' - Get a length value, either absolute or %. -// - +/** Gets a length value, either absolute or %. */ int Fl_Help_View::get_length(const char *l) { // I - Value int val; // Integer value @@ -2920,10 +2871,7 @@ void Fl_Help_View::end_selection(int clipboard) #define ctrl(x) ((x)&0x1f) -// -// 'Fl_Help_View::handle()' - Handle events in the widget. -// - +/** Handle events in the widget. */ int // O - 1 if we handled it, 0 otherwise Fl_Help_View::handle(int event) // I - Event to handle { @@ -3072,10 +3020,7 @@ Fl_Help_View::Fl_Help_View(int xx, // I - Left position } -// -// 'Fl_Help_View::~Fl_Help_View()' - Destroy a Fl_Help_View widget. -// - +/** Destroy a Fl_Help_View widget. */ Fl_Help_View::~Fl_Help_View() /** The destructor destroys the widget and frees all memory that has been @@ -3087,9 +3032,7 @@ Fl_Help_View::~Fl_Help_View() } -// -// 'Fl_Help_View::load()' - Load the specified file. -// +/** Load the specified file. */ int // O - 0 on success, -1 on error Fl_Help_View::load(const char *f)// I - Filename to load (may also have target) @@ -3188,9 +3131,7 @@ Fl_Help_View::load(const char *f)// I - Filename to load (may also have target) } -// -// 'Fl_Help_View::resize()' - Resize the help widget. -// +/** Resize the help widget. */ void Fl_Help_View::resize(int xx, // I - New left position @@ -3306,10 +3247,7 @@ Fl_Help_View::value(const char *v) // I - Text to view // part b in the table seems to be mac_roman - beku # define ENC(a, b) a -// -// 'quote_char()' - Return the character code associated with a quoted char. -// - +/** Return the character code associated with a quoted char. */ static int // O - Code or -1 on error quote_char(const char *p) { // I - Quoted string int i; // Looping var @@ -3439,10 +3377,7 @@ quote_char(const char *p) { // I - Quoted string } -// -// 'scrollbar_callback()' - A callback for the scrollbar. -// - +/** The scrollbar callback. */ static void scrollbar_callback(Fl_Widget *s, void *) { @@ -3450,10 +3385,7 @@ scrollbar_callback(Fl_Widget *s, void *) } -// -// 'hscrollbar_callback()' - A callback for the horizontal scrollbar. -// - +/** The horizontal scrollbar callback . */ static void hscrollbar_callback(Fl_Widget *s, void *) { diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx index a1dfbc7a2..e7550f3ba 100644 --- a/src/Fl_Text_Buffer.cxx +++ b/src/Fl_Text_Buffer.cxx @@ -114,7 +114,7 @@ static void undobuffersize(int n) { } } -/* +/** Create an empty text buffer of a pre-determined size (use this to avoid unnecessary re-allocation if you know exactly how much the buffer will need to hold @@ -210,14 +210,11 @@ void Fl_Text_Buffer::text(const char *t) { free((void *)deletedText); } -/* +/** Return a copy of the text between "start" and "end" character positions from text buffer "buf". Positions start at 0, and the range does not include the character pointed to by "end" -*/ -/** - Returns the text from the range of characters. When you are - done with the text, free it using the free() function. + When you are done with the text, free it using the free() function. */ char * Fl_Text_Buffer::text_range(int start, int end) { char * s = NULL; @@ -254,10 +251,8 @@ char * Fl_Text_Buffer::text_range(int start, int end) { return s; } -/* - Return the character at buffer position "pos". Positions start at 0. -*/ -/** Returns the character at the specified position in the buffer.*/ +/** Returns the character at the specified position pos in the buffer. + Positions start at 0 */ char Fl_Text_Buffer::character(int pos) { if (pos < 0 || pos >= mLength) return '\0'; @@ -284,11 +279,10 @@ void Fl_Text_Buffer::insert(int pos, const char *s) { call_modify_callbacks(pos, 0, nInserted, 0, NULL); } -/* - Delete the characters between "start" and "end", and insert the - null-terminated string "text" in their place in in "buf" +/** + DeleteS the characters between "start" and "end", and inserts the + null-terminated string "s" in their place in the buffer. */ -/** Replaces the text in the specified range of characters in the buffer.*/ void Fl_Text_Buffer::replace(int start, int end, const char *s) { const char * deletedText; int nInserted; @@ -611,11 +605,10 @@ char * Fl_Text_Buffer::text_in_rectangle(int start, int end, return retabbedStr; } -/* - Set the hardware tab distance used by all displays for this buffer, +/** + Set the hardware tab distance (width) used by all displays for this buffer, and used in computing offsets for rectangular selection operations. */ -/** Gets or sets the tab width.*/ void Fl_Text_Buffer::tab_distance(int tabDist) { const char * deletedText; @@ -974,18 +967,16 @@ int Fl_Text_Buffer::word_end(int pos) { return pos; } -/* - Get a character from the text buffer expanded into it's screen +/** + Expands the given character to a displayable format. Tabs and + other control characters are given special treatment. + Get a character from the text buffer expanded into its screen representation (which may be several characters for a tab or a control code). Returns the number of characters written to "outStr". "indent" is the number of characters from the start of the line for figuring tabs. Output string is guranteed to be shorter or equal in length to FL_TEXT_MAX_EXP_CHAR_LEN */ -/** - Expands the given character to a displayable format. Tabs and - other control characters are given special treatment. -*/ int Fl_Text_Buffer::expand_character(int pos, int indent, char *outStr) { int ret; char c = character(pos); @@ -1049,7 +1040,7 @@ int Fl_Text_Buffer::expand_character(char c, int indent, char *outStr, int tabDi return 1; } -/* +/** Return the length in displayed characters of character "c" expanded for display (as discussed above in BufGetExpandedChar). If the buffer for which the character width is being measured is doing null @@ -1171,13 +1162,11 @@ int Fl_Text_Buffer::skip_lines(int startPos, int nLines) { return pos; } -/* - Find the position of the first character of the line "nLines" backwards +/** + Finds and returns the position of the first character of the line "nLines" backwards from "startPos" (not counting the character pointed to by "startpos" if - that is a newline) in "buf". nLines == 0 means find the beginning of - the line + that is a newline) in "buf". nLines == 0 means find the beginning of the line */ -/** Returns the buffer position for the Nth previous line.*/ int Fl_Text_Buffer::rewind_lines(int startPos, int nLines) { int pos, gapLen = mGapEnd - mGapStart; int lineCount = -1; @@ -2225,8 +2214,8 @@ void Fl_Text_Buffer::move_gap(int pos) { mGapStart += pos - mGapStart; } -/* - reallocate the text storage in "buf" to have a gap starting at "newGapStart" +/** + Reallocates the text storage in "buf" to have a gap starting at "newGapStart" and a gap size of "newGapLen", preserving the buffer's current contents. */ void Fl_Text_Buffer::reallocate_with_gap(int newGapStart, int newGapLen) { @@ -2258,7 +2247,7 @@ void Fl_Text_Buffer::reallocate_with_gap(int newGapStart, int newGapLen) { #endif } -/* +/** Update all of the selections in "buf" for changes in the buffer's text */ void Fl_Text_Buffer::update_selections(int pos, int nDeleted, @@ -2268,7 +2257,7 @@ void Fl_Text_Buffer::update_selections(int pos, int nDeleted, mHighlight.update(pos, nDeleted, nInserted); } -/* +/** Update an individual selection for changes in the corresponding text */ void Fl_Text_Selection::update(int pos, int nDeleted, @@ -2414,11 +2403,11 @@ static int textWidth(const char *text, int tabDist, char nullSubsChar) { return maxWidth; } -/* +/** Find the first and last character position in a line within a rectangular selection (for copying). Includes tabs which cross rectStart, but not control characters which do so. Leaves off tabs which cross rectEnd. -** + Technically, the calling routine should convert tab characters which cross the right boundary of the selection to spaces which line up with the edge of the selection. Unfortunately, the additional memory diff --git a/src/Fl_Valuator.cxx b/src/Fl_Valuator.cxx index 7a76220df..0c1f10e1a 100644 --- a/src/Fl_Valuator.cxx +++ b/src/Fl_Valuator.cxx @@ -85,7 +85,7 @@ int Fl_Valuator::value(double v) { value_damage(); return 1; } - +/** Clamps the value, but accepts v if the previous value is not already out of range */ double Fl_Valuator::softclamp(double v) { int which = (min<=max); double p = previous_value_; @@ -95,7 +95,7 @@ double Fl_Valuator::softclamp(double v) { } // inline void Fl_Valuator::handle_push() {previous_value_ = value_;} - +/** Called during a drag operation, after an FL_WHEN_CHANGED event is received and before the callback. */ void Fl_Valuator::handle_drag(double v) { if (v != value_) { value_ = v; @@ -104,7 +104,7 @@ void Fl_Valuator::handle_drag(double v) { if (when() & FL_WHEN_CHANGED) do_callback(); } } - +/** Called after an FL_WHEN_RELEASE event is received and before the callback. */ void Fl_Valuator::handle_release() { if (when()&FL_WHEN_RELEASE) { // insure changed() is off even if no callback is done. It may have diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx index 8a404e191..e03a44312 100644 --- a/src/Fl_Widget.cxx +++ b/src/Fl_Widget.cxx @@ -80,6 +80,7 @@ int Fl_Widget::handle(int) { return 0; } +/** default font size for widgets */ Fl_Fontsize FL_NORMAL_SIZE = 14; Fl_Widget::Fl_Widget(int X, int Y, int W, int H, const char* L) { @@ -132,10 +133,13 @@ int Fl_Widget::take_focus() { extern void fl_throw_focus(Fl_Widget*); // in Fl_x.cxx -// Destruction does not remove from any parent group! And groups when -// destroyed destroy all their children. This is convienent and fast. -// However, it is only legal to destroy a "root" such as an Fl_Window, -// and automatic destructors may be called. +/** + Destroys the widget, taking care of throwing focus before if any. + Destruction does not remove from any parent group! And groups when + destroyed destroy all their children. This is convienent and fast. + However, it is only legal to destroy a "root" such as an Fl_Window, + and automatic destructors may be called. +*/ Fl_Widget::~Fl_Widget() { Fl::clear_widget_pointer(this); if (flags() & COPIED_LABEL) free((void *)(label_.value)); @@ -143,7 +147,7 @@ Fl_Widget::~Fl_Widget() { fl_throw_focus(this); } -// draw a focus box for the widget... +/** Draws a focus box for the widget at position X,Y and SIZE W,H . */ void Fl_Widget::draw_focus(Fl_Boxtype B, int X, int Y, int W, int H) const { if (!Fl::visible_focus()) return; diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index 5e00d8c86..21eec3caa 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -166,14 +166,15 @@ void Fl::default_atclose(Fl_Window* window, void* v) { } void (*Fl::atclose)(Fl_Window*, void*) = default_atclose; - +/** + Sets the default callback v for win to call on close event. +

For back compatibility only. +*/ void Fl_Window::default_callback(Fl_Window* win, void* v) { Fl::atclose(win, v); } -/** - Returns the last window that was made current. -*/ +/** Returns the last window that was made current. */ Fl_Window *Fl_Window::current() { return current_; } diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx index 41644dc8a..432efef2d 100644 --- a/src/Fl_compose.cxx +++ b/src/Fl_compose.cxx @@ -85,7 +85,9 @@ static char dead_keys[] = { }; #endif // !WIN32 && OLD_DEAD_KEY_CODE +#ifndef FL_DOXYGEN int Fl::compose_state = 0; +#endif /** Any text editing widget should call this for each FL_KEYBOARD event. Use of this function is very simple. diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index e017e7158..e294a5246 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -263,8 +263,8 @@ extern void fl_down_frame(int, int, int, int, Fl_Color); extern void fl_thin_up_frame(int, int, int, int, Fl_Color); extern void fl_thin_down_frame(int, int, int, int, Fl_Color); -const char *Fl::scheme_ = (const char *)0; -Fl_Image *Fl::scheme_bg_ = (Fl_Image *)0; +const char *Fl::scheme_ = (const char *)0; ///< current scheme +Fl_Image *Fl::scheme_bg_ = (Fl_Image *)0; ///< current background image for the scheme static Fl_Pixmap tile(tile_xpm); diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index 36c84664f..d90f82c3e 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -67,13 +67,15 @@ returns the most recent value! */ +#ifndef FL_DOXYGEN Fl_Awake_Handler *Fl::awake_ring_; void **Fl::awake_data_; int Fl::awake_ring_size_; int Fl::awake_ring_head_; int Fl::awake_ring_tail_; -static const int AWAKE_RING_SIZE = 1024; +#endif +static const int AWAKE_RING_SIZE = 1024; static void lock_ring(); static void unlock_ring(); diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index 06ee599a0..eb3b82393 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -46,6 +46,8 @@ // we don't need the following definition because we deliver only // true mouse moves. On very slow systems however, this flag may // still be useful. +#ifndef FL_DOXYGEN + #define CONSOLIDATE_MOTION 0 extern "C" { #include @@ -2592,6 +2594,7 @@ void MacUnmapWindow(Fl_Window *w, WindowPtr p) { if (w && Fl_X::i(w)) MacUnlinkWindow(Fl_X::i(w)); } +#endif // FL_DOXYGEN // // End of "$Id$". diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 4a9176b3a..accd05498 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -29,6 +29,7 @@ // in. Search other files for "WIN32" or filenames ending in _win32.cxx // for other system-specific code. +#ifndef FL_DOXYGEN #include #include #include @@ -1850,7 +1851,7 @@ void fl_cleanup_dc_list(void) { // clean up the list t = win_DC_list; } while(t); } - +#endif // FL_DOXYGEN // // End of "$Id$". diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 0b6a9bf3c..e92766968 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -29,7 +29,7 @@ //# include "Fl_win32.cxx" #elif defined(__APPLE__) //# include "Fl_mac.cxx" -#else +#elif !defined(FL_DOXYGEN) # define CONSOLIDATE_MOTION 1 /**** Define this if your keyboard lacks a backspace key... ****/ diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx index b0ba175e3..8621962e2 100644 --- a/src/fl_boxtype.cxx +++ b/src/fl_boxtype.cxx @@ -322,7 +322,7 @@ void fl_draw_box(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color c) { } //extern Fl_Widget *fl_boxcheat; // hack set by Fl_Window.cxx - +/** Draws the widget box according its box style */ void Fl_Widget::draw_box() const { int t = box_; if (!t) return; @@ -333,13 +333,12 @@ void Fl_Widget::draw_box() const { // } draw_box((Fl_Boxtype)t, x_, y_, w_, h_, (Fl_Color)color_); } - +/** Draws a box of type b, of color c at the widget position and size. */ void Fl_Widget::draw_box(Fl_Boxtype b, Fl_Color c) const { draw_box(b, x_, y_, w_, h_, c); } - -void Fl_Widget::draw_box(Fl_Boxtype b, int X, int Y, int W, int H, Fl_Color c) -const { +/** Draws a box of type b, of color c at the widget position X,Y and size W,H. */ +void Fl_Widget::draw_box(Fl_Boxtype b, int X, int Y, int W, int H, Fl_Color c) const { draw_it_active = active_r(); fl_box_table[b].f(X, Y, W, H, c); draw_it_active = 1; diff --git a/src/fl_cursor.cxx b/src/fl_cursor.cxx index 1a8c4b0a3..92e5e26f1 100644 --- a/src/fl_cursor.cxx +++ b/src/fl_cursor.cxx @@ -42,7 +42,10 @@ void fl_cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) { if (Fl::first_window()) Fl::first_window()->cursor(c,fg,bg); } - +/** + Sets the default Window cursor as well as its color. +

For back compatibility only. +*/ void Fl_Window::default_cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) { // if (c == FL_CURSOR_DEFAULT) c = FL_CURSOR_ARROW; diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx index c8d3737cb..f55389126 100644 --- a/src/fl_font_win32.cxx +++ b/src/fl_font_win32.cxx @@ -24,7 +24,7 @@ // // http://www.fltk.org/str.php // - +#ifndef FL_DOXYGEN Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize size) { int weight = FW_NORMAL; int italic = 0; @@ -248,7 +248,7 @@ void fl_rtl_draw(const char* c, int n, int x, int y) { } SetTextColor(fl_gc, oldColor); } - +#endif // // End of "$Id$". // diff --git a/src/fl_font_x.cxx b/src/fl_font_x.cxx index a323d7644..41639bb82 100644 --- a/src/fl_font_x.cxx +++ b/src/fl_font_x.cxx @@ -24,6 +24,7 @@ // // http://www.fltk.org/str.php // +#ifndef FL_DOXYGEN Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name) { font = XCreateUtf8FontStruct(fl_display, name); @@ -316,7 +317,7 @@ void fl_rtl_draw(const char* c, int n, int x, int y) { } XUtf8DrawRtlString(fl_display, fl_window, fl_xfont, fl_gc, x, y, c, n); } - +#endif // FL_DOXYGEN // // End of "$Id$". // diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx index 0425cafeb..6d73de6b4 100644 --- a/src/fl_font_xft.cxx +++ b/src/fl_font_xft.cxx @@ -61,6 +61,7 @@ // itself. You should edit the ~/.xftconfig file to "fix" things, there // are several web pages of information on how to do this. // +#ifndef FL_DOXYGEN #include @@ -567,6 +568,7 @@ void fl_rtl_draw(const char* c, int n, int x, int y) { delete[] ucs_txt; } +#endif // // End of "$Id$" diff --git a/src/fl_labeltype.cxx b/src/fl_labeltype.cxx index 4444af0e7..92a0d00e9 100644 --- a/src/fl_labeltype.cxx +++ b/src/fl_labeltype.cxx @@ -82,12 +82,12 @@ void Fl::set_labeltype(Fl_Labeltype t,Fl_Label_Draw_F* f,Fl_Label_Measure_F*m) //////////////////////////////////////////////////////////////// -// draw label with arbitrary alignment in arbitrary box: +/** draw label with arbitrary alignment in arbitrary box */ void Fl_Label::draw(int X, int Y, int W, int H, Fl_Align align) const { if (!value && !image) return; table[type](this, X, Y, W, H, align); } - +/** Gets the size of the label W and H contains the calculated size at return. */ void Fl_Label::measure(int& W, int& H) const { if (!value && !image) { W = H = 0; @@ -98,7 +98,7 @@ void Fl_Label::measure(int& W, int& H) const { f(this, W, H); } -// The normal call for a draw() method: +/** The normal call for a draw() method */ void Fl_Widget::draw_label() const { int X = x_+Fl::box_dx(box()); int W = w_-Fl::box_dw(box()); @@ -106,14 +106,14 @@ void Fl_Widget::draw_label() const { draw_label(X, y_+Fl::box_dy(box()), W, h_-Fl::box_dh(box())); } -// draw() can use this instead to change the bounding box: +/** draw() can use this instead to change the bounding box */ void Fl_Widget::draw_label(int X, int Y, int W, int H) const { // quit if we are not drawing a label inside the widget: if ((align()&15) && !(align() & FL_ALIGN_INSIDE)) return; draw_label(X,Y,W,H,align()); } -// Anybody can call this to force the label to draw anywhere: +/** Anybody can call this to force the label to draw anywhere */ void Fl_Widget::draw_label(int X, int Y, int W, int H, Fl_Align a) const { if (flags()&SHORTCUT_LABEL) fl_draw_shortcut = 1; Fl_Label l1 = label_; diff --git a/src/forms_bitmap.cxx b/src/forms_bitmap.cxx index 538b9a622..3b35f264b 100644 --- a/src/forms_bitmap.cxx +++ b/src/forms_bitmap.cxx @@ -26,7 +26,7 @@ // #include - +/** Creates a bitmap widget from a box type, position, size and optional label specification */ Fl_FormsBitmap::Fl_FormsBitmap( Fl_Boxtype t, int X, int Y, int W, int H, const char* l) : Fl_Widget(X, Y, W, H, l) { @@ -35,12 +35,13 @@ Fl_FormsBitmap::Fl_FormsBitmap( color(FL_BLACK); align(FL_ALIGN_BOTTOM); } - +/** Sets a new bitmap bits with size W,H. Deletes the previous one.*/ void Fl_FormsBitmap::set(int W, int H, const uchar *bits) { delete b; bitmap(new Fl_Bitmap(bits, W, H)); } +/** Draws the bitmap and its associated box. */ void Fl_FormsBitmap::draw() { draw_box(box(), selection_color()); if (b) {fl_color(color()); b->draw(x(), y(), w(), h());}