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