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