HierarchicalListEditor.st
author tz
Fri, 09 Jan 1998 17:48:57 +0100
changeset 401 30ecf82e3ae7
parent 372 042713cfe1ed
child 423 ea6880a0e024
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     1
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     3
              All Rights Reserved
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     4
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     5
 This software is furnished under a license and may be used
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    10
 hereby transferred.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    11
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    12
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    13
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    14
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    15
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    16
ApplicationModel subclass:#HierarchicalListEditor
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    17
	instanceVariableNames:'didInstall treeView specClass specSelector'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    18
	classVariableNames:'CopyBuffer IconCreateChild IconCreateSister'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    19
	poolDictionaries:''
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    20
	category:'Interface-UIPainter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    21
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    22
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    23
!HierarchicalListEditor class methodsFor:'documentation'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    24
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    25
copyright
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    26
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    27
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    28
              All Rights Reserved
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    29
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    30
 This software is furnished under a license and may be used
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    35
 hereby transferred.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    36
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    37
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    38
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    39
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    40
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    41
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    42
documentation
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    43
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    44
    HierarchicalListEditor is used by the UIPainter to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    45
    create or maintain a hierarchical list.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    46
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    47
    [start with:]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    48
        HierarchicalListEditor open
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    49
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    50
    [see also:]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    51
        UIPainter
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    52
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    53
    [author:]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    54
        Claus Atzkern
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    55
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    56
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    57
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    58
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    59
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    60
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    61
!HierarchicalListEditor class methodsFor:'icons'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    62
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    63
iconCreateChild
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    64
372
ca
parents: 337
diff changeset
    65
    <resource: #fileImage>
