📄 unixmenu.test
字号:
.m1 add command -label foo -state disabled -background red set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} { catch {destroy .m1} menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} { catch {destroy .m1} menu .m1 -disabledforeground "" .m1 add command -label foo -state disabled set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.7 {TkpDrawMenuEntry - gc for normal - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -foreground red set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.8 {TkpDrawMenuEntry - gc for normal} { catch {destroy .m1} menu .m1 .m1 add command -label foo set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.9 {TkpDrawMenuEntry - gc for indicator - custom entry} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo -selectcolor orange .m1 invoke 1 set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.10 {TkpDrawMenuEntry - gc for indicator} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo .m1 invoke 1 set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.11 {TkpDrawMenuEntry - border - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activebackground green set tearoff [tkTearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1]} {{} {}}test unixMenu-23.12 {TkpDrawMenuEntry - border} { catch {destroy .m1} menu .m1 .m1 add command -label foo set tearoff [tkTearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1]} {{} {}}test unixMenu-23.13 {TkpDrawMenuEntry - active border - strict motif} { catch {destroy .m1} set tk_strictMotif 1 menu .m1 .m1 add command -label foo set tearoff [tkTearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0]} {{} {} 0}test unixMenu-23.14 {TkpDrawMenuEntry - active border - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activeforeground yellow set tearoff [tkTearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1]} {{} {}}test unixMenu-23.15 {TkpDrawMenuEntry - active border} { catch {destroy .m1} menu .m1 .m1 add command -label foo set tearoff [tkTearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1]} {{} {}}test unixMenu-23.16 {TkpDrawMenuEntry - font - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -font "Helvectica 72" set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.17 {TkpDrawMenuEntry - font} { catch {destroy .m1} menu .m1 -font "Courier 72" .m1 add command -label foo set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.18 {TkpDrawMenuEntry - separator} { catch {destroy .m1} menu .m1 .m1 add separator set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.19 {TkpDrawMenuEntry - standard} { catch {destroy .mb} menu .m1 .m1 add command -label foo set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.20 {TkpDrawMenuEntry - disabled cascade item} { catch {destroy .m1} menu .m1 .m1 add cascade -label File -menu .m1.file menu .m1.file .m1.file add command -label foo .m1 entryconfigure File -state disabled set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.21 {TkpDrawMenuEntry - indicator} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label Foo .m1 invoke Foo set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-23.22 {TkpDrawMenuEntry - hide margin} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label Foo -hidemargin 1 .m1 invoke Foo set tearoff [tkTearOffMenu .m1 40 40] list [update] [destroy .m1]} {{} {}}test unixMenu-24.1 {GetMenuLabelGeometry - image} { catch {destroy .m1} catch {image delete image1} menu .m1 image create test image1 .m1 add command -image image1 list [update idletasks] [destroy .m1] [image delete image1]} {{} {} {}}test unixMenu-24.2 {GetMenuLabelGeometry - bitmap} { catch {destroy .m1} menu .m1 .m1 add command -bitmap questhead list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-24.3 {GetMenuLabelGeometry - no text} { catch {destroy .m1} menu .m1 .m1 add command list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-24.4 {GetMenuLabelGeometry - text} { catch {destroy .m1} menu .m1 .m1 add command -label "This is a test." list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.1 {TkpComputeStandardMenuGeometry - no entries} { catch {destroy .m1} menu .m1 list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.2 {TkpComputeStandardMenuGeometry - one entry} { catch {destroy .m1} menu .m1 .m1 add command -label "one" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.3 {TkpComputeStandardMenuGeometry - more than one entry} { catch {destroy .m1} menu .m1 .m1 add command -label "one" .m1 add command -label "two" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.4 {TkpComputeStandardMenuGeometry - separator} { catch {destroy .m1} menu .m1 .m1 add separator list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.5 {TkpComputeStandardMenuGeometry - tearoff entry} {unixOnly} { catch {destroy .m1} menubutton .mb -text "test" -menu .mb.m menu .mb.m .mb.m add command -label test pack .mb catch {tkMbPost .mb} list [update] [destroy .mb]} {{} {}}test unixMenu-25.6 {TkpComputeStandardMenuGeometry - standard label geometry} { catch {destroy .m1} menu .m1 .m1 add command -label "test" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.7 {TkpComputeStandardMenuGeometry - different font for entry} { catch {destroy .m1} menu .m1 -font "Helvetica 12" .m1 add command -label "test" -font "Courier 12" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.8 {TkpComputeStandardMenuGeometry - second entry larger} { catch {destroy .m1} menu .m1 .m1 add command -label "test" .m1 add command -label "test test" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.9 {TkpComputeStandardMenuGeometry - first entry larger} { catch {destroy .m1} menu .m1 .m1 add command -label "test test" .m1 add command -label "test" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.10 {TkpComputeStandardMenuGeometry - accelerator} { catch {destroy .m1} menu .m1 .m1 add command -label "test" -accel "Ctrl+S" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.11 {TkpComputeStandardMenuGeometry - second accel larger} { catch {destroy .m1} menu .m1 .m1 add command -label "test" -accel "1" .m1 add command -label "test" -accel "1 1" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.12 {TkpComputeStandardMenuGeometry - second accel smaller} { catch {destroy .m1} menu .m1 .m1 add command -label "test" -accel "1 1" .m1 add command -label "test" -accel "1" list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.13 {TkpComputeStandardMenuGeometry - indicator} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label test .m1 invoke 1 list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.14 {TkpComputeStandardMenuGeometry - second indicator less or equal } { catch {destroy .m1} catch {image delete image1} image create test image1 menu .m1 .m1 add checkbutton -image image1 .m1 invoke 1 .m1 add checkbutton -label test .m1 invoke 2 list [update idletasks] [destroy .m1] [image delete image1]} {{} {} {}}test unixMenu-25.15 {TkpComputeStandardMenuGeometry - second indicator larger } {unixOnly} { catch {destroy .m1} catch {image delete image1} image create test image1 menu .m1 .m1 add checkbutton -image image1 .m1 invoke 1 .m1 add checkbutton -label test .m1 invoke 2 list [update idletasks] [destroy .m1] [image delete image1]} {{} {} {}}test unixMenu-25.16 {TkpComputeStandardMenuGeometry - zero sized menus} { catch {destroy .m1} menu .m1 -tearoff 0 list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.17 {TkpComputeStandardMenuGeometry - first column bigger} { catch {destroy .m1} menu .m1 .m1 add command -label one .m1 add command -label two .m1 add command -label three -columnbreak 1 list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.18 {TkpComputeStandardMenuGeometry - second column bigger} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add command -label one .m1 add command -label two -columnbreak 1 .m1 add command -label three list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-25.19 {TkpComputeStandardMenuGeometry - three columns} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add command -label one .m1 add command -label two -columnbreak 1 .m1 add command -label three .m1 add command -label four .m1 add command -label five -columnbreak 1 .m1 add command -label six list [update idletasks] [destroy .m1] } {{} {}}test unixMenu-25.20 {TkpComputeStandardMenuGeometry - hide margin} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add checkbutton -label one -hidemargin 1 list [update idletasks] [destroy .m1]} {{} {}}test unixMenu-26.1 {TkpMenuInit - nothing to do} {} {}deleteWindows
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -