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