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