MenuEditor.st
changeset 738 ebc4a399f4dc
parent 734 9fdcc26c458f
child 748 03bc27132916
equal deleted inserted replaced
737:ed5b109a0f91 738:ebc4a399f4dc
     1 "
     1 "
     2  COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
     2  COPYRIGHT (c) 1997 by eXept Software AG
     3               All Rights Reserved
     3               All Rights Reserved
     4 
     4 
     5  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
     6  only in accordance with the terms of that license and with the
     6  only in accordance with the terms of that license and with the
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice. This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
    13 
    13 
    14 
    14 
    15 ListSpecEditor subclass:#MenuEditor
    15 ResourceSpecEditor subclass:#MenuEditor
    16 	instanceVariableNames:'specCanvas helpCanvas slices'
    16 	instanceVariableNames:'specCanvas helpCanvas slices'
    17 	classVariableNames:''
    17 	classVariableNames:''
    18 	poolDictionaries:''
    18 	poolDictionaries:''
    19 	category:'Interface-UIPainter'
    19 	category:'Interface-UIPainter'
    20 !
    20 !
    37 
    37 
    38 !MenuEditor class methodsFor:'documentation'!
    38 !MenuEditor class methodsFor:'documentation'!
    39 
    39 
    40 copyright
    40 copyright
    41 "
    41 "
    42  COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
    42  COPYRIGHT (c) 1997 by eXept Software AG
    43               All Rights Reserved
    43               All Rights Reserved
    44 
    44 
    45  This software is furnished under a license and may be used
    45  This software is furnished under a license and may be used
    46  only in accordance with the terms of that license and with the
    46  only in accordance with the terms of that license and with the
    47  inclusion of the above copyright notice.   This software may not
    47  inclusion of the above copyright notice. This software may not
    48  be provided or otherwise made available to, or used by, any
    48  be provided or otherwise made available to, or used by, any
    49  other person.  No title to or ownership of the software is
    49  other person.  No title to or ownership of the software is
    50  hereby transferred.
    50  hereby transferred.
    51 "
    51 "
    52 
    52 
    72 
    72 
    73 ! !
    73 ! !
    74 
    74 
    75 !MenuEditor class methodsFor:'instance creation'!
    75 !MenuEditor class methodsFor:'instance creation'!
    76 
    76 
    77 openModalOnClass:aClass andSelector:aSelector
       
    78     "Open modal a MenuEditor on aClass and aSelector"
       
    79     "self openModalOnClass:self andSelector:#menu"
       
    80 
       
    81     ^self new openModalOnClass:aClass andSelector:aSelector
       
    82 
       
    83 
       
    84 !
       
    85 
       
    86 openModalOnMenu: aMenu
    77 openModalOnMenu: aMenu
    87     "Open a MenuEditor modal on aMenu"
    78     "Open a MenuEditor modal on aMenu"
    88     "self openModalOnMenu: (self perform: #menu) decodeAsLiteralArray"
    79     "self openModalOnMenu: (self perform: #menu) decodeAsLiteralArray"
    89 
    80 
    90     ^self new openModalOnMenu: aMenu
    81     ^self new openModalOnMenu: aMenu
    91 !
       
    92 
       
    93 openOnClass:aClass andSelector:aSelector
       
    94     "Open a MenuEditor on aClass and aSelector"
       
    95     "self openOnClass:self andSelector:#menu"
       
    96 
       
    97     ^self new openOnClass:aClass andSelector:aSelector
       
    98 
       
    99 
       
   100 ! !
    82 ! !
   101 
    83 
   102 !MenuEditor class methodsFor:'accessing'!
    84 !MenuEditor class methodsFor:'accessing'!
   103 
    85 
   104 iconUnknown
    86 iconUnknown
   147 ! !
   129 ! !
   148 
   130 
   149 !MenuEditor class methodsFor:'help specs'!
   131 !MenuEditor class methodsFor:'help specs'!
   150 
   132 
   151 helpSpec
   133 helpSpec
   152     "return a dictionary filled with helpKey -> helptext associations.
   134     "This resource specification was automatically generated
   153      These are used by the activeHelp tool."
   135      by the UIHelpTool of ST/X."
   154 
   136 
   155     "
   137     "Do not manually edit this!! If it is corrupted,
   156     UIHelpTool openOnClass:MenuEditor    
   138      the UIHelpTool may not be able to read the specification."
   157     "
   139 
   158 
   140     "
   159   ^ super helpSpec addPairsFrom:#(
   141      UIHelpTool openOnClass:MenuEditor    
       
   142     "
       
   143 
       
   144     <resource: #help>
       
   145 
       
   146     ^super helpSpec addPairsFrom:#(
   160 
   147 
   161 #addMenuItem
   148 #addMenuItem
   162 'Adds a new menu item.'
   149 'Adds a new menu item.'
   163 
   150 
   164 #addMenuSeparator
   151 #addMenuSeparator
   246 ! !
   233 ! !
   247 
   234 
   248 !MenuEditor class methodsFor:'image specs'!
   235 !MenuEditor class methodsFor:'image specs'!
   249 
   236 
   250 linkSubmenuImage
   237 linkSubmenuImage
   251     "Generated by the Image Editor"
   238     "This resource specification was automatically generated
   252     "
   239      by the ImageEditor of ST/X."
   253     ImageEditor openOnClass:self andSelector:#linkSubmenuImage
   240 
       
   241     "Do not manually edit this!!!! If it is corrupted,
       
   242      the ImageEditor may not be able to read the specification."
       
   243 
       
   244     "
       
   245      ImageEditor openOnClass:self andSelector:#linkSubmenuImage
   254     "
   246     "
   255 
   247 
   256     <resource: #image>
   248     <resource: #image>
   257 
   249 
   258     ^Icon
   250     ^Icon
   259         constantNamed:#'MenuEditor linkSubmenuImage'
   251         constantNamed:#'MenuEditor linkSubmenuImage'
   260         ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@ADQDQDQDQDQDQH@D"H"H"H"H"H"K0@RH"H"H"H"H"H/@A????????????<@D@@@@@@@@@@@C0@PL3L0DQDQDQD_@A@3L3LBH"H"H"<@DCL3L3@"H"H"K0@PL3L3L0??????@A@@@@L3L@@@@@<@DQDQDCL3@PLAG0@RH"H"@3L0@3@/@AH"H"H L3L3L0<@G?????<CL3L3L@@P@@@@@@@3L3LO@ADQDQDQDP@CLA<@D"H"H"H"H LBK0@RH"H"H"H"@BH/@B????????????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
   252         ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@ADQDQDQDQDQDQH@D"H"H"H"H"H"K0@RH"H"H"H"H"H/@A????????????<@D@@@@@@@@@@@C0@PL3L0DQDQDQD_@A@3L3LBH"H"H"<@DCL3L3@"H"H"K0@PL3L3L0??????@A@@@@L3L@@@@@<@DQDQDCL3@PLAG0@RH"H"@3L0@3@/@AH"H"H L3L3L0<@G?????<CL3L3L@@P@@@@@@@3L3LO@ADQDQDQDP@CLA<@D"H"H"H"H LBK0@RH"H"H"H"@BH/@B????????????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
   261 
   253 
   262 menuItemImage
   254 menuItemImage
   263     "Generated by the Image Editor"
   255     "This resource specification was automatically generated
   264     "
   256      by the ImageEditor of ST/X."
   265     ImageEditor openOnClass:self andSelector:#menuItemImage
   257 
       
   258     "Do not manually edit this!!!! If it is corrupted,
       
   259      the ImageEditor may not be able to read the specification."
       
   260 
       
   261     "
       
   262      ImageEditor openOnClass:self andSelector:#menuItemImage
   266     "
   263     "
   267 
   264 
   268     <resource: #image>
   265     <resource: #image>
   269 
   266 
   270     ^Icon
   267     ^Icon
   271         constantNamed:#'MenuEditor menuItemImage'
   268         constantNamed:#'MenuEditor menuItemImage'
   272         ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUQUUUUUUUPUUUUUUU_UUUUUUUPUUUUUUUP@@@@@@@@EUUUUUVAF*****+HF:?+::;@F:.+*?;@F:.+::;@F:.+*:;@F:.+::;@F*****+DK??????A@@@@@@@@UUUUUUUPUUUUUUUXUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUX') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
   269         ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUQUUUUUUUPUUUUUUU_UUUUUUUPUUUUUUUP@@@@@@@@EUUUUUVAF*****+HF:?+::;@F:.+*?;@F:.+::;@F:.+*:;@F:.+::;@F*****+DK??????A@@@@@@@@UUUUUUUPUUUUUUUXUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUX') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
   273 
   270 
   274 menuSeparatorImage
   271 menuSeparatorImage
   275     "Generated by the Image Editor"
   272     "This resource specification was automatically generated
   276     "
   273      by the ImageEditor of ST/X."
   277     ImageEditor openOnClass:self andSelector:#menuSeparatorImage
   274 
       
   275     "Do not manually edit this!!!! If it is corrupted,
       
   276      the ImageEditor may not be able to read the specification."
       
   277 
       
   278     "
       
   279      ImageEditor openOnClass:self andSelector:#menuSeparatorImage
   278     "
   280     "
   279 
   281 
   280     <resource: #image>
   282     <resource: #image>
   281 
   283 
   282     ^Icon
   284     ^Icon
   283         constantNamed:#'MenuEditor menuSeparatorImage'
   285         constantNamed:#'MenuEditor menuSeparatorImage'
   284         ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUURUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP@@@@@@@@EUUUUUV@F*****+DF*****+CF?????+@F0@@@@[@F%UUUU[HF*****+@F*****+@K??????N@@@@@@@HUUUUUUUPUUUUUUUPUUUUUUUWUUUUUUUXUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
   286         ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUURUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP@@@@@@@@EUUUUUV@F*****+DF*****+CF?????+@F0@@@@[@F%UUUU[HF*****+@F*****+@K??????N@@@@@@@HUUUUUUUPUUUUUUUPUUUUUUUWUUUUUUUXUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
   285 
   287 
   286 submenuImage
   288 submenuImage
   287     "Generated by the Image Editor"
   289     "This resource specification was automatically generated
   288     "
   290      by the ImageEditor of ST/X."
   289     ImageEditor openOnClass:self andSelector:#submenuImage
   291 
       
   292     "Do not manually edit this!!!! If it is corrupted,
       
   293      the ImageEditor may not be able to read the specification."
       
   294 
       
   295     "
       
   296      ImageEditor openOnClass:self andSelector:#submenuImage
   290     "
   297     "
   291 
   298 
   292     <resource: #image>
   299     <resource: #image>
   293 
   300 
   294     ^Icon
   301     ^Icon
   296         ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@EUUUUUV@F*****+@F*****+@G??????GD@@@@@C@EUUUUUWLF*****+@F*****+@G??????HD@@@@@C@EUUUUUW@F*****+@F*****+OG??????@D@@@@@C@EUUUUUW@F*****+@F*****+@K??????@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]! !
   303         ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@EUUUUUV@F*****+@F*****+@G??????GD@@@@@C@EUUUUUWLF*****+@F*****+@G??????HD@@@@@C@EUUUUUW@F*****+@F*****+OG??????@D@@@@@C@EUUUUUW@F*****+@F*****+@K??????@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]! !
   297 
   304 
   298 !MenuEditor class methodsFor:'interface specs'!
   305 !MenuEditor class methodsFor:'interface specs'!
   299 
   306 
   300 basicsItemSpec
   307 basicsItemSpec
   301     "this window spec was automatically generated by the ST/X UIPainter"
   308     "This resource specification was automatically generated
   302 
   309      by the UIPainter of ST/X."
   303     "do not manually edit this - the painter/builder may not be able to
   310 
   304      handle the specification if its corrupted."
   311     "Do not manually edit this!! If it is corrupted,
       
   312      the UIPainter may not be able to read the specification."
   305 
   313 
   306     "
   314     "
   307      UIPainter new openOnClass:MenuEditor andSelector:#basicsItemSpec
   315      UIPainter new openOnClass:MenuEditor andSelector:#basicsItemSpec
   308      MenuEditor new openInterface:#basicsItemSpec
   316      MenuEditor new openInterface:#basicsItemSpec
   309     "
   317     "
   314      
   322      
   315        #(#FullSpec
   323        #(#FullSpec
   316           #window: 
   324           #window: 
   317            #(#WindowSpec
   325            #(#WindowSpec
   318               #name: 'Basics Item'
   326               #name: 'Basics Item'
   319               #layout: #(#LayoutFrame 184 0 332 0 450 0 650 0)
   327               #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
   320               #label: 'Basics Item'
   328               #label: 'Basics Item'
   321               #min: #(#Point 10 10)
   329               #min: #(#Point 10 10)
   322               #max: #(#Point 1160 870)
   330               #max: #(#Point 1160 870)
   323               #bounds: #(#Rectangle 184 332 451 651)
   331               #bounds: #(#Rectangle 473 301 740 620)
   324               #usePreferredExtent: false
   332               #usePreferredExtent: false
   325           )
   333           )
   326           #component: 
   334           #component: 
   327            #(#SpecCollection
   335            #(#SpecCollection
   328               #collection: 
   336               #collection: 
   430           )
   438           )
   431       )
   439       )
   432 !
   440 !
   433 
   441 
   434 basicsLinkSpec
   442 basicsLinkSpec
   435     "this window spec was automatically generated by the ST/X UIPainter"
   443     "This resource specification was automatically generated
   436 
   444      by the UIPainter of ST/X."
   437     "do not manually edit this - the painter/builder may not be able to
   445 
   438      handle the specification if its corrupted."
   446     "Do not manually edit this!! If it is corrupted,
       
   447      the UIPainter may not be able to read the specification."
   439 
   448 
   440     "
   449     "
   441      UIPainter new openOnClass:MenuEditor andSelector:#basicsLinkSpec
   450      UIPainter new openOnClass:MenuEditor andSelector:#basicsLinkSpec
   442      MenuEditor new openInterface:#basicsLinkSpec
   451      MenuEditor new openInterface:#basicsLinkSpec
   443     "
   452     "
   448      
   457      
   449        #(#FullSpec
   458        #(#FullSpec
   450           #window: 
   459           #window: 
   451            #(#WindowSpec
   460            #(#WindowSpec
   452               #name: 'Basics Link'
   461               #name: 'Basics Link'
   453               #layout: #(#LayoutFrame 212 0 351 0 478 0 669 0)
   462               #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
   454               #label: 'Basics Link'
   463               #label: 'Basics Link'
   455               #min: #(#Point 10 10)
   464               #min: #(#Point 10 10)
   456               #max: #(#Point 1280 1024)
   465               #max: #(#Point 1280 1024)
   457               #bounds: #(#Rectangle 212 351 479 670)
   466               #bounds: #(#Rectangle 473 301 740 620)
   458               #usePreferredExtent: false
   467               #usePreferredExtent: false
   459           )
   468           )
   460           #component: 
   469           #component: 
   461            #(#SpecCollection
   470            #(#SpecCollection
   462               #collection: 
   471               #collection: 
   537           )
   546           )
   538       )
   547       )
   539 !
   548 !
   540 
   549 
   541 basicsMenuSpec
   550 basicsMenuSpec
   542     "this window spec was automatically generated by the ST/X UIPainter"
   551     "This resource specification was automatically generated
   543 
   552      by the UIPainter of ST/X."
   544     "do not manually edit this - the painter/builder may not be able to
   553 
   545      handle the specification if its corrupted."
   554     "Do not manually edit this!! If it is corrupted,
       
   555      the UIPainter may not be able to read the specification."
   546 
   556 
   547     "
   557     "
   548      UIPainter new openOnClass:MenuEditor andSelector:#basicsMenuSpec
   558      UIPainter new openOnClass:MenuEditor andSelector:#basicsMenuSpec
   549      MenuEditor new openInterface:#basicsMenuSpec
   559      MenuEditor new openInterface:#basicsMenuSpec
   550     "
   560     "
   555      
   565      
   556        #(#FullSpec
   566        #(#FullSpec
   557           #window: 
   567           #window: 
   558            #(#WindowSpec
   568            #(#WindowSpec
   559               #name: 'Basics Menu'
   569               #name: 'Basics Menu'
   560               #layout: #(#LayoutFrame 212 0 351 0 478 0 669 0)
   570               #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
   561               #label: 'Basics Menu'
   571               #label: 'Basics Menu'
   562               #min: #(#Point 10 10)
   572               #min: #(#Point 10 10)
   563               #max: #(#Point 1280 1024)
   573               #max: #(#Point 1280 1024)
   564               #bounds: #(#Rectangle 212 351 479 670)
   574               #bounds: #(#Rectangle 473 301 740 620)
   565               #usePreferredExtent: false
   575               #usePreferredExtent: false
   566           )
   576           )
   567           #component: 
   577           #component: 
   568            #(#SpecCollection
   578            #(#SpecCollection
   569               #collection: 
   579               #collection: 
   613           )
   623           )
   614       )
   624       )
   615 !
   625 !
   616 
   626 
   617 basicsRootSpec
   627 basicsRootSpec
   618     "this window spec was automatically generated by the ST/X UIPainter"
   628     "This resource specification was automatically generated
   619 
   629      by the UIPainter of ST/X."
   620     "do not manually edit this - the painter/builder may not be able to
   630 
   621      handle the specification if its corrupted."
   631     "Do not manually edit this!! If it is corrupted,
       
   632      the UIPainter may not be able to read the specification."
   622 
   633 
   623     "
   634     "
   624      UIPainter new openOnClass:MenuEditor andSelector:#basicsRootSpec
   635      UIPainter new openOnClass:MenuEditor andSelector:#basicsRootSpec
   625      MenuEditor new openInterface:#basicsRootSpec
   636      MenuEditor new openInterface:#basicsRootSpec
   626     "
   637     "
   631      
   642      
   632        #(#FullSpec
   643        #(#FullSpec
   633           #window: 
   644           #window: 
   634            #(#WindowSpec
   645            #(#WindowSpec
   635               #name: 'Basics Root'
   646               #name: 'Basics Root'
   636               #layout: #(#LayoutFrame 424 0 293 0 690 0 611 0)
   647               #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
   637               #label: 'Basics Root'
   648               #label: 'Basics Root'
   638               #min: #(#Point 10 10)
   649               #min: #(#Point 10 10)
   639               #max: #(#Point 1280 1024)
   650               #max: #(#Point 1280 1024)
   640               #bounds: #(#Rectangle 424 293 691 612)
   651               #bounds: #(#Rectangle 473 301 740 620)
   641               #usePreferredExtent: false
   652               #usePreferredExtent: false
   642           )
   653           )
   643           #component: 
   654           #component: 
   644            #(#SpecCollection
   655            #(#SpecCollection
   645               #collection: 
   656               #collection: 
   664           )
   675           )
   665       )
   676       )
   666 !
   677 !
   667 
   678 
   668 basicsSeparatorSpec
   679 basicsSeparatorSpec
   669     "this window spec was automatically generated by the ST/X UIPainter"
   680     "This resource specification was automatically generated
   670 
   681      by the UIPainter of ST/X."
   671     "do not manually edit this - the painter/builder may not be able to
   682 
   672      handle the specification if its corrupted."
   683     "Do not manually edit this!! If it is corrupted,
       
   684      the UIPainter may not be able to read the specification."
   673 
   685 
   674     "
   686     "
   675      UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec
   687      UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec
   676      MenuEditor new openInterface:#basicsSeparatorSpec
   688      MenuEditor new openInterface:#basicsSeparatorSpec
   677     "
   689     "
   682      
   694      
   683        #(#FullSpec
   695        #(#FullSpec
   684           #window: 
   696           #window: 
   685            #(#WindowSpec
   697            #(#WindowSpec
   686               #name: 'Basics Separator'
   698               #name: 'Basics Separator'
   687               #layout: #(#LayoutFrame 297 0 354 0 563 0 672 0)
   699               #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0)
   688               #label: 'Basics Separator'
   700               #label: 'Basics Separator'
   689               #min: #(#Point 10 10)
   701               #min: #(#Point 10 10)
   690               #max: #(#Point 1160 870)
   702               #max: #(#Point 1160 870)
   691               #bounds: #(#Rectangle 297 354 564 673)
   703               #bounds: #(#Rectangle 473 301 740 620)
   692               #usePreferredExtent: false
   704               #usePreferredExtent: false
   693           )
   705           )
   694           #component: 
   706           #component: 
   695            #(#SpecCollection
   707            #(#SpecCollection
   696               #collection: 
   708               #collection: 
   731           )
   743           )
   732       )
   744       )
   733 !
   745 !
   734 
   746 
   735 detailsEditSpec
   747 detailsEditSpec
   736     "this window spec was automatically generated by the ST/X UIPainter"
   748     "This resource specification was automatically generated
   737 
   749      by the UIPainter of ST/X."
   738     "do not manually edit this - the painter/builder may not be able to
   750 
   739      handle the specification if its corrupted."
   751     "Do not manually edit this!! If it is corrupted,
       
   752      the UIPainter may not be able to read the specification."
   740 
   753 
   741     "
   754     "
   742      UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec
   755      UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec
   743      MenuEditor new openInterface:#detailsEditSpec
   756      MenuEditor new openInterface:#detailsEditSpec
   744     "
   757     "
   749      
   762      
   750        #(#FullSpec
   763        #(#FullSpec
   751           #window: 
   764           #window: 
   752            #(#WindowSpec
   765            #(#WindowSpec
   753               #name: 'Details Edit'
   766               #name: 'Details Edit'
   754               #layout: #(#LayoutFrame 263 0 364 0 521 0 651 0)
   767               #layout: #(#LayoutFrame 332 0 374 0 590 0 661 0)
   755               #label: 'Details Edit'
   768               #label: 'Details Edit'
   756               #min: #(#Point 10 10)
   769               #min: #(#Point 10 10)
   757               #max: #(#Point 1280 1024)
   770               #max: #(#Point 1280 1024)
   758               #bounds: #(#Rectangle 263 364 522 652)
   771               #bounds: #(#Rectangle 332 374 591 662)
   759               #usePreferredExtent: false
   772               #usePreferredExtent: false
   760           )
   773           )
   761           #component: 
   774           #component: 
   762            #(#SpecCollection
   775            #(#SpecCollection
   763               #collection: 
   776               #collection: 
   822                 )
   835                 )
   823                  #(#PopUpListSpec
   836                  #(#PopUpListSpec
   824                     #name: 'StartGroupPopUp'
   837                     #name: 'StartGroupPopUp'
   825                     #layout: #(#LayoutFrame 110 0 100 0 -5 1.0 122 0)
   838                     #layout: #(#LayoutFrame 110 0 100 0 -5 1.0 122 0)
   826                     #label: 'PopUpList'
   839                     #label: 'PopUpList'
       
   840                     #tabable: true
   827                     #model: #startGroup
   841                     #model: #startGroup
   828                     #menu: 
   842                     #menu: 
   829                      #(nil
   843                      #(nil
   830                         #right
   844                         #right
   831                     )
   845                     )
   852           )
   866           )
   853       )
   867       )
   854 !
   868 !
   855 
   869 
   856 imageEditSpec
   870 imageEditSpec
   857     "this window spec was automatically generated by the ST/X UIPainter"
   871     "This resource specification was automatically generated
   858 
   872      by the UIPainter of ST/X."
   859     "do not manually edit this - the painter/builder may not be able to
   873 
   860      handle the specification if its corrupted."
   874     "Do not manually edit this!! If it is corrupted,
       
   875      the UIPainter may not be able to read the specification."
   861 
   876 
   862     "
   877     "
   863      UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec
   878      UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec
   864      MenuEditor new openInterface:#imageEditSpec
   879      MenuEditor new openInterface:#imageEditSpec
   865     "
   880     "
   870      
   885      
   871        #(#FullSpec
   886        #(#FullSpec
   872           #window: 
   887           #window: 
   873            #(#WindowSpec
   888            #(#WindowSpec
   874               #name: 'Image Item'
   889               #name: 'Image Item'
   875               #layout: #(#LayoutFrame 263 0 364 0 507 0 505 0)
   890               #layout: #(#LayoutFrame 473 0 301 0 717 0 442 0)
   876               #label: 'Image Item'
   891               #label: 'Image Item'
   877               #min: #(#Point 10 10)
   892               #min: #(#Point 10 10)
   878               #max: #(#Point 1280 1024)
   893               #max: #(#Point 1280 1024)
   879               #bounds: #(#Rectangle 263 364 508 506)
   894               #bounds: #(#Rectangle 473 301 718 443)
   880               #usePreferredExtent: false
   895               #usePreferredExtent: false
   881           )
   896           )
   882           #component: 
   897           #component: 
   883            #(#SpecCollection
   898            #(#SpecCollection
   884               #collection: 
   899               #collection: 
   937           )
   952           )
   938       )
   953       )
   939 !
   954 !
   940 
   955 
   941 windowSpec
   956 windowSpec
   942     "this window spec was automatically generated by the ST/X UIPainter"
   957     "This resource specification was automatically generated
   943 
   958      by the UIPainter of ST/X."
   944     "do not manually edit this - the painter/builder may not be able to
   959 
   945      handle the specification if its corrupted."
   960     "Do not manually edit this!! If it is corrupted,
       
   961      the UIPainter may not be able to read the specification."
   946 
   962 
   947     "
   963     "
   948      UIPainter new openOnClass:MenuEditor andSelector:#windowSpec
   964      UIPainter new openOnClass:MenuEditor andSelector:#windowSpec
   949      MenuEditor new openInterface:#windowSpec
   965      MenuEditor new openInterface:#windowSpec
   950     "
   966      MenuEditor open
   951     "MenuEditor open"
   967     "
   952 
   968 
   953     <resource: #canvas>
   969     <resource: #canvas>
   954 
   970 
   955     ^
   971     ^
   956      
   972      
   957        #(#FullSpec
   973        #(#FullSpec
   958           #window: 
   974           #window: 
   959            #(#WindowSpec
   975            #(#WindowSpec
   960               #name: 'Menu Editor'
   976               #name: 'Menu Editor'
   961               #layout: #(#LayoutFrame 100 0 374 0 679 0 757 0)
   977               #layout: #(#LayoutFrame 473 0 301 0 1052 0 684 0)
   962               #label: 'Menu Editor'
   978               #label: 'Menu Editor'
   963               #min: #(#Point 10 10)
   979               #min: #(#Point 10 10)
   964               #max: #(#Point 1152 900)
   980               #max: #(#Point 1152 900)
   965               #bounds: #(#Rectangle 100 374 680 758)
   981               #bounds: #(#Rectangle 473 301 1053 685)
   966               #menu: #menu
   982               #menu: #menu
   967               #usePreferredExtent: false
   983               #usePreferredExtent: false
   968           )
   984           )
   969           #component: 
   985           #component: 
   970            #(#SpecCollection
   986            #(#SpecCollection
  1032 ! !
  1048 ! !
  1033 
  1049 
  1034 !MenuEditor class methodsFor:'menu specs'!
  1050 !MenuEditor class methodsFor:'menu specs'!
  1035 
  1051 
  1036 menu
  1052 menu
  1037     "this window spec was automatically generated by the ST/X MenuEditor"
  1053     "This resource specification was automatically generated
  1038 
  1054      by the MenuEditor of ST/X."
  1039     "do not manually edit this - the builder may not be able to
  1055 
  1040      handle the specification if its corrupted."
  1056     "Do not manually edit this!! If it is corrupted,
       
  1057      the MenuEditor may not be able to read the specification."
  1041 
  1058 
  1042     "
  1059     "
  1043      MenuEditor new openOnClass:MenuEditor andSelector:#menu
  1060      MenuEditor new openOnClass:MenuEditor andSelector:#menu
  1044      (Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp
  1061      (Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp
  1045     "
  1062     "
  1140                 #label: 'History'
  1157                 #label: 'History'
  1141                 #activeHelpKey: #history
  1158                 #activeHelpKey: #history
  1142                 #submenuChannel: #menuHistory
  1159                 #submenuChannel: #menuHistory
  1143             )
  1160             )
  1144              #(#MenuItem
  1161              #(#MenuItem
       
  1162                 #label: 'Settings'
       
  1163                 #submenu: 
       
  1164                  #(#Menu
       
  1165                     
       
  1166                      #(
       
  1167                        #(#MenuItem
       
  1168                           #label: 'Fonts'
       
  1169                           #submenuChannel: #menuFont
       
  1170                       )
       
  1171                     ) nil
       
  1172                     nil
       
  1173                 )
       
  1174             )
       
  1175              #(#MenuItem
  1145                 #label: 'Help'
  1176                 #label: 'Help'
  1146                 #startGroup: #right
  1177                 #startGroup: #right
  1147                 #activeHelpKey: #help
  1178                 #activeHelpKey: #help
  1148                 #submenuChannel: #menuHelp
  1179                 #submenuChannel: #menuHelp
  1149             )
  1180             )
  1151           nil
  1182           nil
  1152       )
  1183       )
  1153 !
  1184 !
  1154 
  1185 
  1155 menuAdd
  1186 menuAdd
  1156     "this window spec was automatically generated by the ST/X MenuEditor"
  1187     "This resource specification was automatically generated
  1157 
  1188      by the MenuEditor of ST/X."
  1158     "do not manually edit this - the builder may not be able to
  1189 
  1159      handle the specification if its corrupted."
  1190     "Do not manually edit this!! If it is corrupted,
       
  1191      the MenuEditor may not be able to read the specification."
  1160 
  1192 
  1161     "
  1193     "
  1162      MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd
  1194      MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd
  1163      (Menu new fromLiteralArrayEncoding:(MenuEditor menuAdd)) startUp
  1195      (Menu new fromLiteralArrayEncoding:(MenuEditor menuAdd)) startUp
  1164     "
  1196     "
  1201           nil
  1233           nil
  1202       )
  1234       )
  1203 !
  1235 !
  1204 
  1236 
  1205 menuDefaultLink
  1237 menuDefaultLink
  1206     "this window spec was automatically generated by the ST/X MenuEditor"
  1238     "This resource specification was automatically generated
  1207 
  1239      by the MenuEditor of ST/X."
  1208     "do not manually edit this - the builder may not be able to
  1240 
  1209      handle the specification if its corrupted."
  1241     "Do not manually edit this!! If it is corrupted,
       
  1242      the MenuEditor may not be able to read the specification."
  1210 
  1243 
  1211     "
  1244     "
  1212      MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink
  1245      MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink
  1213      (Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp
  1246      (Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp
       
  1247     "
       
  1248 
       
  1249     <resource: #menu>
       
  1250 
       
  1251     ^
       
  1252 
       
  1253        #(#Menu
       
  1254 
       
  1255            #(
       
  1256              #(#MenuItem
       
  1257                 #'label:' '!!!! derives from application !!!!'
       
  1258             )
       
  1259           ) nil
       
  1260           nil
       
  1261       )
       
  1262 !
       
  1263 
       
  1264 menuEdit
       
  1265     "This resource specification was automatically generated
       
  1266      by the MenuEditor of ST/X."
       
  1267 
       
  1268     "Do not manually edit this!! If it is corrupted,
       
  1269      the MenuEditor may not be able to read the specification."
       
  1270 
       
  1271     "
       
  1272      MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit
       
  1273      (Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp
  1214     "
  1274     "
  1215 
  1275 
  1216     <resource: #menu>
  1276     <resource: #menu>
  1217 
  1277 
  1218     ^
  1278     ^
  1219      
  1279      
  1220        #(#Menu
  1280        #(#Menu
  1221           
  1281           
  1222            #(
  1282            #(
  1223              #(#MenuItem
  1283              #(#MenuItem
  1224                 #'label:' '!! derives from application !!'
       
  1225             )
       
  1226           ) nil
       
  1227           nil
       
  1228       )
       
  1229 !
       
  1230 
       
  1231 menuEdit
       
  1232     "this window spec was automatically generated by the ST/X MenuEditor"
       
  1233 
       
  1234     "do not manually edit this - the builder may not be able to
       
  1235      handle the specification if its corrupted."
       
  1236 
       
  1237     "
       
  1238      MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit
       
  1239      (Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp
       
  1240     "
       
  1241 
       
  1242     <resource: #menu>
       
  1243 
       
  1244     ^
       
  1245      
       
  1246        #(#Menu
       
  1247           
       
  1248            #(
       
  1249              #(#MenuItem
       
  1250                 #label: 'Cut'
  1284                 #label: 'Cut'
  1251                 #value: #doCut
  1285                 #value: #doCut
  1252                 #activeHelpKey: #editCut
  1286                 #activeHelpKey: #editCut
  1253                 #enabled: #hasValidSelection
  1287                 #enabled: #hasValidSelection
  1254                 #shortcutKeyCharacter: #Cut
  1288                 #shortcutKeyCharacter: #Cut
  1262             )
  1296             )
  1263              #(#MenuItem
  1297              #(#MenuItem
  1264                 #label: 'Paste'
  1298                 #label: 'Paste'
  1265                 #value: #doPaste
  1299                 #value: #doPaste
  1266                 #activeHelpKey: #editPaste
  1300                 #activeHelpKey: #editPaste
  1267                 #enabled: #hasAnySingleSelection
  1301                 #enabled: #valueOfCanPaste
  1268                 #shortcutKeyCharacter: #Paste
  1302                 #shortcutKeyCharacter: #Paste
  1269             )
  1303             )
  1270              #(#MenuItem
  1304              #(#MenuItem
  1271                 #label: 'Delete'
  1305                 #label: 'Delete'
  1272                 #value: #doDelete
  1306                 #value: #doDelete
  1305           nil
  1339           nil
  1306       )
  1340       )
  1307 !
  1341 !
  1308 
  1342 
  1309 menuToolbar
  1343 menuToolbar
  1310     "this window spec was automatically generated by the ST/X MenuEditor"
  1344     "This resource specification was automatically generated
  1311 
  1345      by the MenuEditor of ST/X."
  1312     "do not manually edit this - the builder may not be able to
  1346 
  1313      handle the specification if its corrupted."
  1347     "Do not manually edit this!! If it is corrupted,
       
  1348      the MenuEditor may not be able to read the specification."
  1314 
  1349 
  1315     "
  1350     "
  1316      MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar
  1351      MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar
  1317      (Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp
  1352      (Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp
  1318     "
  1353     "
  1367              #(#MenuItem
  1402              #(#MenuItem
  1368                 #label: 'Paste'
  1403                 #label: 'Paste'
  1369                 #isButton: true
  1404                 #isButton: true
  1370                 #value: #doPaste
  1405                 #value: #doPaste
  1371                 #activeHelpKey: #editPaste
  1406                 #activeHelpKey: #editPaste
  1372                 #enabled: #hasAnySingleSelection
  1407                 #enabled: #valueOfCanPaste
  1373                 #labelImage: #(#ResourceRetriever nil #pasteIcon)
  1408                 #labelImage: #(#ResourceRetriever nil #pasteIcon)
  1374             )
  1409             )
  1375              #(#MenuItem
  1410              #(#MenuItem
  1376                 #label: 'Delete'
  1411                 #label: 'Delete'
  1377                 #isButton: true
  1412                 #isButton: true
  1600     self treeView selection: 2.
  1635     self treeView selection: 2.
  1601     self menuChanged
  1636     self menuChanged
  1602 
  1637 
  1603 !
  1638 !
  1604 
  1639 
  1605 buildFromListSpec: aListSpec
  1640 buildFromResourceSpec: aResourceSpec
  1606 
  1641 
  1607     self buildFromMenu:  
  1642     self buildFromMenu:  
  1608         (aListSpec class == Menu ifTrue: [aListSpec] ifFalse: [aListSpec decodeAsLiteralArray])
  1643         (aResourceSpec class == Menu ifTrue: [aResourceSpec] ifFalse: [aResourceSpec decodeAsLiteralArray])
  1609 ! !
  1644 ! !
  1610 
  1645 
  1611 !MenuEditor methodsFor:'change & update'!
  1646 !MenuEditor methodsFor:'change & update'!
  1612 
  1647 
  1613 updateEnabledChannels
  1648 updateEnabledChannels
  1627             next := parent childAt:((parent indexOfChild:node) + 1).
  1662             next := parent childAt:((parent indexOfChild:node) + 1).
  1628             self valueOfEnableMovingIn       value:(next notNil and:[next hasChildren]).
  1663             self valueOfEnableMovingIn       value:(next notNil and:[next hasChildren]).
  1629             self valueOfEnableMovingUpOrDown value:(parent children size > 1).
  1664             self valueOfEnableMovingUpOrDown value:(parent children size > 1).
  1630             self valueOfEnableMovingOut      value:parent parent notNil.
  1665             self valueOfEnableMovingOut      value:parent parent notNil.
  1631             self hasValidSingleSelection     value:true.
  1666             self hasValidSingleSelection     value:true.
  1632             self hasValidSelection           value:true.
  1667             self hasValidSelection           value:true.      
  1633           ^ self
  1668             self valueOfCanPaste             value: true & self valueOfCanPaste value.
       
  1669             ^self
  1634         ]
  1670         ]
  1635     ]
  1671     ]
  1636     ifFalse:
  1672     ifFalse:
  1637     [
  1673     [
  1638         self hasAnySingleSelection value:false.
  1674         self hasAnySingleSelection value:false.
  1643     self valueOfEnableMovingUpOrDown value:false.
  1679     self valueOfEnableMovingUpOrDown value:false.
  1644     self valueOfEnableMovingIn       value:false.
  1680     self valueOfEnableMovingIn       value:false.
  1645     self valueOfEnableMovingOut      value:false.
  1681     self valueOfEnableMovingOut      value:false.
  1646     self hasValidSingleSelection     value:false.
  1682     self hasValidSingleSelection     value:false.
  1647     self hasValidSelection           value:state.
  1683     self hasValidSelection           value:state.
       
  1684     self valueOfCanPaste             value: false.
  1648 ! !
  1685 ! !
  1649 
  1686 
  1650 !MenuEditor methodsFor:'event handling'!
  1687 !MenuEditor methodsFor:'event handling'!
  1651 
  1688 
  1652 doesNotUnderstand: aMessage
  1689 doesNotUnderstand: aMessage
  1665 !MenuEditor methodsFor:'help'!
  1702 !MenuEditor methodsFor:'help'!
  1666 
  1703 
  1667 openDocumentation
  1704 openDocumentation
  1668 
  1705 
  1669     self openHTMLDocument: 'tools/MenuEditor/TOP.html'.
  1706     self openHTMLDocument: 'tools/MenuEditor/TOP.html'.
  1670 
       
  1671 ! !
       
  1672 
       
  1673 !MenuEditor methodsFor:'initialization'!
       
  1674 
       
  1675 initialize
       
  1676     "initialize value holders for the attributes of the menu components"
       
  1677 
       
  1678     |holder|
       
  1679 
       
  1680     super initialize.
       
  1681 
       
  1682     aspects at:#seperatorSelection put:(holder := SelectionInList new).
       
  1683     holder list: Item separatorList.
       
  1684     holder addDependent:self.   
       
  1685 
  1707 
  1686 ! !
  1708 ! !
  1687 
  1709 
  1688 !MenuEditor methodsFor:'private'!
  1710 !MenuEditor methodsFor:'private'!
  1689 
  1711 
  1801         helpCanvas raise.
  1823         helpCanvas raise.
  1802     ] ifFalse:[       
  1824     ] ifFalse:[       
  1803         aspects do: [:holder| holder release].
  1825         aspects do: [:holder| holder release].
  1804         specCanvas client:self spec:(self class perform:(slices at:tabSelection) last) builder:builder.
  1826         specCanvas client:self spec:(self class perform:(slices at:tabSelection) last) builder:builder.
  1805         aspects do: [:holder| holder addDependent:self].
  1827         aspects do: [:holder| holder addDependent:self].
       
  1828         self updateFonts.
  1806         specCanvas raise.
  1829         specCanvas raise.
  1807     ]    
  1830     ]    
  1808 
  1831 
  1809 ! !
  1832 ! !
  1810 
  1833 
  1811 !MenuEditor methodsFor:'startup / release'!
  1834 !MenuEditor methodsFor:'startup / release'!
  1812 
  1835 
       
  1836 initialize
       
  1837     "initialize value holders for the attributes of the menu components"
       
  1838 
       
  1839     |holder|
       
  1840 
       
  1841     super initialize.
       
  1842 
       
  1843     aspects at:#seperatorSelection put:(holder := SelectionInList new).
       
  1844     holder list: Item separatorList.
       
  1845     holder addDependent:self.   
       
  1846 
       
  1847 !
       
  1848 
  1813 openModalOnMenu: aMenu
  1849 openModalOnMenu: aMenu
  1814     "build a tree from aMenu and open it modal"
  1850     "build a tree from aMenu and open it modal"
  1815 
  1851 
  1816     super openModalOnListSpec: aMenu
  1852     super openModalOnResourceSpec: aMenu
  1817 !
  1853 !
  1818 
  1854 
  1819 postOpenWith:aBuilder
  1855 postOpenWith:aBuilder
  1820 
  1856 
  1821     super postOpenWith:aBuilder.
  1857     super postOpenWith:aBuilder.
  1869     modified := false
  1905     modified := false
  1870 !
  1906 !
  1871 
  1907 
  1872 doNew
  1908 doNew
  1873 
  1909 
  1874     self askForModification
  1910     super doNew ifTrue: [self helpTool reset]
  1875     ifTrue: 
       
  1876     [
       
  1877         self isStandAlone ifTrue: [specClass := specSelector := nil].
       
  1878         self buildFromClass: nil andSelector: #menu
       
  1879     ]
       
  1880 !
  1911 !
  1881 
  1912 
  1882 doPickAMenu
  1913 doPickAMenu
  1883 
  1914 
  1884     |view|
  1915     |view|
  1918     code := BANG
  1949     code := BANG
  1919             , (cls name , ' class methodsFor:' , category storeString)
  1950             , (cls name , ' class methodsFor:' , category storeString)
  1920             , BANG , '\\'
  1951             , BANG , '\\'
  1921 
  1952 
  1922             , specSelector , '\'
  1953             , specSelector , '\'
  1923             , '    "this window spec was automatically generated by the ST/X MenuEditor"\\'
  1954             , (self class codeGenerationComment replChar:$!! withString:'!!!!')
  1924             , '    "do not manually edit this - the builder may not be able to\'
  1955             , '\\    "\'
  1925             , '     handle the specification if its corrupted."\\'
       
  1926             , '    "\'
       
  1927             , ('     MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\')
  1956             , ('     MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\')
  1928             , ('     (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\')
  1957             , ('     (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\')
  1929             , '    "\'.
  1958             , '    "\'.
  1930 
  1959 
  1931     code := code 
  1960     code := code 
  2496     self multipleSelectOk:true.
  2525     self multipleSelectOk:true.
  2497     self showDirectoryIndicator: true.
  2526     self showDirectoryIndicator: true.
  2498     self showDirectoryIndicatorForRoot: false.
  2527     self showDirectoryIndicatorForRoot: false.
  2499     self selectConditionBlock: [:i|self application askForItemModification]. 
  2528     self selectConditionBlock: [:i|self application askForItemModification]. 
  2500     self validateDoubleClickBlock: [:node| node ~~ listOfNodes first].
  2529     self validateDoubleClickBlock: [:node| node ~~ listOfNodes first].
  2501 
       
  2502     self model iconAction: [:aNode| aNode contents iconFor: aNode].
  2530     self model iconAction: [:aNode| aNode contents iconFor: aNode].
  2503     self model labelAction: [:aNode| aNode contents treeViewLabel]
  2531     self model labelAction: [:aNode| aNode contents treeViewLabel]
  2504 ! !
  2532 ! !
  2505 
  2533 
  2506 !MenuEditor::TreeView methodsFor:'menus'!
  2534 !MenuEditor::TreeView methodsFor:'menus'!