ca
parents: 337
diff changeset
    66
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    67
    IconCreateChild isNil ifTrue:[
337
7c36c8b2b495 update images;
ca
parents: 327
diff changeset
    68
        IconCreateChild := Image fromFile:'bitmaps/ui_hierListChild.xpm'.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    69
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    70
  ^ IconCreateChild.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    71
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    72
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    73
IconCreateChild := nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    74
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    75
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    76
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    77
iconCreateSister
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    78
372
ca
parents: 337
diff changeset
    79
    <resource: #fileImage>
ca
parents: 337
diff changeset
    80
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    81
    IconCreateSister isNil ifTrue:[
337
7c36c8b2b495 update images;
ca
parents: 327
diff changeset
    82
        IconCreateSister := Image fromFile:'bitmaps/ui_hierListSister.xpm'.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    83
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    84
  ^ IconCreateSister.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    85
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    86
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    87
IconCreateSister := nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    88
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    89
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    90
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    91
!HierarchicalListEditor class methodsFor:'interface specs'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    92
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    93
classAndMethodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    94
    "this window spec was automatically generated by the ST/X UIPainter"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    95
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    96
    "do not manually edit this - the painter/builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    97
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    98
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    99
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   100
     UIPainter new openOnClass:HierarchicalListEditor andSelector:#classAndMethodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   101
     HierarchicalListEditor new openInterface:#classAndMethodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   102
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   103
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   104
    <resource: #canvas>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   105
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   106
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   107
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   108
       #(#FullSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   109
          #'window:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   110
           #(#WindowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   111
              #'name:' 'Painter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   112
              #'layout:' #(#LayoutFrame 199 0 167 0 589 0 336 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   113
              #'label:' 'Painter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   114
              #'min:' #(#Point 10 10)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   115
              #'max:' #(#Point 1160 870)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   116
              #'bounds:' #(#Rectangle 199 167 590 337)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   117
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   118
          #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   119
           #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   120
              #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   121
               #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   122
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   123
                    #'name:' 'boxLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   124
                    #'layout:' #(#Point 5 10)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   125
                    #'label:' 'class & method for code:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   126
                    #'adjust:' #left
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   127
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   128
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   129
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   130
                    #'name:' 'classLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   131
                    #'layout:' #(#AlignmentOrigin 45 0.11 51 0 1 0.5)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   132
                    #'label:' 'class:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   133
                    #'adjust:' #right
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   134
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   135
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   136
                 #(#InputFieldSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   137
                    #'name:' 'classField'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   138
                    #'layout:' #(#LayoutFrame 47 0.11 39 0 -2 1.0 61 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   139
                    #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   140
                    #'model:' #specClassChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   141
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   142
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   143
                    #'name:' 'methodLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   144
                    #'layout:' #(#AlignmentOrigin 45 0.11 74 0 1 0.5)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   145
                    #'label:' 'method:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   146
                    #'adjust:' #right
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   147
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   148
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   149
                 #(#InputFieldSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   150
                    #'name:' 'methodField'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   151
                    #'layout:' #(#LayoutFrame 47 0.11 64 0 -2 1.0 86 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   152
                    #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   153
                    #'model:' #specSelectorChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   154
                    #'type:' #string
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   155
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   156
                 #(#HorizontalPanelViewSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   157
                    #'name:' 'commitPanel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   158
                    #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   159
                    #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   160
                     #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   161
                        #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   162
                         #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   163
                           #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   164
                              #'name:' 'cancel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   165
                              #'label:' 'cancel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   166
                              #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   167
                              #'model:' #cancel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   168
                              #'extent:' #(#Point 191 24)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   169
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   170
                           #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   171
                              #'name:' 'accept'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   172
                              #'label:' 'ok'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   173
                              #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   174
                              #'isDefault:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   175
                              #'model:' #accept
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   176
                              #'extent:' #(#Point 191 24)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   177
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   178
                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   179
                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   180
                    #'horizontalLayout:' #fitSpace
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   181
                    #'verticalLayout:' #fit
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   182
                    #'horizontalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   183
                    #'verticalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   184
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   185
              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   186
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   187
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   188
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   189
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   190
menuButtons
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   191
    "this window spec was automatically generated by the ST/X MenuEditor"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   192
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   193
    "do not manually edit this - the builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   194
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   195
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   196
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   197
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuButtons
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   198
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuButtons)) startUp
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   199
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   200
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   201
    <resource: #menu>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   202
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   203
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   204
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   205
       #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   206
          
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   207
           #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   208
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   209
                #'label:' 'createChild'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   210
                #'value:' #doCreateChild
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   211
                #'enabled:' #canCreateChildChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   212
                #'labelImage:' #(#ResourceRetriever #HierarchicalListEditor #iconCreateChild)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   213
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   214
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   215
                #'label:' 'createSister'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   216
                #'value:' #doCreateSister
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   217
                #'enabled:' #canCreateSisterChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   218
                #'labelImage:' #(#ResourceRetriever #HierarchicalListEditor #iconCreateSister)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   219
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   220
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   221
                #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   222
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   223
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   224
                #'label:' ''
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   225
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   226
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   227
                #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   228
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   229
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   230
                #'label:' 'stepUp'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   231
                #'value:' #doStepUp
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   232
                #'enabled:' #canStepOverChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   233
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepUp)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   234
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   235
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   236
                #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   237
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   238
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   239
                #'label:' 'stepDown'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   240
                #'value:' #doStepDown
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   241
                #'enabled:' #canStepOverChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   242
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepDown)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   243
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   244
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   245
                #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   246
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   247
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   248
                #'label:' 'stepIn'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   249
                #'value:' #doStepIn
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   250
                #'enabled:' #canStepInChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   251
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepIn)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   252
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   253
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   254
                #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   255
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   256
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   257
                #'label:' 'stepOut'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   258
                #'value:' #doStepOut
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   259
                #'enabled:' #canStepOutChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   260
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepOut)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   261
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   262
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   263
                #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   264
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   265
          ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   266
          nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   267
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   268
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   269
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   270
menuMain
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   271
    "this window spec was automatically generated by the ST/X MenuEditor"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   272
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   273
    "do not manually edit this - the builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   274
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   275
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   276
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   277
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuMain
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   278
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuMain)) startUp
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   279
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   280
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   281
    <resource: #menu>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   282
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   283
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   284
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   285
       #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   286
          
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   287
           #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   288
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   289
                #'label:' 'file'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   290
                #'submenu:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   291
                 #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   292
                    
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   293
                     #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   294
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   295
                          #'label:' 'new'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   296
                          #'value:' #doNew
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   297
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   298
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   299
                          #'label:' 'reload'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   300
                          #'value:' #doReload
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   301
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   302
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   303
                          #'label:' '='
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   304
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   305
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   306
                          #'label:' 'quit'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   307
                          #'value:' #closeRequest
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   308
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   309
                    ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   310
                    nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   311
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   312
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   313
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   314
                #'label:' 'code'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   315
                #'submenu:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   316
                 #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   317
                    
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   318
                     #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   319
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   320
                          #'label:' 'class && method'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   321
                          #'value:' #doDefineClass
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   322
                          #'enabled:' #canChangeClassName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   323
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   324
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   325
                          #'label:' 'method'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   326
                          #'value:' #doDefineSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   327
                          #'enabled:' #hasValidClass
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   328
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   329
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   330
                          #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   331
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   332
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   333
                          #'label:' 'install spec.'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   334
                          #'value:' #doInstall
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   335
                          #'enabled:' #hasValidClass
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   336
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   337
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   338
                          #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   339
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   340
                       #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   341
                          #'label:' 'browse'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   342
                          #'enabled:' #hasValidClass
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   343
                          #'submenu:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   344
                           #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   345
                              
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   346
                               #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   347
                                 #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   348
                                    #'label:' 'class'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   349
                                    #'value:' #'doBrowse:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   350
                                    #'argument:' #class
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   351
                                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   352
                                 #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   353
                                    #'label:' '-'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   354
                                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   355
                                 #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   356
                                    #'label:' 'specification'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   357
                                    #'value:' #'doBrowse:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   358
                                    #'enabled:' #hasValidSpecSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   359
                                    #'argument:' #spec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   360
                                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   361
                                 #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   362
                                    #'label:' 'method'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   363
                                    #'value:' #'doBrowse:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   364
                                    #'enabled:' #hasValidMethodSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   365
                                    #'argument:' #method
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   366
                                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   367
                              ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   368
                              nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   369
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   370
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   371
                    ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   372
                    nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   373
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   374
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   375
          ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   376
          nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   377
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   378
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   379
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   380
menuTree
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   381
    "this window spec was automatically generated by the ST/X MenuEditor"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   382
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   383
    "do not manually edit this - the builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   384
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   385
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   386
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   387
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuTree
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   388
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuTree)) startUp
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   389
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   390
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   391
    <resource: #menu>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   392
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   393
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   394
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   395
       #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   396
          
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   397
           #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   398
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   399
                #'label:' 'copy'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   400
                #'value:' #doCopy
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   401
                #'enabled:' #canCopy
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   402
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   403
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   404
                #'label:' 'cut'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   405
                #'value:' #doCut
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   406
                #'enabled:' #canCut
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   407
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   408
             #(#MenuItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   409
                #'label:' 'paste'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   410
                #'value:' #doPaste
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   411
                #'enabled:' #canPaste
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   412
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   413
          ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   414
          nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   415
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   416
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   417
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   418
methodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   419
    "this window spec was automatically generated by the ST/X UIPainter"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   420
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   421
    "do not manually edit this - the painter/builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   422
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   423
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   424
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   425
     UIPainter new openOnClass:HierarchicalListEditor andSelector:#methodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   426
     HierarchicalListEditor new openInterface:#methodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   427
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   428
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   429
    <resource: #canvas>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   430
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   431
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   432
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   433
       #(#FullSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   434
          #'window:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   435
           #(#WindowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   436
              #'name:' 'Painter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   437
              #'layout:' #(#LayoutFrame 275 0 381 0 665 0 550 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   438
              #'label:' 'Painter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   439
              #'min:' #(#Point 10 10)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   440
              #'max:' #(#Point 1160 870)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   441
              #'bounds:' #(#Rectangle 275 381 666 551)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   442
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   443
          #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   444
           #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   445
              #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   446
               #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   447
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   448
                    #'name:' 'boxLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   449
                    #'layout:' #(#Point 5 10)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   450
                    #'label:' 'class & method for code:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   451
                    #'adjust:' #left
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   452
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   453
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   454
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   455
                    #'name:' 'methodLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   456
                    #'layout:' #(#AlignmentOrigin 45 0.11 74 0 1 0.5)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   457
                    #'label:' 'method:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   458
                    #'adjust:' #right
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   459
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   460
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   461
                 #(#InputFieldSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   462
                    #'name:' 'methodField'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   463
                    #'layout:' #(#LayoutFrame 47 0.11 64 0 -2 1.0 86 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   464
                    #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   465
                    #'model:' #specSelectorChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   466
                    #'type:' #string
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   467
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   468
                 #(#HorizontalPanelViewSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   469
                    #'name:' 'commitPanel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   470
                    #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   471
                    #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   472
                     #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   473
                        #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   474
                         #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   475
                           #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   476
                              #'name:' 'cancel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   477
                              #'label:' 'cancel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   478
                              #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   479
                              #'model:' #cancel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   480
                              #'extent:' #(#Point 191 24)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   481
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   482
                           #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   483
                              #'name:' 'accept'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   484
                              #'label:' 'ok'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   485
                              #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   486
                              #'isDefault:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   487
                              #'model:' #accept
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   488
                              #'extent:' #(#Point 191 24)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   489
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   490
                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   491
                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   492
                    #'horizontalLayout:' #fitSpace
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   493
                    #'verticalLayout:' #fit
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   494
                    #'horizontalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   495
                    #'verticalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   496
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   497
              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   498
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   499
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   500
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   501
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   502
windowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   503
    "this window spec was automatically generated by the ST/X UIPainter"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   504
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   505
    "do not manually edit this - the painter/builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   506
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   507
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   508
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   509
     UIPainter new openOnClass:HierarchicalListEditor andSelector:#windowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   510
     HierarchicalListEditor new openInterface:#windowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   511
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   512
    "HierarchicalListEditor open"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   513
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   514
    <resource: #canvas>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   515
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   516
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   517
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   518
       #(#FullSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   519
          #'window:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   520
           #(#WindowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   521
              #'name:' 'HierarchicalListEditor'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   522
              #'layout:' #(#LayoutFrame 437 0 260 0 1004 0 554 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   523
              #'label:' 'Hierarchical List Editor'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   524
              #'min:' #(#Point 10 10)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   525
              #'max:' #(#Point 1160 870)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   526
              #'bounds:' #(#Rectangle 437 260 1005 555)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   527
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   528
          #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   529
           #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   530
              #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   531
               #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   532
                 #(#MenuPanelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   533
                    #'name:' 'menuMain'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   534
                    #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   535
                    #'menu:' #menuMain
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   536
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   537
                 #(#VariableHorizontalPanelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   538
                    #'name:' 'variableHorizontalPanel1'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   539
                    #'layout:' #(#LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   540
                    #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   541
                     #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   542
                        #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   543
                         #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   544
                           #(#ViewSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   545
                              #'name:' 'view1'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   546
                              #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   547
                               #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   548
                                  #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   549
                                   #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   550
                                     #(#MenuPanelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   551
                                        #'name:' 'menuButtons'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   552
                                        #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 28 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   553
                                        #'menu:' #menuButtons
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   554
                                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   555
                                     #(#ArbitraryComponentSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   556
                                        #'name:' 'treeView'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   557
                                        #'layout:' #(#LayoutFrame 0 0.0 28 0.0 0 1.0 0 1.0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   558
                                        #'menu:' #menuTree
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   559
                                        #'hasHorizontalScrollBar:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   560
                                        #'hasVerticalScrollBar:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   561
                                        #'miniScrollerHorizontal:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   562
                                        #'miniScrollerVertical:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   563
                                        #'component:' #treeView
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   564
                                        #'hasBorder:' false
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   565
                                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   566
                                  )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   567
                              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   568
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   569
                           #(#ViewSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   570
                              #'name:' 'view2'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   571
                              #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   572
                               #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   573
                                  #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   574
                                   #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   575
                                     #(#ViewSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   576
                                        #'name:' 'viewSpec'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   577
                                        #'layout:' #(#LayoutFrame 0 0 0 0 0 0 0 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   578
                                        #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   579
                                         #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   580
                                            #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   581
                                             #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   582
                                               #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   583
                                                  #'name:' 'nameLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   584
                                                  #'layout:' #(#AlignmentOrigin 75 0 36 0 1 0.5)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   585
                                                  #'label:' 'Name:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   586
                                                  #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   587
                                              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   588
                                               #(#InputFieldSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   589
                                                  #'name:' 'nameFiled'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   590
                                                  #'layout:' #(#LayoutFrame 81 0 26 0 -5 1.0 48 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   591
                                                  #'model:' #itemName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   592
                                              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   593
                                               #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   594
                                                  #'name:' 'valueLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   595
                                                  #'layout:' #(#AlignmentOrigin 75 0 71 0 1 0.5)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   596
                                                  #'label:' 'Value:'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   597
                                                  #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   598
                                              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   599
                                               #(#InputFieldSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   600
                                                  #'name:' 'valueField'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   601
                                                  #'layout:' #(#LayoutFrame 81 0 61 0 -5 1.0 83 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   602
                                                  #'model:' #itemValue
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   603
                                                  #'type:' #symbolOrNil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   604
                                              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   605
                                               #(#HorizontalPanelViewSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   606
                                                  #'name:' 'commitPanel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   607
                                                  #'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   608
                                                  #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   609
                                                   #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   610
                                                      #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   611
                                                       #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   612
                                                         #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   613
                                                            #'name:' 'cancelButton'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   614
                                                            #'label:' 'cancel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   615
                                                            #'model:' #cancel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   616
                                                            #'enableChannel:' #modifiedChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   617
                                                            #'extent:' #(#Point 1 22)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   618
                                                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   619
                                                         #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   620
                                                            #'name:' 'acceptButton'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   621
                                                            #'label:' 'ok'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   622
                                                            #'model:' #accept
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   623
                                                            #'enableChannel:' #modifiedChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   624
                                                            #'extent:' #(#Point 1 22)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   625
                                                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   626
                                                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   627
                                                  )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   628
                                                  #'horizontalLayout:' #fitSpace
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   629
                                                  #'verticalLayout:' #center
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   630
                                                  #'horizontalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   631
                                                  #'verticalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   632
                                              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   633
                                            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   634
                                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   635
                                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   636
                                  )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   637
                              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   638
                              #'borderWidth:' 1
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   639
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   640
                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   641
                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   642
                    #'handles:' #(#Any 0.5 1.0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   643
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   644
              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   645
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   646
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   647
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   648
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   649
!HierarchicalListEditor class methodsFor:'printing'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   650
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   651
prettyPrintArray:anArray on:aStream indent:anIndent
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   652
    "print a literal array in a nice format
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   653
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   654
    |arg sol|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   655
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   656
    sol := aStream position.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   657
    aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   658
    aStream nextPutAll:'#('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   659
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   660
    anArray first isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   661
        arg := anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   662
        aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   663
        aStream nextPutAll:anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   664
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   665
        anArray size == 2 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   666
            self prettyPrintArray:(anArray last)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   667
                               on:aStream
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   668
                           indent:(anIndent + 4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   669
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   670
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   671
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   672
      ^ self  
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   673
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   674
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   675
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   676
    aStream nextPutAll:(anArray at:1).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   677
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   678
    arg := anArray at:2 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   679
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   680
    arg isString ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   681
        aStream spaces:((50 - (aStream position - sol)) max:4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   682
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   683
        arg isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   684
            aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   685
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   686
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   687
        aStream nextPutAll:arg.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   688
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   689
        arg := anArray at:3 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   690
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   691
    arg isArray ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   692
        aStream nextPutAll:' #('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   693
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   694
        arg do:[:e|self prettyPrintArray:e on:aStream indent:(anIndent + 4)].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   695
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   696
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   697
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   698
    aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   699
    aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   700
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   701
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   702
!HierarchicalListEditor methodsFor:'accessing'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   703
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   704
didInstall
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   705
    "returns true if spec was installed by operator
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   706
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   707
    ^ didInstall ? false
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   708
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   709
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   710
selectorName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   711
    "returns current spec. selector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   712
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   713
    ^ specSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   714
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   715
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   716
!HierarchicalListEditor methodsFor:'actions'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   717
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   718
accept
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   719
    "accept changes"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   720
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   721
    |node index|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   722
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   723
    (index := treeView selectedIndex) ~~ 0 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   724
        node := treeView nodeAtIndex:index.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   725
        node name:(self itemName value).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   726
        node contents:(self itemValue value).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   727
        treeView redrawLine:index.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   728
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   729
    self modifiedChannel value:false.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   730
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   731
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   732
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   733
cancel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   734
    "reload selected item and update channels
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   735
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   736
    |node|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   737
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   738
    (node := treeView selectedNode) notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   739
        self itemName  value:node name.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   740
        self itemValue value:node contents.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   741
        (builder componentAt:#viewSpec) extent:1.0@1.0.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   742
    ] ifFalse:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   743
        (builder componentAt:#viewSpec) extent:0@0.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   744
        self itemName  value:''.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   745
        self itemValue value:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   746
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   747
    self modifiedChannel value:false.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   748
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   749
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   750
!HierarchicalListEditor methodsFor:'aspects'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   751
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   752
canCreateChildChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   753
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   754
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   755
    ^ builder booleanValueAspectFor:#canCreateChildChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   756
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   757
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   758
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   759
canCreateSisterChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   760
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   761
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   762
    ^ builder booleanValueAspectFor:#canCreateSisterChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   763
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   764
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   765
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   766
canStepInChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   767
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   768
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   769
    ^ builder booleanValueAspectFor:#canStepInChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   770
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   771
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   772
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   773
canStepOutChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   774
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   775
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   776
    ^ builder booleanValueAspectFor:#canStepOutChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   777
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   778
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   779
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   780
canStepOverChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   781
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   782
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   783
    ^ builder booleanValueAspectFor:#canStepOverChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   784
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   785
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   786
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   787
itemName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   788
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   789
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   790
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   791
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   792
    (holder := builder bindingAt:#itemName) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   793
        builder aspectAt:#itemName put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   794
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   795
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   796
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   797
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   798
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   799
itemValue
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   800
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   801
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   802
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   803
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   804
    (holder := builder bindingAt:#itemValue) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   805
        builder aspectAt:#itemValue put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   806
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   807
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   808
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   809
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   810
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   811
modifiedChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   812
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   813
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   814
    ^ builder booleanValueAspectFor:#modifiedChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   815
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   816
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   817
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   818
treeView
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   819
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   820
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   821
    ^ treeView
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   822
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   823
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   824
!HierarchicalListEditor methodsFor:'change & update'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   825
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   826
update:something with:aParameter from:someObject
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   827
    "one of my models changed
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   828
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   829
    self modifiedChannel value:true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   830
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   831
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   832
!HierarchicalListEditor methodsFor:'menu buttons'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   833
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   834
doCreateChild
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   835
    "create a child within selected parent
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   836
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   837
    |node|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   838
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   839
    (node := treeView selectedNode) notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   840
        treeView model add:(self newItem) beforeIndex:1 below:node.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   841
        treeView selectedNodeExpand:true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   842
        self updateChannels.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   843
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   844
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   845
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   846
doCreateSister
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   847
    "create a sister next to selected item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   848
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   849
    |node|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   850
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   851
    (node := treeView selectedNode) notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   852
        node parent notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   853
            treeView model add:(self newItem) after:node
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   854
        ] ifFalse:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   855
            treeView model add:(self newItem) beforeIndex:1 below:node
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   856
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   857
        self updateChannels
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   858
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   859
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   860
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   861
doStepDown
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   862
    "move selected item after next item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   863
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   864
    treeView selectedNodeChangeSequenceOrder:1.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   865
    self updateChannels.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   866
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   867
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   868
doStepIn
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   869
    "lets become the selected item a child of its next sister
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   870
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   871
    treeView selectedNodeBecomeChildOfNext.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   872
    self updateChannels.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   873
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   874
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   875
doStepOut
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   876
    "let selected node become a sister of its current parent
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   877
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   878
    treeView selectedNodeBecomeSisterOfParent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   879
    self updateChannels.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   880
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   881
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   882
doStepUp
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   883
    "move selected item before previous item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   884
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   885
    treeView selectedNodeChangeSequenceOrder:-1.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   886
    self updateChannels.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   887
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   888
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   889
menuButtons
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   890
    "this window spec was automatically generated by the ST/X MenuEditor"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   891
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   892
    ^ self class menuButtons
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   893
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   894
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   895
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   896
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   897
!HierarchicalListEditor methodsFor:'menu main'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   898
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   899
doBrowse:what
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   900
    "open a system browser
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   901
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   902
    |cls sel|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   903
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   904
    (cls := specClass) notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   905
        what == #class ifFalse:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   906
            (sel := specSelector) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   907
                ^ self
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   908
            ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   909
            what == #spec ifTrue:[cls := cls class]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   910
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   911
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   912
        SystemBrowser openInClass:cls selector:sel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   913
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   914
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   915
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   916
doDefineClass
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   917
    "define class and selector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   918
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   919
    |sel cls bindings accepted|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   920
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   921
    masterApplication notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   922
        ^ self information:'only selector could be changed.'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   923
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   924
    accepted := true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   925
    bindings := IdentityDictionary new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   926
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   927
    specClass    notNil ifTrue:[cls := specClass name asString]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   928
                       ifFalse:[cls := ''].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   929
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   930
    specSelector notNil ifTrue:[sel := specSelector asString]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   931
                       ifFalse:[sel := ''].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   932
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   933
    bindings at:#specSelectorChannel put:(sel asValue).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   934
    bindings at:#specClassChannel    put:(cls asValue).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   935
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   936
    [accepted] whileTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   937
        accepted := self openDialogInterface:#classAndMethodSpec withBindings:bindings.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   938
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   939
        accepted ifTrue:[
337
7c36c8b2b495 update images;
ca
parents: 327
diff changeset
   940
            cls := self resolveName:(bindings at:#specClassChannel) value.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   941
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   942
            cls notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   943
                sel := (bindings at:#specSelectorChannel) value withoutSeparators.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   944
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   945
                sel size ~~ 0 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   946
                    specClass    := cls.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   947
                    specSelector := sel asSymbol.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   948
                  ^ self
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   949
                ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   950
            ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   951
        ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   952
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   953
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   954
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   955
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   956
doDefineSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   957
    "define selector only
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   958
    "
327
0040d47658c6 check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
   959
    |sel bindings accepted|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   960
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   961
    accepted := true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   962
    bindings := IdentityDictionary new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   963
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   964
    specSelector notNil ifTrue:[sel := specSelector asString]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   965
                       ifFalse:[sel := ''].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   966
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   967
    bindings at:#specSelectorChannel put:(sel asValue).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   968
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   969
    [accepted] whileTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   970
        accepted := self openDialogInterface:#methodSpec withBindings:bindings.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   971
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   972
        accepted ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   973
            sel := (bindings at:#specSelectorChannel) value withoutSeparators.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   974
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   975
            sel size ~~ 0 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   976
                specSelector := sel asSymbol.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   977
              ^ self
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   978
            ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   979
        ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   980
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   981
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   982
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   983
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   984
doInstall
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   985
    "install code
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   986
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   987
    |code spec category mthd stream|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   988
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   989
    (specClass notNil and:[specSelector notNil]) ifFalse:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   990
        ^ self information:'no valid class & method defined'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   991
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   992
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   993
    spec   := (treeView nodeAtIndex:1) literalArrayEncoding.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   994
    stream := WriteStream on:String new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   995
    self class prettyPrintArray:spec on:stream indent:4.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   996
    spec       := stream contents.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   997
    category   := 'interface specs'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   998
    didInstall := true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   999
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1000
    (mthd := specClass class compiledMethodAt:specSelector) notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1001
        category := mthd category.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1002
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1003
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1004
    code := Character excla asString 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1005
            , specClass name , ' class methodsFor:' , category storeString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1006
            , Character excla asString , '\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1007
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1008
            , specSelector , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1009
            , '    "this window spec was automatically generated by the ST/X HierarchicalListEditor"\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1010
            , '    "do not manually edit this - the builder may not be able to\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1011
            , '     handle the specification if its corrupted."\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1012
            , '    "\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1013
            , '     HierarchicalListEditor new openOnClass:' , specClass name , ' andSelector:#' , specSelector , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1014
            , '    "\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1015
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1016
    code := code 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1017
            , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1018
            , '    <resource: #hierarchicalList>\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1019
            , '    ^\' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1020
            , spec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1021
            , ' decodeAsLiteralArray\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1022
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1023
            , ' '
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1024
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1025
            , '\\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1026
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1027
    code := code withCRs.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1028
    (ReadStream on:code) fileIn.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1029
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1030
    (specClass compiledMethodAt:specSelector) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1031
        category := 'aspects'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1032
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1033
        code := Character excla asString 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1034
                , specClass name , ' methodsFor:' , category storeString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1035
                , Character excla asString , '\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1036
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1037
                , specSelector , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1038
                , '    "this window spec was automatically generated by the ST/X HierarchicalListEditor"\\'
306
e5e33576c3ad change install routine;
ca
parents: 300
diff changeset
  1039
                , '    ^ self class ', specSelector
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1040
                , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1041
                , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1042
                , ' '
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1043
                , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1044
                , '\\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1045
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1046
        code := code withCRs.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1047
        (ReadStream on:code) fileIn.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1048
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1049
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1050
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1051
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1052
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1053
doNew
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1054
    "remove all items; restart
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1055
    "
306
e5e33576c3ad change install routine;
ca
parents: 300
diff changeset
  1056
    treeView root:(TreeItem name:'Anchor' contents:#anchor).
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1057
    treeView selection:0.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1058
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1059
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1060
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1061
doReload
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1062
    "reload spec from current class and selector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1063
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1064
    self buildFrom:specClass andSelector:specSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1065
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1066
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1067
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1068
menuMain
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1069
    "this window spec was automatically generated by the ST/X MenuEditor"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1070
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1071
    ^ self class menuMain
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1072
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1073
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1074
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1075
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1076
!HierarchicalListEditor methodsFor:'menu tree'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1077
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1078
doCopy
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1079
    "copy current selected nodes into copy buffer
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1080
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1081
    CopyBuffer := OrderedCollection new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1082
    treeView selectedNodesDo:[:aNode| CopyBuffer add:(aNode copy)].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1083
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1084
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1085
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1086
doCut
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1087
    "cut current selected nodes
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1088
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1089
    treeView hasSelection ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1090
        self doCopy.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1091
        treeView selectedNodesRemove.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1092
        self updateChannels.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1093
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1094
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1095
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1096
doPaste
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1097
    "paste after current selected item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1098
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1099
    treeView selectedNodeAdd:CopyBuffer.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1100
    self updateChannels.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1101
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1102
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1103
menuTree
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1104
    "this window spec was automatically generated by the ST/X MenuEditor"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1105
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1106
    ^ self class menuTree
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1107
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1108
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1109
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1110
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1111
!HierarchicalListEditor methodsFor:'private'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1112
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1113
newItem
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1114
    "creates and returns a new default item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1115
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1116
    ^ TreeItem name:'undefined' contents:nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1117
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1118
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1119
updateChannels
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1120
    "update channels
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1121
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1122
    |node parent chnStepIn chnStepOut chnStepOvr chnChild chnSister|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1123
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1124
    chnStepIn := chnStepOut := chnStepOvr := chnChild := chnSister := false.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1125
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1126
    (node := treeView selectedNode) notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1127
        chnChild := true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1128
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1129
        (parent := node parent) notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1130
            chnSister  := true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1131
            chnStepOvr := parent numberOfChildren > 1.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1132
            chnStepOut := parent parent notNil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1133
            chnStepIn  := node ~~ parent lastChild.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1134
        ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1135
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1136
    self canCreateChildChannel  value:chnChild.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1137
    self canCreateSisterChannel value:chnSister.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1138
    self canStepOverChannel     value:chnStepOvr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1139
    self canStepOutChannel      value:chnStepOut.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1140
    self canStepInChannel       value:chnStepIn.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1141
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1142
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1143
!HierarchicalListEditor methodsFor:'queries'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1144
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1145
canChangeClassName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1146
    "returns true if current class could be changed which is dependent on
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1147
     the mode: standalone or started by UIPainter
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1148
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1149
    ^ masterApplication isNil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1150
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1151
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1152
canCopy
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1153
    "returns true if any selection exists
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1154
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1155
    ^ treeView selection notNil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1156
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1157
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1158
canCut
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1159
    "returns true if any selection exists and not includes
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1160
     the anchor (first element into list).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1161
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1162
    treeView selection notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1163
        ^ (treeView isInSelection:1) not
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1164
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1165
    ^ false
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1166
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1167
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1168
canPaste
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1169
    "returns true if something to be paste exists and a
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1170
     single selection exists
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1171
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1172
    ^ (CopyBuffer notNil and:[treeView selectedNode notNil])
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1173
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1174
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1175
hasValidClass
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1176
    "returns true if the class defined allready exists
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1177
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1178
    ^ specClass isBehavior
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1179
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1180
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1181
hasValidMethodSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1182
    "returns true if the class and the instance selector defined
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1183
     allready exists.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1184
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1185
    (specSelector notNil and:[self hasValidClass]) ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1186
        ^ (specClass compiledMethodAt:specSelector) notNil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1187
    ].    
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1188
    ^ false
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1189
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1190
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1191
hasValidSpecSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1192
    "returns true if the class and the class selector defined
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1193
     allready exists.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1194
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1195
    (specSelector notNil and:[self hasValidClass]) ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1196
        ^ (specClass class compiledMethodAt:specSelector) notNil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1197
    ].    
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1198
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1199
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1200
!HierarchicalListEditor methodsFor:'startup/release'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1201
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1202
buildFrom:aClass andSelector:aSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1203
    "rebuild window from a class and selector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1204
    "
327
0040d47658c6 check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
  1205
    |sel anchor|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1206
337
7c36c8b2b495 update images;
ca
parents: 327
diff changeset
  1207
    specClass := self resolveName:aClass.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1208
    specSelector := nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1209
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1210
    aSelector size ~~ 0 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1211
        sel := aSelector asString withoutSeparators.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1212
        sel size ~~ 0 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1213
            specSelector := sel asSymbol
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1214
        ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1215
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1216
    treeView selection:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1217
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1218
    (specSelector notNil and:[specClass notNil]) ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1219
        (specClass respondsTo:specSelector) ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1220
            anchor := specClass perform:specSelector.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1221
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1222
            anchor isArray ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1223
                anchor := anchor decodeAsLiteralArray.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1224
            ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1225
        ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1226
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1227
    anchor notNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1228
        anchor expand.
306
e5e33576c3ad change install routine;
ca
parents: 300
diff changeset
  1229
        treeView root:anchor.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1230
    ] ifFalse:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1231
        self doNew
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1232
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1233
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1234
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1235
initialize
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1236
    "setup default values
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1237
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1238
    super initialize.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1239
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1240
    treeView := SelectionInTreeView new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1241
    treeView multipleSelectOk:true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1242
    treeView action:[:aNr| self updateChannels. self cancel ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1243
    self doNew.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1244
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1245
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1246
openModalOnClass:aClass andSelector:aSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1247
    "open modal on class and selector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1248
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1249
    specClass := Association key:aClass value:aSelector.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1250
    super openInterfaceModal.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1251
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1252
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1253
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1254
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1255
openOnClass:aClass andSelector:aSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1256
    "open on class and selector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1257
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1258
    specClass := Association key:aClass value:aSelector.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1259
    super openInterface.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1260
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1261
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1262
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1263
postBuildWith:builder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1264
    "setup view
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1265
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1266
    |cls sel|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1267
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1268
    specClass isAssociation ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1269
        cls := specClass key.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1270
        sel := specClass value.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1271
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1272
    self buildFrom:cls andSelector:sel.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1273
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1274
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1275
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1276
!HierarchicalListEditor class methodsFor:'documentation'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1277
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1278
version
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1279
    ^ '$Header$'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1280
! !