summaryrefslogtreecommitdiffstats
path: root/win/tkWinDraw.c
diff options
context:
space:
mode:
authorjingham <jingham>1999-08-10 05:04:45 (GMT)
committerjingham <jingham>1999-08-10 05:04:45 (GMT)
commit4904c2fefb18f2f2cc5e3e70d58e1750f52fa659 (patch)
tree7316e518597bb3d84ce7a7a7cabcf5b05832add8 /win/tkWinDraw.c
parent1cdd5fb850d1be603e0994761bd0271233c964c4 (diff)
downloadtk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.zip
tk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.tar.gz
tk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.tar.bz2
New Function: TkpDrawHighlightBorder. Use this in place of Tk_DrawFocusHighlight. The latter did not work on the Mac, since you need to know both foreground & background color when you draw the active focus ring.
Diffstat (limited to 'win/tkWinDraw.c')
-rw-r--r--win/tkWinDraw.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index 43a2197..13a15bd 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinDraw.c,v 1.4 1999/04/16 01:51:51 stanton Exp $
+ * RCS: @(#) $Id: tkWinDraw.c,v 1.5 1999/08/10 05:04:56 jingham Exp $
*/
#include "tkWinInt.h"
@@ -1269,3 +1269,37 @@ TkWinFillRect(dc, x, y, width, height, pixel)
ExtTextOut(dc, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
SetBkColor(dc, oldColor);
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkpDrawHighlightBorder --
+ *
+ * This procedure draws a rectangular ring around the outside of
+ * a widget to indicate that it has received the input focus.
+ *
+ * On Windows, we just draw the simple inset ring. On other sytems,
+ * e.g. the Mac, the focus ring is a little more complicated, so we
+ * need this abstraction.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * A rectangle "width" pixels wide is drawn in "drawable",
+ * corresponding to the outer area of "tkwin".
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TkpDrawHighlightBorder (
+ Tk_Window tkwin,
+ GC fgGC,
+ GC bgGC,
+ int highlightWidth,
+ Drawable drawable)
+{
+ TkDrawInsetFocusHighlight (tkwin, fgGC, highlightWidth, drawable, 0);
+}
+ \ No newline at end of file