diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-01-14 17:17:09 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-01-14 17:17:09 +0100 |
| commit | ab58971bcf9cedee6ecd131ca032087ff7d1623c (patch) | |
| tree | 39f102b41d07db356b4de105ccdb4b3191c451c2 /FL/fl_draw.H | |
| parent | c45bf57c8fcaf9c18f52f9d91dc97527e74d3d42 (diff) | |
Improve focus box drawing and documentation
Add new method
Fl_Widget::draw_focus(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color bg)
... with background color for correct contrast testing (in Fl_Tabs)
Draw the focus box of the "tabs" of Fl_Tabs widgets with the correct
boxtype and background color.
Make 'unsigned int visible_focus()' const so it can be used in 'const'
methods.
Do not draw the focus box if the per-widget focus box option is off.
Diffstat (limited to 'FL/fl_draw.H')
| -rw-r--r-- | FL/fl_draw.H | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/FL/fl_draw.H b/FL/fl_draw.H index 8db59b43b..66125d351 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -299,7 +299,12 @@ inline void fl_rect(Fl_Rect r) { fl_rect(r.x(), r.y(), r.w(), r.h()); } -/** Draw a dotted rectangle, used to indicate keyboard focus on a widget. */ +/** Draw a dotted rectangle, used to indicate keyboard focus on a widget. + + This method draws the rectangle in the current color and independent of + the Fl::visible_focus() option. You may need to set the current color + with fl_color() before you call this. +*/ inline void fl_focus_rect(int x, int y, int w, int h) { fl_graphics_driver->focus_rect(x, y, w, h); } |
