summaryrefslogtreecommitdiff
path: root/src/Fl_Device.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-02-01 23:06:14 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-02-01 23:06:14 +0000
commit6e16d033aefffab71e2674143bbb722bf43df7c0 (patch)
treecc99b67fde50b1ce2a76780168e42c573ec39d70 /src/Fl_Device.cxx
parent5af1344b80335a73f20d372b993eae188d8ecdec (diff)
Add fl_focus_rect function to driver.
Focus rectangles are dotted lines. The default implementation uses the dotted line style, However, for systems without line stye, we draw many dots instead. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11110 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Device.cxx')
-rw-r--r--src/Fl_Device.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx
index 689ee4654..c4b7c8585 100644
--- a/src/Fl_Device.cxx
+++ b/src/Fl_Device.cxx
@@ -20,6 +20,7 @@
#include "config_lib.h"
#include <FL/Fl_Device.H>
#include <FL/Fl_Image.H>
+#include <FL/fl_draw.h>
#ifdef FL_CFG_GFX_QUARTZ
#include "drivers/Quartz/Fl_Quartz_Graphics_Driver.h"
@@ -87,6 +88,13 @@ void Fl_Graphics_Driver::text_extents(const char*t, int n, int& dx, int& dy, int
dy = descent();
}
+void Fl_Graphics_Driver::focus_rect(int x, int y, int w, int h)
+{
+ line_style(FL_DOT);
+ rect(x, y, w, h);
+ line_style(FL_SOLID);
+}
+
/** A constructor that sets the graphics driver used by the display */
Fl_Display_Device::Fl_Display_Device(Fl_Graphics_Driver *graphics_driver) : Fl_Surface_Device(graphics_driver) {
this->set_current();