TabListEditor.st
author Claus Gittinger <cg@exept.de>
Fri, 22 May 1998 11:57:38 +0200
changeset 847 15f688710007
parent 749 8f8767c6f32f
child 883 10afc79658a6
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     1
"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     4
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     7
 inclusion of the above copyright notice. This software may not
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
cc3413fc1afb initial checkin
tz
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    11
"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    12
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    13
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    14
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    15
ResourceSpecEditor subclass:#TabListEditor
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    16
	instanceVariableNames:'rebuildMode testView listOfTabs selectedIndex'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    17
	classVariableNames:''
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    18
	poolDictionaries:''
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    19
	category:'Interface-UIPainter'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    20
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    21
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    22
!TabListEditor class methodsFor:'documentation'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    23
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    24
copyright
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    25
"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    26
 COPYRIGHT (c) 1997 by eXept Software AG
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    27
              All Rights Reserved
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    28
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    29
 This software is furnished under a license and may be used
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    31
 inclusion of the above copyright notice. This software may not
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    34
 hereby transferred.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    35
"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    36
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    37
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    38
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    39
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    40
documentation
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    41
"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    42
    The TabListEditor allows you to create, modify or just inspect
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    43
    tab lists for tab headers or note books.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    44
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    45
    [start with:]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    46
        TabItemEditor open
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    47
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    48
    [see also:]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    49
        TabItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    50
        TabView
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    51
        NoteBookView
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    52
        UIPainter
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    53
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    54
    [author:]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    55
        Claus Atzkern, eXept Software AG
749
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
    56
        Thomas Zwick, eXept Software AG
739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    57
"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    58
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    59
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    60
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    61
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    62
!TabListEditor class methodsFor:'instance creation'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    63
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    64
openModalOnTabList: aTabList
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    65
    "Open a TabListEditor modal on aTabList"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    66
    "self openModalOnTabList: (Array with: (TabItem label: 'Tab Item 1'))"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    67
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    68
    ^self new openModalOnTabList: aTabList
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    69
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    70
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    71
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    72
!TabListEditor class methodsFor:'accessing'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    73
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    74
resourceType
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    75
    "get the type of resource of the method generated by the TabListEditor"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    76
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    77
    ^#tabList
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    78
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    79
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    80
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    81
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    82
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    83
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    84
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    85
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    86
!TabListEditor class methodsFor:'aspects'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    87
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    88
aspects
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    89
    "get the aspects for the attributes of the tab list components"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    90
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    91
    ^#(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    92
        label
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    93
        translateLabel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    94
        labelForegroundColor
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    95
        enabled
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    96
        editAgument
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    97
    )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    98
