HierarchicalListEditor.st
author Claus Gittinger <cg@exept.de>
Sat, 21 Jul 2012 18:58:03 +0200
changeset 2898 c7f6c498df6a
parent 1875 cfef9684a543
child 3306 a2d6e8a1bcaf
permissions -rw-r--r--
category of:15 methods
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     1
"
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
300
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
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
     7
 inclusion of the above copyright notice. This software may not
300
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
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
    16
"{ Package: 'stx:libtool2' }"
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
    17
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    18
ResourceSpecEditor subclass:#HierarchicalListEditor
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    19
	instanceVariableNames:'treeView'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    20
	classVariableNames:''
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    21
	poolDictionaries:''
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    22
	category:'Interface-UIPainter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    23
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    24
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    25
!HierarchicalListEditor class methodsFor:'documentation'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    26
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    27
copyright
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    28
"
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    29
 COPYRIGHT (c) 1997 by eXept Software AG
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    30
              All Rights Reserved
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    31
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    32
 This software is furnished under a license and may be used
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    33
 only in accordance with the terms of that license and with the
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    34
 inclusion of the above copyright notice. This software may not
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    35
 be provided or otherwise made available to, or used by, any
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    36
 other person.  No title to or ownership of the software is
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    37
 hereby transferred.
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
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    43
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    44
documentation
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    45
"
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    46
    The HierarchicalListEditor allows you to create, modify or just inspect
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    47
    (statical) hierarchical lists for the SelectionInListView.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    48
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    49
    [start with:]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    50
        HierarchicalListEditor open
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    51
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    52
    [see also:]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    53
        UIPainter
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    54
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    55
    [author:]
546
aac3f3c9383f help menu item aligned to the right
tz
parents: 529
diff changeset
    56
        Claus Atzkern, eXept Software AG
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    57
        Thomas Zwick, eXept Software AG
300
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
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    62
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    63
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    64
!HierarchicalListEditor class methodsFor:'instance creation'!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    65
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    66
openModalOnTreeItem: aTreeItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    67
    "Open a HierarchicalListEditor modal on aTreeItem"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    68
    "self openModalOnTreeItem: (TreeItem name: 'Label' contents: #Contents)"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    69
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    70
    ^self new openModalOnTreeItem: aTreeItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    71
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    72
! !
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    73
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    74
!HierarchicalListEditor class methodsFor:'accessing'!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    75
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    76
resourceType
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    77
    "get the type of resource of the method generated by the HierarchicalListEditor"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    78
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    79
    ^#hierarchicalList
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    80
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    81
! !
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    82
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    83
!HierarchicalListEditor class methodsFor:'help specs'!
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    84
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    85
helpSpec
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    86
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    87
     by the UIHelpTool of ST/X."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    88
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    89
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    90
     the UIHelpTool may not be able to read the specification."
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    91
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    92
    "
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    93
     UIHelpTool openOnClass:HierarchicalListEditor    
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    94
    "
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    95
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    96
    <resource: #help>
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    97
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    98
    ^super helpSpec addPairsFrom:#(
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    99
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   100
#addChild
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   101
'Adds a new child item.'
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   102
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   103
#addSister
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   104
'Adds a new sister item.'
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   105
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   106
#contents
399646a86258 help texts added
tz
parents: 566
diff changeset
   107
'Contents of the tree item.'
399646a86258 help texts added
tz
parents: 566
diff changeset
   108
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   109
#fileLoad
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   110
'Opens a dialog for selecting and loading a hierarchical list spec from a class.'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   111
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   112
#fileNew
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   113
'Creates a new hierarchical list. '
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   114
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   115
#fileSave
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   116
'Saves current hierarchical list spec.'
552
8597d3786b09 help texts added
tz
parents: 551
diff changeset
   117
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   118
#fileSaveAs
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   119
'Opens a dialog to save current hierarchical list spec.'
552
8597d3786b09 help texts added
tz
parents: 551
diff changeset
   120
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   121
#label
399646a86258 help texts added
tz
parents: 566
diff changeset
   122
