diff --git a/CHANGES b/CHANGES index 39e312ed9..9efe11724 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.8 + - Updated documentation (STR #1420, STR #1421) - Fixed font caching issue (STR #1415) - Fixed crash in fl_file_chooser (STR #1410) - Fixed Fluid hotspot bug (STR #1416) diff --git a/documentation/Fl.html b/documentation/Fl.html index a20e913d4..701e9c314 100644 --- a/documentation/Fl.html +++ b/documentation/Fl.html @@ -424,19 +424,43 @@ handle()).
Returns the height offset for the given boxtype. +See box_dy.
Returns the width offset for the given boxtype. +See box_dy.
Returns the X offset for the given boxtype. +See box_dy.
Returns the Y offset for the given boxtype. +
These functions return the offset values necessary for a given +boxtype, useful for computing the area inside a box's borders, to +prevent overdrawing the borders. + +
For instance, in the case of a boxtype like FL_DOWN_BOX +where the border width might be 2 pixels all around, the above +functions would return 2, 2, 4, and 4 for box_dx, +box_dy, box_dw, and box_dh +respectively. + +
An example to compute the area inside a widget's box(): +
+ int X = yourwidget->x() + Fl::box_dx(yourwidget->box()); + int Y = yourwidget->y() + Fl::box_dy(yourwidget->box()); + int W = yourwidget->w() - Fl::box_dw(yourwidget->box()); + int H = yourwidget->h() - Fl::box_dh(yourwidget->box()); ++
These functions are mainly useful in the draw() code +for deriving custom widgets, where one wants to avoid drawing +over the widget's own border box(). +
Same as Fl::wait(0). Calling this during a big calculation