HierarchicalListEditor.st
author Claus Gittinger <cg@exept.de>
Fri, 28 Feb 2003 13:26:25 +0100
changeset 1686 5d20782f58f9
parent 1575 a933d590818c
child 1856 db8156ab00ae
permissions -rw-r--r--
allow any object as contents; accept on pointer leave in fields
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
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   229
                        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   230
                       #(#InputFieldSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   231
                          #name: 'labelInputField'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   232
                          #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
   233
                          #activeHelpKey: #label
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   234
                          #tabable: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   235
                          #model: #itemName
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   236
                          #acceptOnLeave: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   237
                          #acceptOnLostFocus: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   238
                          #acceptChannel: #acceptChannel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   239
                          #modifiedChannel: #modifiedChannel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   240
                          #acceptOnPointerLeave: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   241
                        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   242
                       #(#LabelSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   243
                          #label: 'Contents:'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   244
                          #name: 'valueLabel'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   245
                          #layout: #(#AlignmentOrigin 98 0 52 0 1 0.5)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   246
                          #activeHelpKey: #contents
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   247
                          #resizeForLabel: true
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   248
                        )
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   249
                       #(#InputFieldSpec
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   250
                          #name: 'valueInputField'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   251
                          #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
   252
                          #activeHelpKey: #contents
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   253
                          #tabable: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   254
                          #model: #itemValue
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   255
                          #type: #smalltalkObject
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   256
                          #acceptOnLeave: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   257
                          #acceptOnLostFocus: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   258
                          #acceptChannel: #acceptChannel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   259
                          #modifiedChannel: #modifiedChannel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   260
                          #acceptOnPointerLeave: true
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   261
                        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   262
                       #(#UISubSpecification
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   263
                          #name: 'SubSpecification'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   264
                          #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
   265
                          #majorKey: #ToolApplicationModel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   266
                          #minorKey: #windowSpecForCommit
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   267
                        )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   268
                       )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   269
                     
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   270
                    )
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   271
                  )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   272
                 )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   273
               
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   274
              )
1686
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   275
              #handles: #(#Any 0.368421 1.0)
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   276
            )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   277
           #(#UISubSpecification
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   278
              #name: 'InfoBarSubSpec'
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   279
              #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
   280
              #majorKey: #ToolApplicationModel
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   281
              #minorKey: #windowSpecForInfoBar
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   282
            )
5d20782f58f9 allow any object as contents;
Claus Gittinger <cg@exept.de>
parents: 1575
diff changeset
   283
           )
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
        )
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   286
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   287
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   288
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   289
!HierarchicalListEditor class methodsFor:'menu specs'!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   290
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   291
menu
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   292
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   293
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   294
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   295
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   296
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   297
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   298
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   299
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   300
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menu)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   301
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   302
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   303
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   304
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   305
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   306
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   307
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   308
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   309
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   310
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   311
                #label: 'File'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   312
                #submenu: 
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   313
                 #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   314
                    
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   315
                     #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   316
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   317
                          #label: 'New'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   318
                          #value: #doNew
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   319
                          #activeHelpKey: #fileNew
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   320
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   321
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   322
                          #label: '-'
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   323
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   324
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   325
                          #label: 'Load...'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   326
                          #translateLabel: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   327
                          #value: #doLoad
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   328
                          #activeHelpKey: #fileLoad
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   329
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   330
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   331
                          #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   332
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   333
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   334
                          #label: 'Save'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   335
                          #value: #doSave
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   336
                          #activeHelpKey: #fileSave
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   337
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   338
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   339
                          #label: 'Save As...'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   340
                          #value: #doSaveAs
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   341
                          #activeHelpKey: #fileSaveAs
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   342
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   343
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   344
                          #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   345
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   346
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   347
                          #label: 'Browse Class'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   348
                          #value: #doBrowseClass
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   349
                          #activeHelpKey: #fileBrowseClass
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   350
                          #enabled: #hasValidClass
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   351
                      )
399646a86258 help texts added
tz
parents: 566
diff changeset
   352
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   353
                          #label: '-'
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   354
                      )
