summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjingham <jingham@noemail.net>1999-08-10 05:04:44 (GMT)
committerjingham <jingham@noemail.net>1999-08-10 05:04:44 (GMT)
commitc582bf35bf20084065646debe5530181755dd44e (patch)
tree7316e518597bb3d84ce7a7a7cabcf5b05832add8 /unix
parent961a6ba6f98f8f6bbb1f1654697976bd4771cc6d (diff)
downloadtk-c582bf35bf20084065646debe5530181755dd44e.zip
tk-c582bf35bf20084065646debe5530181755dd44e.tar.gz
tk-c582bf35bf20084065646debe5530181755dd44e.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.
FossilOrigin-Name: 9bb078186f93162afcdcd453066e44b705aa8186
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixDraw.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/unix/tkUnixDraw.c b/unix/tkUnixDraw.c
index adb86dc..d7ac932 100644
--- a/unix/tkUnixDraw.c
+++ b/unix/tkUnixDraw.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixDraw.c,v 1.3 1999/03/10 07:04:45 stanton Exp $
+ * RCS: @(#) $Id: tkUnixDraw.c,v 1.4 1999/08/10 05:04:45 jingham Exp $
*/
#include "tkPort.h"
@@ -173,3 +173,36 @@ ScrollRestrictProc(arg, eventPtr)
return TK_DISCARD_EVENT;
}
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkpDrawHighlightBorder --
+ *
+ * This procedure draws a rectangular ring around the outside of
+ * a widget to indicate that it has received the input focus.
+ *
+ * On Unix, 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);
+}
+