'Label of the tree item.'
399646a86258 help texts added
tz
parents: 566
diff changeset
   123
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   124
)
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   125
! !
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   126
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   127
!HierarchicalListEditor class methodsFor:'image specs'!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   128
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   129
createChildIcon
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   130
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   131
     by the ImageEditor of ST/X."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   132
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   133
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   134
     the ImageEditor may not be able to read the specification."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   135
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   136
    "
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   137
     ImageEditor openOnClass:self andSelector:#createChildIcon
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   138
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   139
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   140
    <resource: #image>
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   141
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   142
    ^Icon
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   143
        constantNamed:#'HierarchicalListEditor createChildIcon'
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
   144
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@AUUUUP@@A????2@@A????2 @A????0@@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A<3L308@A33L33H@A30L33H@A33L33H@A<3L008@A?????8@C*****(@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8') ; yourself); yourself]
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
   145
!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   146
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   147
createSisterIcon
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   148
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   149
     by the ImageEditor of ST/X."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   150
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   151
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   152
     the ImageEditor may not be able to read the specification."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   153
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   154
    "
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   155
     ImageEditor openOnClass:self andSelector:#createSisterIcon
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   156
    "
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   157
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   158
    <resource: #image>
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   159
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   160
    ^Icon
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   161
        constantNamed:#'HierarchicalListEditor createSisterIcon'
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
   162
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@AUUUUP@@A????2@@A????2 @A????0@@A?????8@A?????8@A?????8@A<L<O?8@A3<3??8@A<<<<C8@A?L?O?8@A0<0??8@A?????8@A0LCC?8@A<<?L?8@A<<CC?8@A<<?L?8@A<<CL?8@A?????8@C*****(@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8') ; yourself); yourself]
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
   163
! !
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   164
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   165
!HierarchicalListEditor class methodsFor:'interface specs'!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   166
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   167
windowSpec
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   168
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   169
     by the UIPainter of ST/X."
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   170
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   171
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   172
     the UIPainter may not be able to read the specification."
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   173
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   174
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   175
     UIPainter new openOnClass:HierarchicalListEditor andSelector:#windowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   176
     HierarchicalListEditor new openInterface:#windowSpec
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   177
     HierarchicalListEditor open
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   178
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   179
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   180
    <resource: #canvas>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   181
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   182
    ^ 
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   183
     #(#FullSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   184
        #name: #windowSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   185
        #window: 
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   186
       #(#WindowSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   187
          #label: 'Hierarchical List Editor'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   188
          #name: 'Hierarchical List Editor'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   189
          #min: #(#Point 450 280)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   190
          #max: #(#Point 1152 900)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   191
          #bounds: #(#Rectangle 16 46 486 376)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   192
          #menu: #menu
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   193
        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   194
        #component: 
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   195
       #(#SpecCollection
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   196
          #collection: #(
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   197
           #(#MenuPanelSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   198
              #name: 'menuToolbarView'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   199
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 32 0)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   200
              #menu: #menuToolbar
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   201
            )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   202
           #(#VariableHorizontalPanelSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   203
              #name: 'VariableHorizontalPanel'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   204
              #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   205
              #component: 
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   206
             #(#SpecCollection
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   207
                #collection: #(
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   208
                 #(#ArbitraryComponentSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   209
                    #name: 'TreeView'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   210
                    #menu: #menuEdit
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   211
                    #hasHorizontalScrollBar: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   212
                    #hasVerticalScrollBar: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   213
                    #miniScrollerHorizontal: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   214
                    #miniScrollerVertical: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   215
                    #hasBorder: false
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   216
                    #component: #treeView
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   217
                  )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   218
                 #(#ViewSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   219
                    #name: 'SpecView'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   220
                    #level: -1
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   221
                    #component: 
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   222
                   #(#SpecCollection
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   223
                      #collection: #(
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   224
                       #(#LabelSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   225
                          #label: 'Label:'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   226
                          #name: 'nameLabel'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   227
                          #layout: #(#AlignmentOrigin 98 0 26 0 1 0.5)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   228
                          #resizeForLabel: true
1875
cfef9684a543 translate labels in specs
Claus Gittinger <cg@exept.de>
parents: 1856
diff changeset
   229
                    translateLabel: true
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   230
                        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   231
                       #(#InputFieldSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   232
                          #name: 'labelInputField'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   233
                          #layout: #(#LayoutFrame 100 0 15 0 -5 1.0 37 0)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   234
                          #activeHelpKey: #label
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   235
                          #tabable: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   236
                          #model: #itemName
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   237
                          #acceptOnLeave: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   238
                          #acceptOnLostFocus: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   239
                          #acceptChannel: #acceptChannel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   240
                          #modifiedChannel: #modifiedChannel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   241
                          #acceptOnPointerLeave: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   242
                        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   243
                       #(#LabelSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   244
                          #label: 'Contents:'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   245
                          #name: 'valueLabel'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   246
                          #layout: #(#AlignmentOrigin 98 0 52 0 1 0.5)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   247
                          #activeHelpKey: #contents
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   248
                          #resizeForLabel: true