cc3413fc1afb initial checkin
tz
parents:
diff changeset
    99
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   100
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   101
!TabListEditor class methodsFor:'help specs'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   102
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   103
helpSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   104
    "This resource specification was automatically generated
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   105
     by the UIHelpTool of ST/X."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   106
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   107
    "Do not manually edit this!! If it is corrupted,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   108
     the UIHelpTool may not be able to read the specification."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   109
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   110
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   111
     UIHelpTool openOnClass:TabListEditor    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   112
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   113
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   114
    <resource: #help>
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   115
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   116
    ^super helpSpec addPairsFrom:#(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   117
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   118
#addTabItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   119
'Adds a new tab item.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   120
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   121
#argument
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   122
'An argument not explicitly used by the tab item.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   123
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   124
#canSelect
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   125
'Turns on/off whether the tab item is selectable.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   126
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   127
#color
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   128
'Defines the foreground color of the label. The default color derives from the style sheet.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   129
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   130
#fileCreateAspectMethod
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   131
'Creates the aspect method for the tab list.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   132
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   133
#fileLoad
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   134
'Opens a dialog for selecting and loading a tab list spec from a class.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   135
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   136
#fileNew
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   137
'Creates a new tab list.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   138
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   139
#fileSave
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   140
'Saves current tab list.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   141
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   142
#label
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   143
'Label of the tab item.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   144
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   145
#labelDerivesFromApplication
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   146
'If turned on, the label''s string is a selector returning a string or bitmap image, which is used as logo in the tab item.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   147
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   148
#testPreview
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   149
'Turns on/off preview of the tab list.'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   150
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   151
)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   152
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   153
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   154
!TabListEditor class methodsFor:'image specs'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   155
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   156
newTabItemIcon
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   157
    "This resource specification was automatically generated
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   158
     by the ImageEditor of ST/X."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   159
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   160
    "Do not manually edit this!!!! If it is corrupted,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   161
     the ImageEditor may not be able to read the specification."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   162
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   163
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   164
     ImageEditor openOnClass:self andSelector:#newTabItemIcon
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   165
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   166
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   167
    <resource: #image>
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   168
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   169
    ^Icon
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   170
        constantNamed:#'TabListEditor newTabItemIcon'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   171
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'U@@@@EUPUEUUVEUPUF**+EUPUF**+EUPUF**+EUP@F**+@@@EV***UV@F*****+@F KNC*+NF(("H*+@F((BC +EF(("H*+@F(("C*+MF*****+@F"@ H*K@F"""(LK@F"" ("K@F"""(*K@F"" H*K@F*****+HK??????@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G?<@G?<@G?<@G?<@G?<@???<???<???<???????<???<???<???<???????=???<???????<???????<???<???=') ; yourself); yourself]! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   172
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   173
!TabListEditor class methodsFor:'interface specs'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   174
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   175
tabSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   176
    "This resource specification was automatically generated
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   177
     by the UIPainter of ST/X."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   178
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   179
    "Do not manually edit this!! If it is corrupted,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   180
     the UIPainter may not be able to read the specification."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   181
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   182
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   183
     UIPainter new openOnClass:TabListEditor andSelector:#tabSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   184
     TabListEditor new openInterface:#tabSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   185
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   186
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   187
    <resource: #canvas>
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   188
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   189
    ^
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   190
     
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   191
       #(#FullSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   192
          #window: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   193
           #(#WindowSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   194
              #name: 'Tab Basic'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   195
              #layout: #(#LayoutFrame 463 0 289 0 825 0 514 0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   196
              #label: 'Tab Basic'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   197
              #min: #(#Point 10 10)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   198
              #max: #(#Point 1280 1024)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   199
              #bounds: #(#Rectangle 463 289 826 515)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   200
              #usePreferredExtent: false
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   201
          )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   202
          #component: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   203
           #(#SpecCollection
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   204
              #collection: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   205
               #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   206
                 #(#LabelSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   207
                    #name: 'Label'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   208
                    #layout: #(#AlignmentOrigin 98 0 26 0 1 0.5)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   209
                    #label: 'Label:'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   210
                    #resizeForLabel: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   211
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   212
                 #(#InputFieldSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   213
                    #name: 'LabelField'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   214
                    #layout: #(#LayoutFrame 100 0 15 0 -5 1.0 37 0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   215
                    #activeHelpKey: #label
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   216
                    #model: #label
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   217
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   218
                 #(#CheckBoxSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   219
                    #name: 'TranslateLabel'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   220
                    #layout: #(#LayoutFrame 100 0 40 0 -5 1 66 0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   221
                    #activeHelpKey: #labelDerivesFromApplication
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   222
                    #model: #translateLabel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   223
                    #label: 'Label derives from Application'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   224
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   225
                 #(#LabelSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   226
                    #name: 'ArgumentLabel'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   227
                    #layout: #(#AlignmentOrigin 98 0 81 0 1 0.5)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   228
                    #label: 'Argument:'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   229
                    #resizeForLabel: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   230
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   231
                 #(#InputFieldSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   232
                    #name: 'ArgumentField'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   233
                    #layout: #(#LayoutFrame 100 0 70 0 -5 1.0 92 0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   234
                    #activeHelpKey: #argument
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   235
                    #model: #editAgument
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   236
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   237
                 #(#LabelSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   238
                    #name: 'ForegroundLabel'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   239
                    #layout: #(#AlignmentOrigin 98 0 115 0 1 0.5)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   240
                    #label: 'Color:'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   241
                    #adjust: #right
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   242
                    #resizeForLabel: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   243
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   244
                 #(#ColorMenuSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   245
                    #name: 'ForegroundColorMenu'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   246
                    #layout: #(#LayoutFrame 100 0 103 0 -5 1.0 125 0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   247
                    #activeHelpKey: #color
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   248
                    #model: #labelForegroundColor
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   249
                    #labelsAreColored: false
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   250
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   251
                 #(#CheckBoxSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   252
                    #name: 'CanSelect'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   253
                    #layout: #(#LayoutFrame 100 0 135 0 -5 1 157 0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   254
                    #activeHelpKey: #canSelect
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   255
                    #model: #enabled
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   256
                    #label: 'Can Select'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   257
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   258
              )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   259
          )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   260
      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   261
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   262
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   263
windowSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   264
    "This resource specification was automatically generated
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   265
     by the UIPainter of ST/X."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   266
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   267
    "Do not manually edit this!! If it is corrupted,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   268
     the UIPainter may not be able to read the specification."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   269
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   270
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   271
     UIPainter new openOnClass:TabListEditor andSelector:#windowSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   272
     TabListEditor new openInterface:#windowSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   273
     TabListEditor open
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   274
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   275
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   276
    <resource: #canvas>
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   277
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   278
    ^
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   279
     
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   280
       #(#FullSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   281
          #window: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   282
           #(#WindowSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   283
              #name: 'Tab List Editor'
749
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
   284
              #layout: #(#LayoutFrame 117 0 340 0 586 0 669 0)
739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   285
              #label: 'Tab List Editor'
749
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
   286
              #min: #(#Point 440 280)
739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   287
              #max: #(#Point 1152 900)
749
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
   288
              #bounds: #(#Rectangle 117 340 587 670)
