Tk Source Code

Changes On Branch tip-161
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch tip-161 Excluding Merge-Ins

This is equivalent to a diff from c6575c18 to 65fd52c8

2018-02-11
11:20
Fix [1c5f27afe5]. Make winWm-5.2 pass again by forcing -tearoff 1 (as it was the case before implementation of TIP #161). check-in: 973f6db0 user: fvogel tags: trunk
11:18
Fix [1c5f27afe5]. Make winWm-5.2 pass again by forcing -tearoff 1 (as it was the case before implementation of TIP #161). Closed-Leaf check-in: 65fd52c8 user: fvogel tags: tip-161
2017-11-06
16:06
Permit building for Windows on a Tcl 9 foundation. See also [13c80537ab31845b]. check-in: 99eeb161 user: jan.nijtmans tags: trunk
2017-11-04
12:22
merge trunk check-in: a7200178 user: fvogel tags: tip-161
12:20
Fix [c8c52b9d6a]: OS X - Lots of menu.test tests fail (items are off by one). All tests from menu.test do pass now on all three platforms (Win, Linux, OS X) check-in: c6575c18 user: fvogel tags: trunk
12:19
Fix [c8c52b9d6a]: OS X - Lots of menu.test tests fail (items are off by one). All tests from menu.test do pass now on all three platforms (Win, Linux, OS X) check-in: 37221978 user: fvogel tags: core-8-6-branch
2017-11-03
22:42
Fix [0ef1c52736]: OS X - tests menu-22.[345] hang check-in: 2856c489 user: fvogel tags: trunk

Changes to doc/menu.n.

30
31
32
33
34
35
36
37
38
39
40
41
42






43
44
45
46
47
48
49
30
31
32
33
34
35
36






37
38
39
40
41
42
43
44
45
46
47
48
49







-
-
-
-
-
-
+
+
+
+
+
+







of those menus are posted.
This is due to the limitations in the individual platforms' menu managers.
.OP \-selectcolor selectColor Background
For menu entries that are check buttons or radio buttons, this option
specifies the color to display in the indicator when the check button
or radio button is selected.
.OP \-tearoff tearOff TearOff
This option must have a proper boolean value, which specifies
whether or not the menu should include a tear-off entry at the
top.  If so, it will exist as entry 0 of the menu and the other
entries will number starting at 1.  The default
menu bindings arrange for the menu to be torn off when the tear-off
entry is invoked.
This option must have a proper boolean value (default is false),
which specifies whether or not the menu should include a tear-off
entry at the top.  If so, it will exist as entry 0 of the menu and
the other entries will number starting at 1.  The default menu
bindings arrange for the menu to be torn off when the tear-off entry
is invoked.
This option is ignored under Aqua/Mac OS X, where menus cannot
be torn off.
.OP \-tearoffcommand tearOffCommand TearOffCommand
If this option has a non-empty value, then it specifies a Tcl command
to invoke whenever the menu is torn off.  The actual command will
consist of the value of this option, followed by a space, followed
by the name of the menu window, followed by a space, followed by

Changes to macosx/tkMacOSXDefault.h.

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
321
322
323
324
325
326
327





328
329
330
331
332
333
334







-
-
-
-
-







#define DEF_MENU_FONT			"menu" /* special: see tkMacOSXMenu.c */
#define DEF_MENU_FG			"systemMenuText"
#define DEF_MENU_POST_COMMAND		""
#define DEF_MENU_RELIEF			"flat"
#define DEF_MENU_SELECT_COLOR		"systemMenuActive"
#define DEF_MENU_SELECT_MONO		BLACK
#define DEF_MENU_TAKE_FOCUS		"0"

/*
 * FIXME: Turn the default back to 1 when we make tearoff menus work again.
 */

#define DEF_MENU_TEAROFF		"0"
#define DEF_MENU_TEAROFF_CMD		((char *) NULL)
#define DEF_MENU_TITLE			""
#define DEF_MENU_TYPE			"normal"

/*
 * Defaults for menubuttons:

Changes to tests/winWm.test.

241
242
243
244
245
246
247
248

249
250
251
252
253
254
255
241
242
243
244
245
246
247

248
249
250
251
252
253
254
255







-
+







    toplevel .t
    frame .t.f -width 150 -height 50 -background red
    pack .t.f
    wm geometry .t -0-0
    update
    set y [winfo rooty .t]
    lappend result [winfo height .t]
    menu .t.m
    menu .t.m -tearoff 1
    .t configure -menu .t.m
    .t.m add command -label foo
    .t.m add command -label "thisisreallylong"
    .t.m add command -label "thisisreallylong"
    update
    lappend result [winfo height .t]
    lappend result [expr {$y - [winfo rooty .t]}]

Changes to unix/tkUnixDefault.h.

283
284
285
286
287
288
289
290

291
292
293
294
295
296
297
283
284
285
286
287
288
289

290
291
292
293
294
295
296
297







-
+







#define DEF_MENU_FONT			"TkMenuFont"
#define DEF_MENU_FG			BLACK
#define DEF_MENU_POST_COMMAND		""
#define DEF_MENU_RELIEF			"raised"
#define DEF_MENU_SELECT_COLOR		MENU_INDICATOR
#define DEF_MENU_SELECT_MONO		BLACK
#define DEF_MENU_TAKE_FOCUS		"0"
#define DEF_MENU_TEAROFF		"1"
#define DEF_MENU_TEAROFF		"0"
#define DEF_MENU_TEAROFF_CMD		((char *) NULL)
#define DEF_MENU_TITLE			""
#define DEF_MENU_TYPE			"normal"

/*
 * Defaults for menubuttons:
 */

Changes to win/tkWinDefault.h.

286
287
288
289
290
291
292
293

294
295
296
297
298
299
300
286
287
288
289
290
291
292

293
294
295
296
297
298
299
300







-
+







#define DEF_MENU_FONT			"TkMenuFont"
#define DEF_MENU_FG			MENU_FG
#define DEF_MENU_POST_COMMAND		""
#define DEF_MENU_RELIEF			"flat"
#define DEF_MENU_SELECT_COLOR		MENU_FG
#define DEF_MENU_SELECT_MONO		BLACK
#define DEF_MENU_TAKE_FOCUS		"0"
#define DEF_MENU_TEAROFF		"1"
#define DEF_MENU_TEAROFF		"0"
#define DEF_MENU_TEAROFF_CMD		((char *) NULL)
#define DEF_MENU_TITLE			""
#define DEF_MENU_TYPE			"normal"

/*
 * Defaults for menubuttons:
 */