1875
cfef9684a543 translate labels in specs
Claus Gittinger <cg@exept.de>
parents: 1856
diff changeset
   249
                    translateLabel: true
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   250
                        )
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   251
                       #(#InputFieldSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   252
                          #name: 'valueInputField'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   253
                          #layout: #(#LayoutFrame 100 0 41 0 -5 1.0 63 0)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   254
                          #activeHelpKey: #contents
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   255
                          #tabable: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   256
                          #model: #itemValue
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   257
                          #type: #smalltalkObject
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   258
                          #acceptOnLeave: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   259
                          #acceptOnLostFocus: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   260
                          #acceptChannel: #acceptChannel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   261
                          #modifiedChannel: #modifiedChannel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   262
                          #acceptOnPointerLeave: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   263
                        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   264
                       #(#UISubSpecification
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   265
                          #name: 'SubSpecification'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   266
                          #layout: #(#LayoutFrame 2 0.0 -26 1.0 -2 1.0 -2 1.0)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   267
                          #majorKey: #ToolApplicationModel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   268
                          #minorKey: #windowSpecForCommit
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   269
                        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   270
                       )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   271
                     
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   272
                    )
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   273
                  )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   274
                 )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   275
               
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   276
              )
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   277
              #handles: #(#Any 0.368421 1.0)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   278
            )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   279
           #(#UISubSpecification
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   280
              #name: 'InfoBarSubSpec'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   281
              #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   282
              #majorKey: #ToolApplicationModel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   283
              #minorKey: #windowSpecForInfoBar
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   284
            )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   285
           )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   286
         
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   287
        )
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   288
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   289
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   290
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   291
!HierarchicalListEditor class methodsFor:'menu specs'!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   292
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   293
menu
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   294
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   295
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   296
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   297
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   298
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   299
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   300
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   301
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   302
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menu)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   303
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   304
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   305
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   306
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   307
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   308
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   309
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   310
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   311
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   312
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   313
                #label: 'File'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   314
                #submenu: 
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   315
                 #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   316
                    
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   317
                     #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   318
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   319
                          #label: 'New'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   320
                          #value: #doNew
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   321
                          #activeHelpKey: #fileNew
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   322
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   323
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   324
                          #label: '-'
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   325
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   326
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   327
                          #label: 'Load...'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   328
                          #translateLabel: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   329
                          #value: #doLoad
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   330
                          #activeHelpKey: #fileLoad
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   331
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   332
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   333
                          #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   334
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   335
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   336
                          #label: 'Save'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   337
                          #value: #doSave
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   338
                          #activeHelpKey: #fileSave
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   339
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   340
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   341
                          #label: 'Save As...'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   342
                          #value: #doSaveAs
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   343
                          #activeHelpKey: #fileSaveAs
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   344
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   345
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   346
                          #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   347
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   348
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   349
                          #label: 'Browse Class'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   350
                          #value: #doBrowseClass
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   351
                          #activeHelpKey: #fileBrowseClass
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   352
                          #enabled: #hasValidClass
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   353
                      )
399646a86258 help texts added
tz
parents: 566
diff changeset
   354
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   355
                          #label: '-'
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   356
                      )
399646a86258 help texts added
tz
parents: 566
diff changeset
   357
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   358
                          #label: 'Exit'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   359
                          #value: #closeRequest
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   360
                          #activeHelpKey: #fileExit
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   361
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   362
                    ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   363
                    nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   364
                )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   365
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   366
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   367
                #label: 'Edit'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   368
                #submenuChannel: #menuEdit
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   369
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   370
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   371
                #label: 'Add'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   372
                #submenu: 
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   373
                 #(#Menu
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   374
                    
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   375
                     #(
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   376
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   377
                          #label: 'Child'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   378
                          #value: #doCreateChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   379
                          #activeHelpKey: #addChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   380
                          #enabled: #canCreateChildChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   381
                          #labelImage: #(#ResourceRetriever #HierarchicalListEditor #createChildIcon 'Child')
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   382
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   383
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   384
                          #label: 'Sister'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   385
                          #value: #doCreateSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   386
                          #activeHelpKey: #addSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   387
                          #enabled: #canCreateSisterChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   388
                          #labelImage: #(#ResourceRetriever #HierarchicalListEditor #createSisterIcon 'Sister')
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   389
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   390
                    ) nil
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   391
                    nil
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   392
                )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   393
            )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   394
             #(#MenuItem
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   395
                #label: 'History'
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   396
                #submenuChannel: #menuHistory
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   397
            )
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   398
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   399
                #label: 'Help'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   400
                #startGroup: #right
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   401
                #submenuChannel: #menuHelp