739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   289
              #menu: #menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   290
              #usePreferredExtent: false
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   291
          )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   292
          #component: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   293
           #(#SpecCollection
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   294
              #collection: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   295
               #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   296
                 #(#MenuPanelSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   297
                    #name: 'menuToolbarView'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   298
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 34 0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   299
                    #menu: #menuToolbar
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   300
                    #showSeparatingLines: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   301
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   302
                 #(#VariableHorizontalPanelSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   303
                    #name: 'VariablePanel'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   304
                    #layout: #(#LayoutFrame 0 0.0 36 0.0 0 1.0 -26 1.0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   305
                    #component: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   306
                     #(#SpecCollection
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   307
                        #collection: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   308
                         #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   309
                           #(#SequenceViewSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   310
                              #name: 'ColumnView'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   311
                              #model: #selectionHolder
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   312
                              #menu: #menuEdit
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   313
                              #hasHorizontalScrollBar: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   314
                              #hasVerticalScrollBar: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   315
                              #miniScrollerHorizontal: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   316
                              #useIndex: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   317
                              #sequenceList: #listOfLabels
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   318
                          )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   319
                           #(#ViewSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   320
                              #name: 'SpecView'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   321
                              #component: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   322
                               #(#SpecCollection
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   323
                                  #collection: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   324
                                   #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   325
                                     #(#ViewSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   326
                                        #name: 'TestView'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   327
                                        #layout: #(#LayoutFrame 1 0.0 0 0.0 0 1.0 0 1.0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   328
                                        #component: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   329
                                         #(#SpecCollection
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   330
                                            #collection: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   331
                                             #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   332
                                               #(#TabViewSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   333
                                                  #name: 'TestTabsView'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   334
                                                  #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 0.5)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   335
                                              )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   336
                                            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   337
                                        )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   338
                                    )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   339
                                     #(#SubCanvasSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   340
                                        #name: 'specCanvas'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   341
                                        #layout: #(#LayoutFrame 1 0.0 0 0.0 0 1.0 -30 1.0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   342
                                        #specHolder: #specChannel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   343
                                    )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   344
                                     #(#UISubSpecification
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   345
                                        #name: 'subSpec'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   346
                                        #layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   347
                                        #majorKey: #ToolApplicationModel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   348
                                        #minorKey: #windowSpecForCommit
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   349
                                    )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   350
                                  )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   351
                              )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   352
                              #level: -1
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   353
                          )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   354
                        )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   355
                    )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   356
                    #handles: #(#Any 0.259875 1.0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   357
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   358
                 #(#UISubSpecification
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   359
                    #name: 'infoBarSubSpec'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   360
                    #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   361
                    #majorKey: #ToolApplicationModel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   362
                    #minorKey: #windowSpecForInfoBar
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   363
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   364
              )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   365
          )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   366
      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   367
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   368
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   369
!TabListEditor class methodsFor:'menu specs'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   370
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   371
menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   372
    "This resource specification was automatically generated
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   373
     by the MenuEditor of ST/X."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   374
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   375
    "Do not manually edit this!! If it is corrupted,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   376
     the MenuEditor may not be able to read the specification."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   377
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   378
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   379
     MenuEditor new openOnClass:TabListEditor andSelector:#menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   380
     (Menu new fromLiteralArrayEncoding:(TabListEditor menu)) startUp
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   381
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   382
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   383
    <resource: #menu>
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   384
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   385
    ^
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   386
     
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   387
       #(#Menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   388
          
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   389
           #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   390
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   391
                #label: 'About'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   392
                #activeHelpKey: #about
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   393
                #labelImage: #(#ResourceRetriever nil #menuIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   394
                #submenuChannel: #menuAbout
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   395
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   396
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   397
                #label: 'File'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   398
                #activeHelpKey: #file
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   399
                #submenu: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   400
                 #(#Menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   401
                    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   402
                     #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   403
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   404
                          #label: 'New'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   405
                          #value: #doNew
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   406
                          #activeHelpKey: #fileNew
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   407
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   408
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   409
                          #label: '-'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   410
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   411
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   412
                          #label: 'Load...'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   413
                          #translateLabel: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   414
                          #value: #doLoad
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   415
                          #activeHelpKey: #fileLoad
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   416
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   417
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   418
                          #label: '-'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   419
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   420
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   421
                          #label: 'Save'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   422
                          #value: #doSave
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   423
                          #activeHelpKey: #fileSave
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   424
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   425
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   426
                          #label: 'Save As...'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   427
                          #value: #doSaveAs
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   428
                          #activeHelpKey: #fileSave
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   429
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   430
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   431
                          #label: '-'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   432
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   433
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   434
                          #label: 'Browse Class'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   435
                          #value: #doBrowseClass
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   436
                          #activeHelpKey: #fileBrowseClass
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   437
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   438
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   439
                          #label: '-'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   440
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   441
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   442
                          #label: 'Exit'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   443
                          #value: #closeRequest
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   444
                          #activeHelpKey: #fileExit
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   445
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   446
                    ) nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   447
                    nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   448
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   449
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   450
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   451
                #label: 'Edit'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   452
                #activeHelpKey: #edit
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   453
                #submenuChannel: #menuEdit
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   454
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   455
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   456
                #label: 'Add'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   457
                #activeHelpKey: #add
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   458
                #submenu: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   459
                 #(#Menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   460
                    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   461
                     #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   462
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   463
                          #label: 'Tab Item'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   464
                          #value: #doCreateTabItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   465
                          #activeHelpKey: #addTabItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   466
                          #labelImage: #(#ResourceRetriever nil #newTabItemIcon 'Tab Item')
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   467
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   468
                    ) nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   469
                    nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   470
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   471
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   472
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   473
                #label: 'Generate'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   474
                #activeHelpKey: #add
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   475
                #submenu: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   476
                 #(#Menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   477
                    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   478
                     #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   479
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   480
                          #label: 'Aspect Method'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   481
                          #value: #doGenerateAspectMethod
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   482
                          #activeHelpKey: #fileCreateAspectMethod
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   483
                          #enabled: #hasClassAndSelector
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   484
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   485
                    ) nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   486
                    nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   487
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   488
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   489
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   490
                #label: 'Test'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   491
                #activeHelpKey: #test
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   492
                #submenu: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   493
                 #(#Menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   494
                    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   495
                     #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   496
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   497
                          #label: 'Preview'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   498
                          #activeHelpKey: #testPreview
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   499
                          #enabled: #canShowTestMode
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   500
                          #indication: #testMode
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   501
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   502
                    ) nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   503
                    nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   504
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   505
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   506
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   507
                #label: 'Settings'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   508
                #submenu: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   509
                 #(#Menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   510
                    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   511
                     #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   512
                       #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   513
                          #label: 'Fonts'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   514
                          #submenuChannel: #menuFont
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   515
                      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   516
                    ) nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   517
                    nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   518
                )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   519
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   520
             #(#MenuItem
