📄 unixmenu.test
字号:
list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1]} {0 {}}test unixMenu-18.1 {GetTearoffEntryGeometry} { catch {destroy .m1} menubutton .mb -text "test" -menu .mb.m menu .mb.m .mb.m add command -label test pack .mb raise . list [catch {tkMbPost .mb} msg] $msg [destroy .mb]} {0 {} {}}# Don't know how to reproduce the case where the tkwin has been deleted.test unixMenu-19.1 {TkpComputeMenubarGeometry - zero entries} { catch {destroy .m1} menu .m1 . configure -menu .m1 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}# Don't know how to generate one width windowstest unixMenu-19.2 {TkpComputeMenubarGeometry - one entry} { catch {destroy .m1} menu .m1 .m1 add cascade -label File . configure -menu .m1 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.3 {TkpComputeMenubarGeometry - entry with different font} { catch {destroy .m1} menu .m1 -font "Courier 24" .m1 add cascade -label File -font "Helvetica 18" . configure -menu .m1 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.4 {TkpComputeMenubarGeometry - separator} { catch {destroy .m1} menu .m1 .m1 add separator . configure -menu .m1 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.5 {TkpComputeMenubarGeometry - First entry} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label File . configure -menu .m1 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.6 {TkpComputeMenubarGeometry - First entry too wide} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label File -font "Times 72" . configure -menu .m1 wm geometry . 10x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.7 {TkpComputeMenubarGeometry - two entries fit} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label File .m1 add cascade -label Edit . configure -menu .m1 wm geometry . 200x200 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.8 {TkpComputeMenubarGeometry - two entries; 2nd don't fit} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label File .m1 add cascade -label Edit -font "Times 72" . configure -menu .m1 wm geometry . 100x100 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.9 {TkpComputeMenubarGeometry - two entries; 1st dont fit} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label File -font "Times 72" .m1 add cascade -label Edit . configure -menu .m1 wm geometry . 100x100 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.10 {TkpComputeMenubarGeometry - two entries; neither fit} { catch {destroy .m1} menu .m1 -tearoff 0 -font "Times 72" .m1 add cascade -label File .m1 add cascade -label Edit . configure -menu .m1 wm geometry . 10x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}# ABC notation; capital A means first window fits, small a means it# does not. capital B menu means second window fist, etc.test unixMenu-19.11 {TkpComputeMenubarGeometry - abc} { catch {destroy .m1} menu .m1 -tearoff 0 -font "Times 72" .m1 add cascade -label "aaaaa" .m1 add cascade -label "bbbbb" .m1 add cascade -label "ccccc" . configure -menu .m1 wm geometry . 10x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.12 {TkpComputeMenubarGeometry - abC} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label "aaaaa" -font "Times 72" .m1 add cascade -label "bbbbb" -font "Times 72" .m1 add cascade -label "C" . configure -menu .m1 wm geometry . 10x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.13 {TkpComputeMenubarGeometry - aBc} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label "aaaaa" -font "Times 72" .m1 add cascade -label "B" .m1 add cascade -label "ccccc" -font "Times 72" . configure -menu .m1 wm geometry . 10x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.14 {TkpComputeMenubarGeometry - aBC} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label "aaaaa" -font "Times 72" .m1 add cascade -label "B" .m1 add cascade -label "C" . configure -menu .m1 wm geometry . 60x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.15 {TkpComputeMenubarGeometry - Abc} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label "A" .m1 add cascade -label "bbbbb" -font "Times 72" .m1 add cascade -label "ccccc" -font "Times 72" . configure -menu .m1 wm geometry . 60x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.16 {TkpComputeMenubarGeometry - AbC} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label "A" .m1 add cascade -label "bbbbb" -font "Times 72" .m1 add cascade -label "C" . configure -menu .m1 wm geometry . 60x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.17 {TkpComputeMenubarGeometry - ABc} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label "A" .m1 add cascade -label "B" .m1 add cascade -label "ccccc" -font "Times 72" . configure -menu .m1 wm geometry . 60x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.18 {TkpComputeMenubarGeometry - ABC} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label "A" .m1 add cascade -label "B" .m1 add cascade -label "C" . configure -menu .m1 wm geometry . 100x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.19 {TkpComputeMenubarGeometry - help menu in first position} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label Help -menu .m1.help menu .m1.help -tearoff 0 .m1 add cascade -label File -menu .m1.file menu .m1.file -tearoff 0 .m1 add cascade -label Edit -menu .m1.edit menu .m1.edit -tearoff 0 . configure -menu .m1 wm geometry . 100x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.20 {TkpComputeMenubarGeometry - help menu in middle} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label Edit -menu .m1.edit menu .m1.edit -tearoff 0 .m1 add cascade -label Help -menu .m1.help menu .m1.help -tearoff 0 .m1 add cascade -label File -menu .m1.file menu .m1.file -tearoff 0 . configure -menu .m1 wm geometry . 100x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.21 {TkpComputeMenubarGeometry - help menu in first position} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label File -menu .m1.file menu .m1.file -tearoff 0 .m1 add cascade -label Edit -menu .m1.edit menu .m1.edit -tearoff 0 .m1 add cascade -label Help -menu .m1.help menu .m1.help -tearoff 0 . configure -menu .m1 wm geometry . 100x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.22 {TkpComputeMenubarGeometry - help item fits} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label File -menu .m1.file menu .m1.file -tearoff 0 .m1 add cascade -label Help -menu .m1.help menu .m1.help -tearoff 0 . configure -menu .m1 wm geometry . 100x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.23 {TkpComputeMenubarGeometry - help item does not fit} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label File -menu .m1.file menu .m1.file -tearoff 0 .m1 add cascade -label Help -menu .m1.help -font "Helvetica 72" menu .m1.help -tearoff 0 . configure -menu .m1 wm geometry . 100x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-19.24 {TkpComputeMenubarGeometry - help item only one} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label Help -menu .m1.help menu .m1.help -tearoff 0 . configure -menu .m1 wm geometry . 100x10 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-20.1 {DrawTearoffEntry - menubar} { catch {destroy .m1} menu .m1 .m1 add cascade -label File . configure -menu .m1 list [catch {update} msg] $msg [. configure -menu ""] [destroy .m1]} {0 {} {} {}}test unixMenu-20.2 {DrawTearoffEntry - non-menubar} { catch {destroy .m1} menu .m1 .m1 add command -label foo .m1 post 40 40 list [catch {update} msg] $msg [destroy .m1]} {0 {} {}}test unixMenu-21.1 {TkpInitializeMenuBindings - nothing to do} {} {}test unixMenu-22.1 {SetHelpMenu - no menubars} { catch {destroy .m1} menu .m1 -tearoff 0 .m1 add cascade -label test -menu .m1.test list [catch {menu .m1.test} msg] $msg [destroy .m1]} {0 .m1.test {}}# Don't know how to automate missing tkwinstest unixMenu-22.2 {SetHelpMenu - menubar but no help menu} { catch {destroy .m1} menu .m1 -tearoff 0 . configure -menu .m1 .m1 add cascade -label .m1.file list [catch {menu .m1.file} msg] $msg [. configure -menu ""] [destroy .m1]} {0 .m1.file {} {}}test unixMenu-22.3 {SetHelpMenu - menubar with help menu} { catch {destroy .m1} menu .m1 -tearoff 0 . configure -menu .m1 .m1 add cascade -label .m1.help list [catch {menu .m1.help} msg] $msg [. configure -menu ""] [destroy .m1]} {0 .m1.help {} {}}test unixMenu-22.4 {SetHelpMenu - multiple menubars with same help menu} { catch {destroy .m1} catch {destroy .t2} toplevel .t2 wm geometry .t2 +40+40 menu .m1 -tearoff 0 . configure -menu .m1 .t2 configure -menu .m1 .m1 add cascade -label .m1.help list [catch {menu .m1.help} msg] $msg [. configure -menu ""] [destroy .m1] [destroy .t2]} {0 .m1.help {} {} {}}test unixMenu-23.1 {TkpDrawMenuEntry - gc for active and not strict motif} { 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.2 {TkpDrawMenuEntry - gc for active menu item with its own gc} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activeforeground red set tearoff [tkTearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1]} {{} {}}test unixMenu-23.3 {TkpDrawMenuEntry - gc for active and strict motif} { catch {destroy .m1} menu .m1 set tk_strictMotif 1 .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.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custom entry} { catch {destroy .m1} menu .m1 -disabledforeground blue
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -