MenuEditor.st
author Stefan Vogel <sv@exept.de>
Tue, 27 Jan 1998 10:15:31 +0100
changeset 480 fde17b1640d6
parent 469 28bcb1982ef9
child 485 3afea2fc1e65
permissions -rw-r--r--
Use Class>>selector notation to be consistent with UIPainter and Debugger. Support class name completion.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     1
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     3
              All Rights Reserved
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     4
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     5
 This software is furnished under a license and may be used
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    10
 hereby transferred.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    11
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    12
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    13
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    14
398
155310ec83aa revised version
tz
parents: 382
diff changeset
    15
ToolApplicationModel subclass:#MenuEditor
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
    16
	instanceVariableNames:'isModified specClass specCanvas helpCanvas tabSelection aspects
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
    17
		slices didInstall'
220
ca
parents: 218
diff changeset
    18
	classVariableNames:''
ca
parents: 218
diff changeset
    19
	poolDictionaries:''
ca
parents: 218
diff changeset
    20
	category:'Interface-UIPainter'
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    21
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    22
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    23
Object subclass:#Item
220
ca
parents: 218
diff changeset
    24
	instanceVariableNames:'activeHelpKey enabled label value nameKey indication shortcutKey
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
    25
		accessCharacterPos retriever icon iconAndLabel submenuChannel
398
155310ec83aa revised version
tz
parents: 382
diff changeset
    26
		argument translateLabel isButton'
220
ca
parents: 218
diff changeset
    27
	classVariableNames:''
ca
parents: 218
diff changeset
    28
	poolDictionaries:''
ca
parents: 218
diff changeset
    29
	privateIn:MenuEditor
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    30
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    31
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
    32
SelectionInTreeView subclass:#TreeView
275
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
    33
	instanceVariableNames:'images'
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
    34
	classVariableNames:'CopyBuffer Images'
220
ca
parents: 218
diff changeset
    35
	poolDictionaries:''
ca
parents: 218
diff changeset
    36
	privateIn:MenuEditor
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    37
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    38
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    39
!MenuEditor class methodsFor:'documentation'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    40
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    41
copyright
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    42
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    43
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    44
              All Rights Reserved
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    45
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    46
 This software is furnished under a license and may be used
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    47
 only in accordance with the terms of that license and with the
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    48
 inclusion of the above copyright notice.   This software may not
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    49
 be provided or otherwise made available to, or used by, any
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    50
 other person.  No title to or ownership of the software is
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    51
 hereby transferred.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    52
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    53
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    54
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    55
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    56
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    57
documentation
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    58
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    59
    create and modify or inspect popup and pullDown menus of the
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    60
    new style( derives from Menu).
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    61
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    62
    [start with:]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    63
        MenuEditor open
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    64
        MenuEditor new openOnClass:MenuEditor andSelector:#menuPullDown
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    65
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    66
    [see also:]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    67
        UIPainter
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    68
        UIHelpTool
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    69
        UISpecificationTool
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    70
        SelectionInTreeView
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    71
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    72
    [author:]
398
155310ec83aa revised version
tz
parents: 382
diff changeset
    73
        Claus Atzkern, Thomas Zwick
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    74
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    75
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    76
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
    77
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
    78
!MenuEditor class methodsFor:'initialization'!
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
    79
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
    80
initialize
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
    81
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
    82
    super initialize.
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
    83
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
    84
    TreeView initialize
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
    85
! !
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
    86
318
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    87
!MenuEditor class methodsFor:'code generation'!
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    88
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    89
generateCodeFor:aClass menuSelector:aSelector
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    90
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    91
    |code category|
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    92
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    93
    category := self sourceCategory.
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    94
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    95
    code := Character excla asString 
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    96
            , aClass name , ' methodsFor:' , category storeString
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    97
            , Character excla asString , '\\'
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    98
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
    99
            , aSelector , '\'
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   100
            , '    "this window spec was automatically generated by the UI Builder"\\'
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   101
            , '    ^ self class ', aSelector, '\\'
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   102
            , '\'
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   103
            , Character excla asString
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   104
            , ' '
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   105
            , Character excla asString
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   106
            , '\\'.
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   107
    ^ code
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   108
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   109
"
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   110
self generateCodeFor:MenuEditor menuSelector:#menu
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   111
"
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   112
!
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   113
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   114
sourceCategory
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   115
    "returns the category where to install the menu
318
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   116
    "
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   117
    ^ 'accessing menu'
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   118
! !
31a94b71ae1b reuse of generate code for instance method #menu
ca
parents: 304
diff changeset
   119
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   120
!MenuEditor class methodsFor:'help specs'!
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   121
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   122
helpSpec
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   123
    "return a dictionary filled with helpKey -> helptext associations.
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   124
     These are used by the activeHelp tool."
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   125
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   126
    "
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   127
    UIHelpTool openOnClass:MenuEditor    
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   128
    "
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   129
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   130
  ^ super helpSpec addPairsFrom:#(
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   131
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   132
#aboutSTX
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   133
'Open an InfoBox about running ST/X.'
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   134
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   135
#aboutThisAppliaction
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   136
'Open an InfoBox about release and author.'
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   137
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   138
#accessCharaterPos
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   139
'The index of the access character position into the textual label (optional).'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   140
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   141
#argument
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   142
'An argument passed to the value method, if the value  selector is a one- or two-arg selector (i.e. ends with '':''). The argument is passed as a string.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   143
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   144
#enbled
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   145
'This enabled field specifies the name of the aspect (-method or binding) in your application, which returns a value holder holding a boolean, a block which evaluates to either true or false, a selector which returns either true or false or simply true or false. The value, true or false, specifies whether  the respective field can be selected, a value of true, or not, a value of false.'
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   146
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   147
#fileExit
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   148
'Exit current application.'
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   149
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   150
#helpClassDocumentation
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   151
'Open a HTML-browser with a class documentation for the current application.'
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   152
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   153
#helpProgrammersGuide
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   154
'Open a HTML-browser with a programmers guide.'
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   155
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   156
#helpShowHelp
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   157
'Toggle on/off displaying help texts.'
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   158
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   159
#helpTutorial
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   160
'Open a HTML-browser with tutorial for beginners.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   161
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   162
#icon
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   163
'Selector which returns an image to be displayed.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   164
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   165
#iconAndLabel
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   166
'Boolean flag to specify that both image and textual label shall be shown.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   167
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   168
#indication
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   169
'This indication field specifies the name of the aspect (-method or binding) in your application, a value holder holding a boolean, a block which evaluates to either true or false, a selector which returns either true or false or simply true or false. The value, true or false, specifies whether the shown indicator is switched on or off.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   170
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   171
#label
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   172
'The label of the item. If the ''retriever/selector'' is set,  and returns an image, the image is used as the displayed label.  Dependent on the state of the ''Image & Label'' flag, both the image and the label are shown.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   173
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   174
#menuSelector
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   175
'The name of the selector under which the generated  menu should be installed and is accessable.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   176
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   177
#nameKey
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   178
'An unique identifier of the item (optional)'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   179
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   180
#retriever
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   181
'The name of the class, which implements the image selector.  This selector is specified by ''selector''. If no class is given,  the current application should implement the specified image selector.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   182
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   183
#seperatorList
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   184
'The list of valid separators'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   185
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   186
#shortcutKey
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   187
'The key to be pressed, to select the menu item from the keyboard (accelerator key).'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   188
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   189
#submenuChannel
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   190
'A value holder, which provides the submenu (Menu) to be opened if the item is selected. Useful if the items submenu is to be  changed dynamically.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   191
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   192
#value
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
   193
'An action which can be either a block or a selector. Depending on the number of arguments to the action, the action will be called with the respective arguments. There can either zero, one or two arguments. The first argument to the action is the argument derived from the argument field and the second argument the selected item.'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   194
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   195
)
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   196
! !
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   197
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   198
!MenuEditor class methodsFor:'interface specs'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   200
classDefineSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   201
    "this window spec was automatically generated by the ST/X UIPainter"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   202
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   203
    "do not manually edit this - the painter/builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   204
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   205
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   206
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   207
     UIPainter new openOnClass:MenuEditor andSelector:#classDefineSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   208
     MenuEditor new openInterface:#classDefineSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   209
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   210
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   211
    <resource: #canvas>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   212
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   213
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   214
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   215
       #(#FullSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   216
          #'window:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   217
           #(#WindowSpec
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   218
              #'name:' 'MenuEditor'
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   219
              #'layout:' #(#LayoutFrame 262 0 426 0 508 0 519 0)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   220
              #'label:' 'MenuEditor'
155310ec83aa revised version
tz
parents: 382
diff changeset
   221
              #'min:' #(#Point 10 10)
155310ec83aa revised version
tz
parents: 382
diff changeset
   222
              #'max:' #(#Point 1152 900)
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   223
              #'bounds:' #(#Rectangle 262 426 509 520)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   224
              #'usePreferredExtent:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   225
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   226
          #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   227
           #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   228
              #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   229
               #(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   230
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   231
                    #'name:' 'boxLabel'
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   232
                    #'layout:' #(#LayoutFrame 2 0.0 4 0 -2 1.0 24 0)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   233
                    #'label:' 'Class for menu spec:'
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   234
                    #'adjust:' #left
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   235
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   236
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   237
                 #(#InputFieldSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   238
                    #'name:' 'classNameField'
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   239
                    #'layout:' #(#LayoutFrame 2 0.0 27 0 -2 1.0 49 0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   240
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   241
                    #'model:' #classNameChannel
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   242
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   243
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   244
                )
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   245
                 #(#UISubSpecification
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   246
                    #'name:' 'SubSpecification'
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   247
                    #'layout:' #(#LayoutFrame 0 0 -29 1 0 1 -5 1)
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   248
                    #'majorKey:' #ToolApplicationModel
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
   249
                    #'minorKey:' #windowSpecForCommitWithoutChannels
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   250
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   251
              )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   252
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   253
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   254
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   255
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   256
menu
220
ca
parents: 218
diff changeset
   257
    "this window spec was automatically generated by the ST/X MenuEditor"
ca
parents: 218
diff changeset
   258
ca
parents: 218
diff changeset
   259
    "do not manually edit this - the builder may not be able to
ca
parents: 218
diff changeset
   260
     handle the specification if its corrupted."
ca
parents: 218
diff changeset
   261
ca
parents: 218
diff changeset
   262
    "
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   263
     MenuEditor new openOnClass:MenuEditor andSelector:#menu
155310ec83aa revised version
tz
parents: 382
diff changeset
   264
     (Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp
220
ca
parents: 218
diff changeset
   265
    "
ca
parents: 218
diff changeset
   266
ca
parents: 218
diff changeset
   267
    <resource: #menu>
ca
parents: 218
diff changeset
   268
ca
parents: 218
diff changeset
   269
    ^
ca
parents: 218
diff changeset
   270
     
ca
parents: 218
diff changeset
   271
       #(#Menu
ca
parents: 218
diff changeset
   272
          
ca
parents: 218
diff changeset
   273
           #(
ca
parents: 218
diff changeset
   274
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   275
                #'label:' 'About'
155310ec83aa revised version
tz
parents: 382
diff changeset
   276
                #'accessCharacterPosition:' 1
155310ec83aa revised version
tz
parents: 382
diff changeset
   277
                #'labelImage:' #(#ResourceRetriever nil #icon)
155310ec83aa revised version
tz
parents: 382
diff changeset
   278
                #'submenuChannel:' #menuAbout
220
ca
parents: 218
diff changeset
   279
            )
ca
parents: 218
diff changeset
   280
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   281
                #'label:' 'File'
155310ec83aa revised version
tz
parents: 382
diff changeset
   282
                #'translateLabel:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   283
                #'value:' #file
155310ec83aa revised version
tz
parents: 382
diff changeset
   284
                #'submenu:' 
155310ec83aa revised version
tz
parents: 382
diff changeset
   285
                 #(#Menu
155310ec83aa revised version
tz
parents: 382
diff changeset
   286
                    
155310ec83aa revised version
tz
parents: 382
diff changeset
   287
                     #(
155310ec83aa revised version
tz
parents: 382
diff changeset
   288
                       #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   289
                          #'label:' 'New'
155310ec83aa revised version
tz
parents: 382
diff changeset
   290
                          #'value:' #doNew
155310ec83aa revised version
tz
parents: 382
diff changeset
   291
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   292
                       #(#MenuItem
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   293
                          #'label:' '-'
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   294
                      )
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   295
                       #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   296
                          #'label:' 'Load From Class...'
155310ec83aa revised version
tz
parents: 382
diff changeset
   297
                          #'translateLabel:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   298
                          #'value:' #doFromClass
155310ec83aa revised version
tz
parents: 382
diff changeset
   299
                          #'enabled:' #isStandAlone
155310ec83aa revised version
tz
parents: 382
diff changeset
   300
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   301
                       #(#MenuItem
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   302
                          #'label:' 'Load From Class With Superclass...'
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   303
                          #'translateLabel:' true
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   304
                          #'value:' #loadFromClassWithSuperclass
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   305
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   306
                       #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   307
                          #'label:' '-'
155310ec83aa revised version
tz
parents: 382
diff changeset
   308
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   309
                       #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   310
                          #'label:' 'Save'
155310ec83aa revised version
tz
parents: 382
diff changeset
   311
                          #'value:' #doInstallSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   312
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   313
                       #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   314
                          #'label:' '-'
155310ec83aa revised version
tz
parents: 382
diff changeset
   315
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   316
                       #(#MenuItem
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   317
                          #'label:' 'Pick A Menu'
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   318
                          #'value:' #doPickAMenu
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   319
                          #'enabled:' #isStandAlone
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   320
                      )
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   321
                       #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   322
                          #'label:' 'Define Class...'