399646a86258 help texts added
tz
parents: 566
diff changeset
   355
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   356
                          #label: 'Exit'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   357
                          #value: #closeRequest
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   358
                          #activeHelpKey: #fileExit
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   359
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   360
                    ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   361
                    nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   362
                )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   363
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   364
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   365
                #label: 'Edit'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   366
                #submenuChannel: #menuEdit
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   367
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   368
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   369
                #label: 'Add'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   370
                #submenu: 
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   371
                 #(#Menu
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   372
                    
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   373
                     #(
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   374
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   375
                          #label: 'Child'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   376
                          #value: #doCreateChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   377
                          #activeHelpKey: #addChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   378
                          #enabled: #canCreateChildChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   379
                          #labelImage: #(#ResourceRetriever #HierarchicalListEditor #createChildIcon 'Child')
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   380
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   381
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   382
                          #label: 'Sister'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   383
                          #value: #doCreateSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   384
                          #activeHelpKey: #addSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   385
                          #enabled: #canCreateSisterChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   386
                          #labelImage: #(#ResourceRetriever #HierarchicalListEditor #createSisterIcon 'Sister')
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   387
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   388
                    ) nil
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   389
                    nil
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   390
                )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   391
            )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   392
             #(#MenuItem
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   393
                #label: 'History'
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   394
                #submenuChannel: #menuHistory
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   395
            )
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   396
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   397
                #label: 'Help'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   398
                #startGroup: #right
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   399
                #submenuChannel: #menuHelp
