# -*- winmgr -*- # Menu layout testing script # ImagePath /tmp:+ # Tested menu styles and parameters # # - SidePic # - SideColor # - SeparatorsLong / SeparatorsShort # - TitleUnderlines0 / TitleUnderlines1 / TitleUnderlines2 # - VerticalItemSpacing # - VerticalTitleSpacing # - VerticalMargins # - BorderWidth # - Hilight3DThickness / Hilight3DThick / Hilight3DThin / Hilight3DOff # - ItemFormat: # %l %c %r %i %| %< %> %s %(left).(right)(...) [%](space) [%](tab) %p # - Empty menus, items, formats and missing parts in the menus, separators # - Item pictures # - Continuation menus DestroyFunc NewTest # $0 = itemformat string # $1 = more menu styles beginning with "," # $2 = menu title # $3 = test description AddToFunc NewTest + I DestroyMenu TestMenu + I DestroyMenuStyle TestMS + I MenuStyle TestMS ItemFormat "$0" $1 + I DestroyFunc DoTest + I AddToFunc DoTest I Echo $3 + I AddToFunc DoTest I Menu TestMenu + I AddToMenu TestMenu "$2" Title + I ChangeMenuStyle TestMS TestMenu # # Vertical layout # Echo *** Echo *** VERTICAL LAYOUT TESTS *** Echo *** # DestroyFunc UseDefaultItems AddToFunc UseDefaultItems + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "1 2 3" beep + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "title" title + I AddToMenu TestMenu "1 2 3" beep + I AddToMenu TestMenu "title" title + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "title" title + I AddToMenu TestMenu "title" title + I AddToMenu TestMenu "1 2 3" beep + I AddToMenu TestMenu "1 2 3" beep + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "*/tmp/icon1.xpm*1 2 3" beep + I AddToMenu TestMenu "*/tmp/icon2.xpm*1 2 3" beep + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "" nop + I AddToMenu TestMenu "" nop # NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", borderwidth 50, hilight3dthickness 50 50" "bw 50, ht 50" "bw 50, ht 50" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", borderwidth 1, hilight3dthin" "bw 1, hthin" "bw 1, hthin" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", borderwidth 0, hilight3doff" "bw 0, hoff" "bw 0, hoff" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", borderwidth 2, hilight3dthick" "bw 2, hthick" "bw 2, hhick" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", borderwidth -1, hilight3dthickness -10" "bw -1, ht -10" "bw -1, ht -10" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", separatorslong" "separatorslong" "separatorslong" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", separatorsshort" "separatorsshort" "separatorsshort" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines0" "titleunderlines0" "titleunderlines0" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1" "titleunderlines1" "titleunderlines1" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines2" "titleunderlines2" "titleunderlines2" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing 10 20" "vis 10 20" "vis 10 20" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing 10 -10" "vis 10 -10" "vis 10 -10" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing -10 10" "vis -10 10" "vis -10 10" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing -24 0" "vis -24 0" "vis -24 0" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing -5 -5" "vis -5 -5" "vis -5 -5" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing 1 2" "vis 1 2" "vis 1 2" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing 0 2" "vis 0 2" "vis 0 2" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing -1 2" "vis -1 2" "vis -1 2" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing 1 1" "vis 1 1" "vis 1 1" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing 1 0" "vis 1 0" "vis 1 0" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalitemspacing 1 -1" "vis 1 -1" "vis 1 -1" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalmargins 10 20" "vis 10 20" "vis 10 20" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines2, verticalmargins 0 0" "vis 10 20" "vis 10 20" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalmargins" "vis 10 20" "vis 10 20" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines2, verticalmargins -10 -20" "vis 10 20" "vis 10 20" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines1, verticalmargins -10 20" "vis 10 20" "vis 10 20" UseDefaultItems DoTest NewTest "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" ", titleunderlines2, verticalmargins 10 -20" "vis 10 20" "vis 10 20" UseDefaultItems DoTest # # Submenus # Echo *** Echo *** SUBMENU TESTS *** Echo *** # DestroyFunc UseDefaultItems AddToFunc UseDefaultItems + I AddToMenu TestMenu + I AddToMenu TestMenu "1 222 popup non-exist" Popup non-exist + I AddToMenu TestMenu "1 222 popup self" Popup TestMenu + I AddToMenu TestMenu "1 222 menu non-exist" Menu non-exist + I AddToMenu TestMenu "1 222 menu self" Menu TestMenu + I AddToMenu TestMenu "" Popup TestMenu + I AddToMenu TestMenu "" menu TestMenu + I AddToMenu TestMenu " " Popup TestMenu + I AddToMenu TestMenu " " menu TestMenu # NewTest "%l%c%r%>" "" "%%l%%c%%r%%>" "%l%c%r%>" UseDefaultItems DoTest NewTest "%l%c%r%<" "" "%%l%%c%%r%%<" "%l%c%r%<" UseDefaultItems DoTest NewTest "%l%<%c%>%r" "" "%%l%%<%%c%%>%%r" "%l%<%c%>%r" UseDefaultItems DoTest NewTest "%l%c%r" "" "%%l%%c%%r" "%l%c%r" UseDefaultItems DoTest NewTest "%>" "" "%%>" "%>" UseDefaultItems DoTest # # Spacing # Echo *** Echo *** SPACING TESTS *** Echo *** # DestroyFunc UseDefaultItems AddToFunc UseDefaultItems + I AddToMenu TestMenu + I AddToMenu TestMenu "11111111111 22222222222 33333333333" Beep # NewTest "%10l%r%.l" "" "%%10l%%r%%.l" "%10l%r%.l" UseDefaultItems DoTest NewTest "%-10l%r%10.l" "" "%%-10l%%r%%10.l" "%-10l%r%10.l" UseDefaultItems DoTest NewTest "%.-10l%r %l% " "" "%%.-10l%%r(space)%%l%%(space)" "%.-10l%r(space)%l%(space)" UseDefaultItems DoTest NewTest "%.10l%r %l% " "" "%%.10l%%r(tab)%%l%%(tab)" "%.10l%r(tab)%l%(tab)" UseDefaultItems DoTest NewTest "%10.-10l%r%20p%l" "" "%%10.-10l%%r%%20p%%l" "%10.-10l%r%20p%l" UseDefaultItems DoTest # # Hilighting and sidepic tests # Echo *** Echo *** HILIGHTING AND SIDEPIC TESTS *** Echo *** # DestroyFunc UseDefaultItems AddToFunc UseDefaultItems + I AddToMenu TestMenu + I AddToMenu TestMenu "1 2 3" Beep + I AddToMenu TestMenu "1111111111 2222222222222 33333333333" Beep + I AddToMenu TestMenu " 2 3" Beep + I AddToMenu TestMenu "1 3" Beep + I AddToMenu TestMenu "1 2+ " Beep + I AddToMenu TestMenu "1 2 3" Title + I AddToMenu TestMenu "1 2" Beep + I AddToMenu TestMenu "1 2 3" Beep + I AddToMenu TestMenu "1 2 3" Beep + I AddToMenu TestMenu "1++" Beep + I AddToMenu TestMenu " 2+" Beep + I AddToMenu TestMenu " 3" Beep + I AddToMenu TestMenu " " Beep + I AddToMenu TestMenu " 4" Beep + I AddToMenu TestMenu "1 2 3 4" Beep + I AddToMenu TestMenu "final title" Title # NewTest "%s%r%|%l%|%i%c" ", SidePic sidepic.xpm, SideColor blue" "%%s%%r%%|%%l%%|%%i%%c" "%s%r%|%l%|%i%c" UseDefaultItems DoTest NewTest "%r%|%s%l%|%i%c" ", SidePic sidepic.xpm, SideColor blue" "%%r%%|%%s%%l%%|%%i%%c" "%r%|%s%l%|%i%c" UseDefaultItems DoTest NewTest "%r%|%l%|%i%c%s" ", SidePic sidepic.xpm, SideColor blue" "%%r%%|%%l%%|%%i%%c%%s" "%r%|%l%|%i%c%s" UseDefaultItems DoTest NewTest "%s%r%|%l%i%c" ", SidePic sidepic.xpm, SideColor blue" "%%s%%r%%|%%l%%i%%c" "%s%r%|%l%i%c" UseDefaultItems DoTest NewTest "%r%|%l%i%c%s" ", SidePic sidepic.xpm, SideColor blue" "%%r%%|%%l%%i%%c%%s" "%r%|%l%i%c%s" UseDefaultItems DoTest NewTest "%s%r%l%i%c" ", SidePic sidepic.xpm, SideColor blue" "%%s%%r%%l%%i%%c" "%s%r%l%i%c" UseDefaultItems DoTest NewTest "%r%l%i%c%s" ", SidePic sidepic.xpm, SideColor blue" "%%r%%l%%i%%c%%s" "%r%l%i%c%s" UseDefaultItems DoTest NewTest "%s%r%|%l%|%i%c" "" "%%s%%r%%|%%l%%|%%i%%c" "%s%r%|%l%|%i%c" UseDefaultItems DoTest NewTest "%r%|%l%|%i%c%s" "" "%%r%%|%%l%%|%%i%%c%%s" "%r%|%l%|%i%c%s" UseDefaultItems DoTest NewTest "%0|%.0|" "" "%%|%%| placement" "%|%|" UseDefaultItems DoTest NewTest "%l%10.1|%1.10|%r" "" "%%l%%10.1|%%1.10|%%r" "%l%10.1|%1.10|%r" UseDefaultItems DoTest NewTest "%|%|" "" "" "%|%|" UseDefaultItems DoTest NewTest "%|%-20|" "" "" "%|%-20|" UseDefaultItems DoTest NewTest "%500|%c%-500|" "" "%%500|%%c%%-500|" "%500|%c%-500|" UseDefaultItems DoTest NewTest "%100|%c%-100|" "" "%%100|%%c%%-100|" "%100|%c%-100|" UseDefaultItems DoTest NewTest "%-100|%c%100|" "" "%%-100|%%c%%100|" "%-100|%c%100|" UseDefaultItems DoTest NewTest "%r%|%l%|%i%|%c%|" "" "%%r%%|%%l%%|%%i%%|%%c%%|" "%r%|%l%|%i%|%c%|" UseDefaultItems DoTest NewTest "%r%|%l%i%c" "" "%%r%%|%%l%%i%%c" "%r%|%l%i%c" UseDefaultItems DoTest NewTest "%r%l%i%c" "" "%%r%%l%%i%%c" "%rl%i%c" UseDefaultItems DoTest # # Label placement # Echo *** Echo *** ICON PLACEMENT TESTS *** Echo *** # DestroyFunc UseDefaultItems AddToFunc UseDefaultItems + I AddToMenu TestMenu + I AddToMenu TestMenu "%/tmp/icon1.xpm%%/tmp/icon2.xpm%%/tmp/icon3.xpm%%sidepic.xpm%" Beep + I AddToMenu TestMenu "%/tmp/icon1.xpm%%/tmp/icon2.xpm%%/tmp/icon3.xpm%" Beep + I AddToMenu TestMenu "%/tmp/icon1.xpm%%/tmp/icon2.xpm%" Beep + I AddToMenu TestMenu "%/tmp/icon1.xpm%" Beep + I AddToMenu TestMenu " " Beep + I AddToMenu TestMenu "%/tmp/icon1.xpm%%sidepic.xpm%" Beep + I AddToMenu TestMenu "1abc%/tmp/icon1.xpm%1def%/tmp/icon2.xpm%1ghi" Beep + I AddToMenu TestMenu "1 %/tmp/icon1.xpm%2%/tmp/icon2.xpm% 3" Beep + I AddToMenu TestMenu "111%/tmp/icon1.xpm% 22222 %/tmp/icon2.xpm%3333333" Beep # NewTest "%i%i" "" "%%i%%i placement" "%i%i icon placement" UseDefaultItems DoTest NewTest "%i %i" "" "%%i(tab)%%i placement" "%i(tab)%i icon placement" UseDefaultItems DoTest NewTest " %i %i " "" "(tab)%%i(tab)%%i(tab) placement" "(tab)%i(tab)%i(tab) icon placement" UseDefaultItems DoTest NewTest " %i %i " "" "(space)%%i(space)%%i(space) placement" "(space)%i(space)%i(space) icon placement" UseDefaultItems DoTest NewTest "%l%l%l%i%i" "" "%%l%%l%%l%%i%%i placement" "%l%l%l%i%i icon placement" UseDefaultItems DoTest NewTest "%i%r%r%i%r" "" "%%i%%r%%r%%i%%r placement" "%i%r%r%i%r icon placement" UseDefaultItems DoTest NewTest "%i%i%i%i%i%i" "" "%%i%%i%%i%%i%%i%%i placement" "%i%i%i%i%i%i icon placement" UseDefaultItems DoTest NewTest "%i" "" "%%i placement" "%i icon placement" UseDefaultItems DoTest NewTest " " "" "(empty) placement" "(empty) icon placement" UseDefaultItems DoTest Echo *** Echo *** LABEL PLACEMENT TESTS *** Echo *** # DestroyFunc UseDefaultItems AddToFunc UseDefaultItems + I AddToMenu TestMenu + I AddToMenu TestMenu "1 2 3" Beep + I AddToMenu TestMenu "1111111111 2222222222222 33333333333" Beep + I AddToMenu TestMenu " 2 3" Beep + I AddToMenu TestMenu "1 3" Beep + I AddToMenu TestMenu "1 2+ " Beep + I AddToMenu TestMenu "1 2 3" Title + I AddToMenu TestMenu "1 2" Beep + I AddToMenu TestMenu "1 2 3" Beep + I AddToMenu TestMenu "1 2 3" Beep + I AddToMenu TestMenu "1++" Beep + I AddToMenu TestMenu " 2+" Beep + I AddToMenu TestMenu " 3" Beep + I AddToMenu TestMenu " " Beep + I AddToMenu TestMenu " 4" Beep + I AddToMenu TestMenu "1 2 3 4" Beep + I AddToMenu TestMenu "final title" Title # NewTest "%l%l%l" "" "%%l%%l%%l placement" "%l%l%l label placement" UseDefaultItems DoTest NewTest "%c%c%c" "" "%%c%%c%%c placement" "%c%c%c label placement" UseDefaultItems DoTest NewTest "%r%r%r" "" "%%r%%r%%r placement" "%r%r%r label placement" UseDefaultItems DoTest NewTest "%r%c%l" "" "%%r%%c%%l placement" "%r%c%l label placement" UseDefaultItems DoTest NewTest "%l%c%r" "" "%%l%%c%%r placement" "%l%c%r label placement" UseDefaultItems DoTest NewTest "%r%l%c" "" "%%r%%l%%c placement" "%r%l%c label placement" UseDefaultItems DoTest NewTest "%c%r%l" "" "%%c%%r%%l placement" "%c%r%l label placement" UseDefaultItems DoTest NewTest "%l%l%l" "" "%%l%%l%%l placement with a veeeeeeeeeeeeeeerrrrrrrrrrrryyyy long title" "%l%l%l label placement with a very long long title" UseDefaultItems DoTest NewTest "%c%c%c" "" "%%c%%c%%c placement with a veeeeeeeeeeeeeeerrrrrrrrrrrryyyy long title" "%c%c%c label placement with a very long long title" UseDefaultItems DoTest NewTest "%r%r%r" "" "%%r%%r%%r placement with a veeeeeeeeeeeeeeerrrrrrrrrrrryyyy long title" "%r%r%r label placement with a very long long title" UseDefaultItems DoTest NewTest "%r%c%l" "" "%%r%%c%%l placement with a veeeeeeeeeeeeeeerrrrrrrrrrrryyyy long title" "%r%c%l label placement with a very long long title" UseDefaultItems DoTest NewTest "%l%c%r" "" "%%l%%c%%r placement with a veeeeeeeeeeeeeeerrrrrrrrrrrryyyy long title" "%l%c%r label placement with a very long long title" UseDefaultItems DoTest NewTest "%r%l%r" "" "%%r%%l%%r placement with a veeeeeeeeeeeeeeerrrrrrrrrrrryyyy long title" "%r%l%r label placement with a very long long title" UseDefaultItems DoTest NewTest "%l%l" "" "%%l%%l placement" "%l%l label placement" UseDefaultItems DoTest NewTest "%c%c" "" "%%c%%c placement" "%c%c label placement" UseDefaultItems DoTest NewTest "%r%r" "" "%%r%%r placement" "%r%r label placement" UseDefaultItems DoTest NewTest "%r%l" "" "%%r%%l placement" "%r%l label placement" UseDefaultItems DoTest NewTest "%l%r" "" "%%l%%r placement" "%l%r label placement" UseDefaultItems DoTest NewTest "%c%r" "" "%%c%%r placement" "%c%r label placement" UseDefaultItems DoTest NewTest "%l%c" "" "%%l%%c placement" "%l%c label placement" UseDefaultItems DoTest NewTest "%l" "" "%%l placement" "%l label placement" UseDefaultItems DoTest NewTest "%c" "" "%%c placement" "%c label placement" UseDefaultItems DoTest NewTest " " "" "(empty) placement" "(empty) label placement" UseDefaultItems DoTest NewTest "%l%l%l%l%r%c%l%c%r%r" "" "%%l%%l%%l%%l%%r%%c%%l%%c%%r%%r placement" "%l%l%l%l%r%c%l%c%r%r label placement" UseDefaultItems DoTest