home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Utilities / Text Processing / Alpha / Tcl / SystemCode / alphaMenus.tcl < prev    next >
Encoding:
Text File  |  1999-04-20  |  4.9 KB  |  250 lines  |  [TEXT/ALFA]

  1. ## -*-Tcl-*-
  2.  # ###################################################################
  3.  #  Alpha - new Tcl folder configuration
  4.  # 
  5.  #  FILE: "alphaMenus.tcl"
  6.  #                                    created: 98-04-07 07.36.22 
  7.  #                                last update: 20/4/1999 {6:22:20 pm} 
  8.  #  Author: Vince Darley
  9.  #  E-mail: <darley@fas.harvard.edu>
  10.  #    mail: Division of Engineering and Applied Sciences, Harvard University
  11.  #          Oxford Street, Cambridge MA 02138, USA
  12.  #     www: <http://www.fas.harvard.edu/~darley/>
  13.  #  
  14.  # Reorganisation carried out by Vince Darley with much help from Tom 
  15.  # Fetherston, Johan Linde and suggestions from the Alpha-D mailing list.  
  16.  # Alpha is shareware; please register with the author using the register 
  17.  # button in the about box.
  18.  #  
  19.  # Description:
  20.  # 
  21.  #  Initialises variables which contain the global menus.  If you 
  22.  #  use the smarterSource package, you can over-ride these quite
  23.  #  easily.  This file is sourced by the procedure 'menu::buildSome'
  24.  #  which handles menu building.
  25.  # ###################################################################
  26.  ##
  27. # ◊◊◊◊ File menu ◊◊◊◊ #
  28. set menu::items(File) {
  29.     "/Nnew"
  30.     "/Oopen…"
  31.     "<S/Wclose"
  32.     "<S<O<U/WcloseFloat"
  33.     "<S<I<O/WcloseAll"
  34.     "(-"
  35.     "<S/Ssave"
  36.     "<S<B<O/SsaveUnmodified"
  37.     "<S<I<O/SsaveAll"
  38.     "<SsaveACopyAs…"
  39.     "<S<UrenameTo…"
  40.     "<SsaveAs…"
  41.     "<E<SrevertToBackup"
  42.     "<Srevert"
  43.     "(-"
  44.     {Menu -n fileUtils -p menu::fileUtils {}}
  45.     "(-"
  46.     "pageSetup…"
  47.     "/P<Sprint…"
  48.     "printAll"
  49.     "(-"
  50.     "/Qquit"
  51. }
  52. lappend menu::which_subs(File) "fileUtils"
  53.  
  54. # ◊◊◊◊ Edit menu ◊◊◊◊ #
  55. set menu::items(Edit) {
  56.     "/Zundo"
  57.     "/Z<I<Oredo"
  58.     "(-"
  59.     "/X<Scut"
  60.     "/C<Scopy"
  61.     "/V<Spaste"
  62.     "/A<SselectAll"
  63.     "/A<S<I<OselectParagraph"
  64.     "clear"
  65.     "(-"
  66.     "/`<Stwiddle"
  67.     "/`<S<I<OtwiddleWords" 
  68.     "(-" 
  69.     {/[<SshiftLeft} 
  70.     {/[<S<I<OshiftLeftSpace} 
  71.     {/]<SshiftRight} 
  72.     {/]<S<I<OshiftRightSpace} 
  73.     "/Bbalance" 
  74. }
  75.  
  76. # ◊◊◊◊ Text menu ◊◊◊◊ #
  77. set menu::items(Text) {
  78.     "/I<SfillParagraph"
  79.     "/I<S<O<IwrapParagraph"
  80.     "/I<S<O<I<UsentenceParagraph"
  81.     "/U<S<OfillRegion"
  82.     "/U<S<I<OwrapRegion"
  83.     "/U<S<O<I<UsentenceRegion"
  84.     "<E<SparagraphToLine"
  85.     "<SlineToParagraph"
  86.     "(-"
  87.     "<SreverseSort"
  88.     "<S<UsortParagraphs"
  89.     "<SsortLines"
  90.     "(-"
  91.     "zapInvisibles"
  92.     "<SspacesToTabs"
  93.     "<StabsToSpaces"
  94.     "<S<EindentSelection"
  95.     "<SIndentLine"
  96.     "<E<SdowncaseRegion"
  97.     "<SupcaseRegion"
  98.     "(-"
  99.     {Menu -n Strings {
  100.         "<SremovePrefix"
  101.         "<SinsertPrefix"
  102.         "<S<EremoveSuffix"
  103.         "<SinsertSuffix"
  104.         "setPrefix"
  105.         "setSuffix"
  106.         }}
  107.     "/D<ScommentLine"
  108.     "/D<S<I<OuncommentLine"
  109.     "<SuncommentBox"
  110.     "<ScommentBox"
  111.     "<S<EuncommentParagraph"
  112.     "<ScommentParagraph"
  113. }
  114. set menu::proc(Text) menu::textProc
  115.  
  116. proc menu::textProc {menu item} {
  117.     switch -- $item {
  118.     indentLine bind::IndentLine
  119.     "Goto Func" gotoFunc
  120.     "Goto File Mark" gotoFileMark
  121.     "Mark Hilite" markHilite
  122.     default {eval $item}
  123.     }
  124. }
  125.  
  126. # ◊◊◊◊ Search menu ◊◊◊◊ #
  127. set menu::items(Search) {
  128.     "/F<Sfind…"
  129.     "/F<S<I<OsearchStart"
  130.     "/G<SfindAgain"
  131.     "/G<S<I<OfindAgainBackward"
  132.     "/MfindInNextFile"
  133.     "/E<SenterSearchString"
  134.     "/E<S<I<OenterReplaceString"
  135.     "(-"
  136.     "/S<S<BquickFind"
  137.     "/S<S<B<IquickFindRegexp"
  138.     "/R<BreverseQuickFind"
  139.     "(-"
  140.     "/Rreplace"
  141.     "/Hreplace&FindAgain"
  142.     "<S/R<O<IreplaceAll"
  143.     "<S/R<O<I<BreplaceInFileset"
  144.     "(-"
  145.     "/,<BplaceBookmark"
  146.     "/.<BreturnToBookmark"
  147.     "/G<IgotoLine"
  148.     "(-"
  149.     "/M<I<OmatchingLines" 
  150.     "gotoMatch" 
  151.     "/M<BnextMatch"
  152.     "(-"
  153.     "/K<I<OgotoFunc"
  154.     "/K<O<BgotoFileMark"
  155.     "/=markHilite"
  156.     {Menu -n namedMarks -p namedMarkProc {
  157.         "/K<Oset…"
  158.         "goto…"
  159.         "remove…"
  160.         "(-"
  161.         "sort"
  162.         "sortByPosition"}}
  163.     {Menu -n unnamedMarks -p unnamedMarkproc {
  164.         "set…"
  165.         "exchangePointAndMark"}}
  166. }
  167. set menu::proc(Search) ""
  168.  
  169. # ◊◊◊◊ Utils menu ◊◊◊◊ #
  170. set menu::proc(fileUtils) menu::fileUtils
  171. set menu::proc(winUtils) menu::fileUtils
  172. set menu::items(fileUtils) {
  173.     "fileRemove…"
  174.     "fileInfo…"
  175.     "textToAlpha"
  176.     "showInFinder"
  177. }
  178. set menu::items(winUtils) {
  179.     "insertPathName…"
  180.     "insertFile…"
  181. }
  182.  
  183. set menu::items(Utils) {
  184.     {Menu -n winUtils -p menu::fileUtils {}}
  185.     {Menu -n asciiEtc {
  186.         "quoteChar"
  187.         "(-"
  188.         "keyCode"
  189.         "keyAscii"
  190.         "getAscii"
  191.         "insertAscii"}
  192.     }
  193.     "(-"
  194.     "<S/Y<Oshell"
  195.     "<S/Y<U<Ocalculator"
  196.     "<S/Y<B<OtoolserverShell"
  197.     "<S/L<O<IspellcheckWindow"
  198.     "<S/L<O<I<BspellcheckSelection"
  199.     "wordCount"
  200.     "(-" 
  201.     "sendUrl"
  202.     "/jcmdDoubleClick"
  203. }
  204. set menu::proc(Utils) ""
  205. lappend menu::which_subs(Utils) "winUtils"
  206.  
  207. # ◊◊◊◊ Config menu ◊◊◊◊ #
  208.  
  209. #     "helperApps…"
  210.  
  211. set menu::items(Config) {
  212.     {Menu -n preferences {}} 
  213.     {Menu -n packages -p menu::packagesProc {}}
  214.     {Menu -n "Mode Prefs" -p mode::menuProc {}}
  215.     "(-"
  216.     "/lsetFontsTabs…"
  217.     "specialKeys…" 
  218.     "/kdescribeBinding"
  219.     "listPackages" 
  220.     "<SlistGlobalBindings" 
  221.     "<SlistAllBindings" 
  222.     "listFunctions" "(-" 
  223.     "viewSavedSetting…"
  224.     "removeSavedSetting…"
  225.     "(-"
  226.     {Menu -n redefineColors -p menu::colorProc {
  227.         foreground
  228.         background
  229.         "(-"
  230.         blue
  231.         cyan
  232.         green
  233.         magenta
  234.         red
  235.         white
  236.         yellow
  237.         "(-"
  238.         color_9
  239.         color_10
  240.         color_11
  241.         color_12
  242.         color_13
  243.         color_14
  244.         color_15}}
  245. }
  246. set menu::proc(Config) "menu::globalProc"
  247. lappend menu::which_subs(Config) mode packages preferences internetUpdates
  248.  
  249.  
  250.