1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
+
|
/*
* tkMacMenubutton.c --
*
* This file implements the Macintosh specific portion of the
* menubutton widget.
*
* Copyright (c) 1996 by Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tkMacMenubutton.c,v 1.4 1999/05/22 06:33:38 jingham Exp $
* RCS: @(#) $Id: tkMacMenubutton.c,v 1.5 1999/08/10 05:05:02 jingham Exp $
*/
#include "tkMenubutton.h"
#include "tkMacInt.h"
#include <Controls.h>
#define kShadowOffset (3) /* amount to offset shadow from frame */
|
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
-
+
+
-
+
+
+
+
-
+
-
-
|
PenSize(mbPtr->borderWidth - 1, mbPtr->borderWidth - 1);
MoveTo(r.right, r.top + kShadowOffset);
LineTo(r.right, r.bottom);
LineTo(r.left + kShadowOffset, r.bottom);
}
if (mbPtr->highlightWidth != 0) {
GC gc;
GC fgGC, bgGC;
bgGC = Tk_GCForColor(mbPtr->highlightBgColorPtr, Tk_WindowId(tkwin));
if (mbPtr->flags & GOT_FOCUS) {
gc = Tk_GCForColor(mbPtr->highlightColorPtr, Tk_WindowId(tkwin));
fgGC = Tk_GCForColor(mbPtr->highlightColorPtr, Tk_WindowId(tkwin));
TkpDrawHighlightBorder(tkwin, fgGC, bgGC, mbPtr->highlightWidth,
Tk_WindowId(tkwin));
} else {
TkpDrawHighlightBorder(tkwin, bgGC, bgGC, mbPtr->highlightWidth,
gc = Tk_GCForColor(mbPtr->highlightBgColorPtr, Tk_WindowId(tkwin));
Tk_WindowId(tkwin));
}
Tk_DrawFocusHighlight(tkwin, gc, mbPtr->highlightWidth,
Tk_WindowId(tkwin));
}
SetGWorld(saveWorld, saveDevice);
}
/*
*----------------------------------------------------------------------
|