749
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
   521
                #label: 'History'
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
   522
                #activeHelpKey: #history
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
   523
                #submenuChannel: #menuHistory
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
   524
            )
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
   525
             #(#MenuItem
739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   526
                #label: 'Help'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   527
                #startGroup: #right
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   528
                #activeHelpKey: #help
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   529
                #submenuChannel: #menuHelp
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   530
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   531
          ) nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   532
          nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   533
      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   534
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   535
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   536
menuEdit
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   537
    "This resource specification was automatically generated
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   538
     by the MenuEditor of ST/X."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   539
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   540
    "Do not manually edit this!! If it is corrupted,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   541
     the MenuEditor may not be able to read the specification."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   542
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   543
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   544
     MenuEditor new openOnClass:TabListEditor andSelector:#menuEdit
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   545
     (Menu new fromLiteralArrayEncoding:(TabListEditor menuEdit)) startUp
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   546
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   547
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   548
    <resource: #menu>
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   549
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   550
    ^
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   551
     
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   552
       #(#Menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   553
          
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   554
           #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   555
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   556
                #label: 'Cut'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   557
                #value: #doCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   558
                #activeHelpKey: #editCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   559
                #enabled: #valueOfCanCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   560
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   561
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   562
                #label: 'Copy'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   563
                #value: #doCopy
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   564
                #activeHelpKey: #editCopy
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   565
                #enabled: #valueOfCanCopy
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   566
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   567
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   568
                #label: 'Paste'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   569
                #value: #doPaste
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   570
                #activeHelpKey: #editPaste
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   571
                #enabled: #valueOfCanPaste
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   572
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   573
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   574
                #label: 'Delete'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   575
                #value: #doDelete
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   576
                #activeHelpKey: #editPaste
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   577
                #enabled: #valueOfCanCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   578
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   579
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   580
                #label: '-'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   581
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   582
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   583
                #label: 'Move Up'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   584
                #value: #doMoveTabUpOrDown:
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   585
                #activeHelpKey: #editMoveUp
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   586
                #enabled: #canMoveTabItemUpOrDown
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   587
                #argument: #up
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   588
                #labelImage: #(#ResourceRetriever #ToolApplicationModel #upIcon 'Move Up')
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   589
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   590
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   591
                #label: 'Move Down'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   592
                #value: #doMoveTabUpOrDown:
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   593
                #activeHelpKey: #editMoveDown
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   594
                #enabled: #canMoveTabItemUpOrDown
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   595
                #argument: #down
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   596
                #labelImage: #(#ResourceRetriever #ToolApplicationModel #downIcon 'Move Down')
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   597
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   598
          ) nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   599
          nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   600
      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   601
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   602
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   603
menuToolbar
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   604
    "This resource specification was automatically generated
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   605
     by the MenuEditor of ST/X."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   606
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   607
    "Do not manually edit this!! If it is corrupted,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   608
     the MenuEditor may not be able to read the specification."
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   609
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   610
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   611
     MenuEditor new openOnClass:TabListEditor andSelector:#menuToolbar
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   612
     (Menu new fromLiteralArrayEncoding:(TabListEditor menuToolbar)) startUp
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   613
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   614
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   615
    <resource: #menu>
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   616
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   617
    ^
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   618
     
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   619
       #(#Menu
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   620
          
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   621
           #(
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   622
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   623
                #label: 'New'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   624
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   625
                #value: #doNew
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   626
                #activeHelpKey: #fileNew
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   627
                #labelImage: #(#ResourceRetriever nil #newIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   628
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   629
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   630
                #label: 'Load'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   631
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   632
                #value: #doLoad
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   633
                #activeHelpKey: #fileLoad
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   634
                #labelImage: #(#ResourceRetriever nil #loadIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   635
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   636
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   637
                #label: 'Save'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   638
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   639
                #value: #doSave
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   640
                #activeHelpKey: #fileSave
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   641
                #labelImage: #(#ResourceRetriever nil #saveIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   642
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   643
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   644
                #label: ''
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   645
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   646
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   647
                #label: 'Cut'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   648
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   649
                #value: #doCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   650
                #activeHelpKey: #editCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   651
                #enabled: #valueOfCanCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   652
                #labelImage: #(#ResourceRetriever nil #cutIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   653
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   654
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   655
                #label: 'Copy'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   656
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   657
                #value: #doCopy
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   658
                #activeHelpKey: #editCopy
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   659
                #enabled: #valueOfCanCopy
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   660
                #labelImage: #(#ResourceRetriever nil #copyIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   661
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   662
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   663
                #label: 'Paste'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   664
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   665
                #value: #doPaste
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   666
                #activeHelpKey: #editPaste
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   667
                #enabled: #valueOfCanPaste
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   668
                #labelImage: #(#ResourceRetriever nil #pasteIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   669
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   670
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   671
                #label: 'Delete'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   672
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   673
                #value: #doDelete
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   674
                #activeHelpKey: #editDelete
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   675
                #enabled: #valueOfCanCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   676
                #labelImage: #(#ResourceRetriever nil #deleteIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   677
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   678
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   679
                #label: ''
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   680
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   681
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   682
                #label: 'Add Tab Item'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   683
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   684
                #value: #doCreateTabItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   685
                #activeHelpKey: #addTabItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   686
                #labelImage: #(#ResourceRetriever nil #newTabItemIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   687
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   688
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   689
                #label: ''
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   690
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   691
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   692
                #label: 'Move Tab Up'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   693
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   694
                #value: #doMoveTabUpOrDown:
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   695
                #activeHelpKey: #editMoveUp
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   696
                #enabled: #canMoveTabItemUpOrDown
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   697
                #argument: #up
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   698
                #labelImage: #(#ResourceRetriever nil #upIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   699
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   700
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   701
                #label: 'Move Tab Down'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   702
                #isButton: true
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   703
                #value: #doMoveTabUpOrDown:
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   704
                #activeHelpKey: #editMoveDown
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   705
                #enabled: #canMoveTabItemUpOrDown
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   706
                #argument: #down
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   707
                #labelImage: #(#ResourceRetriever nil #downIcon)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   708
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   709
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   710
                #label: ''
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   711
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   712
             #(#MenuItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   713
                #label: 'Preview'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   714
                #activeHelpKey: #testPreview
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   715
                #enabled: #canShowTestMode
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   716
                #indication: #testMode
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   717
            )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   718
          ) nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   719
          nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   720
      )
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   721
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   722
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   723
!TabListEditor methodsFor:'aspects'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   724
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   725
canMoveTabItemUpOrDown
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   726
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   727
    |holder|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   728
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   729
    (holder := builder bindingAt:#canMoveTabItemUpOrDown) isNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   730
        builder aspectAt:#canMoveTabItemUpOrDown put:(holder := false asValue).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   731
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   732
    ^ holder
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   733
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   734
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   735
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   736
canShowTestMode
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   737
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   738
    |holder|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   740
    (holder := builder bindingAt:#canShowTestMode) isNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   741
        builder aspectAt:#canShowTestMode put:(holder := false asValue).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   742
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   743
    ^ holder
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   744
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   745
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   746
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   747
listOfLabels
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   748
    "returns a holder which keeps the list of tab labels
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   749
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   750
    |list|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   751
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   752
    (list := builder bindingAt:#listOfLabels) isNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   753
        builder aspectAt:#listOfLabels put:(list :=  List new).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   754
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   755
    ^ list
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   756
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   757
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   758
selectionHolder
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   759
    "holder which keeps the current selection
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   760
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   761
    |holder|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   762
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   763
    (holder := builder bindingAt:#selectionHolder) isNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   764
        holder := AspectAdaptor new subject:self; forAspect:#selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   765
        builder aspectAt:#selectionHolder put:holder.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   766
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   767
    ^ holder
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   768
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   769
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   770
specChannel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   771
    "holder which keeps the current tab specification
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   772
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   773
    |holder|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   774
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   775
    (holder := builder bindingAt:#specChannel) isNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   776
        builder aspectAt:#specChannel put:(holder :=  ValueHolder new).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   777
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   778
    ^ holder
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   779
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   780
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   781
testMode
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   782
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   783
    |holder|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   784
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   785
    (holder := builder bindingAt:#testMode) isNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   786
        builder aspectAt:#testMode put:(holder := false asValue).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   787
        holder addDependent: self
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   788
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   789
    ^ holder
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   790
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   791
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   792
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   793
!TabListEditor methodsFor:'building'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   794
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   795
buildFromClass:aClass andSelector:aSelector
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   796
    "build from class and selector
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   797
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   798
    |cls spec list|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   799
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   800
    self testMode value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   801
    self selectionHolder value:0.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   802
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   803
    "if opened on a tab list"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   804
    (aClass isNil and: [aSelector isNil and: [listOfTabs size > 0]]) 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   805
    ifTrue: 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   806
    [
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   807
        listOfTabs notEmpty ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   808
            self selectionHolder value:1
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   809
        ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   810
        ^nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   811
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   812
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   813
    self listOfLabels removeAll.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   814
    listOfTabs removeAll.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   815
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   816
    testView notNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   817
        testView lower
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   818
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   819
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   820
    rebuildMode := false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   821
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   822
    self canShowTestMode value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   823
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   824
    cls := self resolveName:aClass.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   825
    specSelector := aSelector.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   826
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   827
    cls notNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   828
        specSelector notNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   829
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   830
            (cls respondsTo:specSelector) ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   831
                spec := cls perform:specSelector.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   832
                list := self listOfLabels.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   833
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   834
                spec size ~~ 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   835
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   836
                    rebuildMode := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   837
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   838
                    spec do:[:aTab|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   839
                        list add:aTab label.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   840
                        listOfTabs add:aTab.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   841
                    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   842
                    rebuildMode := false.          
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   843
                    self addToHistory:(cls name, ' ', specSelector) -> #loadFromMessage:                        
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   844
                ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   845
            ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   846
        ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   847
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   848
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   849
    modified := false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   850
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   851
    listOfTabs notEmpty ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   852
        self selectionHolder value:1
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   853
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   854
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   855
    self updateInfoLabel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   856
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   857
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   858
buildFromResourceSpec: aListSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   859
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   860
    self buildFromTabList: aListSpec
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   861
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   862
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   863
buildFromTabList: aTabList
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   864
    "build from a aTabList"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   865
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   866
    rebuildMode := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   867
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   868
    self selectionHolder value: nil.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   869
    self listOfLabels removeAll.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   870
    listOfTabs removeAll.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   871
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   872
    aTabList do:[:aTabItem|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   873
        listOfTabs add: aTabItem.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   874
        self listOfLabels add: aTabItem label
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   875
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   876
    rebuildMode := false.          
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   877
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   878
    modified := false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   879
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   880
    listOfTabs notEmpty ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   881
        self selectionHolder value:1
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   882
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   883
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   884
    self updateInfoLabel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   885
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   886
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   887
!TabListEditor methodsFor:'change & update'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   888
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   889
update:something with:aParameter from:someObject
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   890
    "one of my aspects has changed; update modified channel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   891
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   892
    super update:something with:aParameter from:someObject.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   893
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   894
    someObject = self testMode
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   895
    ifTrue:
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   896
    [              
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   897
        someObject value
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   898
            ifTrue: [self doTest]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   899
            ifFalse:[testView lower. self selectionHolder value:1].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   900
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   901
        self updateInfoLabel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   902
    ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   903
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   904
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   905
!TabListEditor methodsFor:'help'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   906
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   907
defaultInfoLabel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   908
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   909
    ^self testMode value
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   910
        ifTrue:  ['Test mode']
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   911
        ifFalse: [super defaultInfoLabel]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   912
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   913
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   914
!TabListEditor methodsFor:'selection'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   915
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   916
selectedIndex
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   917
    ^ selectedIndex
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   918
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   919
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   920
selectedIndex:anIndex
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   921
    |s oldSel|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   922
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   923
    self listOfLabels notEmpty ifTrue: [self canShowTestMode value: true].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   924
    anIndex notNil ifTrue: [self testMode value: false].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   925
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   926
    oldSel := selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   927
    selectedIndex := anIndex ? 0.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   928
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   929
    selectedIndex == oldSel ifTrue:[^ self].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   930
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   931
    oldSel == 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   932
        self specChannel value:(self class tabSpec)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   933
    ] ifFalse:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   934
        selectedIndex == 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   935
            self specChannel value:nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   936
        ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   937
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   938
    self cancel.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   939
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   940
    testView notNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   941
        testView lower.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   942
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   943
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   944
    self valueOfCanCut value: (anIndex ~~ 0).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   945
    self valueOfCanCopy value: (anIndex ~~ 0).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   946
    self valueOfCanPaste.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   947
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   948
    self updateFonts
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   949
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   950
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   951
!TabListEditor methodsFor:'startup / release'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   952
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   953
initialize
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   954
    "setup aspects used by column description specifications
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   955
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   956
    |holder|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   957
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   958
    super initialize.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   959
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   960
    listOfTabs    := OrderedCollection new.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   961
    selectedIndex := 0.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   962
    rebuildMode   := false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   963
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   964
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   965
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   966
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   967
openModalOnTabList: aTabList
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   968
    "build a tab list from aTabList and open it modal"
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   969
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   970
    super openModalOnResourceSpec: aTabList
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   971
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   972
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   973
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   974
postBuildWith:builder
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   975
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   976
    super postBuildWith:builder.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   977
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   978
    testView := builder componentAt:#TestView.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   979
    (builder componentAt:#ColumnView) selectConditionBlock: [:i|self askForItemModification].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   980
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   981
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   982
!TabListEditor methodsFor:'user actions'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   983
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   984
accept
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   985
    "accept changes
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   986
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   987
    |label|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   988
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   989
    selectedIndex ~~ 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   990
        rebuildMode := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   991
        label := listOfTabs at:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   992
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   993
        aspects keysAndValuesDo:[:aKey :aModel|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   994
            label perform:(aKey , ':') asSymbol with:(aModel value).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   995
        ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   996
        self listOfLabels at:selectedIndex put:(label label).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   997
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   998
        rebuildMode := false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
   999
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1000
    self cancel.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1001
    modified := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1002
    self valueOfEnablingCommitButtons value: false
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1003
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1004
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1005
cancel
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1006
    "cancel all changes
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1007
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1008
    |tab|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1009
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1010
    selectedIndex ~~ 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1011
        tab := listOfTabs at:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1012
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1013
        rebuildMode := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1014
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1015
        aspects keysAndValuesDo:[:aKey :aModel|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1016
            aModel value:(tab perform:aKey)    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1017
        ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1018
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1019
        rebuildMode := false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1020
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1021
    self canMoveTabItemUpOrDown value:(selectedIndex ~~ 0 and:[listOfTabs size > 1]).
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1022
    self valueOfEnablingCommitButtons value: false
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1023
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1024
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1025
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1026
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1027
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1028
doCopy
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1029
    "copy selected tab
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1030
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1031
    selectedIndex ~~ 0 ifTrue:[
749
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
  1032
        self clipboard:(listOfTabs at:selectedIndex) deepCopy.
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
  1033
        self updateAllToolInstances.
739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1034
    ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1035
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1036
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1037
doCreateTabItem
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1038
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1039
    |tab|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1040
    self testMode value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1041
    tab := TabItem label:'Tab Item ', (listOfTabs size + 1) printString.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1042
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1043
    listOfTabs add:tab afterIndex:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1044
    self listOfLabels add:(tab label) afterIndex:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1045
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1046
    selectedIndex == 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1047
        self selectionHolder value:1
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1048
    ] ifFalse:[    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1049
        self selectionHolder value:selectedIndex + 1.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1050
        self cancel.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1051
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1052
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1053
    modified := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1054
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1055
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1056
doCut
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1057
    "cut selected tab
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1058
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1059
    |list index|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1060
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1061
    (index := selectedIndex) ~~ 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1062
        self testMode value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1063
        list := self listOfLabels.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1064
        self clipboard:(listOfTabs at:index) deepCopy.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1065
        self selectionHolder value:0.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1066
        listOfTabs removeIndex:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1067
        list removeIndex:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1068
        index > list size ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1069
            index := index - 1
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1070
        ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1071
        self selectionHolder value:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1072
        self listOfLabels isEmpty ifTrue: [self canShowTestMode value: false].
749
8f8767c6f32f update other instances if clipboarding
tz
parents: 739
diff changeset
  1073
        self updateAllToolInstances.
739
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1074
        modified := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1075
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1076
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1077
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1078
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1079
doDelete
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1080
    "delete selected tab
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1081
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1082
    |list index|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1083
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1084
    (index := selectedIndex) ~~ 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1085
        self testMode value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1086
        list := self listOfLabels.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1087
        self selectionHolder value:0.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1088
        listOfTabs removeIndex:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1089
        list removeIndex:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1090
        index > list size ifTrue:[index := index - 1].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1091
        self selectionHolder value:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1092
        self listOfLabels isEmpty ifTrue: [self canShowTestMode value: false].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1093
        modified := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1094
    ].       
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1095
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1096
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1097
doGenerateAspectMethod
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1098
    "generate aspect method
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1099
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1100
    |cls code|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1101
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1102
    (specClass notNil and:[specSelector notNil])
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1103
    ifFalse:
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1104
    [
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1105
        ^self information:'No class and selector defined!!'   
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1106
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1107
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1108
    cls := self resolveName: specClass.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1109
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1110
    (cls canUnderstand:specSelector) ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1111
        "/ method already exists, do not overwrite the method automaticaly
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1112
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1113
        ( YesNoBox title:'method '
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1114
                         , (Text string:('#', specSelector) emphasis:#bold)
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1115
                         , ' already exists!!'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1116
                 yesText:'overwrite'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1117
                  noText:'cancel'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1118
        ) confirm ifFalse:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1119
            ^ self
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1120
        ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1121
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1122
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1123
    code := '!!' , cls name , ' methodsFor:''aspects''!!\\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1124
            specSelector , '\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1125
            '    "Generated by the TabListEditor"\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1126
            '\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1127
            '    |list|\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1128
            '\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1129
            '    (list := builder bindingAt:#' , specSelector , ') isNil ifTrue:[\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1130
            '        builder aspectAt:#' , specSelector, ' put:(list := self class ', specSelector, ').\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1131
            '    ].\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1132
            '    ^ list\' ,
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1133
            '!! !!\\'.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1134
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1135
    (ReadStream on:(code withCRs)) fileIn
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1136
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1137
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1138
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1139
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1140
doMoveTabUpOrDown:what
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1141
    "step up or down
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1142
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1143
    |tab list index|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1144
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1145
    (selectedIndex ~~ 0 and:[listOfTabs size > 1]) ifFalse:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1146
        ^ self
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1147
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1148
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1149
    list := self listOfLabels.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1150
    tab  := listOfTabs at:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1151
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1152
    list removeIndex:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1153
    listOfTabs removeIndex:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1154
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1155
    what == #down ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1156
        index := selectedIndex > list size ifTrue:[1]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1157
                                          ifFalse:[selectedIndex + 1]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1158
    ] ifFalse:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1159
        index := selectedIndex == 1 ifTrue:[list size + 1]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1160
                                   ifFalse:[selectedIndex - 1]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1161
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1162
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1163
    list add:(tab label) beforeIndex:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1164
    listOfTabs add:tab beforeIndex:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1165
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1166
    rebuildMode := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1167
    self selectionHolder value:index.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1168
    rebuildMode := false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1169
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1170
    modified := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1171
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1172
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1173
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1174
doPaste
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1175
    "paste a tab
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1176
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1177
    |tab|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1178
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1179
    self testMode value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1180
    (tab := self class clipboard deepCopy) isNil ifTrue: [^nil].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1181
    listOfTabs add:tab afterIndex:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1182
    self listOfLabels add:(tab label) afterIndex:selectedIndex.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1183
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1184
    selectedIndex == 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1185
        self selectionHolder value:1
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1186
    ] ifFalse:[    
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1187
        self selectionHolder value:selectedIndex + 1.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1188
        self cancel.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1189
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1190
      
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1191
    modified  := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1192
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1193
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1194
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1195
doSave
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1196
    "generate code for class and instance
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1197
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1198
    |cls code spec category mthd|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1199
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1200
    (specClass notNil and:[specSelector notNil])
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1201
    ifFalse:
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1202
    [
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1203
        ^self doSaveAs
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1204
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1205
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1206
    cls := self resolveName: specClass.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1207
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1208
    listOfTabs isEmpty ifTrue:[^self information:'No tab list defined!!'].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1209
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1210
    spec  := WriteStream on:String new.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1211
    UISpecification prettyPrintSpecArray:(listOfTabs literalArrayEncoding) on:spec indent:5.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1212
    spec := spec contents.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1213
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1214
    "/ if that method already exists, do not overwrite the category
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1215
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1216
    category := 'list specs'.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1217
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1218
    (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1219
        category := mthd category.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1220
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1221
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1222
    code := Character excla asString 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1223
            , cls name , ' class methodsFor:' , category storeString
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1224
            , Character excla asString , '\\'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1225
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1226
            , specSelector , '\'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1227
            , (self class codeGenerationComment replChar:$!! withString:'!!!!')
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1228
            , '\\    "\'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1229
            , '     TabListEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1230
            , '    "\'.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1231
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1232
    code := code 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1233
            , '\'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1234
            , '    <resource: #tabList>\\'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1235
            , '    ^' 
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1236
            , '     ', spec, '\'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1237
            , '      collect:[:aTab| TabItem new fromLiteralArrayEncoding:aTab ]'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1238
            , '\'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1239
            , Character excla asString
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1240
            , ' '
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1241
            , Character excla asString
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1242
            , '\'.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1243
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1244
    code := code withCRs.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1245
    (ReadStream on:code) fileIn.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1246
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1247
    (cls canUnderstand:specSelector) ifFalse:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1248
        (YesNoBox confirm:'Generate aspect method?') ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1249
            self doGenerateAspectMethod
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1250
        ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1251
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1252
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1253
    self addToHistory:(cls name, ' ', specSelector) -> #loadFromMessage:.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1254
    modified  := false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1255
    hasSaved  := true.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1256
!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1257
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1258
doTest
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1259
    "run a test
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1260
    "
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1261
    |tabView list|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1262
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1263
    self selectionHolder value:nil.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1264
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1265
    listOfTabs size ~~ 0 ifTrue:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1266
        list := listOfTabs collect:[:aTab||t|
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1267
            t := aTab copy.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1268
            t setAttributesFromClass:specClass.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1269
            t
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1270
        ]
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1271
    ] ifFalse:[
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1272
        list := nil
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1273
    ].
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1274
    tabView  := builder componentAt:#TestTabsView.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1275
    tabView list:list.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1276
    testView raise.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1277
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1278
    self valueOfCanCut value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1279
    self valueOfCanCopy value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1280
    self valueOfCanPaste value: false.
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1281
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1282
! !
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1283
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1284
!TabListEditor class methodsFor:'documentation'!
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1285
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1286
version
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1287
    ^ '$Header: /files/CVS/stx/libtool2/TabListEditor.st,v'
cc3413fc1afb initial checkin
tz
parents:
diff changeset
  1288
! !