155310ec83aa revised version
tz
parents: 382
diff changeset
   323
                          #'value:' #doDefineClass
155310ec83aa revised version
tz
parents: 382
diff changeset
   324
                          #'enabled:' #isStandAlone
155310ec83aa revised version
tz
parents: 382
diff changeset
   325
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   326
                       #(#MenuItem
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   327
                          #'label:' 'Browse Class'
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   328
                          #'value:' #doBrowseAppClass
155310ec83aa revised version
tz
parents: 382
diff changeset
   329
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   330
                       #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   331
                          #'label:' '-'
155310ec83aa revised version
tz
parents: 382
diff changeset
   332
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   333
                       #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   334
                          #'label:' 'Exit'
155310ec83aa revised version
tz
parents: 382
diff changeset
   335
                          #'translateLabel:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   336
                          #'value:' #closeRequest
155310ec83aa revised version
tz
parents: 382
diff changeset
   337
                      )
155310ec83aa revised version
tz
parents: 382
diff changeset
   338
                    ) nil
155310ec83aa revised version
tz
parents: 382
diff changeset
   339
                    nil
220
ca
parents: 218
diff changeset
   340
                )
ca
parents: 218
diff changeset
   341
            )
ca
parents: 218
diff changeset
   342
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   343
                #'label:' 'Edit'
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   344
                #'submenuChannel:' #menuEdit
220
ca
parents: 218
diff changeset
   345
            )
ca
parents: 218
diff changeset
   346
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   347
                #'label:' 'Test'
155310ec83aa revised version
tz
parents: 382
diff changeset
   348
                #'submenuChannel:' #submenuTest
220
ca
parents: 218
diff changeset
   349
            )
ca
parents: 218
diff changeset
   350
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   351
                #'label:' 'History'
155310ec83aa revised version
tz
parents: 382
diff changeset
   352
                #'submenuChannel:' #menuHistory
220
ca
parents: 218
diff changeset
   353
            )
ca
parents: 218
diff changeset
   354
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   355
                #'label:' 'Help'
155310ec83aa revised version
tz
parents: 382
diff changeset
   356
                #'submenuChannel:' #menuHelp
220
ca
parents: 218
diff changeset
   357
            )
ca
parents: 218
diff changeset
   358
          ) nil
ca
parents: 218
diff changeset
   359
          nil
ca
parents: 218
diff changeset
   360
      )
ca
parents: 218
diff changeset
   361
!
ca
parents: 218
diff changeset
   362
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   363
menuDefaultLink
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   364
    "this window spec was automatically generated by the ST/X MenuEditor"
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   365
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   366
    "do not manually edit this - the builder may not be able to
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   367
     handle the specification if its corrupted."
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   368
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   369
    "
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   370
     MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   371
     (Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   372
    "
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   373
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   374
    <resource: #menu>
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   375
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   376
    ^
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   377
     
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   378
       #(#Menu
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   379
          
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   380
           #(
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   381
             #(#MenuItem
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   382
                #'label:' '!! derives from application !!'
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   383
            )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   384
          ) nil
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   385
          nil
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   386
      )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   387
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   388
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   389
menuEdit
220
ca
parents: 218
diff changeset
   390
    "this window spec was automatically generated by the ST/X MenuEditor"
ca
parents: 218
diff changeset
   391
ca
parents: 218
diff changeset
   392
    "do not manually edit this - the builder may not be able to
ca
parents: 218
diff changeset
   393
     handle the specification if its corrupted."
ca
parents: 218
diff changeset
   394
ca
parents: 218
diff changeset
   395
    "
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   396
     MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   397
     (Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp
220
ca
parents: 218
diff changeset
   398
    "
ca
parents: 218
diff changeset
   399
ca
parents: 218
diff changeset
   400
    <resource: #menu>
ca
parents: 218
diff changeset
   401
ca
parents: 218
diff changeset
   402
    ^
ca
parents: 218
diff changeset
   403
     
ca
parents: 218
diff changeset
   404
       #(#Menu
ca
parents: 218
diff changeset
   405
          
ca
parents: 218
diff changeset
   406
           #(
ca
parents: 218
diff changeset
   407
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   408
                #'label:' 'Cut'
155310ec83aa revised version
tz
parents: 382
diff changeset
   409
                #'value:' #doCut
155310ec83aa revised version
tz
parents: 382
diff changeset
   410
                #'enabled:' #hasValidSelection
155310ec83aa revised version
tz
parents: 382
diff changeset
   411
                #'shortcutKeyCharacter:' #Cut
155310ec83aa revised version
tz
parents: 382
diff changeset
   412
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   413
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   414
                #'label:' 'Copy'
220
ca
parents: 218
diff changeset
   415
                #'value:' #doCopy
ca
parents: 218
diff changeset
   416
                #'enabled:' #hasValidSelection
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
   417
                #'shortcutKeyCharacter:' #Copy
220
ca
parents: 218
diff changeset
   418
            )
ca
parents: 218
diff changeset
   419
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   420
                #'label:' 'Paste'
220
ca
parents: 218
diff changeset
   421
                #'value:' #doPaste
ca
parents: 218
diff changeset
   422
                #'enabled:' #hasAnySingleSelection
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
   423
                #'shortcutKeyCharacter:' #Paste
220
ca
parents: 218
diff changeset
   424
            )
ca
parents: 218
diff changeset
   425
             #(#MenuItem
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   426
                #'label:' '-'
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   427
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   428
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   429
                #'label:' 'Create Item'
155310ec83aa revised version
tz
parents: 382
diff changeset
   430
                #'value:' #doCreateItem
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   431
                #'labelImage:' #(#ResourceRetriever #MenuEditor #menuItemImage 'Create Item')
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   432
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   433
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   434
                #'label:' 'Create Separator'
155310ec83aa revised version
tz
parents: 382
diff changeset
   435
                #'value:' #doCreateSep
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   436
                #'labelImage:' #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Create Separator')
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   437
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   438
             #(#MenuItem
220
ca
parents: 218
diff changeset
   439
                #'label:' '-'
ca
parents: 218
diff changeset
   440
            )
ca
parents: 218
diff changeset
   441
             #(#MenuItem
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   442
                #'label:' 'Create Submenu'
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   443
                #'value:' #doCreateMenu
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   444
                #'labelImage:' #(#ResourceRetriever #MenuEditor #submenuImage 'Create Submenu')
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   445
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   446
             #(#MenuItem
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   447
                #'label:' 'Create Submenu Link'
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   448
                #'value:' #doCreateLink
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   449
                #'labelImage:' #(#ResourceRetriever #MenuEditor #linkSubmenuImage 'Create Submenu Link')
220
ca
parents: 218
diff changeset
   450
            )
ca
parents: 218
diff changeset
   451
          ) nil
ca
parents: 218
diff changeset
   452
          nil
ca
parents: 218
diff changeset
   453
      )
ca
parents: 218
diff changeset
   454
!
ca
parents: 218
diff changeset
   455
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   456
menuToolbar
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   457
    "this window spec was automatically generated by the ST/X MenuEditor"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   458
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   459
    "do not manually edit this - the builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   460
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   461
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   462
    "
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   463
     MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar
155310ec83aa revised version
tz
parents: 382
diff changeset
   464
     (Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   465
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   466
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   467
    <resource: #menu>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   468
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   469
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   470
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   471
       #(#Menu
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   472
          
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   473
           #(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   474
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   475
                #'label:' 'New'
155310ec83aa revised version
tz
parents: 382
diff changeset
   476
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   477
                #'value:' #doNew
155310ec83aa revised version
tz
parents: 382
diff changeset
   478
                #'labelImage:' #(#ResourceRetriever nil #newIcon)
155310ec83aa revised version
tz
parents: 382
diff changeset
   479
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   480
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   481
                #'label:' 'Load'
155310ec83aa revised version
tz
parents: 382
diff changeset
   482
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   483
                #'value:' #doFromClass
155310ec83aa revised version
tz
parents: 382
diff changeset
   484
                #'labelImage:' #(#ResourceRetriever nil #loadIcon)
155310ec83aa revised version
tz
parents: 382
diff changeset
   485
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   486
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   487
                #'label:' 'Save'
155310ec83aa revised version
tz
parents: 382
diff changeset
   488
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   489
                #'value:' #doInstallSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   490
                #'labelImage:' #(#ResourceRetriever nil #saveIcon)
155310ec83aa revised version
tz
parents: 382
diff changeset
   491
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   492
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   493
                #'label:' '-'
155310ec83aa revised version
tz
parents: 382
diff changeset
   494
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   495
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   496
                #'label:' 'createItem'
155310ec83aa revised version
tz
parents: 382
diff changeset
   497
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   498
                #'value:' #doCreateItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   499
                #'enabled:' #hasAnySingleSelection
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   500
                #'labelImage:' #(#ResourceRetriever nil #menuItemImage)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   501
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   502
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   503
                #'label:' 'createSeparator'
155310ec83aa revised version
tz
parents: 382
diff changeset
   504
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   505
                #'value:' #doCreateSep
155310ec83aa revised version
tz
parents: 382
diff changeset
   506
                #'enabled:' #hasAnySingleSelection
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   507
                #'labelImage:' #(#ResourceRetriever nil #menuSeparatorImage)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   508
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   509
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   510
                #'label:' '-'
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   511
            )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   512
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   513
                #'label:' 'createMenu'
155310ec83aa revised version
tz
parents: 382
diff changeset
   514
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   515
                #'value:' #doCreateMenu
155310ec83aa revised version
tz
parents: 382
diff changeset
   516
                #'enabled:' #hasAnySingleSelection
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   517
                #'labelImage:' #(#ResourceRetriever nil #submenuImage)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   518
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   519
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   520
                #'label:' 'createLink'
155310ec83aa revised version
tz
parents: 382
diff changeset
   521
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   522
                #'value:' #doCreateLink
155310ec83aa revised version
tz
parents: 382
diff changeset
   523
                #'enabled:' #hasAnySingleSelection
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   524
                #'labelImage:' #(#ResourceRetriever nil #linkSubmenuImage)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   525
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   526
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   527
                #'label:' '-'
243
ae6608b760bf nicer images
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
   528
            )
ae6608b760bf nicer images
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
   529
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   530
                #'label:' 'stepUp'
155310ec83aa revised version
tz
parents: 382
diff changeset
   531
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   532
                #'value:' #doStepUp
155310ec83aa revised version
tz
parents: 382
diff changeset
   533
                #'enabled:' #enabledStepOver
155310ec83aa revised version
tz
parents: 382
diff changeset
   534
                #'labelImage:' #(#ResourceRetriever nil #upIcon)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   535
            )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   536
             #(#MenuItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   537
                #'label:' 'stepDown'
155310ec83aa revised version
tz
parents: 382
diff changeset
   538
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   539
                #'value:' #doStepDown
155310ec83aa revised version
tz
parents: 382
diff changeset
   540
                #'enabled:' #enabledStepOver
155310ec83aa revised version
tz
parents: 382
diff changeset
   541
                #'labelImage:' #(#ResourceRetriever nil #downIcon)
155310ec83aa revised version
tz
parents: 382
diff changeset
   542
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   543
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   544
                #'label:' 'stepIn'
155310ec83aa revised version
tz
parents: 382
diff changeset
   545
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   546
                #'value:' #doStepIn
155310ec83aa revised version
tz
parents: 382
diff changeset
   547
                #'enabled:' #enabledStepIn
155310ec83aa revised version
tz
parents: 382
diff changeset
   548
                #'labelImage:' #(#ResourceRetriever nil #downRightIcon)
155310ec83aa revised version
tz
parents: 382
diff changeset
   549
            )
155310ec83aa revised version
tz
parents: 382
diff changeset
   550
             #(#MenuItem
155310ec83aa revised version
tz
parents: 382
diff changeset
   551
                #'label:' 'stepOut'
155310ec83aa revised version
tz
parents: 382
diff changeset
   552
                #'isButton:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   553
                #'value:' #doStepOut
155310ec83aa revised version
tz
parents: 382
diff changeset
   554
                #'enabled:' #enabledStepOut
155310ec83aa revised version
tz
parents: 382
diff changeset
   555
                #'labelImage:' #(#ResourceRetriever nil #leftDownIcon)
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   556
            )
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   557
          ) nil
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   558
          nil
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   559
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   560
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   561
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   562
windowSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   563
    "this window spec was automatically generated by the ST/X UIPainter"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   564
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   565
    "do not manually edit this - the painter/builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   566
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   567
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   568
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   569
     UIPainter new openOnClass:MenuEditor andSelector:#windowSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   570
     MenuEditor new openInterface:#windowSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   571
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   572
    "MenuEditor open"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   573
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   574
    <resource: #canvas>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   575
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   576
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   577
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   578
       #(#FullSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   579
          #'window:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   580
           #(#WindowSpec
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   581
              #'name:' 'Menu Builder'
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   582
              #'layout:' #(#LayoutFrame 414 0 21 0 993 0 404 0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   583
              #'label:' 'Menu Builder'
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   584
              #'min:' #(#Point 10 10)
155310ec83aa revised version
tz
parents: 382
diff changeset
   585
              #'max:' #(#Point 1152 900)
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   586
              #'bounds:' #(#Rectangle 414 21 994 405)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   587
              #'menu:' #menu
155310ec83aa revised version
tz
parents: 382
diff changeset
   588
              #'usePreferredExtent:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   589
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   590
          #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   591
           #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   592
              #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   593
               #(
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   594
                 #(#MenuPanelSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   595
                    #'name:' 'menuToolbarView'
414
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
   596
                    #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   597
                    #'menu:' #menuToolbar
155310ec83aa revised version
tz
parents: 382
diff changeset
   598
                    #'showSeparatingLines:' true
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   599
                )
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   600
                 #(#VariableHorizontalPanelSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   601
                    #'name:' 'variableHorizontalPanel1'
414
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
   602
                    #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   603
                    #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   604
                     #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   605
                        #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   606
                         #(
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   607
                           #(#ArbitraryComponentSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   608
                              #'name:' 'painterView'
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   609
                              #'menu:' #menuEdit
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   610
                              #'hasHorizontalScrollBar:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   611
                              #'hasVerticalScrollBar:' true
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   612
                              #'component:' #treeView
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   613
                              #'hasBorder:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   614
                          )
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   615
                           #(#ViewSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   616
                              #'name:' 'view1'
155310ec83aa revised version
tz
parents: 382
diff changeset
   617
                              #'component:' 
155310ec83aa revised version
tz
parents: 382
diff changeset
   618
                               #(#SpecCollection
155310ec83aa revised version
tz
parents: 382
diff changeset
   619
                                  #'collection:' 
155310ec83aa revised version
tz
parents: 382
diff changeset
   620
                                   #(
155310ec83aa revised version
tz
parents: 382
diff changeset
   621
                                     #(#NoteBookViewSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   622
                                        #'name:' 'specificationView'
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   623
                                        #'layout:' #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -26 1.0)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   624
                                        #'tabable:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   625
                                        #'model:' #tabModel
155310ec83aa revised version
tz
parents: 382
diff changeset
   626
                                        #'menu:' #tabList
155310ec83aa revised version
tz
parents: 382
diff changeset
   627
                                        #'useIndex:' true
155310ec83aa revised version
tz
parents: 382
diff changeset
   628
                                        #'canvas:' #noteBookView
155310ec83aa revised version
tz
parents: 382
diff changeset
   629
                                    )
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
   630
                                     #(#UISubSpecification
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
   631
                                        #'name:' 'SubSpecification'
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
   632
                                        #'layout:' #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0)
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
   633
                                        #'majorKey:' #ToolApplicationModel
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
   634
                                        #'minorKey:' #windowSpecForCommit
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   635
                                    )
155310ec83aa revised version
tz
parents: 382
diff changeset
   636
                                  )
155310ec83aa revised version
tz
parents: 382
diff changeset
   637
                              )
155310ec83aa revised version
tz
parents: 382
diff changeset
   638
                              #'level:' -1
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   639
                          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   640
                        )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   641
                    )
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   642
                    #'level:' 1
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   643
                    #'handles:' #(#Any 0.384483 1.0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   644
                )
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   645
                 #(#LabelSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   646
                    #'name:' 'infoLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   647
                    #'layout:' #(#LayoutFrame 0 0.0 -22 1 -80 1.0 0 1.0)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   648
                    #'labelChannel:' #valueOfInfoLabel
155310ec83aa revised version
tz
parents: 382
diff changeset
   649
                    #'level:' 1
155310ec83aa revised version
tz
parents: 382
diff changeset
   650
                    #'adjust:' #left
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   651
                )
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   652
                 #(#LabelSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   653
                    #'name:' 'timeLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   654
                    #'layout:' #(#LayoutFrame -80 1 -22 1 0 1.0 0 1.0)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   655
                    #'labelChannel:' #valueOfTimeLabel
155310ec83aa revised version
tz
parents: 382
diff changeset
   656
                    #'level:' 1
155310ec83aa revised version
tz
parents: 382
diff changeset
   657
                    #'adjust:' #right
220
ca
parents: 218
diff changeset
   658
                )
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   659
              )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   660
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   661
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   662
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   663
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   664
!MenuEditor class methodsFor:'resources'!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   665
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   666
linkSubmenuImage
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   667
    "ImageEditor openOnClass:self andSelector:#linkSubmenuImage"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   668
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   669
    <resource: #image>
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   670
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 1 17 17 17 17 17 17 17 17 17 32 1 34 34 34 34 34 34 34 34 34 240 1 34 34 34 34 34 34 34 34 34 240 1 255 255 255 255 255 255 255 255 255 240 1 0 0 0 0 0 0 0 0 0 240 1 3 51 51 1 17 17 17 17 17 240 1 3 51 51 48 34 34 34 34 34 240 1 3 51 51 51 2 34 34 34 34 240 1 3 51 51 51 48 255 255 255 255 240 1 0 0 0 51 51 0 0 0 0 240 1 17 17 17 3 51 48 16 48 17 240 1 34 34 34 32 51 51 0 51 2 240 1 34 34 34 34 3 51 51 51 48 240 1 255 255 255 255 240 51 51 51 51 0 1 0 0 0 0 0 3 51 51 48 240 1 17 17 17 17 17 16 0 51 1 240 1 34 34 34 34 34 34 32 48 34 240 1 34 34 34 34 34 34 32 2 34 240 2 255 255 255 255 255 255 255 255 255 240 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   671
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   672
menuItemImage
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   673
    "ImageEditor openOnClass:self andSelector:#menuItemImage"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   674
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   675
    <resource: #image>
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   676
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 81 85 85 85 85 85 80 85 85 85 85 85 95 85 85 85 85 85 80 85 85 85 85 85 80 0 0 0 0 0 0 21 85 85 85 85 129 26 170 170 170 170 200 27 175 235 235 174 192 27 171 171 171 254 192 27 171 171 235 174 192 27 171 171 171 174 192 27 171 171 235 174 192 26 170 170 170 170 196 47 255 255 255 255 193 0 0 0 0 0 0 85 85 85 85 85 80 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 88]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9977)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   677
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   678
!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   679
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   680
menuSeparatorImage
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   681
    "ImageEditor openOnClass:self andSelector:#menuSeparatorImage"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   682
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   683
    <resource: #image>
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   684
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 82 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 0 0 0 0 0 0 21 85 85 85 85 128 26 170 170 170 170 196 26 170 170 170 170 195 27 255 255 255 250 192 27 0 0 0 6 192 26 85 85 85 86 200 26 170 170 170 170 192 26 170 170 170 170 192 47 255 255 255 255 206 0 0 0 0 0 8 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 87 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9977)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   685
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   686
submenuImage
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   687
    "ImageEditor openOnClass:self andSelector:#submenuImage"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   688
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   689
    <resource: #image>
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   690
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 21 85 85 85 85 128 26 170 170 170 170 192 26 170 170 170 170 192 31 255 255 255 255 199 16 0 0 0 0 192 21 85 85 85 85 204 26 170 170 170 170 192 26 170 170 170 170 192 31 255 255 255 255 200 16 0 0 0 0 192 21 85 85 85 85 192 26 170 170 170 170 192 26 170 170 170 170 207 31 255 255 255 255 192 16 0 0 0 0 192 21 85 85 85 85 192 26 170 170 170 170 192 26 170 170 170 170 192 47 255 255 255 255 192 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   691
! !
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   692
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   693
!MenuEditor class methodsFor:'slices'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   694
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   695
slicesItem
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   696
    ^#(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   697
            (Basics     basicsItemSpec)
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   698
            (Details    detailsEditSpec)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   699
            (Image      imageEditSpec)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   700
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   701
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   702
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   703
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   704
slicesLink
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   705
    ^#(
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   706
            (Basics     basicsLinkSpec)
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   707
            (Details    detailsEditSpec)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   708
            (Image      imageEditSpec)
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   709
      )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   710
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   711
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   712
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   713
slicesMenu
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   714
    ^#(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   715
            (Basics     basicsMenuSpec)
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   716
            (Details    detailsEditSpec)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   717
            (Image      imageEditSpec)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   718
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   719
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   720
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   721
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   722
slicesRootMenu
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   723
    ^#(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   724
            (Basics   basicsRootSpec)
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   725
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   726
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   727
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   728
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   729
slicesSeparatorMenu
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   730
    ^#(
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   731
            (Basics   basicsSeparatorSpec)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   732
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   733
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   734
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   735
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   736
!MenuEditor class methodsFor:'specs'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   737
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   738
basicsItemSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   739
    "this window spec was automatically generated by the ST/X UIPainter"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   740
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   741
    "do not manually edit this - the painter/builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   742
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   743
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   744
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   745
     UIPainter new openOnClass:MenuEditor andSelector:#basicsItemSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   746
     MenuEditor new openInterface:#basicsItemSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   747
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   748
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   749
    <resource: #canvas>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   750
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   751
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   752
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   753
       #(#FullSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   754
          #'window:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   755
           #(#WindowSpec
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   756
              #'name:' 'unnamed canvas'
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   757
              #'layout:' #(#LayoutFrame 170 0 315 0 436 0 633 0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   758
              #'label:' 'unnamed canvas'
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   759
              #'min:' #(#Point 10 10)
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   760
              #'max:' #(#Point 1160 870)
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   761
              #'bounds:' #(#Rectangle 170 315 437 634)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   762
              #'usePreferredExtent:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   763
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   764
          #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   765
           #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   766
              #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   767
               #(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   768
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   769
                    #'name:' 'nameKeyLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   770
                    #'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   771
                    #'label:' 'NameKey:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
   772
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   773
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   774
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   775
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   776
                    #'name:' 'nameKeyField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   777
                    #'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   778
                    #'activeHelpKey:' #nameKey
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   779
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   780
                    #'model:' #nameKey
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   781
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   782
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   783
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   784
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   785
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   786
                    #'name:' 'labelLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   787
                    #'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   788
                    #'label:' 'Label:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
   789
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   790
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   791
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   792
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   793
                    #'name:' 'labelField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   794
                    #'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   795
                    #'activeHelpKey:' #label
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   796
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   797
                    #'model:' #label
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   798
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   799
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   800
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   801
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   802
                    #'name:' 'valueLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   803
                    #'layout:' #(#AlignmentOrigin 107 0 90 0 1 0.5)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   804
                    #'label:' 'Value:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
   805
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   806
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   807
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   808
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   809
                    #'name:' 'valueField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   810
                    #'layout:' #(#LayoutFrame 110 0 79 0 -5 1.0 101 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   811
                    #'activeHelpKey:' #value
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   812
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   813
                    #'model:' #value
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   814
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   815
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   816
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   817
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   818
                 #(#LabelSpec
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   819
                    #'name:' 'argumentLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   820
                    #'layout:' #(#AlignmentOrigin 107 0 115 0 1 0.5)
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   821
                    #'label:' 'Argument:'
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   822
                    #'adjust:' #right
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   823
                    #'resizeForLabel:' true
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   824
                )
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   825
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   826
                    #'name:' 'argumentField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   827
                    #'layout:' #(#LayoutFrame 110 0 104 0 -5 1.0 126 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   828
                    #'activeHelpKey:' #argument
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   829
                    #'tabable:' true
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   830
                    #'model:' #argument
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   831
                    #'type:' #string
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   832
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   833
                    #'acceptOnTab:' false
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
   834
                )
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   835
                 #(#LabelSpec
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   836
                    #'name:' 'indicationLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   837
                    #'layout:' #(#AlignmentOrigin 107 0 155 0 1 0.5)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   838
                    #'label:' 'Indication:'
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   839
                    #'adjust:' #right
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   840
                    #'resizeForLabel:' true
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   841
                )
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   842
                 #(#InputFieldSpec
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   843
                    #'name:' 'indicationField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   844
                    #'layout:' #(#LayoutFrame 110 0 144 0 -5 1.0 166 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   845
                    #'activeHelpKey:' #indication
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   846
                    #'tabable:' true
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   847
                    #'model:' #indication
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   848
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   849
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   850
                    #'acceptOnTab:' false
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   851
                )
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   852
                 #(#CheckBoxSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   853
                    #'name:' 'translateLabelCheckBox'
155310ec83aa revised version
tz
parents: 382
diff changeset
   854
                    #'layout:' #(#Point 20 192)
155310ec83aa revised version
tz
parents: 382
diff changeset
   855
                    #'activeHelpKey:' #translateLabel
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   856
                    #'tabable:' true
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   857
                    #'model:' #translateLabel
155310ec83aa revised version
tz
parents: 382
diff changeset
   858
                    #'label:' 'Translate Label'
155310ec83aa revised version
tz
parents: 382
diff changeset
   859
                )
155310ec83aa revised version
tz
parents: 382
diff changeset
   860
                 #(#CheckBoxSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
   861
                    #'name:' 'isButtonCheckBox'
155310ec83aa revised version
tz
parents: 382
diff changeset
   862
                    #'layout:' #(#Point 20 221)
155310ec83aa revised version
tz
parents: 382
diff changeset
   863
                    #'activeHelpKey:' #translateLabel
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   864
                    #'tabable:' true
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   865
                    #'model:' #isButton
155310ec83aa revised version
tz
parents: 382
diff changeset
   866
                    #'label:' 'Is Button'
155310ec83aa revised version
tz
parents: 382
diff changeset
   867
                )
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   868
              )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   869
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   870
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   871
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   872
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   873
basicsLinkSpec
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   874
    "this window spec was automatically generated by the ST/X UIPainter"
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   875
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   876
    "do not manually edit this - the painter/builder may not be able to
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   877
     handle the specification if its corrupted."
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   878
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   879
    "
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   880
     UIPainter new openOnClass:MenuEditor andSelector:#basicsLinkSpec
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   881
     MenuEditor new openInterface:#basicsLinkSpec
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   882
    "
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   883
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   884
    <resource: #canvas>
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   885
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   886
    ^
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   887
     
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   888
       #(#FullSpec
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   889
          #'window:' 
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   890
           #(#WindowSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   891
              #'name:' 'unnamed canvas'
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   892
              #'layout:' #(#LayoutFrame 374 0 432 0 640 0 750 0)
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   893
              #'label:' 'unnamed canvas'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   894
              #'min:' #(#Point 10 10)
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   895
              #'max:' #(#Point 1280 1024)
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   896
              #'bounds:' #(#Rectangle 374 432 641 751)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   897
              #'usePreferredExtent:' false
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   898
          )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   899
          #'component:' 
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   900
           #(#SpecCollection
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   901
              #'collection:' 
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   902
               #(
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   903
                 #(#LabelSpec
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   904
                    #'name:' 'nameKeyLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   905
                    #'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   906
                    #'activeHelpKey:' #nameKey
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   907
                    #'label:' 'NameKey:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
   908
                    #'adjust:' #right
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   909
                    #'resizeForLabel:' true
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   910
                )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   911
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   912
                    #'name:' 'nameKeyField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   913
                    #'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   914
                    #'activeHelpKey:' #nameKey
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   915
                    #'tabable:' true
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   916
                    #'model:' #nameKey
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   917
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   918
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   919
                    #'acceptOnTab:' false
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   920
                )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   921
                 #(#LabelSpec
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   922
                    #'name:' 'labelLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
   923
                    #'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
   924
                    #'label:' 'Label:'
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   925
                    #'resizeForLabel:' true
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   926
                )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   927
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   928
                    #'name:' 'labelField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   929
                    #'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   930
                    #'activeHelpKey:' #label
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   931
                    #'tabable:' true
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   932
                    #'model:' #label
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   933
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   934
                    #'acceptOnTab:' false
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   935
                )
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   936
                 #(#LabelSpec
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   937
                    #'name:' 'menuLabel'
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   938
                    #'layout:' #(#AlignmentOrigin 107 0 76 0 1 0.5)
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   939
                    #'label:' 'Menu:'
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   940
                    #'resizeForLabel:' true
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   941
                )
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   942
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   943
                    #'name:' 'menuField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   944
                    #'layout:' #(#LayoutFrame 110 0 65 0 -5 1.0 87 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   945
                    #'activeHelpKey:' #submenuChannel
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   946
                    #'tabable:' true
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   947
                    #'model:' #submenuChannel
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   948
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   949
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
   950
                    #'acceptOnTab:' false
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   951
                )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   952
                 #(#LabelSpec
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   953
                    #'name:' 'ArgumentLabel'
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   954
                    #'layout:' #(#AlignmentOrigin 107 0 100 0 1 0.5)
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   955
                    #'label:' 'Argument:'
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   956
                    #'resizeForLabel:' true
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   957
                )
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   958
                 #(#InputFieldSpec
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   959
                    #'name:' 'argumentField'
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   960
                    #'layout:' #(#LayoutFrame 110 0 90 0 -5 1.0 112 0)
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   961
                    #'activeHelpKey:' #submenuChannel
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   962
                    #'tabable:' true
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   963
                    #'model:' #submenuArgument
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   964
                    #'type:' #symbolOrNil
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   965
                    #'acceptOnReturn:' false
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   966
                    #'acceptOnTab:' false
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   967
                )
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   968
                 #(#CheckBoxSpec
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   969
                    #'name:' 'translateLabelCheckBox'
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   970
                    #'layout:' #(#Point 20 128)
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   971
                    #'activeHelpKey:' #translateLabel
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   972
                    #'tabable:' true
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   973
                    #'model:' #translateLabel
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
   974
                    #'label:' 'Translate Label'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
   975
                )
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   976
              )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   977
          )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   978
      )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   979
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
   980
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   981
basicsMenuSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   982
    "this window spec was automatically generated by the ST/X UIPainter"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   983
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   984
    "do not manually edit this - the painter/builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   985
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   986
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   987
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   988
     UIPainter new openOnClass:MenuEditor andSelector:#basicsMenuSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   989
     MenuEditor new openInterface:#basicsMenuSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   990
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   991
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   992
    <resource: #canvas>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   993
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   994
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   995
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   996
       #(#FullSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   997
          #'window:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
   998
           #(#WindowSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
   999
              #'name:' 'unnamed canvas'
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1000
              #'layout:' #(#LayoutFrame 456 0 430 0 722 0 748 0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1001
              #'label:' 'unnamed canvas'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1002
              #'min:' #(#Point 10 10)
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1003
              #'max:' #(#Point 1280 1024)
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1004
              #'bounds:' #(#Rectangle 456 430 723 749)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1005
              #'usePreferredExtent:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1006
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1007
          #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1008
           #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1009
              #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1010
               #(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1011
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1012
                    #'name:' 'nameKeyLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1013
                    #'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1014
                    #'label:' 'NameKey:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
  1015
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1016
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1017
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1018
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1019
                    #'name:' 'nameKeyField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1020
                    #'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1021
                    #'activeHelpKey:' #nameKey
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1022
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1023
                    #'model:' #nameKey
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1024
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1025
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1026
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1027
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1028
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1029
                    #'name:' 'labelLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1030
                    #'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1031
                    #'label:' 'Label:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
  1032
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1033
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1034
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1035
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1036
                    #'name:' 'labelField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1037
                    #'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1038
                    #'activeHelpKey:' #label
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1039
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1040
                    #'model:' #label
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1041
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1042
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1043
                )
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1044
                 #(#CheckBoxSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
  1045
                    #'name:' 'translateLabelCheckBox'
155310ec83aa revised version
tz
parents: 382
diff changeset
  1046
                    #'layout:' #(#Point 20 100)
155310ec83aa revised version
tz
parents: 382
diff changeset
  1047
                    #'activeHelpKey:' #translateLabel
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1048
                    #'tabable:' true
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1049
                    #'model:' #translateLabel
155310ec83aa revised version
tz
parents: 382
diff changeset
  1050
                    #'label:' 'Translate Label'
155310ec83aa revised version
tz
parents: 382
diff changeset
  1051
                )
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1052
              )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1053
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1054
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1055
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1056
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1057
basicsRootSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1058
    "this window spec was automatically generated by the ST/X UIPainter"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1059
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1060
    "do not manually edit this - the painter/builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1061
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1062
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1063
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1064
     UIPainter new openOnClass:MenuEditor andSelector:#basicsRootSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1065
     MenuEditor new openInterface:#basicsRootSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1066
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1067
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1068
    <resource: #canvas>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1069
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1070
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1071
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1072
       #(#FullSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1073
          #'window:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1074
           #(#WindowSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1075
              #'name:' 'unnamed canvas'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1076
              #'layout:' #(#LayoutFrame 230 0 231 0 496 0 549 0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1077
              #'label:' 'unnamed canvas'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1078
              #'min:' #(#Point 10 10)
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1079
              #'max:' #(#Point 1280 1024)
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1080
              #'bounds:' #(#Rectangle 230 231 497 550)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1081
              #'usePreferredExtent:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1082
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1083
          #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1084
           #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1085
              #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1086
               #(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1087
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1088
                    #'name:' 'selectorLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1089
                    #'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1090
                    #'label:' 'Selector:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
  1091
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1092
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1093
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1094
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1095
                    #'name:' 'selectorField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1096
                    #'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1097
                    #'activeHelpKey:' #menuSelector
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1098
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1099
                    #'model:' #label
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1100
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1101
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1102
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1103
              )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1104
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1105
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1106
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1107
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1108
basicsSeparatorSpec
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1109
    "this window spec was automatically generated by the ST/X UIPainter"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1110
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1111
    "do not manually edit this - the painter/builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1112
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1113
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1114
    "
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1115
     UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1116
     MenuEditor new openInterface:#basicsSeparatorSpec
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1117
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1118
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1119
    <resource: #canvas>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1120
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1121
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1122
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1123
       #(#FullSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1124
          #'window:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1125
           #(#WindowSpec
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1126
              #'name:' 'unnamed canvas'
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1127
              #'layout:' #(#LayoutFrame 359 0 319 0 625 0 637 0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1128
              #'label:' 'unnamed canvas'
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1129
              #'min:' #(#Point 10 10)
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1130
              #'max:' #(#Point 1160 870)
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1131
              #'bounds:' #(#Rectangle 359 319 626 638)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1132
              #'usePreferredExtent:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1133
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1134
          #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1135
           #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1136
              #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1137
               #(
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1138
                 #(#LabelSpec
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1139
                    #'name:' 'separatorLabel'
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1140
                    #'layout:' #(#AlignmentOrigin 127 0 26 0 1 0.5)
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1141
                    #'label:' 'Separator Type:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
  1142
                    #'adjust:' #right
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1143
                    #'resizeForLabel:' true
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1144
                )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1145
                 #(#ComboListSpec
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1146
                    #'name:' 'seperatorList'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1147
                    #'layout:' #(#LayoutFrame 132 0 15 0 -5 1.0 37 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1148
                    #'activeHelpKey:' #seperatorList
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1149
                    #'tabable:' true
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1150
                    #'model:' #seperatorSelection
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1151
                    #'useIndex:' true
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1152
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1153
              )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1154
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1155
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1156
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1157
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1158
detailsEditSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1159
    "this window spec was automatically generated by the ST/X UIPainter"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1160
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1161
    "do not manually edit this - the painter/builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1162
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1163
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1164
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1165
     UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1166
     MenuEditor new openInterface:#detailsEditSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1167
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1168
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1169
    <resource: #canvas>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1170
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1171
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1172
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1173
       #(#FullSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1174
          #'window:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1175
           #(#WindowSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1176
              #'name:' 'unnamed canvas'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1177
              #'layout:' #(#LayoutFrame 237 0 249 0 495 0 536 0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1178
              #'label:' 'unnamed canvas'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1179
              #'min:' #(#Point 10 10)
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1180
              #'max:' #(#Point 1280 1024)
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1181
              #'bounds:' #(#Rectangle 237 249 496 537)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1182
              #'usePreferredExtent:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1183
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1184
          #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1185
           #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1186
              #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1187
               #(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1188
                 #(#LabelSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1189
                    #'name:' 'shortcutKeyLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1190
                    #'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1191
                    #'label:' 'Accelerator:'
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1192
                    #'adjust:' #right
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1193
                    #'resizeForLabel:' true
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1194
                )
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1195
                 #(#InputFieldSpec
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1196
                    #'name:' 'shortcutKeyField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1197
                    #'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1198
                    #'activeHelpKey:' #shortcutKey
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1199
                    #'tabable:' true
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1200
                    #'model:' #shortcutKey
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1201
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1202
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1203
                    #'acceptOnTab:' false
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1204
                )
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1205
                 #(#LabelSpec
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1206
                    #'name:' 'enabledLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1207
                    #'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1208
                    #'label:' 'Enabled:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
  1209
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1210
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1211
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1212
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1213
                    #'name:' 'enabledField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1214
                    #'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1215
                    #'activeHelpKey:' #enbled
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1216
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1217
                    #'model:' #enabled
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1218
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1219
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1220
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1221
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1222
                 #(#LabelSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1223
                    #'name:' 'accessCharLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1224
                    #'layout:' #(#AlignmentOrigin 217 0 90 0 1 0.5)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1225
                    #'label:' 'Access Character Position:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
  1226
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1227
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1228
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1229
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1230
                    #'name:' 'accessCharField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1231
                    #'layout:' #(#LayoutFrame 220 0 79 0 -5 1.0 101 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1232
                    #'activeHelpKey:' #accessCharaterPos
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1233
                    #'tabable:' true
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1234
                    #'model:' #accessCharacterPos
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1235
                    #'type:' #numberOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1236
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1237
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1238
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1239
              )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1240
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1241
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1242
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1243
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1244
imageEditSpec
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1245
    "this window spec was automatically generated by the ST/X UIPainter"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1246
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1247
    "do not manually edit this - the painter/builder may not be able to
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1248
     handle the specification if its corrupted."
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1249
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1250
    "
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1251
     UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec
155310ec83aa revised version
tz
parents: 382
diff changeset
  1252
     MenuEditor new openInterface:#imageEditSpec
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1253
    "
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1254
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1255
    <resource: #canvas>
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1256
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1257
    ^
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1258
     
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1259
       #(#FullSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1260
          #'window:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1261
           #(#WindowSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1262
              #'name:' 'unnamed canvas'
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1263
              #'layout:' #(#LayoutFrame 104 0 316 0 348 0 457 0)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1264
              #'label:' 'unnamed canvas'
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1265
              #'min:' #(#Point 10 10)
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1266
              #'max:' #(#Point 1280 1024)
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1267
              #'bounds:' #(#Rectangle 104 316 349 458)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1268
              #'usePreferredExtent:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1269
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1270
          #'component:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1271
           #(#SpecCollection
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1272
              #'collection:' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1273
               #(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1274
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1275
                    #'name:' 'retrieverLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1276
                    #'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1277
                    #'label:' 'Retriever:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
  1278
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1279
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1280
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1281
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1282
                    #'name:' 'retrieverField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1283
                    #'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1284
                    #'activeHelpKey:' #retriever
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1285
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1286
                    #'model:' #retriever
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1287
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1288
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1289
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1290
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1291
                 #(#LabelSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1292
                    #'name:' 'iconLabel'
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1293
                    #'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1294
                    #'label:' 'Selector:'
263
25f080e1217f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 258
diff changeset
  1295
                    #'adjust:' #right
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1296
                    #'resizeForLabel:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1297
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1298
                 #(#InputFieldSpec
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1299
                    #'name:' 'iconField'
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1300
                    #'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1301
                    #'activeHelpKey:' #icon
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1302
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1303
                    #'model:' #icon
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1304
                    #'type:' #symbolOrNil
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1305
                    #'acceptOnReturn:' false
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1306
                    #'acceptOnTab:' false
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1307
                )
469
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1308
                 #(#ActionButtonSpec
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1309
                    #'name:' 'imageEditorButton'
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1310
                    #'layout:' #(#LayoutFrame 110 0 66 0 -5 1 90 0)
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1311
                    #'label:' 'Image Editor'
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1312
                    #'tabable:' true
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1313
                    #'model:' #doEditImage
28bcb1982ef9 tabs added
tz
parents: 455
diff changeset
  1314
                )
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1315
                 #(#CheckBoxSpec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1316
                    #'name:' 'iconAndLabel'
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1317
                    #'layout:' #(#LayoutOrigin 20 0 104 0)
371
7017eaabd9ed add help text
ca
parents: 359
diff changeset
  1318
                    #'activeHelpKey:' #iconAndLabel
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1319
                    #'tabable:' true
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1320
                    #'model:' #iconAndLabel
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1321
                    #'label:' 'Image & Label'
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1322
                )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1323
              )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1324
          )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1325
      )
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1326
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1327
209
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1328
!MenuEditor class methodsFor:'startup'!
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1329
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1330
openModalOnClass:aClass andSelector:aSelector
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1331
    ^ self new openModalOnClass:aClass andSelector:aSelector
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1332
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1333
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1334
!
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1335
209
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1336
openOnClass:aClass andSelector:aSelector
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1337
    ^ self new openOnClass:aClass andSelector:aSelector
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1338
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1339
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1340
! !
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1341
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1342
!MenuEditor methodsFor:'accessing'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1343
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1344
isModified: aBoolean         
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1345
    "sets menu tree modifications; invoked by the painter."
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1346
155310ec83aa revised version
tz
parents: 382
diff changeset
  1347
    isModified := aBoolean
155310ec83aa revised version
tz
parents: 382
diff changeset
  1348
!
155310ec83aa revised version
tz
parents: 382
diff changeset
  1349
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1350
specClass
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1351
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1352
    ^specClass
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1353
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1354
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1355
specClass:aClass
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1356
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1357
    aClass isBehavior ifTrue:[specClass := aClass name]
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1358
                     ifFalse:[specClass := aClass]
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1359
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1360
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1361
submenuTest
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1362
    "returns submenu assigned to item test"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1363
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1364
    |menu|
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1365
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1366
    (menu := self treeView asMenu) allItemsDo:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1367
    [:anItem|
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1368
        anItem value:nil.
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1369
        anItem enabled:true.
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1370
    ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1371
    ^menu
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1372
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1373
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1374
useHelpDictionary:aDictionary
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1375
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1376
    self noteBookView.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1377
    self helpTool dictionary:aDictionary
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1378
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1379
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  1380
!MenuEditor methodsFor:'active help'!
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  1381
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  1382
defaultInfoLabel
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  1383
480
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  1384
    ^(specClass ? 'No class defined') printString, '>>', self treeView selectorName
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  1385
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  1386
    "Modified: / 27.1.1998 / 09:18:51 / stefan"
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  1387
! !
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  1388
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1389
!MenuEditor methodsFor:'aspects'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1390
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1391
aspectFor:aKey
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1392
    "returns aspect for a key or nil"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1393
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1394
    ^aspects at: aKey ifAbsent: [super aspectFor:aKey]
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1395
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1396
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1397
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1398
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1399
enabledStepIn
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1400
    "returns whether user can put selected item in next submenu"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1401
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1402
    ^builder booleanValueAspectFor: #enabledStepIn
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1403
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1404
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1405
enabledStepOut
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1406
    "returns whether user can put selected item out of current parent submenu"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1408
    ^builder booleanValueAspectFor: #enabledStepOut
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1409
                         
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1410
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1411
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1412
enabledStepOver
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1413
    "returns whether user can shift selected item up or down"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1414
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1415
    ^builder booleanValueAspectFor:#enabledStepOver
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1416
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1417
220
ca
parents: 218
diff changeset
  1418
hasAnySingleSelection
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1419
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1420
    ^builder booleanValueAspectFor: #hasAnySingleSelection
220
ca
parents: 218
diff changeset
  1421
!
ca
parents: 218
diff changeset
  1422
ca
parents: 218
diff changeset
  1423
hasValidSelection
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1424
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1425
    ^builder booleanValueAspectFor: #hasValidSelection
220
ca
parents: 218
diff changeset
  1426
!
ca
parents: 218
diff changeset
  1427
ca
parents: 218
diff changeset
  1428
hasValidSingleSelection
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1429
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1430
    ^builder booleanValueAspectFor: #hasValidSingleSelection
220
ca
parents: 218
diff changeset
  1431
!
ca
parents: 218
diff changeset
  1432
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1433
noteBookView
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1434
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1435
    |noteBook helpTool|
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1436
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1437
    (noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1438
        noteBook := View new.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1439
        helpTool := UIHelpTool new.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1440
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1441
        helpTool masterApplication:self.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1442
        helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1443
        specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1444
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1445
        helpCanvas client:helpTool.
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1446
        helpTool masterApplication:self.      
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1447
        helpTool modifiedHolder: self valueOfEnablingCommitButtons.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1448
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1449
        builder aspectAt:#noteBookView put:noteBook.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1450
    ].
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1451
    ^ noteBook
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1452
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1453
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1454
tabList
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1455
298
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1456
    |holder|
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1457
    (holder := builder bindingAt:#tabList) isNil ifTrue:[
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1458
        builder aspectAt:#tabList put:(holder := #('Properties') asValue).
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1459
    ].
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1460
    ^ holder
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1461
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1462
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1463
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1464
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1465
tabModel
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1466
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1467
    |holder|
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1468
    (holder := builder bindingAt:#tabModel) isNil ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1469
        holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1470
        builder aspectAt:#tabModel put:holder.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1471
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1472
    ^ holder
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1473
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1474
!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1475
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1476
treeView
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1477
    "returns the tree view representing hierarchically all the menu items"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1478
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1479
    |treeView|
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1480
    (treeView := builder bindingAt:#treeView) isNil ifTrue:[
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1481
        treeView := TreeView new.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1482
        treeView action:[:dummy|self menuChanged].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1483
        builder aspectAt: #treeView put: treeView
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1484
    ].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1485
    ^treeView
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1486
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1487
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1488
!MenuEditor methodsFor:'change & update'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1489
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1490
update:something with:aParameter from:changedObject
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1491
    "one of my value holders has changed its value, so let me set the editing menu as modified"            
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1492
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1493
    self valueOfEnablingCommitButtons value: true
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1494
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1495
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1496
updateEnabledChannels
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1497
    "update enabled channels"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1498
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1499
    |node parent next state|
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1500
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1501
    state := false.   
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1502
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1503
    (node  := self treeView selectedNode) notNil
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1504
    ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1505
    [
220
ca
parents: 218
diff changeset
  1506
        self hasAnySingleSelection value:true.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1507
        (parent := node parent) notNil
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1508
        ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1509
        [
220
ca
parents: 218
diff changeset
  1510
            next := parent childAt:((parent indexOfChild:node) + 1).
ca
parents: 218
diff changeset
  1511
            self enabledStepIn           value:(next notNil and:[next hasChildren]).
ca
parents: 218
diff changeset
  1512
            self enabledStepOver         value:(parent children size > 1).
ca
parents: 218
diff changeset
  1513
            self enabledStepOut          value:(parent parent notNil).
ca
parents: 218
diff changeset
  1514
            self hasValidSingleSelection value:true.
ca
parents: 218
diff changeset
  1515
            self hasValidSelection       value:true.
ca
parents: 218
diff changeset
  1516
          ^ self
ca
parents: 218
diff changeset
  1517
        ]
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1518
    ]
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1519
    ifFalse:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1520
    [
220
ca
parents: 218
diff changeset
  1521
        self hasAnySingleSelection value:false.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1522
        self treeView numberOfSelections ~~ 0 ifTrue:[
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1523
            state := (self treeView isInSelection:1) not
220
ca
parents: 218
diff changeset
  1524
        ]
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1525
    ].          
220
ca
parents: 218
diff changeset
  1526
    self enabledStepOver         value:false.
ca
parents: 218
diff changeset
  1527
    self enabledStepIn           value:false.
ca
parents: 218
diff changeset
  1528
    self enabledStepOut          value:false.
ca
parents: 218
diff changeset
  1529
    self hasValidSingleSelection value:false.
ca
parents: 218
diff changeset
  1530
    self hasValidSelection       value:state.
ca
parents: 218
diff changeset
  1531
! !
ca
parents: 218
diff changeset
  1532
ca
parents: 218
diff changeset
  1533
!MenuEditor methodsFor:'event handling'!
ca
parents: 218
diff changeset
  1534
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1535
doesNotUnderstand: aMessage
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1536
    "detour incoming messages to the tree view"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1537
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1538
    (self treeView respondsTo: aMessage selector)
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1539
    ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1540
    [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1541
        ^aMessage sendTo: self treeView
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1542
    ].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1543
    super doesNotUnderstand:aMessage
220
ca
parents: 218
diff changeset
  1544
ca
parents: 218
diff changeset
  1545
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1546
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1547
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1548
!MenuEditor methodsFor:'private'!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1549
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1550
checkMenuItemModified
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1551
    "check menu item modification"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1552
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1553
    self valueOfEnablingCommitButtons value
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1554
    ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1555
    [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1556
        ((YesNoBox title:'Menu item was modified!!\Save it?\' withCRs)        
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1557
            noText:'No';
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1558
            yesText:'Yes';
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1559
            showAtPointer;
414
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
  1560
            accepted) 
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
  1561
        ifFalse: 
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
  1562
        [
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1563
            self valueOfEnablingCommitButtons value: false. 
414
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
  1564
            isModified := false.
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
  1565
            ^true
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
  1566
        ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1567
        self accept
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1568
    ].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1569
    ^true
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1570
!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1571
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1572
helpKey
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1573
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1574
    |node|
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1575
    (node := self treeView selectedNode) notNil ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1576
        ^ node contents activeHelpKey
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1577
    ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1578
    ^ nil
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1579
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1580
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1581
helpTool
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1582
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1583
    ^helpCanvas application
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1584
! !
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1585
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1586
!MenuEditor methodsFor:'queries'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1587
270
1a68f7479932 provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
  1588
didInstall
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1589
    "returns true if the menu was installed"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1590
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1591
    ^didInstall
270
1a68f7479932 provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
  1592
!
1a68f7479932 provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
  1593
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1594
isHelpToolSelected
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1595
    "returns true if current selection is help tool"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1596
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1597
    (tabSelection ~~ 0 and:[slices notNil]) ifTrue:[
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1598
        ^(slices at:tabSelection) first = UIHelpTool label
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1599
    ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1600
    ^false
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1601
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1602
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1603
isStandAlone
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1604
    "returns true in case of owner of the helptool"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1605
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1606
    ^self masterApplication isNil
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1607
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1608
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1609
!MenuEditor methodsFor:'selection'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1610
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1611
menuChanged
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1612
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1613
    |node item slc sel old dep|
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1614
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1615
    aspects do: [:holder| holder removeDependent:self].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1616
    (node := self treeView selectedNode) notNil ifTrue:[
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1617
        aspects do:[:anAspect| anAspect value:nil ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1618
        item := node contents.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1619
        item toAspects:aspects.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1620
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1621
        item isSeparator ifFalse:[
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1622
            node parent isNil ifFalse:[
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1623
                node hasChildren ifTrue:[
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1624
                    slc := #slicesMenu
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1625
                ] ifFalse:[
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1626
                    item submenuChannel isNil ifTrue:[slc := #slicesItem]
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1627
                                             ifFalse:[slc := #slicesLink]
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1628
                ].
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1629
                slc := (self class perform:slc) copyWith:#( 'Help' #dummy ).
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1630
            ] ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1631
                slc := self class perform:#slicesRootMenu
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1632
            ].
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1633
        ] ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1634
            slc := self class perform:#slicesSeparatorMenu.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1635
        ]
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1636
    ].
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1637
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1638
    self helpTool helpKey: self helpKey.
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1639
    "Next line helps me to preserve myself against unnecessary settings of
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1640
     valueOfEnablingCommitButtons to true in the help tool."
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1641
    self valueOfEnablingCommitButtons value: false.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1642
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1643
    slc ~= slices  ifTrue:[
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1644
        tabSelection ~~ 0 ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1645
            old := (slices at:tabSelection) first
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1646
        ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1647
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1648
        (slices := slc) notNil ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1649
            sel := slices collect:[:s| s first].
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1650
            tabSelection := 0.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1651
            self tabList value:sel.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1652
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1653
            (old notNil and:[(sel := sel findFirst:[:n|n = old]) ~~ 0]) ifFalse:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1654
                sel := 1
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1655
            ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1656
            self tabModel value:sel
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1657
        ] ifFalse:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1658
            self tabList value:nil.
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1659
            self tabSelection:0.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1660
        ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1661
    ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1662
    self updateEnabledChannels.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1663
    aspects do: [:holder| holder addDependent:self].
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1664
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1665
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1666
tabSelection
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1667
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1668
    ^tabSelection ? 0
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1669
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1670
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1671
tabSelection: aSelection
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1672
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1673
    |sel|                 
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1674
    tabSelection = aSelection ifTrue:[
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1675
        ^ self
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1676
    ].
298
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1677
    (aSelection ~~ 0 and:[slices isNil]) ifTrue:[
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1678
        ^ self
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1679
    ].
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1680
    (tabSelection := aSelection) == 0 ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1681
        slices isNil ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1682
            specCanvas client:nil.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1683
            ^ specCanvas raise.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1684
        ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1685
        tabSelection == 1 ifTrue:[^ self].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1686
        tabSelection := 1
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1687
    ].
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1688
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1689
    self isHelpToolSelected ifTrue:[  
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1690
        self helpTool helpKey:(self helpKey).
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1691
        helpCanvas raise.
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1692
    ] ifFalse:[                       
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1693
        sel := (slices at:tabSelection) last.   
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1694
        aspects do: [:holder| holder release].
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1695
        specCanvas client:self spec:(self class perform:sel) builder:builder.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1696
        aspects do: [:holder| holder addDependent:self].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1697
        specCanvas raise.  
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1698
    ]    
298
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  1699
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1700
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1701
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1702
!MenuEditor methodsFor:'startup / release'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1703
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1704
buildFrom:aClass andSelector:aSelector
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1705
249
bfa28b62528c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 246
diff changeset
  1706
    |oldClass newClass|
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1707
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1708
    self valueOfEnablingCommitButtons value: false.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1709
    oldClass := self specClass.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1710
    self specClass:aClass.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1711
    newClass := self specClass.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1712
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1713
    (self isStandAlone and:[oldClass ~= newClass]) ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  1714
        self helpTool helpSpecFrom:newClass
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1715
    ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1716
    self treeView buildFrom: newClass andSelector: aSelector.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1717
155310ec83aa revised version
tz
parents: 382
diff changeset
  1718
    aClass notNil & aSelector notNil
155310ec83aa revised version
tz
parents: 382
diff changeset
  1719
    ifTrue:
155310ec83aa revised version
tz
parents: 382
diff changeset
  1720
    [
155310ec83aa revised version
tz
parents: 382
diff changeset
  1721
        |className message|
155310ec83aa revised version
tz
parents: 382
diff changeset
  1722
        aClass isClass ifTrue: [className := aClass name].
155310ec83aa revised version
tz
parents: 382
diff changeset
  1723
        aClass isString ifTrue: [className := aClass].
155310ec83aa revised version
tz
parents: 382
diff changeset
  1724
        message := className, ' ', aSelector.
155310ec83aa revised version
tz
parents: 382
diff changeset
  1725
        self addToHistory: message -> #loadFromMessage:.
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  1726
        self valueOfInfoLabel value: self defaultInfoLabel
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1727
    ].
155310ec83aa revised version
tz
parents: 382
diff changeset
  1728
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1729
    self treeView selection: 2.
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1730
    self menuChanged
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1731
155310ec83aa revised version
tz
parents: 382
diff changeset
  1732
!
155310ec83aa revised version
tz
parents: 382
diff changeset
  1733
155310ec83aa revised version
tz
parents: 382
diff changeset
  1734
checkModified
155310ec83aa revised version
tz
parents: 382
diff changeset
  1735
    "check menu modification
155310ec83aa revised version
tz
parents: 382
diff changeset
  1736
    "
155310ec83aa revised version
tz
parents: 382
diff changeset
  1737
    isModified
155310ec83aa revised version
tz
parents: 382
diff changeset
  1738
    ifTrue:
155310ec83aa revised version
tz
parents: 382
diff changeset
  1739
    [
155310ec83aa revised version
tz
parents: 382
diff changeset
  1740
        ((YesNoBox title:'Menu was modified!!')        
155310ec83aa revised version
tz
parents: 382
diff changeset
  1741
            noText:'Cancel';
155310ec83aa revised version
tz
parents: 382
diff changeset
  1742
            yesText:'Waste it and proceed';
155310ec83aa revised version
tz
parents: 382
diff changeset
  1743
            showAtPointer;
155310ec83aa revised version
tz
parents: 382
diff changeset
  1744
            accepted) ifFalse: [^false].
155310ec83aa revised version
tz
parents: 382
diff changeset
  1745
        isModified := false
155310ec83aa revised version
tz
parents: 382
diff changeset
  1746
    ].
155310ec83aa revised version
tz
parents: 382
diff changeset
  1747
    ^true
155310ec83aa revised version
tz
parents: 382
diff changeset
  1748
155310ec83aa revised version
tz
parents: 382
diff changeset
  1749
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1750
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1751
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1752
closeRequest
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1753
    "close request"
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1754
418
f47e99ae91bc double save requests after close request added
tz
parents: 416
diff changeset
  1755
    (self checkMenuItemModified and: [self checkModified]) ifTrue: [super closeRequest]
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1756
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1757
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1758
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1759
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1760
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1761
!
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1762
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1763
initialize
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1764
    "initialize value holders for the menu item properties"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1765
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1766
    |holder|
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1767
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1768
    super initialize.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1769
    aspects := IdentityDictionary new.
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1770
    tabSelection := 0.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1771
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1772
    #(
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1773
        label
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1774
        accessCharacterPos
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  1775
        argument
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1776
        submenuChannel
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  1777
        submenuArgument
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1778
        enabled
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1779
        value
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1780
        nameKey
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1781
        indication
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1782
        translateLabel
155310ec83aa revised version
tz
parents: 382
diff changeset
  1783
        isButton
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1784
        shortcutKey
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1785
        retriever
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1786
        iconAndLabel
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1787
        icon
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1788
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1789
     ) do:[:aKey|
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1790
        aspects at:aKey put:(holder := ValueHolder new).
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1791
        holder addDependent: self
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1792
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1793
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1794
    aspects at:#seperatorSelection put:(holder := SelectionInList new).
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1795
    holder list: Item separatorList.
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  1796
    holder addDependent:self.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1797
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1798
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1799
loadFromMessage: aMessage
155310ec83aa revised version
tz
parents: 382
diff changeset
  1800
414
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
  1801
    (((aMessage size > 0) and: [self checkMenuItemModified]) and: [self checkModified])
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  1802
    ifTrue:
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1803
    [
155310ec83aa revised version
tz
parents: 382
diff changeset
  1804
        |readStream aClass aSelector|
155310ec83aa revised version
tz
parents: 382
diff changeset
  1805
        readStream := aMessage readStream.
155310ec83aa revised version
tz
parents: 382
diff changeset
  1806
        aClass := Smalltalk at: (readStream upTo: $ ) asSymbol.
155310ec83aa revised version
tz
parents: 382
diff changeset
  1807
        aSelector :=  readStream upToEnd asSymbol.
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1808
        self buildFrom: aClass andSelector: aSelector
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1809
    ]
155310ec83aa revised version
tz
parents: 382
diff changeset
  1810
!
155310ec83aa revised version
tz
parents: 382
diff changeset
  1811
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1812
openModalOnClass:aClass andSelector:aSelector
416
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1813
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1814
    specClass := Association key:aClass value:aSelector.
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1815
    super openInterfaceModal.
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1816
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1817
!
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1818
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1819
openOnClass:aClass andSelector:aSelector
416
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1820
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1821
    specClass := Association key:aClass value:aSelector.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1822
    super openInterface.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1823
    self buildFrom:aClass andSelector:aSelector.
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1824
209
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1825
!
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1826
b2fa6f8d4808 postBuildWith:builder
ca
parents: 199
diff changeset
  1827
postBuildWith:builder
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1828
    |cls sel|
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1829
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1830
    didInstall := false.
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1831
    isModified := false.
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  1832
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1833
    specClass isAssociation ifTrue:[
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1834
        cls := specClass key.
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1835
        sel := specClass value.
228
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  1836
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  1837
        specClass := nil.
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  1838
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  1839
        (sel isKindOf:Menu) ifTrue:[
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  1840
            self buildFrom:cls andSelector:nil.
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1841
            ^self treeView buildFromMenu:sel.
228
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  1842
        ]
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  1843
        
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  1844
    ].
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1845
    self buildFrom:cls andSelector:sel
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1846
!
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1847
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1848
postOpenWith:aBuilder
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1849
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1850
    self isHelpToolSelected 
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1851
        ifTrue:  [helpCanvas raise] 
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  1852
        ifFalse: [specCanvas raise]    
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1853
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1854
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1855
!MenuEditor methodsFor:'user interactions'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1856
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1857
accept
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1858
    "invoked by button 'OK' and by save requests of menu item changes"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1859
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1860
    |node|
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1861
    node := self treeView selectedNode.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1862
    node notNil
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1863
    ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1864
    [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1865
        self isHelpToolSelected
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1866
        ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1867
        [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1868
            self helpTool accept.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1869
            node contents activeHelpKey: self helpTool helpKey
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1870
        ]
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1871
        ifFalse:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1872
        [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1873
            self treeView updateNode: (node contents buildFromAspects: aspects)
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1874
        ]
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1875
    ].
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1876
    self valueOfEnablingCommitButtons value:false.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1877
    isModified := true
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1878
!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1879
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1880
cancel
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1881
    "invoked by button 'Cancel'"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1882
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1883
    |node|
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1884
    (node := self treeView selectedNode) notNil
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1885
    ifTrue:
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  1886
    [          
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1887
        self helpTool helpKey:(self helpKey).
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1888
        aspects do:[:anAspect| anAspect value:nil].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1889
        node contents toAspects:aspects
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1890
    ].
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1891
    self valueOfEnablingCommitButtons value: false.
414
116cf2acebe3 before loading of a new menu do fire correct sequence of save requests
tz
parents: 412
diff changeset
  1892
    isModified := false
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1893
!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1894
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1895
doBrowseAppClass
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1896
    "open a browser on the class"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1897
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1898
    |cls|
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1899
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1900
    (cls := self resolveName: self specClass) notNil
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1901
    ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1902
    [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1903
        SystemBrowser openInClass:cls class selector: self treeView selectorName
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1904
    ]
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1905
    ifFalse:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1906
    [
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1907
        self information:'No valid class defined!!'.
331
ca
parents: 326
diff changeset
  1908
    ]
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1909
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1910
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1911
doDefineClass
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1912
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1913
    aspects at:#classNameChannel  put:(self specClass asValue).
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1914
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1915
    (self openDialogInterface:#classDefineSpec) ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1916
        self specClass:((aspects at:#classNameChannel) value)
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1917
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1918
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1919
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1920
381
1d1b1483270c now with image editor support
tz
parents: 371
diff changeset
  1921
doEditImage
1d1b1483270c now with image editor support
tz
parents: 371
diff changeset
  1922
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1923
    |cls resourceClass resourceSelector imageResourceMessage readStream|
155310ec83aa revised version
tz
parents: 382
diff changeset
  1924
416
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1925
    cls := self resolveName: self specClass.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1926
    cls isNil ifTrue:[
155310ec83aa revised version
tz
parents: 382
diff changeset
  1927
        ^ self information:'No valid class defined!!'.
155310ec83aa revised version
tz
parents: 382
diff changeset
  1928
    ].
155310ec83aa revised version
tz
parents: 382
diff changeset
  1929
    (aspects at:#icon) value size > 0
155310ec83aa revised version
tz
parents: 382
diff changeset
  1930
        ifTrue:  [resourceSelector := (aspects at:#icon) value]
155310ec83aa revised version
tz
parents: 382
diff changeset
  1931
        ifFalse: [resourceSelector := #stxIcon].
416
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1932
    (aspects at:#retriever) value size > 0
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1933
        ifTrue:  [resourceClass := (aspects at:#retriever) value]
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1934
        ifFalse: [resourceClass := cls withAllSuperclasses detect: [:cls| cls class implements: resourceSelector] ifNone: [cls]].
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1935
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1936
    (imageResourceMessage := ImageEditor openModalOnClass: resourceClass andSelector: resourceSelector) notNil
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1937
    ifTrue:
155310ec83aa revised version
tz
parents: 382
diff changeset
  1938
    [
416
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1939
        readStream := imageResourceMessage readStream.
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1940
        resourceClass := (readStream upTo: $ ) asSymbol.
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1941
        resourceSelector := readStream upToEnd asSymbol.
d28e8c5f25f3 image editor startup revised
tz
parents: 414
diff changeset
  1942
        resourceClass size > 0 ifTrue: [(aspects at:#retriever) value: resourceClass].
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1943
        resourceSelector size > 0 ifTrue: [(aspects at:#icon) value: resourceSelector. self valueOfEnablingCommitButtons value: true]
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1944
    ]
381
1d1b1483270c now with image editor support
tz
parents: 371
diff changeset
  1945
!
1d1b1483270c now with image editor support
tz
parents: 371
diff changeset
  1946
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1947
doFromClass
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1948
422
f85de4fc2a2c commit buttons moved as subSpec to ToolApplicationModel
tz
parents: 418
diff changeset
  1949
    self loadFromInClassesOf: #Object
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1950
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1951
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1952
doInstallSpec
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1953
    |cls selector treeView menu spec mthd category code|
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1954
331
ca
parents: 326
diff changeset
  1955
    cls := self resolveName:(self specClass).
ca
parents: 326
diff changeset
  1956
ca
parents: 326
diff changeset
  1957
    cls isNil ifTrue:[
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1958
        ^ self information:'No valid class defined!!'.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1959
    ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1960
    treeView  := self treeView.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1961
    selector := treeView selectorName.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  1962
    menu     := treeView asMenu.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1963
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1964
    menu isNil ifTrue:[
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  1965
        ^ self information:'No menu defined.'
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1966
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1967
    menu := menu literalArrayEncoding.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1968
    spec := WriteStream on:String new.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1969
    UISpecification prettyPrintSpecArray:menu on:spec indent:5.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1970
    spec := spec contents.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1971
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1972
    "/ if that method already exists, do not overwrite the category
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1973
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1974
    category := 'interface specs'.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1975
    (mthd := cls class compiledMethodAt:selector) notNil ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1976
        category := mthd category.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1977
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1978
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1979
    code := Character excla asString 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1980
            , cls name , ' class methodsFor:' , category storeString
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1981
            , Character excla asString , '\\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1982
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1983
            , selector , '\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1984
            , '    "this window spec was automatically generated by the ST/X MenuEditor"\\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1985
            , '    "do not manually edit this - the builder may not be able to\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1986
            , '     handle the specification if its corrupted."\\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1987
            , '    "\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1988
            , '     MenuEditor new openOnClass:' , cls name , ' andSelector:#' , selector , '\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1989
            , '     (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , selector , ')) startUp\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1990
            , '    "\'.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1991
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1992
    code := code 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1993
            , '\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1994
            , '    <resource: #menu>\\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1995
            , '    ^\' 
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1996
            , '     ', spec
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1997
            , '\'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1998
            , Character excla asString
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  1999
            , ' '
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2000
            , Character excla asString
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2001
            , '\\'.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2002
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2003
    code := code withCRs.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2004
    (ReadStream on:code) fileIn.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2005
455
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  2006
    self isStandAlone ifTrue:[
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  2007
        self helpTool installHelpSpecInto:(self specClass)
117dcae8b5e0 no separate save of help keys
tz
parents: 441
diff changeset
  2008
    ].
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2009
    didInstall := true.
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2010
    isModified := false.
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2011
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2012
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2013
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2014
doNew
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2015
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2016
    self buildFrom:nil andSelector: self treeView selectorName
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2017
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2018
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2019
doPickAMenu
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2020
228
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  2021
    |view|
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2022
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2023
    view := Screen current viewFromUser.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2024
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2025
    (view isNil or:[view == Screen current rootView]) ifTrue:[
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2026
        ^ self
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2027
    ].
228
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  2028
    view specClass == MenuPanelSpec ifTrue:[
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2029
        ^ self treeView buildFromMenu: view asMenu
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2030
    ].
228
ae3028e45467 can read PullDownMenus
ca
parents: 227
diff changeset
  2031
    ^ nil
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2032
!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2033
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2034
doStepDown
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2035
    "shift selected menu item one step down"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2036
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2037
    self treeView selectedNodeChangeSequenceOrder:1.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2038
    isModified := true.
155310ec83aa revised version
tz
parents: 382
diff changeset
  2039
155310ec83aa revised version
tz
parents: 382
diff changeset
  2040
155310ec83aa revised version
tz
parents: 382
diff changeset
  2041
155310ec83aa revised version
tz
parents: 382
diff changeset
  2042
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2043
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2044
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2045
doStepIn
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2046
    "move selected menu item into next submenu"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2047
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2048
    self treeView selectedNodeBecomeChildOfNext.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2049
    isModified := true.
155310ec83aa revised version
tz
parents: 382
diff changeset
  2050
155310ec83aa revised version
tz
parents: 382
diff changeset
  2051
155310ec83aa revised version
tz
parents: 382
diff changeset
  2052
155310ec83aa revised version
tz
parents: 382
diff changeset
  2053
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2054
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2055
!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2056
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2057
doStepOut
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2058
    "move selected menu item out from parent submenu"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2059
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2060
    self treeView selectedNodeBecomeSisterOfParent.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2061
    isModified := true.
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2062
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2063
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2064
doStepUp
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2065
    "shift selected menu item one step up"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2066
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2067
    self treeView selectedNodeChangeSequenceOrder:-1.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2068
    isModified := true.
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2069
!
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2070
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2071
loadFromClassWithSuperclass
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2072
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2073
    |box|
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2074
    box := EnterBox new.
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2075
    box title:'Name of superclass:'.
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2076
    box okText:'OK'.
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2077
    box abortText:'Cancel'.
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2078
    box initialText: 'ApplicationModel'.
480
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2079
    box entryCompletionBlock:[:contents |
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2080
        |s what m|
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2081
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2082
        s := contents withoutSpaces.
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2083
        what := Smalltalk classnameCompletion:s.
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2084
        box contents:what first.
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2085
        (what at:2) size ~~ 1 ifTrue:[
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2086
            self beep
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2087
        ]
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2088
    ].
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2089
    box showAtPointer.
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2090
    box accepted
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2091
    ifTrue:
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2092
    [            
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2093
        self loadFromInClassesOf: box contents asSymbol
432
d35dccaa804c commit buttons replaced by subSpec in ToolApplicationModel
tz
parents: 422
diff changeset
  2094
    ]
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2095
480
fde17b1640d6 Use Class>>selector notation to be consistent with UIPainter and
Stefan Vogel <sv@exept.de>
parents: 469
diff changeset
  2096
    "Modified: / 26.1.1998 / 22:20:41 / stefan"
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2097
!
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2098
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2099
loadFromInClassesOf: aSuperclassOrSymbol
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2100
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2101
    self loadFromMessage: 
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2102
        (ResourceSelectionBrowser
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2103
            request: 'Load Menu From Class'
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2104
            onSuperclass: aSuperclassOrSymbol
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2105
            andClass: specClass
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2106
            andSelector: nil
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2107
            withResourceTypes: #(menu))
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2108
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2109
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2110
!MenuEditor::Item class methodsFor:'constants'!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2111
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2112
separatorList
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2113
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2114
    ^#('blank' 'single line' 'double line')
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2115
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2116
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2117
separatorSlices
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2118
   ^ #(
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2119
        ( #blank        ''  )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2120
        ( #single       '-' )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2121
        ( #double       '=' )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2122
      )
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2123
! !
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2124
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2125
!MenuEditor::Item class methodsFor:'documentation'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2126
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2127
documentation
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2128
"
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2129
    implements the contents assigned to a TreeItem. An instance
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2130
    is associated with one item and keeps all its information
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2131
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2132
    [see also:]
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2133
        TreeItem
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2134
        MenuEditor
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2135
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2136
    [author:]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2137
        Claus Atzkern
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2138
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2139
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2140
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2141
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2142
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2143
!MenuEditor::Item methodsFor:'accessing'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2144
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  2145
activeHelpKey
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2146
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2147
    ^activeHelpKey
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  2148
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  2149
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  2150
activeHelpKey:aKey
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2151
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  2152
    activeHelpKey := aKey
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  2153
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 275
diff changeset
  2154
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2155
label
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2156
    "return the value of the instance variable 'label' (automatically generated)"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2157
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2158
    ^label
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2159
!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2160
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2161
label:something
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2162
    "set the value of the instance variable 'label' (automatically generated)"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2163
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2164
    label := something ? '-'
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2165
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2166
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2167
separatorType
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2168
    "returns separator type assigned to item or nil"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2169
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2170
    label size > 1 
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2171
    ifFalse:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2172
    [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2173
        label size  == 0  ifTrue:[^#blank].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2174
        label first == $- ifTrue:[^#single].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2175
        label first == $= ifTrue:[^#double].
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2176
    ].    
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2177
    ^nil
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2178
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2179
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2180
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2181
submenuChannel
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2182
    "return the value of the instance variable 'submenuChannel' (automatically generated)"
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2183
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2184
    ^submenuChannel
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2185
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2186
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2187
submenuChannel:aChannel
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2188
    "return the value of the instance variable 'submenuChannel' (automatically generated)"
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2189
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2190
    submenuChannel := aChannel
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2191
! !
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2192
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2193
!MenuEditor::Item methodsFor:'conversion'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2194
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2195
asMenuItem
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2196
    "converts self to a menu item"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2197
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2198
    |item rcv|
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2199
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2200
    item := MenuItem labeled:label.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2201
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2202
    self isSeparator ifFalse:[    
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2203
        item activeHelpKey:activeHelpKey.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2204
        item enabled:enabled.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2205
        item accessCharacterPosition:accessCharacterPos.
290
1428bab2aa68 an empty selection is now specified by 0
ca
parents: 287
diff changeset
  2206
        item argument:argument.
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2207
        item submenuChannel:submenuChannel.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2208
        item nameKey:nameKey.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2209
        item shortcutKeyCharacter:shortcutKey.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2210
        item value:value.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2211
        item indication:indication.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2212
        item translateLabel: translateLabel.
155310ec83aa revised version
tz
parents: 382
diff changeset
  2213
        item isButton: isButton.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2214
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2215
        icon notNil ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2216
            rcv := ResourceRetriever new.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2217
            rcv className:retriever.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2218
            rcv selector:icon.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2219
            iconAndLabel == true ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2220
                rcv labelText:label
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2221
            ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2222
            item labelImage:rcv
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2223
        ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2224
    ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2225
    ^item
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2226
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2227
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2228
buildFromAspects:aspects
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2229
249
bfa28b62528c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 246
diff changeset
  2230
    |name|
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2231
    self isSeparator 
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2232
    ifFalse:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2233
    [
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2234
        name  := label.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2235
        label := (aspects at:#label) value.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2236
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2237
        (label isNil or:[self isSeparator]) ifTrue:[
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2238
            (aspects at:#label) value:(label := name)
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2239
        ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2240
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2241
        enabled            := (aspects at:#enabled) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2242
        value              := (aspects at:#value) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2243
        nameKey            := (aspects at:#nameKey) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2244
        indication         := (aspects at:#indication) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2245
        shortcutKey        := (aspects at:#shortcutKey) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2246
        accessCharacterPos := (aspects at:#accessCharacterPos) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2247
        argument           := (aspects at:#argument) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2248
        translateLabel     := (aspects at:#translateLabel) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2249
        isButton           := (aspects at:#isButton) value.
298
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2250
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2251
        argument isString ifTrue:[
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2252
            argument size > 1 ifTrue:[
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2253
                (argument at:1) == $# ifTrue:[
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2254
                    argument := (argument copyFrom:2) asSymbol
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2255
                ]
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2256
            ]
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2257
        ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2258
        submenuChannel    := (aspects at:#submenuChannel) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2259
        retriever         := (aspects at:#retriever) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2260
        icon              := (aspects at:#icon) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2261
        iconAndLabel      := (aspects at:#iconAndLabel) value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2262
    ]
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2263
    ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2264
    [
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2265
        name  := (aspects at:#seperatorSelection) selectionIndex.
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2266
        label := (self class separatorSlices at:name) last.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2267
    ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2268
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2269
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2270
buildFromMenuItem:anItem
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2271
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2272
    |rtv|
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2273
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2274
    self label:(anItem label).
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2275
    activeHelpKey := anItem activeHelpKey.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2276
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2277
    (enabled := anItem enabled) isSymbol ifFalse:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2278
        enabled := nil
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2279
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2280
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2281
    (value := anItem value) isSymbol ifFalse:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2282
        value := nil.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2283
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2284
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2285
    (indication := anItem indication) isSymbol ifFalse:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2286
        indication := nil
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2287
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2288
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2289
    nameKey            := anItem nameKey.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2290
    shortcutKey        := anItem shortcutKeyCharacter.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2291
    accessCharacterPos := anItem accessCharacterPosition.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2292
    argument           := anItem argument.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2293
    submenuChannel     := anItem submenuChannel.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2294
    translateLabel     := anItem translateLabel.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2295
    isButton           := anItem isButton.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2296
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2297
    (((rtv := anItem adornment) notNil)
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2298
    and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever])
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2299
    ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2300
    [
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2301
        retriever := rtv className.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2302
        icon      := rtv selector.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2303
        (iconAndLabel := rtv labelText notNil) ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2304
            label := rtv labelText.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2305
        ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2306
    ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2307
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2308
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2309
toAspects:aspects
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2310
249
bfa28b62528c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 246
diff changeset
  2311
    |type|
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2312
    (type := self separatorType) notNil
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2313
    ifTrue:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2314
    [
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2315
        type := self class separatorSlices findFirst:[:el| el first == type ].
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2316
        (aspects at:#seperatorSelection) selectionIndex:type.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2317
    ] 
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2318
    ifFalse:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2319
    [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2320
        (aspects at:#label)                value:label.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2321
        (aspects at:#enabled)              value:enabled.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2322
        (aspects at:#value)                value:value.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2323
        (aspects at:#nameKey)              value:nameKey.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2324
        (aspects at:#indication)           value:indication.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2325
        (aspects at:#shortcutKey)          value:shortcutKey.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2326
        (aspects at:#accessCharacterPos)   value:accessCharacterPos.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2327
        (aspects at:#translateLabel)       value:translateLabel.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2328
        (aspects at:#isButton)             value:isButton.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2329
        (aspects at:#submenuChannel)       value:submenuChannel.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2330
        (aspects at:#retriever)            value:retriever.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2331
        (aspects at:#icon)                 value:icon.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2332
        (aspects at:#iconAndLabel)         value:iconAndLabel.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2333
        argument isSymbol
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2334
            ifTrue: [(aspects at:#argument)value:'#', argument] 
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2335
            ifFalse:[(aspects at:#argument)value:argument].
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2336
    ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2337
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2338
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2339
!MenuEditor::Item methodsFor:'queries'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2340
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2341
isSeparator
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2342
    "returns true if item is a seperator"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2343
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2344
    ^self separatorType notNil
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2345
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2346
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2347
!MenuEditor::TreeView class methodsFor:'defaults'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2348
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2349
defaultMenuMessage   
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2350
    "this message is the default yo be sent to the menuHolder to get a menu"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2351
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2352
    ^#menu
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2353
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2354
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2355
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2356
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2357
!MenuEditor::TreeView class methodsFor:'documentation'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2358
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2359
documentation
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2360
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2361
    menu selection list
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2362
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2363
    [see also:]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2364
        SelectionInTreeView
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2365
        SelectionInTree
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2366
        TreeItem
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2367
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2368
    [author:]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2369
        Claus Atzkern
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2370
"
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2371
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2372
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2373
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2374
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2375
!MenuEditor::TreeView class methodsFor:'initialization'!
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2376
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2377
initialize
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2378
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2379
    super initialize.
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2380
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2381
    Images := nil
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2382
! !
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2383
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2384
!MenuEditor::TreeView class methodsFor:'resources'!
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2385
155310ec83aa revised version
tz
parents: 382
diff changeset
  2386
images
155310ec83aa revised version
tz
parents: 382
diff changeset
  2387
    "returns an IdentityDictionary containing a list of images and keys used
155310ec83aa revised version
tz
parents: 382
diff changeset
  2388
    "
155310ec83aa revised version
tz
parents: 382
diff changeset
  2389
    ^ Images ?
155310ec83aa revised version
tz
parents: 382
diff changeset
  2390
        (Images := IdentityDictionary new
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2391
            at: #menuItemImage      put: MenuEditor menuItemImage;
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2392
            at: #menuSeparatorImage put: MenuEditor menuSeparatorImage;
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2393
            at: #submenuImage       put: MenuEditor submenuImage;
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2394
            at: #linkSubmenuImage   put: MenuEditor linkSubmenuImage;
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2395
            yourself)
155310ec83aa revised version
tz
parents: 382
diff changeset
  2396
155310ec83aa revised version
tz
parents: 382
diff changeset
  2397
155310ec83aa revised version
tz
parents: 382
diff changeset
  2398
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2399
! !
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2400
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2401
!MenuEditor::TreeView methodsFor:'accessing'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2402
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2403
selectorName
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2404
    ^ (listOfNodes first contents label) asSymbol
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2405
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2406
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2407
!MenuEditor::TreeView methodsFor:'building'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2408
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2409
buildFrom:aClass andSelector:aSelector
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2410
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2411
    |spec cls menu node|
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2412
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2413
    (aClass notNil and:[aSelector notNil]) ifTrue:[
340
1de048872d5e resolveName:
ca
parents: 331
diff changeset
  2414
        cls := self application resolveName:aClass.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2415
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2416
        (cls respondsTo:aSelector) ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2417
            spec := cls perform:aSelector
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2418
        ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2419
    ].
331
ca
parents: 326
diff changeset
  2420
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2421
    spec isNil ifFalse:[
298
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2422
        (spec isMemberOf:Menu) ifFalse:[
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2423
            menu := Menu new fromLiteralArrayEncoding:spec.
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2424
        ] ifTrue:[
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2425
            menu := spec.
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2426
        ].
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2427
        node := self nodeLabel:(aSelector asString).
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2428
        self subMenu:menu parent:node.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2429
    ] ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2430
        aSelector notNil ifTrue:[cls := aSelector asString]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2431
                        ifFalse:[cls := 'menu'].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2432
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2433
        node := self nodeLabel:cls.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2434
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2435
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2436
    node hasChildren ifFalse:[
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2437
        node add:(self nodeLabel:'undefined')
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2438
    ].
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2439
    node expand.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2440
    model root:node.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2441
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2442
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2443
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2444
buildFromMenu:aMenu
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2445
249
bfa28b62528c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 246
diff changeset
  2446
    |node|
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2447
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2448
    node := self nodeLabel:'menu'.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2449
    self subMenu:aMenu parent:node.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2450
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2451
    node hasChildren ifFalse:[
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2452
        node add:(self nodeLabel:'undefined')
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2453
    ].
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2454
    node expand.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2455
    model root:node.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2456
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2457
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2458
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2459
menuItem:anItem
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2460
249
bfa28b62528c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 246
diff changeset
  2461
    |node|
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2462
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2463
    node := self nodeLabel: anItem label.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2464
    node contents buildFromMenuItem:anItem.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2465
    node name: node contents label.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2466
    self subMenu: anItem submenu parent:node.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2467
    ^node.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2468
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2469
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2470
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2471
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2472
subMenu:aMenu parent:aParent
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2473
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2474
    |idx grp|
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2475
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2476
    aMenu isNil ifFalse:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2477
        grp := aMenu groupSizes.
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2478
        aMenu itemsDo:[:i| aParent add:(self menuItem:i)].
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2479
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2480
        grp notNil ifTrue:[
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2481
            idx := 0.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2482
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2483
            grp do:[:i|
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2484
                idx := idx + i + 1.
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2485
                aParent add:(self nodeLabel:nil) beforeIndex:idx.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2486
            ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2487
        ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2488
    ]
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2489
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2490
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2491
!MenuEditor::TreeView methodsFor:'conversion'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2492
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2493
asMenu
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2494
    |menu root|
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2495
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2496
    root := self root.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2497
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2498
    root hasChildren ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2499
        menu := Menu new.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2500
        root children do:[:aChild| menu addItem:(self asMenuItem:aChild)].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2501
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2502
  ^ menu
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2503
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2504
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2505
asMenuItem:aNode
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2506
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2507
    |menu item|
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2508
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2509
    item := aNode contents asMenuItem.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2510
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2511
    aNode hasChildren ifTrue:[
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2512
        menu := Menu new.
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2513
        aNode children do:[:aChild| menu addItem:(self asMenuItem:aChild)].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2514
        item submenu:menu
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2515
    ].
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2516
  ^ item
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2517
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2518
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2519
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2520
!MenuEditor::TreeView methodsFor:'drawing basics'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2521
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2522
drawLabelIndex:anIndex atX:x y:yCenter
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2523
    "draw text label assigned to a node at x y( center)"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2524
258
c6f8c3e2f463 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2525
    |y x2 type item|
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2526
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2527
    item := (listOfNodes at:anIndex) contents.
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2528
    type := item separatorType.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2529
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2530
    type isNil ifTrue:[
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2531
        super drawLabelIndex:anIndex atX:x y:yCenter
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2532
    ] ifFalse:[
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2533
        type == #blank ifFalse:[
258
c6f8c3e2f463 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2534
            x2 := x + 80.
c6f8c3e2f463 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2535
c6f8c3e2f463 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2536
            self displayLineFromX:x y:yCenter toX:x2 y:yCenter.
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2537
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2538
            type == #double ifTrue:[
258
c6f8c3e2f463 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2539
                y := yCenter + 2.
c6f8c3e2f463 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2540
                self displayLineFromX:x y:y toX:x2 y:y.
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2541
            ]    
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2542
        ]
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2543
    ]
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2544
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2545
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2546
figureFor:aNode
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2547
    "access figure for a node"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2548
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2549
    aNode hasChildren
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2550
    ifFalse:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2551
    [
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2552
        |item|
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2553
        (item := aNode contents) submenuChannel notNil ifTrue:[^images at: #linkSubmenuImage].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2554
        item isSeparator ifTrue:[^images at: #menuSeparatorImage].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2555
        ^images at: #menuItemImage
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2556
    ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2557
    ^images at: #submenuImage
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2558
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2559
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2560
!MenuEditor::TreeView methodsFor:'event handling'!
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2561
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2562
keyPress:key x:x y:y
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2563
    "invoked if any key was pressed"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2564
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  2565
    <resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste)>
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  2566
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  2567
    (key == #Cut or:[key == #Delete or:[key == #BackSpace]]) ifTrue: [^self doCut].
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2568
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2569
    key == #Copy  ifTrue:[^self doCopy].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2570
    key == #Paste ifTrue:[^self doPaste].
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2571
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  2572
    super keyPress:key x:x y:y
356
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2573
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2574
! !
269c117830ba before closing the builder, check for outstanding
ca
parents: 340
diff changeset
  2575
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2576
!MenuEditor::TreeView methodsFor:'initialization'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2577
275
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2578
fetchImageResources
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2579
    "initialize heavily used device resources - to avoid rendering
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2580
     images again and again later; returns maximum extent of the images used."
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2581
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2582
    |defaultExtent imageWidth imageHeight maxWidth maxHeight|
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2583
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2584
    defaultExtent := super fetchImageResources.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2585
    maxHeight := defaultExtent y.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2586
    maxWidth := defaultExtent x.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2587
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2588
    images do:
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2589
    [:anIcon|
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2590
        (imageWidth  := anIcon widthOn:self)  > maxWidth  ifTrue:[maxWidth  := imageWidth].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2591
        (imageHeight := anIcon heightOn:self) > maxHeight ifTrue:[maxHeight := imageHeight].
275
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2592
    ].
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2593
    ^maxWidth@maxHeight
275
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2594
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2595
!
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2596
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2597
initialize
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2598
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2599
    super initialize.
275
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2600
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2601
    images := IdentityDictionary new.
cdecb5b5d356 set fontHeight dependent on max. image height
ca
parents: 270
diff changeset
  2602
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2603
    self class images associationsDo:[:imageAsso|images at: imageAsso key put:(imageAsso value onDevice:device)].
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2604
    self multipleSelectOk:true.
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2605
    self showDirectoryIndicator: true.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2606
    self showDirectoryIndicatorForRoot: false.
411
7f21bc19cd51 supports calling submenus with arguments
tz
parents: 410
diff changeset
  2607
    self selectConditionBlock: [:i|self application checkMenuItemModified].
412
330bf61c53b5 select first menu child item after opening
tz
parents: 411
diff changeset
  2608
    self validateDoubleClickBlock: [:node| node ~~ listOfNodes first].
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2609
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2610
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2611
!MenuEditor::TreeView methodsFor:'menus'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2612
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2613
doCopy
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2614
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2615
    self hasSelection ifTrue:[
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2616
        CopyBuffer := OrderedCollection new.
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2617
        self selectionDo:[:i| CopyBuffer add:((listOfNodes at:i) copy)]
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2618
    ]
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2619
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2620
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2621
doCreateItem
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2622
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2623
    self addElement:(self nodeLabel:'undefined')
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2624
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2625
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2626
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2627
doCreateLink
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2628
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2629
    |node item|
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2630
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2631
    node := self nodeLabel:'undefined'.
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2632
    item := node contents.
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2633
    item submenuChannel:#menuDefaultLink.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2634
    self addElement:node.
155310ec83aa revised version
tz
parents: 382
diff changeset
  2635
    self setModified.
218
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2636
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2637
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2638
!
5c88856b360f access MenuEditor from any specification;
ca
parents: 215
diff changeset
  2639
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2640
doCreateMenu
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2641
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2642
    |node|
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2643
    node := self nodeLabel:'undefined'.
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2644
    node add:(self nodeLabel:'undefined').
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2645
    self addElement:node
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2646
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2647
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2648
doCreateSep
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2649
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2650
    self addElement:(self nodeLabel:nil)
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2651
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2652
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2653
doCut
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2654
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2655
    self doCopy.
298
cec1f174397e use more functionality provided by base class
ca
parents: 290
diff changeset
  2656
    self selectedNodesRemove.
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2657
    self setModified.
155310ec83aa revised version
tz
parents: 382
diff changeset
  2658
155310ec83aa revised version
tz
parents: 382
diff changeset
  2659
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2660
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2661
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2662
doPaste
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2663
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2664
    (CopyBuffer notNil and:[self selectedNode notNil]) ifTrue:[
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2665
        self addElement:(CopyBuffer collect:[:el| el copy])
220
ca
parents: 218
diff changeset
  2666
    ].
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2667
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2668
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2669
!MenuEditor::TreeView methodsFor:'private'!
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2670
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2671
addElement:something
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2672
    "add something after selection"
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2673
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2674
    self selectedNodeAdd:something.
155310ec83aa revised version
tz
parents: 382
diff changeset
  2675
    self setModified.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2676
!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2677
213
71b11a173f87 change model; supports multiple selection
ca
parents: 209
diff changeset
  2678
nodeLabel:aLabel
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2679
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2680
    ^TreeItem name:aLabel contents: (MenuEditor::Item new label:aLabel)
398
155310ec83aa revised version
tz
parents: 382
diff changeset
  2681
!
155310ec83aa revised version
tz
parents: 382
diff changeset
  2682
155310ec83aa revised version
tz
parents: 382
diff changeset
  2683
setModified 
155310ec83aa revised version
tz
parents: 382
diff changeset
  2684
155310ec83aa revised version
tz
parents: 382
diff changeset
  2685
    self topView application isModified: true
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2686
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2687
407
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2688
!MenuEditor::TreeView methodsFor:'selection'!
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2689
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2690
updateNode: aNode
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2691
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2692
    |name treeItem index|
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2693
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2694
    name := aNode label.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2695
    treeItem := listOfNodes detect: [:n| n contents = aNode] ifNone: [1].
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2696
    index := self indexOfNode: treeItem.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2697
    treeItem name: name.
578a7aaed19e totally revised version
tz
parents: 406
diff changeset
  2698
    self redrawLine: index.
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2699
! !
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2700
441
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2701
!MenuEditor::TreeView methodsFor:'startup / release'!
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2702
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2703
destroy
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2704
    "destroy images"
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2705
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2706
    super destroy.
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2707
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2708
    Images := nil
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2709
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2710
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2711
! !
b16598618359 release images after closing
tz
parents: 432
diff changeset
  2712
199
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2713
!MenuEditor class methodsFor:'documentation'!
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2714
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2715
version
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2716
    ^ '$Header$'
6ce84c1270a6 intitial checkin
ca
parents:
diff changeset
  2717
! !
406
a519e0d547f6 widgets rearranged for different fonts + comfortable menu load support
tz
parents: 398
diff changeset
  2718
MenuEditor initialize!