546
aac3f3c9383f help menu item aligned to the right
tz
parents: 529
diff changeset
   400
            )
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   401
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   402
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   403
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   404
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   405
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   406
menuEdit
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   407
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   408
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   409
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   410
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   411
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   412
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   413
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   414
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuEdit
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   415
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuEdit)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   416
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   417
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   418
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   419
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   420
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   421
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   422
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   423
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   424
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   425
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   426
                #label: 'Cut'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   427
                #value: #doCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   428
                #activeHelpKey: #editCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   429
                #enabled: #valueOfCanCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   430
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   431
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   432
                #label: 'Copy'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   433
                #value: #doCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   434
                #activeHelpKey: #editCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   435
                #enabled: #valueOfCanCopy
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   436
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   437
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   438
                #label: 'Paste'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   439
                #value: #doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   440
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   441
                #enabled: #valueOfCanPaste
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   442
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   443
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   444
                #label: 'Delete'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   445
                #value: #doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   446
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   447
                #enabled: #valueOfCanCut
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   448
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   449
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   450
                #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   451
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   452
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   453
                #label: 'Move Up'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   454
                #value: #doStepUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   455
                #activeHelpKey: #editMoveUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   456
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   457
                #labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   458
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   459
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   460
                #label: 'Move Down'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   461
                #value: #doStepDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   462
                #activeHelpKey: #editMoveDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   463
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   464
                #labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   465
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   466
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   467
                #label: 'Move In'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   468
                #value: #doStepIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   469
                #activeHelpKey: #editMoveIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   470
                #enabled: #canStepInChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   471
                #labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Move In')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   472
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   473
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   474
                #label: 'Move Out'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   475
                #value: #doStepOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   476
                #activeHelpKey: #editMoveOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   477
                #enabled: #canStepOutChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   478
                #labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Move Out')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   479
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   480
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   481
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   482
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   483
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   484
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   485
menuToolbar
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   486
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   487
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   488
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   489
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   490
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   491
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   492
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   493
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuToolbar
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   494
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuToolbar)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   495
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   496
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   497
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   498
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   499
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   500
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   501
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   502
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   503
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   504
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   505
                #label: 'New'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   506
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   507
                #value: #doNew
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   508
                #activeHelpKey: #fileNew
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   509
                #labelImage: #(#ResourceRetriever #Icon #newIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   510
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   511
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   512
                #label: 'Load'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   513
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   514
                #value: #doLoad
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   515
                #activeHelpKey: #fileLoad
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   516
                #labelImage: #(#ResourceRetriever #Icon #loadIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   517
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   518
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   519
                #label: 'Save'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   520
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   521
                #value: #doSave
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   522
                #activeHelpKey: #fileSave
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   523
                #labelImage: #(#ResourceRetriever #Icon #saveIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   524
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   525
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   526
                #label: ''
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   527
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   528
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   529
                #label: 'Cut'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   530
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   531
                #value: #doCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   532
                #activeHelpKey: #editCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   533
                #enabled: #valueOfCanCut
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   534
                #labelImage: #(#ResourceRetriever #Icon #cutIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   535
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   536
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   537
                #label: 'Copy'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   538
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   539
                #value: #doCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   540
                #activeHelpKey: #editCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   541
                #enabled: #valueOfCanCopy
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   542
                #labelImage: #(#ResourceRetriever #Icon #copyIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   543
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   544
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   545
                #label: 'Paste'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   546
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   547
                #value: #doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   548
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   549
                #enabled: #valueOfCanPaste
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   550
                #labelImage: #(#ResourceRetriever #Icon #pasteIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   551
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   552
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   553
                #label: 'Delete'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   554
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   555
                #value: #doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   556
                #activeHelpKey: #editDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   557
                #enabled: #valueOfCanCut
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   558
                #labelImage: #(#ResourceRetriever #Icon #deleteIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   559
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   560
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   561
                #label: ''
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   562
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   563
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   564
                #label: 'Add Child'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   565
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   566
                #value: #doCreateChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   567
                #activeHelpKey: #addChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   568
                #enabled: #canCreateChildChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   569
                #labelImage: #(#ResourceRetriever nil #createChildIcon)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   570
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   571
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   572
                #label: 'Add Sister'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   573
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   574
                #value: #doCreateSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   575
                #activeHelpKey: #addSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   576
                #enabled: #canCreateSisterChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   577
                #labelImage: #(#ResourceRetriever nil #createSisterIcon)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   578
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   579
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   580
                #label: ''
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   581
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   582
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   583
                #label: 'Move Up'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   584
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   585
                #value: #doStepUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   586
                #activeHelpKey: #editMoveUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   587
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   588
                #labelImage: #(#ResourceRetriever #Icon #upIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   589
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   590
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   591
                #label: 'Move Down'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   592
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   593
                #value: #doStepDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   594
                #activeHelpKey: #editMoveDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   595
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   596
                #labelImage: #(#ResourceRetriever #Icon #downIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   597
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   598
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   599
                #label: 'Move In'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   600
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   601
                #value: #doStepIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   602
                #activeHelpKey: #editMoveIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   603
                #enabled: #canStepInChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   604
                #labelImage: #(#ResourceRetriever #Icon #downRightIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   605
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   606
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   607
                #label: 'Move Out'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   608
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   609
                #value: #doStepOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   610
                #activeHelpKey: #editMoveOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   611
                #enabled: #canStepOutChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   612
                #labelImage: #(#ResourceRetriever #Icon #leftDownIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   613
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   614
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   615
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   616
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   617
! !
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   618
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   619
!HierarchicalListEditor class methodsFor:'printing'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   620
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   621
prettyPrintArray:anArray on:aStream indent:anIndent
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   622
    "print a literal array in a nice format
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   623
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   624
    |arg sol|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   625
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   626
    sol := aStream position.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   627
    aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   628
    aStream nextPutAll:'#('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   629
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   630
    anArray first isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   631
        arg := anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   632
        aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   633
        aStream nextPutAll:anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   634
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   635
        anArray size == 2 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   636
            self prettyPrintArray:(anArray last)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   637
                               on:aStream
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   638
                           indent:(anIndent + 4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   639
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   640
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   641
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   642
      ^ self  
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   643
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   644
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   645
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   646
    aStream nextPutAll:(anArray at:1).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   647
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   648
    arg := anArray at:2 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   649
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   650
    arg isString ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   651
        aStream spaces:((50 - (aStream position - sol)) max:4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   652
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   653
        arg isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   654
            aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   655
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   656
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   657
        aStream nextPutAll:arg.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   658
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   659
        arg := anArray at:3 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   660
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   661
    arg isArray ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   662
        aStream nextPutAll:' #('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   663
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   664
        arg do:[:e|self prettyPrintArray:e on:aStream indent:(anIndent + 4)].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   665
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   666
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   667
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   668
    aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   669
    aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   670
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   671
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   672
!HierarchicalListEditor methodsFor:'aspects'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   673
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   674
canCreateChildChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   675
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   676
    ^builder booleanValueAspectFor:#canCreateChildChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   677
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   678
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   679
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   680
canCreateSisterChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   681
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   682
    ^builder booleanValueAspectFor:#canCreateSisterChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   683
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   684
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   685
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   686
canStepInChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   687
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   688
    ^builder booleanValueAspectFor:#canStepInChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   689
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   690
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   691
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   692
canStepOutChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   693
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   694
    ^builder booleanValueAspectFor:#canStepOutChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   695
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   696
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   697
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   698
canStepOverChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   699
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   700
    ^builder booleanValueAspectFor:#canStepOverChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   701
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   702
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   703
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   704
itemName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   705
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   706
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   707
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   708
    (holder := builder bindingAt:#itemName) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   709
        builder aspectAt:#itemName put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   710
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   711
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   712
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   713
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   714
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   715
itemValue
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   716
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   717
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   718
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   719
    (holder := builder bindingAt:#itemValue) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   720
        builder aspectAt:#itemValue put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   721
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   722
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   723
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   724
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   725
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   726
treeView
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   727
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   728
    ^treeView
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   729
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   730
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   731
!HierarchicalListEditor methodsFor:'building'!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   732
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   733
buildFromClass:aClass andSelector:aSelector
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   734
    "rebuild window from a class and selector"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   735
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   736
    |cls sel anchor|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   737
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   738
    cls := self resolveName:aClass.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   739
    specSelector := nil.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   740
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   741
    aSelector size ~~ 0 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   742
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   743
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   744
        sel := aSelector asString withoutSeparators.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   745
        sel size ~~ 0 ifTrue:[specSelector := sel asSymbol]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   746
    ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   747
    treeView selection:nil.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   748
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   749
    (specSelector notNil and:[cls notNil]) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   750
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   751
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   752
        (cls respondsTo:specSelector) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   753
        ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   754
        [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   755
            anchor := cls perform:specSelector.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   756
            anchor isArray ifTrue:[anchor := anchor decodeAsLiteralArray]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   757
        ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   758
    ].              
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   759
    anchor notNil     
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   760
        ifTrue:  [anchor expand. treeView root:anchor] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   761
        ifFalse: [treeView root isNil ifTrue: [self buildRoot]].
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   762
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   763
    treeView selection: 1.
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   764
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   765
    self updateHistory.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   766
    self updateInfoLabel.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   767
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   768
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
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   772
buildFromResourceSpec: aListSpec
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   773
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   774
    treeView root: aListSpec
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   775
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   776
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   777
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   778
buildRoot
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   779
    "build just a root"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   780
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   781
    treeView root:(TreeItem name:'Root' contents:#Anchor).
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   782
    treeView selection:1.
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   783
! !
399646a86258 help texts added
tz
parents: 566
diff changeset
   784
1575
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   785
!HierarchicalListEditor methodsFor:'menu accessing'!
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   786
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   787
menu
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   788
    ^ self class menu
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   789
!
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   790
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   791
menuEdit
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   792
    ^ self class menuEdit
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   793
!
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   794
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   795
menuToolbar
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   796
    ^ self class menuToolbar
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   797
! !
a933d590818c bugfix: resolve the menus from instance
ca
parents: 1499
diff changeset
   798
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   799
!HierarchicalListEditor methodsFor:'private'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   800
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   801
getDepthAndSistersNumberOfNode: aNode onParentNode: aParentNode
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   802
    "return depth of selected node"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   803
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   804
    |parent childNode depthAndSistersNumbers str|
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   805
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   806
    depthAndSistersNumbers := OrderedCollection new.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   807
    childNode := aNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   808
    parent := aParentNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   809
    [parent notNil] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   810
    whileTrue: 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   811
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   812
        depthAndSistersNumbers add: (parent children indexOf: childNode). 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   813
        childNode := parent. 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   814
        parent := parent parent. 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   815
    ].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   816
    depthAndSistersNumbers removeFirst; addFirst: aParentNode children size.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   817
    str := ''.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   818
    depthAndSistersNumbers reverseDo: [:n| str := str, n printString, '.'].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   819
    ^str copyFrom: 1 to: str size - 1
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   820
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   821
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   822
newItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   823
    "creates and returns a new default item"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   824
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   825
    ^TreeItem name: 'Item' contents: nil
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   826
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   827
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   828
updateChannels
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   829
    "update channels"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   830
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   831
    |node parent chnStepIn chnStepOut chnStepOvr chnChild chnSister|
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
    chnStepIn := chnStepOut := chnStepOvr := chnChild := chnSister := false.
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
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   836
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   837
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   838
        (builder componentAt: #SpecView) beVisible.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   839
        chnChild := true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   840
        (parent := node parent) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   841
        ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   842
        [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   843
            chnSister  := true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   844
            chnStepOvr := parent numberOfChildren > 1.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   845
            chnStepOut := parent parent notNil.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   846
            chnStepIn  := node ~~ parent lastChild
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   847
        ]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   848
    ]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   849
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   850
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   851
        (builder componentAt: #SpecView) beInvisible
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   852
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   853
    self canCreateChildChannel  value:chnChild.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   854
    self canCreateSisterChannel value:chnSister.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   855
    self canStepOverChannel     value:chnStepOvr.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   856
    self canStepOutChannel      value:chnStepOut.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   857
    self canStepInChannel       value:chnStepIn.
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   858
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   859
    self valueOfCanCut value: (treeView selection notNil      
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   860
        ifTrue:[(treeView isInSelection:1) not] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   861
        ifFalse: [false]).
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   862
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   863
    self valueOfCanCopy value: self valueOfCanCut value.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   864
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   865
    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
   866
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   867
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   868
updateInputFields
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   869
    "reload item value into input fields"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   870
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   871
    |node|
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 := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   874
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   875
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   876
        self itemName  value:node name.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   877
        self itemValue value:node contents
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   878
    ] 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   879
    ifFalse:
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
        self itemName  value:''.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   882
        self itemValue value:nil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   883
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   884
    self valueOfEnablingCommitButtons value: false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   885
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   886
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   887
!HierarchicalListEditor methodsFor:'startup / release'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   888
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   889
initialize
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   890
    "setup default values"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   891
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   892
    super initialize.
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
    treeView := SelectionInTreeView new.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   895
    treeView multipleSelectOk: true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   896
    treeView showDirectoryIndicator: true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   897
    treeView showDirectoryIndicatorForRoot: false.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   898
    treeView action:[:aNr| self updateChannels. self updateInputFields].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   899
    treeView selectConditionBlock: [:i|self askForItemModification].
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   900
    treeView validateDoubleClickBlock: [:node| node ~~ treeView model list first].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   901
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   902
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   903
openModalOnTreeItem: aTreeItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   904
    "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
   905
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   906
    super openModalOnResourceSpec: aTreeItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   907
! !
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   908
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   909
!HierarchicalListEditor methodsFor:'user actions'!
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
accept
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   912
    "invoked by button 'OK'"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   913
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   914
    |node index|
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
    (index := treeView selectedIndex) ~~ 0 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   917
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   918
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   919
        node := treeView nodeAtIndex:index.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   920
        node name: self itemName value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   921
        node contents: self itemValue value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   922
        treeView redrawLine:index.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   923
    ].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   924
    modified := true.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   925
    self valueOfEnablingCommitButtons value: false
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   926
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   927
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   928
cancel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   929
    "invoked by button 'Cancel'"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   930
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   931
    self updateInputFields.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   932
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   933
    modified := false.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   934
    self valueOfEnablingCommitButtons value: false
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   935
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   936
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   937
doCopy
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   938
    "copy current selected nodes into copy buffer"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   939
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   940
    self class clipboard: OrderedCollection new.
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   941
    treeView selectedNodesDo:[:aNode| self class clipboard add: aNode copy].
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   942
    self updateAllToolInstances
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   943
!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   944
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   945
doCreateChild
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   946
    "create a child within selected parent"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   947
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   948
    |node newItem|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   949
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   950
    ((node := treeView selectedNode) notNil and: [self askForItemModification])
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   951
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   952
    [
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   953
        treeView model add: (newItem := self newItem) afterIndex: node children size below:node.
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   954
        newItem name: 'Child ', (self getDepthAndSistersNumberOfNode: newItem onParentNode: node).
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   955
        treeView selectedNodeExpand:true.
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   956
        treeView selectNode: newItem.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   957
        self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   958
        modified := true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   959
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   960
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   961
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   962
doCreateSister
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   963
    "create a sister next to selected item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   964
    "
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   965
    |node newItem|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   966
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   967
    ((node := treeView selectedNode) notNil and: [self askForItemModification]) 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   968
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   969
    [
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   970
        newItem := self newItem.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   971
        node parent notNil 
562
f16b2ca2be5b numeration error fixed
tz
parents: 559
diff changeset
   972
            ifTrue: [treeView model add: newItem after:node] 
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   973
            ifFalse:[treeView model add: newItem beforeIndex:1 below:node].
562
f16b2ca2be5b numeration error fixed
tz
parents: 559
diff changeset
   974
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   975
        newItem name: 'Child ', (self getDepthAndSistersNumberOfNode: newItem onParentNode: node parent).
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   976
        treeView selectNode: newItem.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   977
        self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   978
        modified := true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   979
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   980
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   981
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   982
doCut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   983
    "cut current selected nodes"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   984
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   985
    |selection|
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   986
    (treeView hasSelection and: [self askForItemModification]) 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   987
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   988
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   989
        self doCopy.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   990
        selection := treeView selection asSortedCollection.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   991
        treeView selectedNodesRemove.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   992
        treeView selection: selection first - 1.
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   993
        self updateAllToolInstances.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   994
        modified := true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   995
    ]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   996
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   997
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   998
doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   999
    "delete current selected nodes"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1000
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1001
    |selection|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1002
    (treeView hasSelection and: [self askForItemModification]) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1003
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1004
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1005
        selection := treeView selection asSortedCollection.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1006
        treeView selectedNodesRemove.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1007
        treeView selection: selection first - 1.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1008
        self updateChannels.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1009
        modified := true
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1010
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1011
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1012
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1013
doNew
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1014
    "first do super new; then make a build 
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1015
     of a resource spec containing a root"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1016
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1017
    super doNew ifTrue: [self buildRoot]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1018
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1019
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1020
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1021
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1022
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1023
doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1024
    "paste after current selected item"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1025
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1026
    (self askForItemModification and: [self class clipboard notNil])
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1027
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1028
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1029
        |copiedNode|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1030
        self class clipboard do:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1031
        [:node|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1032
            copiedNode := node copy.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1033
            treeView selectedNodeAdd: copiedNode. 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1034
            treeView selectNode: copiedNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1035
        ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1036
        self updateChannels.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1037
        modified := true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1038
    ]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1039
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1040
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1041
doReload
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1042
    "reload spec from current class and selector"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1043
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1044
    self buildFrom:specClass andSelector:specSelector
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1045
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1046
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1047
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1048
doSave
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1049
    "install code"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1050
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1051
    |cls code spec category mthd stream|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1052
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1053
    (specClass notNil and:[specSelector notNil])
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1054
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1055
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1056
        ^self doSaveAs
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1057
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1058
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1059
    cls := self resolveName: specClass.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1060
    spec   := (treeView nodeAtIndex:1) literalArrayEncoding.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1061
    stream := WriteStream on:String new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1062
    self class prettyPrintArray:spec on:stream indent:4.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1063
    spec       := stream contents.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1064
    category   := 'list specs'.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1065
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1066
    (mthd := cls class compiledMethodAt:specSelector) notNil 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1067
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1068
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1069
        category := mthd category
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1070
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1071
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1072
    code := Character excla asString 
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1073
            , cls name , ' class methodsFor:' , category storeString
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1074
            , Character excla asString , '\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1075
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1076
            , specSelector , '\'
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1077
            , (self class codeGenerationComment replChar:$!! withString:'!!!!')
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1078
            , '\\    "\'
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1079
            , '     HierarchicalListEditor openOnClass:' , cls name , ' andSelector:#' , specSelector , '\'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1080
            , '    "\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1081
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1082
    code := code 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1083
            , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1084
            , '    <resource: #hierarchicalList>\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1085
            , '    ^\' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1086
            , spec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1087
            , ' decodeAsLiteralArray\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1088
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1089
            , ' '
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
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1093
    code := code withCRs.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1094
    (ReadStream on:code) fileIn.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1095
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1096
    self updateHistory.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1097
    hasSaved := true.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1098
    modified := false.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1099
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1100
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1101
doStepDown
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1102
    "move selected item after next item"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1103
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1104
    treeView selectedNodeChangeSequenceOrder:1.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1105
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1106
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1107
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1108
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1109
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1110
doStepIn
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1111
    "lets become the selected item a child of its next sister"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1112
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1113
    treeView selectedNodeBecomeChildOfNext.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1114
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1115
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1116
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1117
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1118
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1119
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1120
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1121
doStepOut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1122
    "let selected node become a sister of its current parent"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1123
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1124
    treeView selectedNodeBecomeSisterOfParent.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1125
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1126
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1127
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1128
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1129
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1130
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1131
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1132
doStepUp
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1133
    "move selected item before previous item"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1134
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1135
    treeView selectedNodeChangeSequenceOrder:-1.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1136
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1137
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1138
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1139
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1140
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1141
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1142
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1143
!HierarchicalListEditor class methodsFor:'documentation'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1144
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1145
version
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1146
    ^ '$Header$'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1147
! !