546
aac3f3c9383f help menu item aligned to the right
tz
parents: 529
diff changeset
   402
            )
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   403
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   404
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   405
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   406
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   407
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   408
menuEdit
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   409
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   410
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   411
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   412
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   413
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   414
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   415
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   416
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuEdit
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   417
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuEdit)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   418
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   419
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   420
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   421
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   422
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   423
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   424
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   425
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   426
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   427
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   428
                #label: 'Cut'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   429
                #value: #doCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   430
                #activeHelpKey: #editCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   431
                #enabled: #valueOfCanCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   432
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   433
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   434
                #label: 'Copy'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   435
                #value: #doCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   436
                #activeHelpKey: #editCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   437
                #enabled: #valueOfCanCopy
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   438
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   439
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   440
                #label: 'Paste'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   441
                #value: #doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   442
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   443
                #enabled: #valueOfCanPaste
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   444
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   445
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   446
                #label: 'Delete'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   447
                #value: #doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   448
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   449
                #enabled: #valueOfCanCut
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   450
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   451
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   452
                #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   453
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   454
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   455
                #label: 'Move Up'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   456
                #value: #doStepUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   457
                #activeHelpKey: #editMoveUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   458
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   459
                #labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   460
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   461
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   462
                #label: 'Move Down'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   463
                #value: #doStepDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   464
                #activeHelpKey: #editMoveDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   465
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   466
                #labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   467
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   468
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   469
                #label: 'Move In'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   470
                #value: #doStepIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   471
                #activeHelpKey: #editMoveIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   472
                #enabled: #canStepInChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   473
                #labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Move In')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   474
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   475
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   476
                #label: 'Move Out'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   477
                #value: #doStepOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   478
                #activeHelpKey: #editMoveOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   479
                #enabled: #canStepOutChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   480
                #labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Move Out')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   481
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   482
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   483
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   484
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   485
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   486
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   487
menuToolbar
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   488
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   489
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   490
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   491
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   492
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   493
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   494
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   495
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuToolbar
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   496
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuToolbar)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   497
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   498
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   499
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   500
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   501
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   502
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   503
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   504
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   505
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   506
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   507
                #label: 'New'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   508
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   509
                #value: #doNew
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   510
                #activeHelpKey: #fileNew
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   511
                #labelImage: #(#ResourceRetriever #Icon #newIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   512
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   513
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   514
                #label: 'Load'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   515
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   516
                #value: #doLoad
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   517
                #activeHelpKey: #fileLoad
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   518
                #labelImage: #(#ResourceRetriever #Icon #loadIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   519
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   520
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   521
                #label: 'Save'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   522
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   523
                #value: #doSave
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   524
                #activeHelpKey: #fileSave
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   525
                #labelImage: #(#ResourceRetriever #Icon #saveIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   526
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   527
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   528
                #label: ''
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   529
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   530
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   531
                #label: 'Cut'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   532
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   533
                #value: #doCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   534
                #activeHelpKey: #editCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   535
                #enabled: #valueOfCanCut
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   536
                #labelImage: #(#ResourceRetriever #Icon #cutIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   537
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   538
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   539
                #label: 'Copy'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   540
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   541
                #value: #doCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   542
                #activeHelpKey: #editCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   543
                #enabled: #valueOfCanCopy
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   544
                #labelImage: #(#ResourceRetriever #Icon #copyIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   545
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   546
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   547
                #label: 'Paste'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   548
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   549
                #value: #doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   550
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   551
                #enabled: #valueOfCanPaste
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   552
                #labelImage: #(#ResourceRetriever #Icon #pasteIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   553
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   554
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   555
                #label: 'Delete'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   556
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   557
                #value: #doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   558
                #activeHelpKey: #editDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   559
                #enabled: #valueOfCanCut
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   560
                #labelImage: #(#ResourceRetriever #Icon #deleteIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   561
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   562
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   563
                #label: ''
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   564
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   565
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   566
                #label: 'Add Child'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   567
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   568
                #value: #doCreateChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   569
                #activeHelpKey: #addChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   570
                #enabled: #canCreateChildChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   571
                #labelImage: #(#ResourceRetriever nil #createChildIcon)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   572
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   573
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   574
                #label: 'Add Sister'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   575
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   576
                #value: #doCreateSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   577
                #activeHelpKey: #addSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   578
                #enabled: #canCreateSisterChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   579
                #labelImage: #(#ResourceRetriever nil #createSisterIcon)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   580
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   581
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   582
                #label: ''
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   583
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   584
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   585
                #label: 'Move Up'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   586
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   587
                #value: #doStepUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   588
                #activeHelpKey: #editMoveUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   589
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   590
                #labelImage: #(#ResourceRetriever #Icon #upIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   591
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   592
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   593
                #label: 'Move Down'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   594
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   595
                #value: #doStepDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   596
                #activeHelpKey: #editMoveDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   597
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   598
                #labelImage: #(#ResourceRetriever #Icon #downIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   599
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   600
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   601
                #label: 'Move In'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   602
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   603
                #value: #doStepIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   604
                #activeHelpKey: #editMoveIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   605
                #enabled: #canStepInChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   606
                #labelImage: #(#ResourceRetriever #Icon #downRightIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   607
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   608
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   609
                #label: 'Move Out'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   610
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   611
                #value: #doStepOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   612
                #activeHelpKey: #editMoveOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   613
                #enabled: #canStepOutChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   614
                #labelImage: #(#ResourceRetriever #Icon #leftDownIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   615
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   616
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   617
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   618
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   619
! !
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   620
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   621
!HierarchicalListEditor class methodsFor:'printing'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   622
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   623
prettyPrintArray:anArray on:aStream indent:anIndent
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   624
    "print a literal array in a nice format
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   625
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   626
    |arg sol|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   627
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   628
    sol := aStream position.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   629
    aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   630
    aStream nextPutAll:'#('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   631
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   632
    anArray first isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   633
        arg := anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   634
        aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   635
        aStream nextPutAll:anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   636
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   637
        anArray size == 2 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   638
            self prettyPrintArray:(anArray last)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   639
                               on:aStream
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   640
                           indent:(anIndent + 4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   641
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   642
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   643
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   644
      ^ self  
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   645
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   646
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   647
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   648
    aStream nextPutAll:(anArray at:1).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   649
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   650
    arg := anArray at:2 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   651
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   652
    arg isString ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   653
        aStream spaces:((50 - (aStream position - sol)) max:4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   654
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   655
        arg isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   656
            aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   657
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   658
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   659
        aStream nextPutAll:arg.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   660
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   661
        arg := anArray at:3 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   662
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   663
    arg isArray ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   664
        aStream nextPutAll:' #('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   665
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   666
        arg do:[:e|self prettyPrintArray:e on:aStream indent:(anIndent + 4)].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   667
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   668
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   669
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   670
    aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   671
    aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   672
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   673
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   674
!HierarchicalListEditor methodsFor:'aspects'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   675
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   676
canCreateChildChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   677
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   678
    ^builder booleanValueAspectFor:#canCreateChildChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   679
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   680
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   681
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   682
canCreateSisterChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   683
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   684
    ^builder booleanValueAspectFor:#canCreateSisterChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   685
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   686
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   687
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   688
canStepInChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   689
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   690
    ^builder booleanValueAspectFor:#canStepInChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   691
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   692
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   693
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   694
canStepOutChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   695
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   696
    ^builder booleanValueAspectFor:#canStepOutChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   697
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   698
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   699
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   700
canStepOverChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   701
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   702
    ^builder booleanValueAspectFor:#canStepOverChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   703
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   704
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   705
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   706
itemName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   707
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   708
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   709
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   710
    (holder := builder bindingAt:#itemName) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   711
        builder aspectAt:#itemName put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   712
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   713
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   714
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   715
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   716
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   717
itemValue
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   718
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   719
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   720
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   721
    (holder := builder bindingAt:#itemValue) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   722
        builder aspectAt:#itemValue put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   723
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   724
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   725
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   726
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   727
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   728
treeView
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   729
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   730
    ^treeView
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   731
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   732
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   733
!HierarchicalListEditor methodsFor:'building'!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   734
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   735
buildFromClass:aClass andSelector:aSelector
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   736
    "rebuild window from a class and selector"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   737
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   738
    |cls sel anchor|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   739
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   740
    cls := self resolveName:aClass.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   741
    specSelector := nil.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   742
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   743
    aSelector size ~~ 0 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   744
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   745
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   746
        sel := aSelector asString withoutSeparators.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   747
        sel size ~~ 0 ifTrue:[specSelector := sel asSymbol]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   748
    ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   749
    treeView selection:nil.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   750
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   751
    (specSelector notNil and:[cls notNil]) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   752
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   753
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   754
        (cls respondsTo:specSelector) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   755
        ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   756
        [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   757
            anchor := cls perform:specSelector.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   758
            anchor isArray ifTrue:[anchor := anchor decodeAsLiteralArray]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   759
        ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   760
    ].              
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   761
    anchor notNil     
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   762
        ifTrue:  [anchor expand. treeView root:anchor] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   763
        ifFalse: [treeView root isNil ifTrue: [self buildRoot]].
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   764
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   765
    treeView selection: 1.
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   766
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   767
    self updateHistory.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   768
    self updateInfoLabel.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   769
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   770
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   771
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   772
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   773
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   774
buildFromResourceSpec: aListSpec
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   775
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   776
    treeView root: aListSpec
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   777
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   778
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   779
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   780
buildRoot
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   781
    "build just a root"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   782
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   783
    treeView root:(TreeItem name:'Root' contents:#Anchor).
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   784
    treeView selection:1.
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   785
! !
399646a86258 help texts added
tz
parents: 566
diff changeset
   786
1575
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   787
!HierarchicalListEditor methodsFor:'menu accessing'!
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   788
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   789
menu
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   790
    ^ self class menu
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   791
!
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   792
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   793
menuEdit
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   794
    ^ self class menuEdit
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   795
!
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   796
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   797
menuToolbar
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   798
    ^ self class menuToolbar
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   799
! !
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   800
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   801
!HierarchicalListEditor methodsFor:'private'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   802
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   803
getDepthAndSistersNumberOfNode: aNode onParentNode: aParentNode
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   804
    "return depth of selected node"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   805
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   806
    |parent childNode depthAndSistersNumbers str|
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   807
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   808
    depthAndSistersNumbers := OrderedCollection new.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   809
    childNode := aNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   810
    parent := aParentNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   811
    [parent notNil] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   812
    whileTrue: 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   813
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   814
        depthAndSistersNumbers add: (parent children indexOf: childNode). 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   815
        childNode := parent. 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   816
        parent := parent parent. 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   817
    ].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   818
    depthAndSistersNumbers removeFirst; addFirst: aParentNode children size.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   819
    str := ''.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   820
    depthAndSistersNumbers reverseDo: [:n| str := str, n printString, '.'].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   821
    ^str copyFrom: 1 to: str size - 1
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   822
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   823
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   824
newItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   825
    "creates and returns a new default item"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   826
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   827
    ^TreeItem name: 'Item' contents: nil
423
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
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   830
updateChannels
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   831
    "update channels"
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
    |node parent chnStepIn chnStepOut chnStepOvr chnChild chnSister|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   834
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   835
    chnStepIn := chnStepOut := chnStepOvr := chnChild := chnSister := false.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   836
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   837
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   838
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   839
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   840
        (builder componentAt: #SpecView) beVisible.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   841
        chnChild := true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   842
        (parent := node parent) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   843
        ifTrue:
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
            chnSister  := true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   846
            chnStepOvr := parent numberOfChildren > 1.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   847
            chnStepOut := parent parent notNil.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   848
            chnStepIn  := node ~~ parent lastChild
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   849
        ]
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
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   852
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   853
        (builder componentAt: #SpecView) beInvisible
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   854
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   855
    self canCreateChildChannel  value:chnChild.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   856
    self canCreateSisterChannel value:chnSister.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   857
    self canStepOverChannel     value:chnStepOvr.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   858
    self canStepOutChannel      value:chnStepOut.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   859
    self canStepInChannel       value:chnStepIn.
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   860
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   861
    self valueOfCanCut value: (treeView selection notNil      
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   862
        ifTrue:[(treeView isInSelection:1) not] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   863
        ifFalse: [false]).
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   864
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   865
    self valueOfCanCopy value: self valueOfCanCut value.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   866
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   867
    self valueOfCanPaste value: treeView selectedNode notNil & self valueOfCanPaste value.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   868
!
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
updateInputFields
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   871
    "reload item value into input fields"
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
    |node|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   874
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   875
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   876
    ifTrue:
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
        self itemName  value:node name.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   879
        self itemValue value:node contents
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   880
    ] 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   881
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   882
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   883
        self itemName  value:''.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   884
        self itemValue value:nil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   885
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   886
    self valueOfEnablingCommitButtons value: false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   887
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   888
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   889
!HierarchicalListEditor methodsFor:'startup / release'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   890
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   891
initialize
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   892
    "setup default values"
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
    super initialize.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   895
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   896
    treeView := SelectionInTreeView new.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   897
    treeView multipleSelectOk: true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   898
    treeView showDirectoryIndicator: true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   899
    treeView showDirectoryIndicatorForRoot: false.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   900
    treeView action:[:aNr| self updateChannels. self updateInputFields].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   901
    treeView selectConditionBlock: [:i|self askForItemModification].
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   902
    treeView validateDoubleClickBlock: [:node| node ~~ treeView model list first].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   903
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   904
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   905
openModalOnTreeItem: aTreeItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   906
    "build a tree from aTreeItem and open it modal"
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   907
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   908
    super openModalOnResourceSpec: aTreeItem
423
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
!HierarchicalListEditor methodsFor:'user actions'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   912
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   913
accept
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   914
    "invoked by button 'OK'"
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
    |node index|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   917
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   918
    (index := treeView selectedIndex) ~~ 0 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   919
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   920
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   921
        node := treeView nodeAtIndex:index.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   922
        node name: self itemName value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   923
        node contents: self itemValue value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   924
        treeView redrawLine:index.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   925
    ].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   926
    modified := true.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   927
    self valueOfEnablingCommitButtons value: false
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
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   930
cancel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   931
    "invoked by button 'Cancel'"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   932
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   933
    self updateInputFields.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   934
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   935
    modified := false.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   936
    self valueOfEnablingCommitButtons value: false
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   937
!
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
doCopy
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   940
    "copy current selected nodes into copy buffer"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   941
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   942
    self class clipboard: OrderedCollection new.
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   943
    treeView selectedNodesDo:[:aNode| self class clipboard add: aNode copy].
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   944
    self updateAllToolInstances
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   945
!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   946
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   947
doCreateChild
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   948
    "create a child within selected parent"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   949
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   950
    |node newItem|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   951
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   952
    ((node := treeView selectedNode) notNil and: [self askForItemModification])
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   953
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   954
    [
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   955
        treeView model add: (newItem := self newItem) afterIndex: node children size below:node.
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   956
        newItem name: 'Child ', (self getDepthAndSistersNumberOfNode: newItem onParentNode: node).
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   957
        treeView selectedNodeExpand:true.
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   958
        treeView selectNode: newItem.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   959
        self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   960
        modified := true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   961
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   962
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   963
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   964
doCreateSister
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   965
    "create a sister next to selected item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   966
    "
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   967
    |node newItem|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   968
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   969
    ((node := treeView selectedNode) notNil and: [self askForItemModification]) 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   970
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   971
    [
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   972
        newItem := self newItem.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   973
        node parent notNil 
562
f16b2ca2be5b numeration error fixed
tz
parents: 559
diff changeset
   974
            ifTrue: [treeView model add: newItem after:node] 
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   975
            ifFalse:[treeView model add: newItem beforeIndex:1 below:node].
562
f16b2ca2be5b numeration error fixed
tz
parents: 559
diff changeset
   976
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   977
        newItem name: 'Child ', (self getDepthAndSistersNumberOfNode: newItem onParentNode: node parent).
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   978
        treeView selectNode: newItem.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   979
        self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   980
        modified := true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   981
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   982
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   983
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   984
doCut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   985
    "cut current selected nodes"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   986
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   987
    |selection|
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   988
    (treeView hasSelection and: [self askForItemModification]) 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   989
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   990
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   991
        self doCopy.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   992
        selection := treeView selection asSortedCollection.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   993
        treeView selectedNodesRemove.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   994
        treeView selection: selection first - 1.
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   995
        self updateAllToolInstances.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   996
        modified := true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   997
    ]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   998
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   999
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1000
doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1001
    "delete current selected nodes"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1002
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1003
    |selection|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1004
    (treeView hasSelection and: [self askForItemModification]) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1005
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1006
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1007
        selection := treeView selection asSortedCollection.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1008
        treeView selectedNodesRemove.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1009
        treeView selection: selection first - 1.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1010
        self updateChannels.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1011
        modified := true
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1012
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1013
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1014
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1015
doNew
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1016
    "first do super new; then make a build 
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1017
     of a resource spec containing a root"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1018
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1019
    super doNew ifTrue: [self buildRoot]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1020
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1021
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1022
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1023
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1024
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1025
doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1026
    "paste after current selected item"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1027
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1028
    (self askForItemModification and: [self class clipboard notNil])
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1029
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1030
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1031
        |copiedNode|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1032
        self class clipboard do:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1033
        [:node|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1034
            copiedNode := node copy.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1035
            treeView selectedNodeAdd: copiedNode. 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1036
            treeView selectNode: copiedNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1037
        ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1038
        self updateChannels.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1039
        modified := true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1040
    ]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1041
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1042
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1043
doReload
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1044
    "reload spec from current class and selector"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1045
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1046
    self buildFrom:specClass andSelector:specSelector
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1047
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1048
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1049
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1050
doSave
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1051
    "install code"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1052
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1053
    |cls code spec category mthd stream|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1054
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1055
    (specClass notNil and:[specSelector notNil])
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1056
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1057
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1058
        ^self doSaveAs
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1059
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1060
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1061
    cls := self resolveName: specClass.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1062
    spec   := (treeView nodeAtIndex:1) literalArrayEncoding.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1063
    stream := WriteStream on:String new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1064
    self class prettyPrintArray:spec on:stream indent:4.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1065
    spec       := stream contents.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1066
    category   := 'list specs'.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1067
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1068
    (mthd := cls class compiledMethodAt:specSelector) notNil 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1069
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1070
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1071
        category := mthd category
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1072
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1073
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1074
    code := Character excla asString 
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1075
            , cls name , ' class methodsFor:' , category storeString
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1076
            , Character excla asString , '\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1077
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1078
            , specSelector , '\'
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1079
            , (self class codeGenerationComment replChar:$!! withString:'!!!!')
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1080
            , '\\    "\'
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1081
            , '     HierarchicalListEditor openOnClass:' , cls name , ' andSelector:#' , specSelector , '\'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1082
            , '    "\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1083
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1084
    code := code 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1085
            , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1086
            , '    <resource: #hierarchicalList>\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1087
            , '    ^\' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1088
            , spec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1089
            , ' decodeAsLiteralArray\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1090
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1091
            , ' '
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1092
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1093
            , '\\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1094
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1095
    code := code withCRs.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1096
    (ReadStream on:code) fileIn.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1097
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1098
    self updateHistory.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1099
    hasSaved := true.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1100
    modified := false.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1101
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1102
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1103
doStepDown
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1104
    "move selected item after next item"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1105
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1106
    treeView selectedNodeChangeSequenceOrder:1.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1107
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1108
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1109
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1110
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1111
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1112
doStepIn
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1113
    "lets become the selected item a child of its next sister"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1114
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1115
    treeView selectedNodeBecomeChildOfNext.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1116
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1117
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1118
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1119
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1120
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1121
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1122
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1123
doStepOut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1124
    "let selected node become a sister of its current parent"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1125
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1126
    treeView selectedNodeBecomeSisterOfParent.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1127
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1128
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1129
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1130
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1131
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1132
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1133
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1134
doStepUp
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1135
    "move selected item before previous item"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1136
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1137
    treeView selectedNodeChangeSequenceOrder:-1.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1138
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1139
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1140
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1141
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1142
1856
db8156ab00ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
  1143
!
db8156ab00ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
  1144
db8156ab00ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
  1145
openDocumentation
db8156ab00ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
  1146
   self openHTMLDocument:'tools/uipainter/HierarchicalListEditor.html'.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1147
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1148
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1149
!HierarchicalListEditor class methodsFor:'documentation'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1150
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1151
version
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1152
    ^ '$Header$'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1153
! !