UIPainter.st
author tz
Tue, 03 Feb 1998 00:15:03 +0100
changeset 561 cd3a3b82cb98
parent 547 930b3df19305
child 564 df1f1e84d94a
permissions -rw-r--r--
extra tab item creation icon added
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     1
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     2
 COPYRIGHT (c) 1995 by eXept Software AG
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     3
              All Rights Reserved
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     4
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     5
 This software is furnished under a license and may be used
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     6
 only in accordance with the terms of that license and with the
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     8
 be provided or otherwise made available to, or used by, any
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     9
 other person.  No title to or ownership of the software is
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    10
 hereby transferred.
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    11
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    12
368
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
    13
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
    14
ToolApplicationModel subclass:#UIPainter
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
    15
	instanceVariableNames:'treeView selectionPanel tabSelection specClass specSelector
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
    16
		specSuperclass aspects layoutCanvas helpCanvas specCanvas
14db1276218c change the spec;
ca
parents: 295
diff changeset
    17
		transcript'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
    18
	classVariableNames:''
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    19
	poolDictionaries:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    20
	category:'Interface-UIPainter'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    21
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    22
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
    23
SelectionInTreeView subclass:#TreeView
491
c3af7854dbe8 image instance variables removed + release all widget icons while snap shoting
tz
parents: 490
diff changeset
    24
	instanceVariableNames:'lastDrawnMaster cvsEventsDisabled windowSpec'
440
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
    25
	classVariableNames:'Images'
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
    26
	poolDictionaries:''
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
    27
	privateIn:UIPainter
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
    28
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
    29
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    30
!UIPainter class methodsFor:'documentation'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    31
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    32
copyright
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    33
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    34
 COPYRIGHT (c) 1995 by eXept Software AG
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    35
              All Rights Reserved
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    36
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    37
 This software is furnished under a license and may be used
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    38
 only in accordance with the terms of that license and with the
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    39
 inclusion of the above copyright notice.   This software may not
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    40
 be provided or otherwise made available to, or used by, any
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    41
 other person.  No title to or ownership of the software is
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    42
 hereby transferred.
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    43
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    44
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    45
!
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    46
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    47
documentation
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    48
"
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    49
    GUI-Builder:
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    50
    this class allows the user to build its own applications providing a graphical
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    51
    user interface to buildin components and to define the behavior of the components
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    52
    during runtime. The resulting specifications can be installed as methods on 
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    53
    classes, typically subclasses of an ApplicationModel. These specifications
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    54
    are used by the UIBuilder to generate the application window and its component
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    55
    structues when open the application.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    56
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    57
    [start with:]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    58
        UIPainter open
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    59
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    60
    [author:]
542
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
    61
        Claus Gittinger, eXept Software AG
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
    62
        Claus Atzkern, eXept Software AG
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    63
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    64
    [see also:]
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    65
        UIBuilder
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    66
        ApplicationModel
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    67
        UISpecification
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    68
"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    69
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    70
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    71
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    72
!UIPainter class methodsFor:'instance creation'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    73
195
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    74
openOnClass:aClass andSelector:aSelector
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    75
    "open up an interface builder, fetching a spec from aClass
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    76
     via some selector
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    77
    "
195
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    78
    ^ self new openOnClass:aClass andSelector:aSelector
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    79
!
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    80
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    81
painter:aBuilderView
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    82
    "set the painter
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    83
    "
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    84
    |application|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    85
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    86
    application := self new.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    87
    application painter:aBuilderView.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    88
  ^ application open
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    89
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    90
87
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    91
!UIPainter class methodsFor:'ST-80 queries'!
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    92
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    93
preferenceFor:aSymbol
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    94
    "ST-80 compatible; always returns false
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    95
    "
87
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    96
    ^ false
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    97
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    98
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    99
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   100
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   101
!UIPainter class methodsFor:'accessing'!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   102
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   103
label
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   104
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   105
    ^'GUI Builder'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   106
! !
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   107
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   108
!UIPainter class methodsFor:'help specs'!
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   109
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   110
helpSpec
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   111
    "return a dictionary filled with helpKey -> helptext associations.
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
   112
     These are used by the activeHelp tool."
114befd1c369 add some help text
ca
parents: 287
diff changeset
   113
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   114
    "
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
   115
    UIHelpTool openOnClass:UIPainter    
114befd1c369 add some help text
ca
parents: 287
diff changeset
   116
    "
114befd1c369 add some help text
ca
parents: 287
diff changeset
   117
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   118
  ^ super helpSpec addPairsFrom:#(
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   119
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   120
#accept
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   121
'Writes back changes.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   122
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   123
#alignSelectionBottom
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   124
'Aligns selected widgets to the bottom edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   125
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   126
#alignSelectionCenterHor
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   127
'Aligns selected widgets vertical to the center of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   128
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   129
#alignSelectionCenterVer
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   130
'Aligns selected widgets horizontal to the center of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   131
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   132
#alignSelectionLeft
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   133
'Aligns selected widgets to the left edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   134
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   135
#alignSelectionLeftAndRight
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   136
'Aligns selected widgets to the right and left edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   137
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   138
#alignSelectionRight
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   139
'Aligns selected widgets to the right edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   140
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   141
#alignSelectionTop
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   142
'Aligns selected widgets to the top edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   143
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   144
#alignSelectionTopAndBottom
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   145
'Aligns selected widgets to the top and bottom edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   146
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   147
#cancel
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   148
'Rereads specification and layout.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   149
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   150
#centerSelectionHor
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   151
'Centers widgets horizontal to their top widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   152
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   153
#centerSelectionVer
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   154
'Centers vertical horizontal in contained view.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   155
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   156
#copyExtent
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   157
'Copies extent of the selected widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   158
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   159
#copyLayout
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   160
'Copies layout of the selected widget.'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   161
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   162
#fileLoad
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   163
'Opens dialog to load an interface from a class.'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   164
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   165
#fileLoadSubspec
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   166
'Opens dialog to load an subspec interface from a class.'
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   167
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   168
#fileNew
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   169
'Creates new interface.'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   170
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   171
#filePickAnInterface
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   172
'Changes the cursor for moving it over another view to load its interface.'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   173
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   174
#fileSave
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   175
'Saves current interface.'
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
   176
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
   177
#galleryShown
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   178
'Shows or hide gallery view.'
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
   179
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   180
#menuAlignment
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   181
'Provides a set of alignment operation on the current selected widgets.'
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
   182
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   183
#moveSelectionDown
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   184
'Moves selected widgets down.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   185
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   186
#moveSelectionLeft
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   187
'Moves selected widgets out of parent widget.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   188
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   189
#moveSelectionRight
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   190
'Moves selected widgets into next widget as child.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   191
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   192
#moveSelectionUp
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   193
'Moves selected widgets up.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   194
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   195
#painterShown
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   196
'Shows or hide painter view.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   197
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   198
#pasteBuffer
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   199
'Pastes widgets at current mouse position.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   200
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   201
#pasteExtent
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   202
'Changes extent of all selected widgets to the last copied extent.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   203
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   204
#pasteHeight
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   205
'Changes height of all selected widgets to the last copied extent height.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   206
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   207
#pasteLayout
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   208
'Changes layout of all selected widgets to the last copied layout.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   209
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   210
#pasteWidth
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   211
'Changes width of all selected widgets to the last copied extent width.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   212
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   213
#pasteWithLayout
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   214
'Pastes widgets without changing their layouts.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   215
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   216
#setToDefaultExtent
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   217
'Sets selected widgets to their default extent.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   218
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   219
#setToDefaultHeight
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   220
'Sets selected widgets to their default height.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   221
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   222
#setToDefaultWidth
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   223
'Sets selected widgets to their default width.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   224
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   225
#spreadSelectionHor
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   226
'Sets horizontal spaces between selected widgets as the same.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   227
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   228
#spreadSelectionVer
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   229
'Sets vertical spaces between selected widgets as the same.'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   230
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   231
#testStartApplication
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   232
'Starts current application on loaded interface.'
194
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   233
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   234
)
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   235
! !
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   236
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   237
!UIPainter class methodsFor:'helpers'!
14db1276218c change the spec;
ca
parents: 295
diff changeset
   238
368
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   239
convertString:aString maxLineSize:maxCharactersPerLine skipLineFeed:skipLineFeed
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   240
    "converts a string to a string collection with maximum characters
14db1276218c change the spec;
ca
parents: 295
diff changeset
   241
     per line
14db1276218c change the spec;
ca
parents: 295
diff changeset
   242
    "
14db1276218c change the spec;
ca
parents: 295
diff changeset
   243
    |stream
14db1276218c change the spec;
ca
parents: 295
diff changeset
   244
        max     "{ Class:SmallInteger }"
14db1276218c change the spec;
ca
parents: 295
diff changeset
   245
        size    "{ Class:SmallInteger }"
14db1276218c change the spec;
ca
parents: 295
diff changeset
   246
        start   "{ Class:SmallInteger }"
14db1276218c change the spec;
ca
parents: 295
diff changeset
   247
        stop    "{ Class:SmallInteger }"
14db1276218c change the spec;
ca
parents: 295
diff changeset
   248
        cpySz   "{ Class:SmallInteger }"
542
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   249
        lnSz    "{ Class:SmallInteger }"
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   250
        atBeginOfLine|
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   251
14db1276218c change the spec;
ca
parents: 295
diff changeset
   252
    maxCharactersPerLine < 20 ifFalse:[max := maxCharactersPerLine - 1]
14db1276218c change the spec;
ca
parents: 295
diff changeset
   253
                               ifTrue:[max := 20].
14db1276218c change the spec;
ca
parents: 295
diff changeset
   254
14db1276218c change the spec;
ca
parents: 295
diff changeset
   255
    (size := aString size) <= max ifTrue:[
14db1276218c change the spec;
ca
parents: 295
diff changeset
   256
        ^ aString
14db1276218c change the spec;
ca
parents: 295
diff changeset
   257
    ].
14db1276218c change the spec;
ca
parents: 295
diff changeset
   258
    start  := 1.
14db1276218c change the spec;
ca
parents: 295
diff changeset
   259
    lnSz   := 0.
14db1276218c change the spec;
ca
parents: 295
diff changeset
   260
    stream := (String new:size) writeStream.
14db1276218c change the spec;
ca
parents: 295
diff changeset
   261
542
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   262
    atBeginOfLine := true.
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   263
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   264
    [start <= size] whileTrue:[
14db1276218c change the spec;
ca
parents: 295
diff changeset
   265
        (start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[
14db1276218c change the spec;
ca
parents: 295
diff changeset
   266
            ^ stream contents
14db1276218c change the spec;
ca
parents: 295
diff changeset
   267
        ].
368
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   268
        (aString at:start) == $\ ifTrue:[
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   269
            skipLineFeed ifFalse:[
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   270
                stream nextPut:$\
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   271
            ].
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   272
            start := start + 1.
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   273
            stream cr.
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   274
            start := start + 1.
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   275
            lnSz := 0.
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   276
        ] ifFalse:[
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   277
            (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[
542
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   278
                stop := size + 1
368
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   279
            ].
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   280
            (aString at:(stop - 1)) == $\ ifTrue:[
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   281
                stop := stop - 1
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   282
            ].
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   283
            cpySz := stop - start.
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   284
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   285
            lnSz == 0 ifFalse:[
542
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   286
                (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr.    lnSz := cpySz. atBeginOfLine := true. ]
368
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   287
                                             ifFalse:[stream space. lnSz := lnSz + 1]
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   288
            ] ifTrue:[
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   289
                lnSz := cpySz
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   290
            ].
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   291
            stream nextPutAll:aString startingAt:start to:(stop - 1).
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   292
            start := stop.
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   293
        ]
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   294
    ].
14db1276218c change the spec;
ca
parents: 295
diff changeset
   295
    ^ stream contents
542
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   296
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   297
    "Modified: / 1.2.1998 / 14:42:56 / cg"
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   298
! !
14db1276218c change the spec;
ca
parents: 295
diff changeset
   299
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   300
!UIPainter class methodsFor:'interface specs'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   301
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   302
gridParametersSpec
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   303
    "this window spec was automatically generated by the ST/X UIPainter"
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   304
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   305
    "do not manually edit this - the painter/builder may not be able to
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   306
     handle the specification if its corrupted."
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   307
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   308
    "
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   309
     UIPainter new openOnClass:UIPainter andSelector:#gridParametersSpec
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   310
     UIPainter new openInterface:#gridParametersSpec
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   311
    "
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   312
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   313
    <resource: #canvas>
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   314
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   315
    ^
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   316
     
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   317
       #(#FullSpec
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   318
          #'window:' 
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   319
           #(#WindowSpec
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   320
              #'name:' 'GUI Builder'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   321
              #'layout:' #(#LayoutFrame 44 0 416 0 325 0 613 0)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   322
              #'label:' 'GUI Builder'
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   323
              #'min:' #(#Point 10 10)
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   324
              #'max:' #(#Point 1280 1024)
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   325
              #'bounds:' #(#Rectangle 44 416 326 614)
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   326
              #'usePreferredExtent:' false
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   327
          )
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   328
          #'component:' 
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   329
           #(#SpecCollection
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   330
              #'collection:' 
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   331
               #(
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   332
                 #(#FramedBoxSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   333
                    #'name:' 'framedBox'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   334
                    #'layout:' #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   335
                    #'component:' 
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   336
                     #(#SpecCollection
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   337
                        #'collection:' 
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   338
                         #(
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   339
                           #(#CheckBoxSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   340
                              #'name:' 'show'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   341
                              #'layout:' #(#Point 23 24)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   342
                              #'model:' #showGrid
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   343
                              #'label:' 'Show grid'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   344
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   345
                           #(#CheckBoxSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   346
                              #'name:' 'align'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   347
                              #'layout:' #(#Point 23 52)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   348
                              #'model:' #alignToGrid
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   349
                              #'label:' 'Align to Grid'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   350
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   351
                           #(#LabelSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   352
                              #'name:' 'hrzLabel'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   353
                              #'layout:' #(#AlignmentOrigin 148 0 99 0 1 0.5)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   354
                              #'label:' 'Horizontal Pixels:'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   355
                              #'adjust:' #right
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   356
                              #'resizeForLabel:' true
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   357
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   358
                           #(#InputFieldSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   359
                              #'name:' 'hrzField'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   360
                              #'layout:' #(#LayoutFrame 154 0 87 0 207 0 109 0)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   361
                              #'model:' #hspace
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   362
                              #'type:' #numberOrNil
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   363
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   364
                           #(#LabelSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   365
                              #'name:' 'vrtLabel'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   366
                              #'layout:' #(#AlignmentOrigin 149 0 124 0 1 0.5)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   367
                              #'label:' 'Vertical Pixels:'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   368
                              #'adjust:' #right
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   369
                              #'resizeForLabel:' true
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   370
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   371
                           #(#InputFieldSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   372
                              #'name:' 'vrtField'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   373
                              #'layout:' #(#LayoutFrame 154 0 112 0 207 0 134 0)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   374
                              #'model:' #vspace
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   375
                              #'type:' #numberOrNil
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   376
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   377
                        )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   378
                    )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   379
                    #'label:' 'Grid Parameter'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   380
                    #'labelPosition:' #topLeft
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   381
                )
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   382
                 #(#UISubSpecification
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   383
                    #'name:' 'uISubSpecifica1'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   384
                    #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   385
                    #'majorKey:' #ToolApplicationModel
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   386
                    #'minorKey:' #windowSpecForCommitWithoutChannels
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   387
                )
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   388
              )
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   389
          )
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   390
      )
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   391
!
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   392
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   393
nameAndSelectorSpec
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   394
    "this window spec was automatically generated by the ST/X UIPainter"
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   395
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   396
    "do not manually edit this - the painter/builder may not be able to
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   397
     handle the specification if its corrupted."
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   398
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   399
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   400
     UIPainter new openOnClass:UIPainter andSelector:#nameAndSelectorSpec
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   401
     UIPainter new openInterface:#nameAndSelectorSpec
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   402
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   403
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   404
    <resource: #canvas>
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   405
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   406
    ^
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   407
     
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   408
       #(#FullSpec
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   409
          #'window:' 
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   410
           #(#WindowSpec
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   411
              #'name:' 'GUI Builder'
538
3d75219adb32 dialog layout changed
tz
parents: 533
diff changeset
   412
              #'layout:' #(#LayoutFrame 238 0 270 0 584 0 429 0)
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   413
              #'label:' 'GUI Builder'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   414
              #'min:' #(#Point 10 10)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   415
              #'max:' #(#Point 1152 900)
538
3d75219adb32 dialog layout changed
tz
parents: 533
diff changeset
   416
              #'bounds:' #(#Rectangle 238 270 585 430)
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   417
              #'usePreferredExtent:' false
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   418
          )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   419
          #'component:' 
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   420
           #(#SpecCollection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   421
              #'collection:' 
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   422
               #(
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   423
                 #(#FramedBoxSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   424
                    #'name:' 'framedBox1'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   425
                    #'layout:' #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   426
                    #'component:' 
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   427
                     #(#SpecCollection
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   428
                        #'collection:' 
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   429
                         #(
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   430
                           #(#LabelSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   431
                              #'name:' 'selectorLabel'
538
3d75219adb32 dialog layout changed
tz
parents: 533
diff changeset
   432
                              #'layout:' #(#AlignmentOrigin 77 0.11 39 0 1 0.5)
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   433
                              #'label:' 'Selector:'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   434
                              #'adjust:' #right
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   435
                              #'resizeForLabel:' true
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   436
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   437
                           #(#InputFieldSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   438
                              #'name:' 'methodNameField'
538
3d75219adb32 dialog layout changed
tz
parents: 533
diff changeset
   439
                              #'layout:' #(#LayoutFrame 80 0.11 28 0 14 1.0 50 0)
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   440
                              #'tabable:' true
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   441
                              #'model:' #methodNameChannel
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   442
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   443
                           #(#LabelSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   444
                              #'name:' 'classLabel'
538
3d75219adb32 dialog layout changed
tz
parents: 533
diff changeset
   445
                              #'layout:' #(#AlignmentOrigin 77 0.11 64 0 1 0.5)
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   446
                              #'label:' 'Class:'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   447
                              #'adjust:' #right
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   448
                              #'resizeForLabel:' true
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   449
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   450
                           #(#InputFieldSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   451
                              #'name:' 'classNameField'
538
3d75219adb32 dialog layout changed
tz
parents: 533
diff changeset
   452
                              #'layout:' #(#LayoutFrame 80 0.11 53 0 14 1.0 75 0)
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   453
                              #'tabable:' true
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   454
                              #'model:' #classNameChannel
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   455
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   456
                           #(#LabelSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   457
                              #'name:' 'superClassLabel'
538
3d75219adb32 dialog layout changed
tz
parents: 533
diff changeset
   458
                              #'layout:' #(#AlignmentOrigin 77 0.11 89 0 1 0.5)
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   459
                              #'label:' 'Superclass:'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   460
                              #'adjust:' #right
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   461
                              #'resizeForLabel:' true
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   462
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   463
                           #(#ComboBoxSpec
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   464
                              #'name:' 'superclassNameComboBox'
538
3d75219adb32 dialog layout changed
tz
parents: 533
diff changeset
   465
                              #'layout:' #(#LayoutFrame 80 0.11 78 0 14 1.0 100 0)
527
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   466
                              #'tabable:' true
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   467
                              #'model:' #superclassNameChannel
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   468
                              #'comboList:' #superclassNameDefaults
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   469
                          )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   470
                        )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   471
                    )
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   472
                    #'label:' 'Class and selector for interface'
6dc446339dc2 dialog styles revised
tz
parents: 518
diff changeset
   473
                    #'labelPosition:' #topLeft
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   474
                )
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   475
                 #(#UISubSpecification
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   476
                    #'name:' 'uISubSpecifica1'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   477
                    #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   478
                    #'majorKey:' #ToolApplicationModel
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   479
                    #'minorKey:' #windowSpecForCommitWithoutChannels
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   480
                )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   481
              )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   482
          )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   483
      )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   484
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   485
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   486
windowSpec
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   487
    "this window spec was automatically generated by the ST/X UIPainter"
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   488
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   489
    "do not manually edit this - the painter/builder may not be able to
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   490
     handle the specification if its corrupted."
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   491
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   492
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   493
     UIPainter new openOnClass:UIPainter andSelector:#windowSpec
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   494
     UIPainter new openInterface:#windowSpec
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   495
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   496
    "UIPainter open"
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   497
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   498
    <resource: #canvas>
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   499
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   500
    ^
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   501
     
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   502
       #(#FullSpec
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   503
          #'window:' 
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   504
           #(#WindowSpec
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
   505
              #'name:' 'Tree-View'
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   506
              #'layout:' #(#LayoutFrame 6 0 406 0 558 0 931 0)
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   507
              #'label:' 'Tree-View'
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
   508
              #'min:' #(#Point 10 10)
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
   509
              #'max:' #(#Point 1160 870)
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   510
              #'bounds:' #(#Rectangle 6 406 559 932)
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   511
              #'menu:' #menu
375
b43507f222ce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   512
              #'usePreferredExtent:' false
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   513
          )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   514
          #'component:' 
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   515
           #(#SpecCollection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   516
              #'collection:' 
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   517
               #(
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   518
                 #(#MenuPanelSpec
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   519
                    #'name:' 'menuToolbarView'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   520
                    #'layout:' #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0)
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   521
                    #'tabable:' true
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   522
                    #'menu:' #menuToolbar
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   523
                    #'showSeparatingLines:' true
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   524
                )
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   525
                 #(#VariableVerticalPanelSpec
14db1276218c change the spec;
ca
parents: 295
diff changeset
   526
                    #'name:' 'vpanel'
448
9f115893b4df info bar added
tz
parents: 447
diff changeset
   527
                    #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   528
                    #'component:' 
14db1276218c change the spec;
ca
parents: 295
diff changeset
   529
                     #(#SpecCollection
14db1276218c change the spec;
ca
parents: 295
diff changeset
   530
                        #'collection:' 
14db1276218c change the spec;
ca
parents: 295
diff changeset
   531
                         #(
14db1276218c change the spec;
ca
parents: 295
diff changeset
   532
                           #(#VariableHorizontalPanelSpec
14db1276218c change the spec;
ca
parents: 295
diff changeset
   533
                              #'name:' 'hpanel'
14db1276218c change the spec;
ca
parents: 295
diff changeset
   534
                              #'component:' 
14db1276218c change the spec;
ca
parents: 295
diff changeset
   535
                               #(#SpecCollection
14db1276218c change the spec;
ca
parents: 295
diff changeset
   536
                                  #'collection:' 
14db1276218c change the spec;
ca
parents: 295
diff changeset
   537
                                   #(
14db1276218c change the spec;
ca
parents: 295
diff changeset
   538
                                     #(#ArbitraryComponentSpec
14db1276218c change the spec;
ca
parents: 295
diff changeset
   539
                                        #'name:' 'treeView'
375
b43507f222ce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   540
                                        #'tabable:' true
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   541
                                        #'menu:' #menuEdit
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   542
                                        #'hasHorizontalScrollBar:' true
14db1276218c change the spec;
ca
parents: 295
diff changeset
   543
                                        #'hasVerticalScrollBar:' true
14db1276218c change the spec;
ca
parents: 295
diff changeset
   544
                                        #'miniScrollerHorizontal:' true
14db1276218c change the spec;
ca
parents: 295
diff changeset
   545
                                        #'miniScrollerVertical:' true
14db1276218c change the spec;
ca
parents: 295
diff changeset
   546
                                        #'component:' #treeView
14db1276218c change the spec;
ca
parents: 295
diff changeset
   547
                                        #'hasBorder:' false
14db1276218c change the spec;
ca
parents: 295
diff changeset
   548
                                    )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   549
                                     #(#ViewSpec
14db1276218c change the spec;
ca
parents: 295
diff changeset
   550
                                        #'name:' 'specHolderView'
14db1276218c change the spec;
ca
parents: 295
diff changeset
   551
                                        #'component:' 
14db1276218c change the spec;
ca
parents: 295
diff changeset
   552
                                         #(#SpecCollection
14db1276218c change the spec;
ca
parents: 295
diff changeset
   553
                                            #'collection:' 
14db1276218c change the spec;
ca
parents: 295
diff changeset
   554
                                             #(
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   555
                                               #(#HorizontalPanelViewSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   556
                                                  #'name:' 'panelViewButtons'
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   557
                                                  #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0)
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   558
                                                  #'component:' 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   559
                                                   #(#SpecCollection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   560
                                                      #'collection:' 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   561
                                                       #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   562
                                                         #(#ArrowButtonSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   563
                                                            #'name:' 'moveLeft'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   564
                                                            #'activeHelpKey:' #moveSelectionLeft
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   565
                                                            #'tabable:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   566
                                                            #'model:' #moveSelectionLeft
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   567
                                                            #'enableChannel:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   568
                                                            #'isTriggerOnDown:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   569
                                                            #'direction:' #left
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   570
                                                            #'extent:' #(#Point 22 22)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   571
                                                        )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   572
                                                         #(#ArrowButtonSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   573
                                                            #'name:' 'moveRight'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   574
                                                            #'activeHelpKey:' #moveSelectionRight
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   575
                                                            #'model:' #moveSelectionRight
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   576
                                                            #'enableChannel:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   577
                                                            #'isTriggerOnDown:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   578
                                                            #'direction:' #right
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   579
                                                            #'extent:' #(#Point 22 22)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   580
                                                        )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   581
                                                         #(#ArrowButtonSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   582
                                                            #'name:' 'moveDown'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   583
                                                            #'activeHelpKey:' #moveSelectionDown
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   584
                                                            #'model:' #moveSelectionDown
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   585
                                                            #'enableChannel:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   586
                                                            #'isTriggerOnDown:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   587
                                                            #'direction:' #down
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   588
                                                            #'extent:' #(#Point 22 22)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   589
                                                        )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   590
                                                         #(#ArrowButtonSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   591
                                                            #'name:' 'moveUp'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   592
                                                            #'activeHelpKey:' #moveSelectionUp
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   593
                                                            #'model:' #moveSelectionUp
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   594
                                                            #'enableChannel:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   595
                                                            #'isTriggerOnDown:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   596
                                                            #'direction:' #up
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   597
                                                            #'extent:' #(#Point 22 22)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   598
                                                        )
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   599
                                                         #(#LabelSpec
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   600
                                                            #'name:' 'label1'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   601
                                                            #'label:' ' '
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   602
                                                            #'extent:' #(#Point 14 22)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   603
                                                        )
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   604
                                                         #(#CheckBoxSpec
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   605
                                                            #'name:' 'checkBox1'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   606
                                                            #'model:' #galleryShown
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   607
                                                            #'label:' 'Gallery'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   608
                                                            #'extent:' #(#Point 82 22)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   609
                                                        )
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   610
                                                         #(#CheckBoxSpec
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   611
                                                            #'name:' 'checkBox2'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   612
                                                            #'model:' #painterShown
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   613
                                                            #'label:' 'Canvas'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   614
                                                            #'extent:' #(#Point 119 22)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   615
                                                        )
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   616
                                                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   617
                                                  )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   618
                                                  #'level:' 1
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   619
                                                  #'horizontalLayout:' #left
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   620
                                                  #'verticalLayout:' #top
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   621
                                                  #'horizontalSpace:' 4
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   622
                                                  #'verticalSpace:' 4
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   623
                                              )
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   624
                                               #(#NoteBookViewSpec
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   625
                                                  #'name:' 'noteBook'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   626
                                                  #'layout:' #(#LayoutFrame 0 0.0 26 0.0 0 1.0 -30 1.0)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   627
                                                  #'enableChannel:' #enableChannel
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   628
                                                  #'tabable:' true
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   629
                                                  #'model:' #tabModel
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   630
                                                  #'menu:' #tabList
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   631
                                                  #'style:' #(#FontDescription #helvetica #medium #roman 10)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   632
                                                  #'canvas:' #noteBookView
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   633
                                              )
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   634
                                               #(#HorizontalPanelViewSpec
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   635
                                                  #'name:' 'modifyPanel'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   636
                                                  #'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   637
                                                  #'component:' 
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   638
                                                   #(#SpecCollection
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   639
                                                      #'collection:' 
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   640
                                                       #(
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   641
                                                         #(#ActionButtonSpec
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   642
                                                            #'name:' 'cancelButton'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   643
                                                            #'activeHelpKey:' #cancel
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   644
                                                            #'label:' 'Cancel'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   645
                                                            #'tabable:' true
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   646
                                                            #'model:' #cancel
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   647
                                                            #'enableChannel:' #modifiedChannel
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   648
                                                            #'extent:' #(#Point 179 24)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   649
                                                        )
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   650
                                                         #(#ActionButtonSpec
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   651
                                                            #'name:' 'acceptButton'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   652
                                                            #'activeHelpKey:' #accept
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   653
                                                            #'label:' 'OK'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   654
                                                            #'tabable:' true
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   655
                                                            #'model:' #accept
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   656
                                                            #'enableChannel:' #modifiedChannel
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   657
                                                            #'extent:' #(#Point 180 24)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   658
                                                        )
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   659
                                                      )
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   660
                                                  )
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   661
                                                  #'horizontalLayout:' #fitSpace
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   662
                                                  #'verticalLayout:' #fitSpace
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   663
                                                  #'horizontalSpace:' 3
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   664
                                                  #'verticalSpace:' 3
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   665
                                              )
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   666
                                            )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   667
                                        )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   668
                                        #'borderWidth:' 1
14db1276218c change the spec;
ca
parents: 295
diff changeset
   669
                                    )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   670
                                  )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   671
                              )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   672
                              #'level:' 1
14db1276218c change the spec;
ca
parents: 295
diff changeset
   673
                              #'handles:' #(#Any 0.329435 1.0)
14db1276218c change the spec;
ca
parents: 295
diff changeset
   674
                          )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   675
                           #(#TextEditorSpec
14db1276218c change the spec;
ca
parents: 295
diff changeset
   676
                              #'name:' 'Transcript'
14db1276218c change the spec;
ca
parents: 295
diff changeset
   677
                              #'hasHorizontalScrollBar:' true
14db1276218c change the spec;
ca
parents: 295
diff changeset
   678
                              #'hasVerticalScrollBar:' true
14db1276218c change the spec;
ca
parents: 295
diff changeset
   679
                              #'miniScrollerHorizontal:' true
14db1276218c change the spec;
ca
parents: 295
diff changeset
   680
                              #'miniScrollerVertical:' true
14db1276218c change the spec;
ca
parents: 295
diff changeset
   681
                          )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   682
                        )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   683
                    )
14db1276218c change the spec;
ca
parents: 295
diff changeset
   684
                    #'handles:' #(#Any 0.880597 1.0)
14db1276218c change the spec;
ca
parents: 295
diff changeset
   685
                )
486
2a1024483349 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 482
diff changeset
   686
                 #(#UISubSpecification
2a1024483349 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 482
diff changeset
   687
                    #'name:' 'infoBarSubSpec'
2a1024483349 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 482
diff changeset
   688
                    #'layout:' #(#LayoutFrame 0 0.0 -22 1 0 1.0 0 1.0)
2a1024483349 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 482
diff changeset
   689
                    #'majorKey:' #ToolApplicationModel
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   690
                    #'minorKey:' #windowSpecForInfoBarWithClock
448
9f115893b4df info bar added
tz
parents: 447
diff changeset
   691
                )
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   692
              )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   693
          )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   694
      )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   695
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   696
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   697
!UIPainter class methodsFor:'menu specs'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   698
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   699
menu
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   700
    "this window spec was automatically generated by the ST/X MenuEditor"
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   701
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   702
    "do not manually edit this - the builder may not be able to
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   703
     handle the specification if its corrupted."
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   704
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   705
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   706
     MenuEditor new openOnClass:UIPainter andSelector:#menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   707
     (Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   708
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   709
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   710
    <resource: #menu>
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   711
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   712
    ^
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   713
     
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   714
       #(#Menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   715
          
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   716
           #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   717
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   718
                #'label:' 'About'
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   719
                #'labelImage:' #(#ResourceRetriever nil #menuIcon)
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   720
                #'submenuChannel:' #menuAbout
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   721
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   722
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   723
                #'label:' 'File'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   724
                #'value:' #file
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   725
                #'enabled:' #enableChannel
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   726
                #'submenu:' 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   727
                 #(#Menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   728
                    
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   729
                     #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   730
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   731
                          #'label:' 'New'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   732
                          #'value:' #doNew
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   733
                          #'activeHelpKey:' #fileNew
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   734
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   735
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   736
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   737
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   738
                       #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   739
                          #'label:' 'Load...'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   740
                          #'value:' #doFromClass
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   741
                          #'activeHelpKey:' #fileLoad
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   742
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   743
                       #(#MenuItem
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   744
                          #'label:' 'Load Subspec...'
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   745
                          #'value:' #loadSubspec
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   746
                          #'activeHelpKey:' #fileLoadSubspec
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   747
                      )
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   748
                       #(#MenuItem
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   749
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   750
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   751
                       #(#MenuItem
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   752
                          #'label:' 'Save'
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   753
                          #'value:' #doInstallSpec
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   754
                          #'activeHelpKey:' #fileSave
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   755
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   756
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   757
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   758
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   759
                       #(#MenuItem
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   760
                          #'label:' 'Define Class And Selector...'
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   761
                          #'value:' #defineClassAndSelector
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   762
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   763
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   764
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   765
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   766
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   767
                          #'label:' 'Create Aspect Methods'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   768
                          #'value:' #doInstallAspects
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   769
                          #'enabled:' #hasSpecClass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   770
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   771
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   772
                          #'label:' 'Create Hook Methods'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   773
                          #'value:' #doInstallHooks
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   774
                          #'enabled:' #hasSpecClass
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   775
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   776
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   777
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   778
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   779
                       #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   780
                          #'label:' 'Pick An Interface'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   781
                          #'value:' #doPickAView
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   782
                          #'activeHelpKey:' #filePickAnInterface
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   783
                      )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   784
                       #(#MenuItem
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   785
                          #'label:' '-'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   786
                      )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   787
                       #(#MenuItem
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   788
                          #'label:' 'Show Interface Spec'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   789
                          #'value:' #doWindowSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   790
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   791
                       #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   792
                          #'label:' 'Browse Interface Class'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   793
                          #'value:' #doBrowseAppClass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   794
                          #'enabled:' #hasSpecClass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   795
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   796
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   797
                          #'label:' 'Browse Aspect Methods'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   798
                          #'value:' #doBrowseAspectMethods
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   799
                          #'enabled:' #hasSpecClass
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   800
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   801
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   802
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   803
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   804
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   805
                          #'label:' 'Exit'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   806
                          #'value:' #closeRequest
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   807
                          #'activeHelpKey:' #fileExit
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   808
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   809
                    ) nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   810
                    nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   811
                )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   812
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   813
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   814
                #'label:' 'Edit'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   815
                #'submenuChannel:' #menuEdit
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   816
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   817
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   818
                #'label:' 'Align'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   819
                #'submenuChannel:' #menuAlign
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   820
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   821
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   822
                #'label:' 'Test'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   823
                #'submenu:' 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   824
                 #(#Menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   825
                    
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   826
                     #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   827
                       #(#MenuItem
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   828
                          #'label:' 'Start Application'
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   829
                          #'value:' #doStartApplication
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   830
                          #'activeHelpKey:' #testStartApplication
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   831
                      )
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   832
                       #(#MenuItem
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   833
                          #'label:' '-'
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   834
                      )
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   835
                       #(#MenuItem
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   836
                          #'label:' 'Geometry Test Mode'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   837
                          #'indication:' #'testMode:'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   838
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   839
                    ) nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   840
                    nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   841
                )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   842
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   843
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   844
                #'label:' 'Settings'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   845
                #'submenu:' 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   846
                 #(#Menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   847
                    
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   848
                     #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   849
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   850
                          #'label:' 'Undo Manager'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   851
                          #'value:' #openUndoMenu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   852
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   853
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   854
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   855
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   856
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   857
                          #'label:' 'Grid Manager'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   858
                          #'value:' #gridMenu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   859
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   860
                    ) nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   861
                    nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   862
                )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   863
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   864
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   865
                #'label:' 'History'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   866
                #'submenuChannel:' #menuHistory
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   867
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   868
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   869
                #'label:' 'Help'
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
   870
                #'startGroup:' #right
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   871
                #'submenuChannel:' #menuHelp
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   872
            )
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   873
          ) nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   874
          nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   875
      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   876
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   877
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   878
menuAlign
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   879
    "this window spec was automatically generated by the ST/X MenuEditor"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   880
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   881
    "do not manually edit this - the builder may not be able to
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   882
     handle the specification if its corrupted."
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   883
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   884
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   885
     MenuEditor new openOnClass:UIPainter andSelector:#menuAlign
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   886
     (Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   887
    "
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   888
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   889
    <resource: #menu>
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   890
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   891
    ^
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   892
     
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   893
       #(#Menu
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   894
          
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   895
           #(
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
   896
             #(#MenuItem
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   897
                #'label:' 'Align Left'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   898
                #'value:' #alignSelectionLeft
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   899
                #'activeHelpKey:' #alignSelectionLeft
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   900
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   901
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignL 'Align Left')
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   902
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   903
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   904
                #'label:' 'Align Right'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   905
                #'value:' #alignSelectionRight
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   906
                #'activeHelpKey:' #alignSelectionRight
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   907
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   908
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignR 'Align Right')
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   909
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   910
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   911
                #'label:' 'Align Left & Right'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   912
                #'value:' #alignSelectionLeftAndRight
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   913
                #'activeHelpKey:' #alignSelectionLeftAndRight
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   914
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   915
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignLR 'Align Left & Right')
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   916
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   917
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   918
                #'label:' 'Align top'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   919
                #'value:' #alignSelectionTop
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   920
                #'activeHelpKey:' #alignSelectionTop
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   921
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   922
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignT 'Align top')
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   923
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   924
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   925
                #'label:' 'Align Bottom'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   926
                #'value:' #alignSelectionBottom
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   927
                #'activeHelpKey:' #alignSelectionBottom
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   928
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   929
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignB 'Align Bottom')
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   930
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   931
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   932
                #'label:' 'Align Top & Bottom'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   933
                #'value:' #alignSelectionTopAndBottom
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   934
                #'activeHelpKey:' #alignSelectionTopAndBottom
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   935
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   936
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignTB 'Align Top & Bottom')
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   937
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   938
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   939
                #'label:' 'Align Centered Horizontal'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   940
                #'value:' #alignSelectionCenterHor
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   941
                #'activeHelpKey:' #alignSelectionCenterHor
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   942
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   943
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterH 'Align Centered Horizontal')
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   944
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   945
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   946
                #'label:' 'Align Centered Vertical'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   947
                #'value:' #alignSelectionCenterVer
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   948
                #'activeHelpKey:' #alignSelectionCenterVer
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   949
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   950
                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterV 'Align Centered Vertical')
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   951
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   952
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   953
                #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   954
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   955
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   956
                #'label:' 'Spread Horizontal'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   957
                #'value:' #spreadSelectionHor
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   958
                #'activeHelpKey:' #spreadSelectionHor
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   959
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   960
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   961
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   962
                #'label:' 'Spread Vertical'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   963
                #'value:' #spreadSelectionVer
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   964
                #'activeHelpKey:' #spreadSelectionVer
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   965
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   966
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   967
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   968
                #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   969
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   970
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   971
                #'label:' 'Center Horizontal In Frame'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   972
                #'value:' #centerSelectionHor
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   973
                #'activeHelpKey:' #centerSelectionHor
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   974
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   975
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   976
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   977
                #'label:' 'Center Vertical In Frame'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   978
                #'value:' #centerSelectionVer
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   979
                #'activeHelpKey:' #centerSelectionVer
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   980
                #'enabled:' #hasSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   981
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   982
          ) nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   983
          nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   984
      )
495
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   985
f356a6636eef disable hook & browse menu items, if there is no class yet.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   986
    "Modified: / 27.1.1998 / 21:27:33 / cg"
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   987
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   988
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   989
menuEdit
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   990
    "this window spec was automatically generated by the ST/X MenuEditor"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   991
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   992
    "do not manually edit this - the builder may not be able to
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   993
     handle the specification if its corrupted."
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   994
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   995
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   996
     MenuEditor new openOnClass:UIPainter andSelector:#menuEdit
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   997
     (Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   998
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   999
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1000
    <resource: #menu>
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1001
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1002
    ^
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1003
     
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1004
       #(#Menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1005
          
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1006
           #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1007
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1008
                #'label:' 'Cut'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1009
                #'value:' #deleteSelection
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1010
                #'activeHelpKey:' #editCut
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1011
                #'enabled:' #hasSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1012
                #'shortcutKeyCharacter:' #Cut
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1013
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1014
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1015
                #'label:' 'Copy'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1016
                #'value:' #copySelection
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1017
                #'activeHelpKey:' #editCopy
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1018
                #'enabled:' #hasSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1019
                #'shortcutKeyCharacter:' #Copy
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1020
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1021
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1022
                #'label:' 'Paste'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1023
                #'nameKey:' #paste
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1024
                #'value:' #paste
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1025
                #'activeHelpKey:' #editPaste
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1026
                #'enabled:' #canPaste
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1027
                #'submenu:' 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1028
                 #(#Menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1029
                    
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1030
                     #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1031
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1032
                          #'label:' 'Paste'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1033
                          #'value:' #pasteBuffer
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1034
                          #'activeHelpKey:' #pasteBuffer
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1035
                          #'shortcutKeyCharacter:' #Paste
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1036
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1037
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1038
                          #'label:' 'Keep Layout'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1039
                          #'value:' #pasteWithLayout
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1040
                          #'activeHelpKey:' #pasteWithLayout
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1041
                          #'enabled:' #canKeepLayoutInSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1042
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1043
                    ) nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1044
                    nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1045
                )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1046
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1047
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1048
                #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1049
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1050
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1051
                #'label:' 'Undo'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1052
                #'nameKey:' #undo
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1053
                #'value:' #undoLast
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1054
                #'activeHelpKey:' #editUndo
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1055
                #'enabled:' #hasUndoHistory
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1056
                #'shortcutKeyCharacter:' #Cmdu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1057
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1058
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1059
                #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1060
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1061
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1062
                #'label:' 'Align'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1063
                #'submenuChannel:' #menuAlign
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1064
            )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1065
             #(#MenuItem
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1066
                #'label:' 'Move'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1067
                #'submenuChannel:' #menuMove
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1068
            )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1069
             #(#MenuItem
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1070
                #'label:' 'Dimension'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1071
                #'value:' #dimension
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1072
                #'enabled:' #hasSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1073
                #'submenu:' 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1074
                 #(#Menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1075
                    
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1076
                     #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1077
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1078
                          #'label:' 'Default Extent'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1079
                          #'value:' #setToDefaultExtent
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1080
                          #'activeHelpKey:' #setToDefaultExtent
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1081
                          #'enabled:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1082
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1083
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1084
                          #'label:' 'Default Width'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1085
                          #'value:' #setToDefaultWidth
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1086
                          #'activeHelpKey:' #setToDefaultWidth
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1087
                          #'enabled:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1088
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1089
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1090
                          #'label:' 'Default Height'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1091
                          #'value:' #setToDefaultHeight
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1092
                          #'activeHelpKey:' #setToDefaultHeight
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1093
                          #'enabled:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1094
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1095
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1096
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1097
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1098
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1099
                          #'label:' 'Copy Extent'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1100
                          #'value:' #copyExtent
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1101
                          #'activeHelpKey:' #copyExtent
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1102
                          #'enabled:' #hasSingleSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1103
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1104
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1105
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1106
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1107
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1108
                          #'label:' 'Paste Extent'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1109
                          #'value:' #pasteExtent
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1110
                          #'activeHelpKey:' #pasteExtent
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1111
                          #'enabled:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1112
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1113
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1114
                          #'label:' 'Paste Width'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1115
                          #'value:' #pasteWidth
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1116
                          #'activeHelpKey:' #pasteWidth
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1117
                          #'enabled:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1118
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1119
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1120
                          #'label:' 'Paste Height'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1121
                          #'value:' #pasteHeight
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1122
                          #'activeHelpKey:' #pasteHeight
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1123
                          #'enabled:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1124
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1125
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1126
                          #'label:' '-'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1127
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1128
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1129
                          #'label:' 'Copy Layout'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1130
                          #'value:' #copyLayout
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1131
                          #'activeHelpKey:' #copyLayout
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1132
                          #'enabled:' #hasSingleSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1133
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1134
                       #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1135
                          #'label:' 'Paste Layout'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1136
                          #'value:' #pasteLayout
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1137
                          #'activeHelpKey:' #pasteLayout
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1138
                          #'enabled:' #canMoveOrAlignSelection
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1139
                      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1140
                    ) nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1141
                    nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1142
                )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1143
            )
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1144
          ) nil
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1145
          nil
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1146
      )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1147
!
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1148
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1149
menuMove
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1150
    "this window spec was automatically generated by the ST/X MenuEditor"
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1151
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1152
    "do not manually edit this - the builder may not be able to
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1153
     handle the specification if its corrupted."
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1154
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1155
    "
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1156
     MenuEditor new openOnClass:UIPainter andSelector:#menuMove
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1157
     (Menu new fromLiteralArrayEncoding:(UIPainter menuMove)) startUp
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1158
    "
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1159
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1160
    <resource: #menu>
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1161
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1162
    ^
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1163
     
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1164
       #(#Menu
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1165
          
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1166
           #(
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1167
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1168
                #'label:' 'Move Up'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1169
                #'value:' #doStepUp
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1170
                #'activeHelpKey:' #moveSelectionUp
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1171
                #'enabled:' #canMoveOrAlignSelection
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1172
                #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #upIcon 'Move Up')
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1173
            )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1174
             #(#MenuItem
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1175
                #'label:' 'Move Down'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1176
                #'value:' #doStepDown
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1177
                #'activeHelpKey:' #moveSelectionDown
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1178
                #'enabled:' #canMoveOrAlignSelection
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1179
                #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #downIcon 'Move Down')
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1180
            )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1181
             #(#MenuItem
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1182
                #'label:' 'Move In'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1183
                #'value:' #doStepIn
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1184
                #'activeHelpKey:' #moveSelectionRight
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1185
                #'enabled:' #canMoveSelectionIntoContainer
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1186
                #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #downRightIcon 'Move In')
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1187
            )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1188
             #(#MenuItem
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1189
                #'label:' 'Move Out'
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1190
                #'value:' #doStepOut
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1191
                #'activeHelpKey:' #moveSelectionLeft
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1192
                #'enabled:' #canMoveSelectionOutOfContainer
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1193
                #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #leftDownIcon 'Move Out')
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1194
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1195
          ) nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1196
          nil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1197
      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1198
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1199
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1200
menuToolbar
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1201
    "this window spec was automatically generated by the ST/X MenuEditor"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1202
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1203
    "do not manually edit this - the builder may not be able to
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1204
     handle the specification if its corrupted."
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1205
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1206
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1207
     MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1208
     (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1209
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1210
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1211
    <resource: #menu>
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1212
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1213
    ^
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1214
     
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1215
       #(#Menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1216
          
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1217
           #(
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1218
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1219
                #'label:' 'Start'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1220
                #'isButton:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1221
                #'value:' #doStartApplication
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1222
                #'activeHelpKey:' #testStartApplication
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1223
                #'labelImage:' #(#ResourceRetriever nil #startIcon)
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1224
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1225
             #(#MenuItem
518
435dcb241555 single lines in tool bar removed
tz
parents: 513
diff changeset
  1226
                #'label:' ''
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1227
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1228
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1229
                #'label:' 'New'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1230
                #'isButton:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1231
                #'value:' #doNew
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1232
                #'activeHelpKey:' #fileNew
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1233
                #'labelImage:' #(#ResourceRetriever nil #newIcon)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1234
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1235
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1236
                #'label:' 'Load'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1237
                #'isButton:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1238
                #'value:' #doFromClass
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1239
                #'activeHelpKey:' #fileLoad
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1240
                #'labelImage:' #(#ResourceRetriever nil #loadIcon)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1241
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1242
             #(#MenuItem
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1243
                #'label:' 'Save'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1244
                #'isButton:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1245
                #'value:' #doInstallSpec
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1246
                #'activeHelpKey:' #fileSave
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1247
                #'labelImage:' #(#ResourceRetriever nil #saveIcon)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1248
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1249
             #(#MenuItem
518
435dcb241555 single lines in tool bar removed
tz
parents: 513
diff changeset
  1250
                #'label:' ''
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1251
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1252
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1253
                #'label:' 'Move Up'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1254
                #'isButton:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1255
                #'value:' #doStepUp
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1256
                #'activeHelpKey:' #moveSelectionUp
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1257
                #'enabled:' #canMoveOrAlignSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1258
                #'labelImage:' #(#ResourceRetriever nil #upIcon)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1259
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1260
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1261
                #'label:' 'Move Down'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1262
                #'isButton:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1263
                #'value:' #doStepDown
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1264
                #'activeHelpKey:' #moveSelectionDown
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1265
                #'enabled:' #canMoveOrAlignSelection
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1266
                #'labelImage:' #(#ResourceRetriever nil #downIcon)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1267
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1268
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1269
                #'label:' 'Move In'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1270
                #'isButton:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1271
                #'value:' #doStepIn
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1272
                #'activeHelpKey:' #moveSelectionRight
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1273
                #'enabled:' #canMoveSelectionIntoContainer
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1274
                #'labelImage:' #(#ResourceRetriever nil #downRightIcon)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1275
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1276
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1277
                #'label:' 'Move Out'
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1278
                #'isButton:' true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1279
                #'value:' #doStepOut
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1280
                #'activeHelpKey:' #moveSelectionLeft
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1281
                #'enabled:' #canMoveSelectionOutOfContainer
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1282
                #'labelImage:' #(#ResourceRetriever nil #leftDownIcon)
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1283
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1284
             #(#MenuItem
518
435dcb241555 single lines in tool bar removed
tz
parents: 513
diff changeset
  1285
                #'label:' ''
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1286
            )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1287
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1288
                #'label:' 'Align left'
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1289
                #'isButton:' true
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1290
                #'value:' #alignSelectionLeft
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1291
                #'activeHelpKey:' #alignSelectionLeft
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1292
                #'labelImage:' #(#ResourceRetriever nil #iconAlignL)
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1293
            )
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1294
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1295
                #'label:' 'Align right'
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1296
                #'isButton:' true
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1297
                #'value:' #alignSelectionRight
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1298
                #'activeHelpKey:' #alignSelectionRight
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1299
                #'labelImage:' #(#ResourceRetriever nil #iconAlignR)
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1300
            )
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1301
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1302
                #'label:' 'Align left & right'
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1303
                #'isButton:' true
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1304
                #'value:' #alignSelectionLeftAndRight
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1305
                #'activeHelpKey:' #alignSelectionLeftAndRight
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1306
                #'labelImage:' #(#ResourceRetriever nil #iconAlignLR)
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1307
            )
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1308
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1309
                #'label:' 'Align top'
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1310
                #'isButton:' true
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1311
                #'value:' #alignSelectionTop
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1312
                #'activeHelpKey:' #alignSelectionTop
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1313
                #'labelImage:' #(#ResourceRetriever nil #iconAlignT)
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1314
            )
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1315
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1316
                #'label:' 'Align bottom'
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1317
                #'isButton:' true
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1318
                #'value:' #alignSelectionBottom
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1319
                #'activeHelpKey:' #alignSelectionBottom
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1320
                #'labelImage:' #(#ResourceRetriever nil #iconAlignB)
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1321
            )
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1322
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1323
                #'label:' 'Align top & bottom'
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1324
                #'isButton:' true
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1325
                #'value:' #alignSelectionTopAndBottom
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1326
                #'activeHelpKey:' #alignSelectionTopAndBottom
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1327
                #'labelImage:' #(#ResourceRetriever nil #iconAlignTB)
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1328
            )
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1329
             #(#MenuItem
518
435dcb241555 single lines in tool bar removed
tz
parents: 513
diff changeset
  1330
                #'label:' ''
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1331
            )
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1332
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1333
                #'label:' 'Align centered horizontal'
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1334
                #'isButton:' true
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1335
                #'value:' #alignSelectionCenterHor
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1336
                #'activeHelpKey:' #alignSelectionCenterHor
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1337
                #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterH)
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1338
            )
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1339
             #(#MenuItem
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1340
                #'label:' 'Align centered vertical'
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1341
                #'isButton:' true
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1342
                #'value:' #alignSelectionCenterVer
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1343
                #'activeHelpKey:' #alignSelectionCenterVer
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1344
                #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterV)
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1345
            )
437
6317d2f08662 button style added
tz
parents: 394
diff changeset
  1346
          ) nil
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1347
          nil
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1348
      )
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1349
! !
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1350
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1351
!UIPainter class methodsFor:'resources'!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1352
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1353
iconAlignB
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1354
    "Generated by the Image Editor"
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1355
    "
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1356
    ImageEditor openOnClass:self andSelector:#iconAlignB
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1357
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1358
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1359
    <resource: #image>
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1360
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1361
    ^Icon
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1362
        constantNamed:#'UIPainter iconAlignB'
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1363
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@'); yourself); yourself]!
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1364
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1365
iconAlignCenterH
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1366
    "Generated by the Image Editor"
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1367
    "
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1368
    ImageEditor openOnClass:self andSelector:#iconAlignCenterH
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1369
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1370
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1371
    <resource: #image>
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1372
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1373
    ^Icon
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1374
        constantNamed:#'UIPainter iconAlignCenterH'
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1375
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUUUUUUPV*****)PV*****)PUUUMUUUPUUT?UUUPUUS?5UU\UUO?=UUWUT???UUPUTUUUUUPUUUUUUUPV*****)PV*****)PUUUMUUUPUUT?UUUPUUS?5UUPUUO?=UUPUT???UUWUTUUUUUPUUUUUUUPUUUUUUUP'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BO??0O??0@G@@@O @@_0@@?8@A?<@A?<@@@@@O??0O??3@G@@@O @@_0@@?8@A?<@A?<@@@@@@@@@'); yourself); yourself]!
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1376
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1377
iconAlignCenterV
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1378
    "Generated by the Image Editor"
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1379
    "
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1380
    ImageEditor openOnClass:self andSelector:#iconAlignCenterV
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1381
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1382
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1383
    <resource: #image>
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1384
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1385
    ^Icon
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1386
        constantNamed:#'UIPainter iconAlignCenterV'
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1387
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUV%UV%PUUV%UV%PUUV%UV%PTEV$EV%PT=V$=V%PT?V$?V%PT?6$?6%WT?>$?>%PT?>$?>%_T?6$?6%PT?V$?V%PT=V$=V%PT5V$5V%WUUV%UV%PUUV%UV%PUUV%UV%_UUV%UV%WUUV%UV%PUUUUUUUPUUUUUUUQ'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@LA!!@LA @LA LM!! NM1 OM9 O-= O=? O=? O=? O-= OM9 NM1 DL!!#@LA @LA @LA @LA @@@C@@@@'); yourself); yourself]!
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1388
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1389
iconAlignL
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1390
    "Generated by the Image Editor"
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1391
    "
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1392
    ImageEditor openOnClass:self andSelector:#iconAlignL
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1393
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1394
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1395
    <resource: #image>
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1396
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1397
    ^Icon
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1398
        constantNamed:#'UIPainter iconAlignL'
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1399
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@'); yourself); yourself]!
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1400
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1401
iconAlignLR
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1402
    "Generated by the Image Editor"
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1403
    "
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1404
    ImageEditor openOnClass:self andSelector:#iconAlignLR
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1405
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1406
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1407
    <resource: #image>
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1408
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1409
    ^Icon
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1410
        constantNamed:#'UIPainter iconAlignLR'
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1411
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@'); yourself); yourself]!
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1412
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1413
iconAlignR
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1414
    "Generated by the Image Editor"
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1415
    "
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1416
    ImageEditor openOnClass:self andSelector:#iconAlignR
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1417
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1418
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1419
    <resource: #image>
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1420
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1421
    ^Icon
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1422
        constantNamed:#'UIPainter iconAlignR'
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1423
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@'); yourself); yourself]!
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1424
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1425
iconAlignT
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1426
    "Generated by the Image Editor"
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1427
    "
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1428
    ImageEditor openOnClass:self andSelector:#iconAlignT
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1429
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1430
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1431
    <resource: #image>
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1432
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1433
    ^Icon
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1434
        constantNamed:#'UIPainter iconAlignT'
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1435
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@'); yourself); yourself]!
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1436
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1437
iconAlignTB
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1438
    "Generated by the Image Editor"
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1439
    "
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1440
    ImageEditor openOnClass:self andSelector:#iconAlignTB
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1441
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1442
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1443
    <resource: #image>
490
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1444
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1445
    ^Icon
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1446
        constantNamed:#'UIPainter iconAlignTB'
c0e98d01e2d4 new icon method format applied
tz
parents: 486
diff changeset
  1447
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@'); yourself); yourself]! !
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1448
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1449
!UIPainter methodsFor:'actions'!
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1450
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1451
accept
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1452
    "accept changes done to the specification. The component assigned to the
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1453
     specification will change immediately dependant on the attributes derived
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1454
     from the specification.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1455
    "
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1456
    |layout spec prop key layoutTool|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1457
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1458
    self isLayoutToolSelected ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1459
        layoutTool := self layoutTool.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1460
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1461
        (layout := layoutTool layout) notNil ifTrue:[
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1462
            layoutTool layoutType == #Extent ifTrue:[
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1463
                layoutTool layoutView == self painter topView ifTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1464
                    layoutTool layoutView extent:layout
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1465
                ] ifFalse:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1466
                    self painter setExtent:layout
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1467
                ]
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1468
            ] ifFalse:[
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  1469
                self painter setLayout:layout
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1470
            ]
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1471
        ]
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1472
    ] ifFalse:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1473
        spec := self specTool specification.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1474
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1475
        self isHelpToolSelected ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1476
            self helpTool accept.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1477
            key  := self helpTool helpKey.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1478
            prop := treeView propertySelected.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1479
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1480
            prop notNil ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1481
                prop spec activeHelpKey:key
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1482
            ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1483
            spec activeHelpKey:key.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1484
        ] ifFalse:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1485
            self painter updateFromSpec:spec.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1486
        ]
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1487
    ].
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1488
    self modifiedChannel value:false.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1489
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1490
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1491
addWidgetOfSpec: aSpec
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1492
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1493
    |newSel|
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1494
    (newSel := self pasteSpecifications:aSpec keepLayout:false at:0@0) notNil
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1495
    ifTrue:
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1496
    [
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1497
        self select: newSel
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1498
    ]
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1499
    ifFalse:
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1500
    [   
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1501
        treeView selection size = 0
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1502
        ifTrue:
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1503
        [                          
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1504
            treeView selection: #(1).
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1505
        ]
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1506
        ifFalse:
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1507
        [
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1508
            treeView selectNode: (treeView detectNode: [:n| n = treeView selectedNode parent])
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1509
        ].
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1510
        self addWidgetOfSpec: aSpec
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1511
    ]
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1512
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1513
!
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  1514
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1515
cancel
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1516
    "cancel all changes done to the specification; reread attributes from the
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1517
     assigned component
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1518
    "
328
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  1519
    |spec key view|
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1520
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1521
    self isModified ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1522
        (spec := self painter specForSelection) notNil ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1523
            key := spec activeHelpKey.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1524
        ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1525
        self helpTool helpKey:key.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1526
        self specTool specification:spec.
328
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  1527
        view := self layoutTool layoutView.
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  1528
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  1529
        self setViewInLayoutTool:view.
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  1530
        spec class == DataSetSpec ifTrue:[
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  1531
            view columnDescriptors:(spec columns)
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  1532
        ].        
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1533
        self modifiedChannel value:false.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1534
    ]
137
ca
parents: 136
diff changeset
  1535
!
ca
parents: 136
diff changeset
  1536
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1537
moveSelectionDown
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1538
    "move selected components down
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1539
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1540
    self painter moveSelectionDown
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1541
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1542
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1543
moveSelectionLeft
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1544
    "move selected components left
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1545
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1546
    self painter moveSelectionLeft
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1547
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1548
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1549
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1550
moveSelectionRight
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1551
    "move selected components right
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1552
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1553
    self painter moveSelectionRight
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1554
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1555
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1556
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1557
moveSelectionUp
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1558
    "move selected components up
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1559
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1560
    self painter moveSelectionUp
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1561
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1562
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1563
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1564
!UIPainter methodsFor:'aspects'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1565
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1566
canMoveOrAlignSelection
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1567
    "returns a boolean value holder which is true in case that any selection exists
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1568
     and all widgets in the selection can change its layout through to a move or
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1569
     align operation
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1570
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1571
    ^ builder booleanValueAspectFor:#canMoveOrAlignSelection
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1572
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1573
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1574
canMoveSelectionIntoContainer
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1575
    "returns a boolean value holder which is true in case that one component is selected
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1576
     and can change its container widget to the next element in the list which will have
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1577
     the same container.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1578
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1579
    ^ builder booleanValueAspectFor:#canMoveSelectionIntoContainer
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1580
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1581
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1582
canMoveSelectionOutOfContainer
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1583
    "returns a boolean value holder which is true in case that one component is selected
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1584
     which is contained within another component
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1585
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1586
    ^ builder booleanValueAspectFor:#canMoveSelectionOutOfContainer
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1587
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1588
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
  1589
enableChannel
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
  1590
    "true if modifications are allowed otherwise running test
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
  1591
    "
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
  1592
  ^ self painter enableChannel
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1593
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1594
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1595
galleryShown
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1596
    "returns a boolean value holder which is set to true if the gallery is shown
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1597
    "
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1598
    |holder|
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1599
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1600
    (holder := builder bindingAt:#galleryShown) isNil ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1601
        builder aspectAt:#galleryShown put:(holder :=  true asValue).
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1602
        holder addDependent:self
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1603
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1604
    ^ holder
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1605
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1606
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1607
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1608
hasOneSelectionOtherThanCanvas
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1609
    "returns a value holder which is true in case that one component is selected
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1610
     other than the canvas.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1611
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1612
    ^ builder booleanValueAspectFor:#hasOneSelectionOtherThanCanvas
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1613
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1614
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1615
modifiedChannel
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1616
    "returns a boolean value holder which is set to true if something is modified
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1617
     and not accepted
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1618
    "
256
d8643afc8203 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  1619
    ^ builder booleanValueAspectFor:#modifiedChannel
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1620
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1621
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1622
noteBookView
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1623
    "returns the notebook view; initialize components within the notebook
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1624
    "
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1625
    |noteBook channel helpTool layoutTool specTool|
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1626
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1627
    (noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1628
        noteBook   := View new.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1629
        layoutTool := UILayoutTool new.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1630
        helpTool   := UIHelpTool   new.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1631
        helpTool helpSpecFrom:specClass.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1632
        specTool   := UISpecificationTool new.
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1633
        channel    := self modifiedChannel.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1634
152
ca
parents: 149
diff changeset
  1635
        layoutTool masterApplication:self.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1636
        specTool   masterApplication:self.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1637
        helpTool   masterApplication:self.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1638
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1639
        layoutCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1640
        helpCanvas   := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1641
        specCanvas   := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1642
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1643
        layoutCanvas client:layoutTool.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1644
        helpCanvas   client:helpTool.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1645
        specTool builder:(specCanvas client:specTool).
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1646
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1647
        layoutTool masterApplication:self.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1648
        specTool   masterApplication:self.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1649
        helpTool   masterApplication:self.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1650
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1651
        layoutTool modifiedHolder:channel.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1652
        helpTool   modifiedHolder:channel.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1653
        specTool   modifiedHolder:channel.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1654
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1655
        builder aspectAt:#noteBookView put:noteBook.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1656
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1657
    ^ noteBook
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1658
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1659
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1660
painterShown
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1661
    "returns a boolean value holder which is set to true if the painter is shown
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1662
    "
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1663
    |holder|
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1664
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1665
    (holder := builder bindingAt:#painterShown) isNil ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1666
        builder aspectAt:#painterShown put:(holder :=  true asValue).
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1667
        holder addDependent:self
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1668
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1669
    ^ holder
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1670
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1671
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1672
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1673
tabList
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1674
    "returns a value holder which keeps a list of labels assigned to the tabs
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1675
    "
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1676
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1677
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1678
    (holder := builder bindingAt:#tabList) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1679
        builder aspectAt:#tabList put:(holder :=  ValueHolder new).
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1680
        holder value:#( 'Properties' ).
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1681
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1682
    ^ holder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1683
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1684
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1685
tabModel
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1686
    "returns a value holder which keeps the current name of the tab selected
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1687
    "
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1688
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1689
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1690
    (holder := builder bindingAt:#tabModel) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1691
        holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1692
        builder aspectAt:#tabModel put:holder.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1693
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1694
    ^ holder
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1695
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1696
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1697
treeView
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1698
    "returns the selection tree view which holds all widget identifiers
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1699
    "
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1700
    ^ treeView
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1701
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1702
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1703
!UIPainter methodsFor:'binding access'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1704
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1705
aspectFor:aKey
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1706
    "aspect for a key
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1707
    "
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1708
  ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1709
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1710
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1711
!UIPainter methodsFor:'buildin editors'!
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1712
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1713
openDataSetColumnEditor
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1714
    "opens a column editor
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1715
    "
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1716
    |cls aspect editor columns|
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1717
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1718
    cls := self resolveName:specClass.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1719
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1720
    cls isNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1721
        ^ self information:'No application class defined yet!!'
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1722
    ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1723
    aspect := self specTool specification columns.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1724
    editor := DataSetBuilder new.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1725
    editor masterApplication:self.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1726
    editor columns:aspect fromView:(self layoutTool layoutView).
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1727
    editor rowClassName:(self specTool specification rowClassName).
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1728
    editor openModal.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1729
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1730
    editor hasChanged ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1731
        self specTool specification columns:(editor columns).
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1732
        self specTool specification rowClassName:(editor rowClassName).
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1733
        self modifiedChannel value:true.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1734
    ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1735
!
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1736
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1737
openEditMenu
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1738
    "opens a menu editor on current widget
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1739
    "
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1740
    |cls aspect editor|
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1741
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1742
    cls := self resolveName:specClass.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1743
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1744
    cls isNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1745
        ^ self information:'No application class defined yet!!'
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1746
    ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1747
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1748
    cls notNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1749
        (aspect := self specTool specification menuSelector) notNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1750
            aspect := aspect asSymbol
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1751
        ] ifFalse:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1752
            "/ cg: q&d hack ...
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1753
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1754
            aspect := treeView propertySelected.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1755
            aspect notNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1756
                Object errorSignal handle:[:ex |
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1757
                    aspect := nil.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1758
                ] do:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1759
                    aspect := aspect view asMenu.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1760
                ]
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1761
            ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1762
        ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1763
        
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1764
        editor := MenuEditor new.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1765
        editor masterApplication:self.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1766
        editor useHelpDictionary:(self helpTool dictionary).
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1767
        editor openModalOnClass:cls andSelector:aspect.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1768
        self helpTool updateList.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1769
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1770
        editor selectorName ~= aspect ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1771
            editor didInstall ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1772
                self specTool specification menuSelector:editor selectorName asSymbol.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1773
                self modifiedChannel value:true.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1774
                self accept
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1775
            ]
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1776
        ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1777
    ]
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1778
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1779
    "Modified: 31.7.1997 / 14:26:13 / cg"
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1780
!
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1781
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1782
openHierarchicalListEditor
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1783
    "opens a hierarchical list editor editor on current widget
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1784
    "
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1785
    |cls aspect editor|
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1786
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1787
    cls := self resolveName:specClass.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1788
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1789
    cls isNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1790
        ^ self information:'No application class defined yet!!'
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1791
    ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1792
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1793
    (aspect := self specTool specification hierarchicalList) notNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1794
        aspect := aspect asSymbol
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1795
    ] ifFalse:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1796
        "/ cg: q&d hack ...
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1797
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1798
        aspect := treeView propertySelected.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1799
        aspect notNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1800
            Object errorSignal handle:[:ex |
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1801
                aspect := nil.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1802
            ] do:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1803
                aspect := aspect view asMenu.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1804
            ]
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1805
        ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1806
    ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1807
    
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1808
    editor := HierarchicalListEditor new.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1809
    editor masterApplication:self.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1810
    editor openModalOnClass:cls andSelector:aspect.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1811
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1812
    editor selectorName ~= aspect ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1813
        editor didInstall ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1814
            self specTool specification hierarchicalList:editor selectorName asSymbol.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1815
            self modifiedChannel value:true.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1816
            self accept
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1817
        ]
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1818
    ]
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1819
!
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1820
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1821
openTabItemEditor
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1822
    "opens a column editor
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1823
    "
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1824
    |cls aspect editor columns|
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1825
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1826
    cls := self resolveName:specClass.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1827
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1828
    cls isNil ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1829
        ^ self information:'no application class defined yet'
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1830
    ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1831
    aspect := self specTool specification listSelector.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1832
    editor := TabItemEditor new.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1833
    editor masterApplication:self.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1834
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1835
    editor openModalOnClass:cls andSelector:aspect.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1836
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1837
    editor selector ~= aspect ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1838
        editor didInstall ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1839
            self specTool specification listSelector:(editor selector).
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1840
            self modifiedChannel value:true.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1841
            self accept.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1842
        ]
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1843
    ]
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1844
! !
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  1845
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1846
!UIPainter methodsFor:'change & update'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1847
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1848
layoutChanged
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1849
    "called by the painter/canvas whenever the layout of the current selected
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1850
     widget changed
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1851
    "
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1852
    self isModified ifFalse:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1853
        self layoutTool update.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1854
        self modifiedChannel value:false
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1855
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1856
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1857
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1858
propertyChanged
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1859
    "called by the painter/canvas whenever the property of the current selected
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1860
     widget changed
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1861
    "
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1862
    |p|
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1863
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1864
    (p := treeView propertySelected) notNil ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1865
        self specTool specification:(p spec copy).
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1866
        self setViewInLayoutTool:(p view).
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1867
        self modifiedChannel value:false
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1868
    ] ifFalse:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1869
        self layoutTool layoutView notNil ifTrue:[
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1870
            self modifiedChannel value:false.
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1871
            self treeSelection
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1872
        ]
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  1873
    ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1874
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1875
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1876
update:something with:aParameter from:someObject
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1877
    "catch change notifications
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1878
    "
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1879
    someObject == treeView model ifTrue:[
362
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  1880
        (something == #selection
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  1881
        or:[something == #selectionIndex]) ifTrue:[self treeSelection].
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1882
      ^ self
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1883
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1884
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1885
    self galleryShown == someObject ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1886
        (self galleryShown value) ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1887
            self raiseUIView:(selectionPanel window)
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1888
        ] ifFalse:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1889
            self hideUIView:(selectionPanel window)
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1890
        ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1891
      ^ self
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1892
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1893
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1894
    self painterShown == someObject ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1895
        (self painterShown value) ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1896
            self raiseUIView:(self painter topView)
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1897
        ] ifFalse:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1898
            self hideUIView:(self painter topView)
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1899
        ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1900
      ^ self
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1901
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1902
362
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  1903
    "Modified: / 29.10.1997 / 17:48:19 / cg"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1904
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1905
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1906
!UIPainter methodsFor:'event handling'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1907
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1908
doesNotUnderstand:aMessage
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1909
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1910
    |painter|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1911
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1912
    painter := self painter.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1913
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1914
    (painter respondsTo:(aMessage selector)) ifTrue:[
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1915
        ^ aMessage sendTo:painter
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1916
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1917
    super doesNotUnderstand:aMessage
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1918
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1919
! !
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1920
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1921
!UIPainter methodsFor:'help'!
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1922
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1923
openTutorial
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1924
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1925
    self openTutorial: 'doc/online/english/tools/uipainter/TOP.html'
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1926
!
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1927
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1928
showHelp:aHelpText for:view
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1929
    "display active help texts in my own info area."
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1930
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1931
    |txt|
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1932
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1933
    aHelpText isNil ifTrue:[
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1934
        txt := nil
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1935
    ] ifFalse:[
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1936
        txt := self class 
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1937
                convertString:(aHelpText asString)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1938
                maxLineSize:(transcript width // transcript font width)
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1939
               skipLineFeed:true
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1940
    ].
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1941
    transcript hideCursor.
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1942
    transcript contents:txt.
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1943
    ^ true
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1944
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1945
    "Modified: / 29.10.1997 / 22:33:55 / cg"
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1946
! !
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  1947
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
  1948
!UIPainter methodsFor:'printing'!
14db1276218c change the spec;
ca
parents: 295
diff changeset
  1949
14db1276218c change the spec;
ca
parents: 295
diff changeset
  1950
show:aText
14db1276218c change the spec;
ca
parents: 295
diff changeset
  1951
    transcript hideCursor.
14db1276218c change the spec;
ca
parents: 295
diff changeset
  1952
    transcript contents:aText.
14db1276218c change the spec;
ca
parents: 295
diff changeset
  1953
        
14db1276218c change the spec;
ca
parents: 295
diff changeset
  1954
! !
14db1276218c change the spec;
ca
parents: 295
diff changeset
  1955
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1956
!UIPainter methodsFor:'private'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1957
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1958
checkModified
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1959
    "check interface modification
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1960
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1961
    self painter isModified
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1962
    ifTrue:
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1963
    [
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1964
        ((YesNoBox title:'Interface was modified!!')        
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1965
            noText:'Cancel';
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1966
            yesText:'Waste it and proceed';
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1967
            showAtPointer;
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1968
            accepted) ifFalse: [^false].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1969
        self painter resetModification
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1970
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1971
    ^true
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1972
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1973
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1974
hideUIView:aView
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1975
    "hide the view which is an application or top view
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1976
    "
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1977
    aView beIndependent.
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1978
    aView unmap.
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1979
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1980
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1981
raiseTabView
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1982
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1983
    self isLayoutToolSelected ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1984
        layoutCanvas raise
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1985
    ] ifFalse:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1986
        self isHelpToolSelected ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1987
            helpCanvas raise
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1988
        ] ifFalse:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1989
            self specTool selection:tabSelection.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1990
            specCanvas raise
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1991
        ]
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  1992
    ]
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1993
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1994
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1995
raiseUIView:aView
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1996
    "raise the view which is an application or top view
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  1997
    "
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1998
    aView map.
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1999
    aView bePartner.
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2000
!
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2001
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2002
setClass:cls selector:selector
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2003
    "set the application class and the selector under which the
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2004
     window specification should be stored
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2005
    "
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2006
    |clsName superClassName|
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2007
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2008
    clsName := cls name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2009
    superClassName := cls superclass name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2010
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2011
    (self aspectFor:#classNameChannel) value:clsName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2012
    (self aspectFor:#methodNameChannel) value:(selector ? '').
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2013
    (self aspectFor:#superclassNameChannel) value:superClassName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2014
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2015
    self painter 
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2016
            className:clsName 
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2017
            superclassName:superClassName
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2018
            selector:(selector ? '').
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2019
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2020
    self specClass:clsName.
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2021
    specSelector := (selector ? '').
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2022
    specSuperclass := superClassName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2023
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2024
    specClass notNil & selector notNil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2025
    ifTrue:
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2026
    [
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2027
        |className message|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2028
        specClass isClass ifTrue: [className := specClass name].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2029
        specClass isString ifTrue: [className := specClass].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2030
        message := className, ' ', specSelector.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2031
        self addToHistory: message -> #loadFromMessage:.
448
9f115893b4df info bar added
tz
parents: 447
diff changeset
  2032
        self valueOfInfoLabel value: className, ' >> ', specSelector
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2033
    ].
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2034
    "Modified: 24.6.1997 / 19:07:01 / cg"
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2035
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2036
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2037
setViewInLayoutTool:aView
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2038
    "set view for layout tool
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2039
    "
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2040
    |type|
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2041
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2042
    self painter topView == aView ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2043
        type := #Extent
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2044
    ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2045
    self layoutTool layoutView:aView type:type
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2046
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2047
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2048
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2049
specClass:aClass
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2050
    specClass := aClass.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2051
    self helpTool helpSpecFrom:specClass.
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2052
! !
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2053
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2054
!UIPainter methodsFor:'private tools'!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2055
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2056
helpTool
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2057
    "returns the help tool
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2058
    "
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2059
    helpCanvas isNil ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2060
        self noteBookView
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2061
    ].
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2062
    ^ helpCanvas application
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2063
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2064
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2065
layoutTool
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2066
    "returns the layout tool
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2067
    "
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2068
    layoutCanvas isNil ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2069
        self noteBookView
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2070
    ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2071
    ^ layoutCanvas application
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2072
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2073
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2074
painter
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2075
    "returns the painter/canvas view
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2076
    "
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2077
    ^ treeView canvas
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2078
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2079
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2080
specTool
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2081
    "returns the spec tool
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2082
    "
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2083
    specCanvas isNil ifTrue:[
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2084
        self noteBookView
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2085
    ].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2086
    ^ specCanvas application
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2087
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2088
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  2089
!UIPainter methodsFor:'queries'!
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  2090
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2091
hasSpecClass
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2092
    "checks whether an application class is defined
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2093
    "
328
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  2094
    ^ (self resolveName:specClass) notNil
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2095
!
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2096
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2097
hasSpecClassAndSelector
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2098
    "checks whether an application class and a selector under which
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2099
     the window specification is stored is defined.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2100
    "
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2101
    specSelector size > 1 ifTrue:[
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2102
        ^ self hasSpecClass
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2103
    ].
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2104
  ^ false
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2105
!
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2106
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  2107
isHelpToolSelected
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2108
    "returns true if current selected tab in the noteBook is assigned
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2109
     to the 'Help' tool
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2110
    "
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2111
    ^ tabSelection = UIHelpTool label
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2112
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  2113
!
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  2114
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  2115
isLayoutToolSelected
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2116
    "returns true if current selected tab in the noteBook is assigned
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2117
     to the 'Layout' tool
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2118
    "
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2119
    ^ tabSelection = UILayoutTool label
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2120
!
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2121
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2122
isModified
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2123
    "returns true if current specification or layout is modified
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2124
    "
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2125
    ^ self modifiedChannel value
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2126
!
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2127
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2128
isPainterEnabled
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2129
    "returns true if not running in test mode
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2130
    "
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2131
    ^ self painter enabled
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  2132
! !
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  2133
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2134
!UIPainter methodsFor:'selection'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2135
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2136
tabSelection
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2137
    "returns name of current selected tab in the notebook.
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2138
    "
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2139
    ^ tabSelection
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2140
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2141
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2142
tabSelection:something
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2143
    "the tab selection of the notebook changed
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2144
    "
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2145
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2146
    |whatToDo|
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2147
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2148
    (something isNil or:[tabSelection = something]) ifTrue:[
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2149
        ^ self
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2150
    ].
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2151
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2152
    self isModified ifTrue:[
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2153
        whatToDo := DialogBox 
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2154
                        confirmWithCancel:'Accept change made in ' , tabSelection printString , ' section?'
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2155
                        labels:#('Cancel' 'Ignore' 'Accept')
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2156
                        default:3.
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2157
        whatToDo isNil ifTrue:[^self].
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2158
        whatToDo == true ifTrue:[
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2159
            self accept
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2160
        ] ifFalse:[
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2161
            self cancel
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2162
        ]
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2163
    ].
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2164
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2165
    tabSelection := something.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2166
    self raiseTabView.
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2167
    self cancel.
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2168
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2169
    "Modified: / 26.10.1997 / 15:54:15 / cg"
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2170
!
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2171
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2172
treeSelection
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2173
    "called whenever the selection of the treeview changed
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2174
    "
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
  2175
    |view list spec slices size property tabComponent|
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2176
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2177
    self isModified ifTrue:[
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2178
        (self confirm:'Accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2179
            self accept
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2180
        ]
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2181
    ].
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2182
    self canMoveOrAlignSelection        value:(treeView canMoveOrAlignSelection).
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2183
    self canMoveSelectionIntoContainer  value:(treeView canMoveSelectionIntoContainer).
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2184
    self canMoveSelectionOutOfContainer value:(treeView canMoveSelectionOutOfContainer).
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2185
    self hasOneSelectionOtherThanCanvas value:(treeView hasOneSelectionOtherThanCanvas).
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2186
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2187
    treeView isCanvasSelected ifTrue:[
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2188
        spec := treeView canvasSpec.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2189
        view := self painter topView.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2190
    ] ifFalse:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2191
        (property := treeView propertySelected) notNil ifTrue:[
301
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2192
            treeView canResizeSelectedWidget ifTrue:[
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2193
                view := property view.
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2194
            ].
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2195
            spec := property spec copy.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2196
        ]
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2197
    ].
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2198
    tabComponent := builder componentAt:#noteBook.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2199
    self setViewInLayoutTool:view.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2200
    self specTool specification:spec.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2201
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2202
    spec notNil ifTrue:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2203
        self helpTool helpKey:(spec activeHelpKey).
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
  2204
        slices := spec class slices.
114befd1c369 add some help text
ca
parents: 287
diff changeset
  2205
        size   := slices size.
301
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2206
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2207
        view notNil ifTrue:[
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2208
            list := Array new:(size + 2).
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2209
            list at:(size + 2) put:(UILayoutTool label).
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2210
        ] ifFalse:[
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2211
            list := Array new:(size + 1).
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2212
        ].
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
  2213
        1 to:size do:[:i| list at:i put:((slices at:i) first asString)].
114befd1c369 add some help text
ca
parents: 287
diff changeset
  2214
        list at:(size + 1) put:(UIHelpTool   label).
301
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  2215
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2216
        self tabList value:list.
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
  2217
        self show:(spec class name).
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2218
        tabComponent enabled:true.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2219
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2220
        (tabSelection := tabComponent selection) isNil ifTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2221
            tabComponent setSelection:(tabSelection := list first)
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2222
        ].
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2223
        self raiseTabView
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2224
    ] ifFalse:[
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2225
        self helpTool helpKey:nil.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2226
        tabComponent enabled:false.
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
  2227
        self show:nil.
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2228
    ].
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2229
    self modifiedChannel value:false.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2230
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2231
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2232
!UIPainter methodsFor:'startup / release'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2233
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2234
closeRequest
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2235
    "close all windows open by builder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2236
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2237
    self checkModified ifFalse:[^self].
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  2238
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2239
    treeView model removeDependent:self.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2240
    self painter release.
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2241
    ColorMenu releaseResources.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2242
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2243
    selectionPanel notNil ifTrue:[
183
bb0cc63e2cf1 set masterApllication instead of application
ca
parents: 179
diff changeset
  2244
        selectionPanel masterApplication:nil.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2245
        selectionPanel closeRequest
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2246
    ].
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  2247
    selectionPanel := nil.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2248
    treeView       := nil.
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  2249
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2250
    ActiveHelp stopFor:self.
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2251
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2252
    super closeRequest.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2253
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2254
    "Modified: / 27.10.1997 / 00:01:30 / cg"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2255
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2256
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2257
closeRequestFor:aTopView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2258
    "handle a close request for a specific view
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2259
    "
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2260
    |topView|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2261
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2262
    topView := self window.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2263
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2264
    topView == aTopView ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2265
        super closeRequestFor:aTopView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2266
    ] ifFalse:[
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2267
        aTopView = selectionPanel window ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2268
            self galleryShown value:false
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2269
        ] ifFalse:[
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2270
            aTopView == (self painter topView) ifTrue:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2271
                self painterShown value:false
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2272
            ] ifFalse:[
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2273
                aTopView closeRequest
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2274
            ]
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2275
        ].
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  2276
        topView raise.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2277
    ].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2278
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2279
345
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2280
openInterface:aSymbol
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2281
    "open interfaces
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2282
    "
345
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2283
    |painterView painter cls topView|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2284
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2285
    aspects := IdentityDictionary new.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2286
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2287
    aspects at:#classNameChannel put:(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2288
        (specClass notNil ifTrue:[specClass]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2289
                         ifFalse:['NewApplication']) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2290
    ).
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2291
    specSuperclass isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2292
        specClass notNil ifTrue:[
328
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  2293
            (cls := self resolveName:specClass) notNil ifTrue:[
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2294
                specSuperclass := cls superclass name.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2295
            ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2296
        ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2297
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2298
    aspects at:#superclassNameChannel put:(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2299
        (specSuperclass notNil ifTrue:[specSuperclass]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2300
                         ifFalse:['ApplicationModel']) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2301
    ).
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  2302
    aspects at:#superclassNameDefaults put:#('ApplicationModel' 'SimpleDialog') asValue.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2303
    aspects at:#methodNameChannel put:(
161
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  2304
        (specSelector notNil ifTrue:[specSelector asValue]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2305
                            ifFalse:[#windowSpec]) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2306
    ).
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2307
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2308
    treeView    := TreeView new.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2309
    painterView := StandardSystemView new.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2310
    painterView label:'unnamed canvas'.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2311
    painterView extent:300@300.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2312
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2313
    painter := UIPainterView in:painterView.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2314
    painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2315
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2316
    treeView := treeView canvas:painter.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2317
    painter treeView:treeView.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2318
    treeView model addDependent:self.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2319
345
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2320
    super openInterface:aSymbol.
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2321
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
  2322
    transcript := (self builder componentAt:#Transcript) scrolledView.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2323
    topView := self window.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2324
    topView bePartner.
345
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2325
    topView label:'GUI Painter'.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2326
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2327
    painterView openInGroup:(topView windowGroup).
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2328
    painterView bePartner.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2329
    painterView application:self.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2330
    painterView open.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2331
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2332
    painterView application:self.
183
bb0cc63e2cf1 set masterApllication instead of application
ca
parents: 179
diff changeset
  2333
    selectionPanel := UISelectionPanel new.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2334
    selectionPanel allButOpenInterface:#windowSpec.
345
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2335
    selectionPanel window openInGroup:(topView windowGroup).
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2336
    selectionPanel window bePartner.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  2337
    selectionPanel openWindow.
183
bb0cc63e2cf1 set masterApllication instead of application
ca
parents: 179
diff changeset
  2338
    selectionPanel masterApplication:self.
274
2db2e583b3b4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
  2339
345
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2340
    topView iconLabel:'GUI Painter'.
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2341
    topView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2342
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2343
    painterView iconLabel:'GUI Painter'.
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2344
    painterView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2345
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2346
    selectionPanel window iconLabel:'GUI Painter'.
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2347
    selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  2348
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2349
    ActiveHelp startFor:self.
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2350
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  2351
    self valueOfHavingTutorial value: true
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  2352
                                           
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2353
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2354
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2355
openNewWindowCanvas
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2356
    "open new
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2357
    "
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2358
    self open.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2359
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2360
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2361
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2362
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2363
openOnClass:aClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2364
    "open up an interface builder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2365
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2366
    self openOnClass:aClass andSelector:#windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2367
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2368
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2369
openOnClass:aClass andSelector:aSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2370
    "open up an interface builder, fetching a spec from someClass
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2371
     via some selector
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2372
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2373
    |painter|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2374
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  2375
    aClass isNil ifTrue:[
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2376
        (self confirm:'nil class given to UIPainter (class was probably renamed ?)\\Open anyway (to create a new interface) ?' withCRs)
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2377
        ifFalse:[^ nil].
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  2378
    ].
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  2379
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2380
    self openInterface.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2381
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  2382
    aClass notNil ifTrue:[
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  2383
        painter        := self painter.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2384
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2385
        self setClass:aClass selector:aSelector.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2386
"/        specClass      := aClass name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2387
"/        specSuperclass := aClass superclass name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2388
"/        specSelector   := aSelector.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2389
"/
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2390
"/        (aspects at:#classNameChannel) value:specClass.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2391
"/        (aspects at:#superclassNameChannel) value:specSuperclass.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2392
"/        (aspects at:#methodNameChannel) value:specSelector asSymbol.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2393
"/
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2394
"/        painter 
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2395
"/            className:aClass name 
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2396
"/            superclassName:aClass superclass name
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2397
"/            selector:aSelector.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2398
195
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2399
        (aClass respondsTo:aSelector) ifTrue:[
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2400
            painter setupFromSpec:(aClass perform:aSelector).
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2401
        ]
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  2402
    ]
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  2403
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2404
    "Modified: / 25.10.1997 / 19:11:51 / cg"
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2405
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2406
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2407
!UIPainter methodsFor:'user interactions'!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2408
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2409
doBrowseAppClass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2410
    "open a browser on the class"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2411
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2412
    |cls|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2413
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2414
    self painter isModified ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2415
        self warn:'The current interface has not yet been saved.\\The browser will show the code of the old interface.' withCRs.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2416
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2417
    cls := self resolveName:specClass.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2418
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2419
    cls notNil ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2420
        SystemBrowser openInClass:cls
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2421
    ] ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2422
        self information:'No class defined!!'.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2423
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2424
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2425
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2426
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2427
doBrowseAspectMethods
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2428
    "open a browser on the aspect methods"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2429
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2430
    |cls methods|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2431
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2432
    self painter isModified ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2433
        self warn:'The current interface has not yet been saved.\\The browser may show the code of the old aspect methods.' withCRs.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2434
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2435
    cls := self resolveName:specClass.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2436
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2437
    cls notNil ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2438
        methods := self painter aspectMethods.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2439
        methods isEmpty ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2440
            self warn:'No aspect methods have been saved yet!!'.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2441
            ^ self.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2442
        ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2443
        SystemBrowser browseMethods:methods title:'Aspect methods'.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2444
    ] ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2445
        self information:'No class defined!!'.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2446
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2447
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2448
    "Created: / 25.10.1997 / 19:07:55 / cg"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2449
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2450
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2451
doFromClass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2452
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2453
    self loadFromMessage: 
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2454
        (ResourceSelectionBrowser
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2455
            request: 'Load Interface From Class'
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2456
            onSuperclass: nil
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2457
            andClass: specClass
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2458
            andSelector: specSelector
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2459
            withResourceTypes: #(canvas))
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2460
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2461
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2462
doInstallAspects
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2463
    "install aspects and actions
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2464
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2465
    |code|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2466
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2467
    self hasSpecClassAndSelector ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2468
        self defineClassAndSelector
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2469
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2470
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2471
    self checkClassAndSelector ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2472
        ^ self
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2473
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2474
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2475
    self painter className:specClass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2476
        superclassName:specSuperclass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2477
              selector:specSelector.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2478
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2479
    code := self painter generateAspectMethods.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2480
    (ReadStream on:code) fileIn.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2481
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2482
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2483
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2484
doInstallHooks
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2485
    "install application hooks
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2486
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2487
    |code|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2488
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2489
    self hasSpecClassAndSelector ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2490
        self defineClassAndSelector
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2491
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2492
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2493
    self checkClassAndSelector ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2494
        ^ self
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2495
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2496
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2497
    self painter className:specClass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2498
        superclassName:specSuperclass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2499
              selector:specSelector.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2500
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2501
    code := self painter generateHookMethods.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2502
    (ReadStream on:code) fileIn.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2503
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2504
    "Created: / 31.10.1997 / 17:37:54 / cg"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2505
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2506
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2507
doInstallSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2508
    "install window specification
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2509
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2510
    |code painter|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2511
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2512
    self hasSpecClassAndSelector ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2513
        self defineClassAndSelector
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2514
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2515
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2516
    self checkClassAndSelector ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2517
        ^ self
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2518
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2519
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2520
    self isModified ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2521
        (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2522
            self accept
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2523
        ] ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2524
            (self confirm:'Load old interface?') ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2525
                ^ self
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2526
            ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2527
        ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2528
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2529
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2530
    painter := self painter.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2531
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2532
    painter className:specClass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2533
       superclassName:specSuperclass
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2534
             selector:specSelector.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2535
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2536
    code := painter generateWindowSpecMethodSource withCRs.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2537
    painter resetModification.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2538
    (ReadStream on:code) fileIn.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2539
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
  2540
    self helpTool installHelpSpecInto:specClass
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2541
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2542
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2543
doNew
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2544
    "remove all components and associated resources
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2545
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2546
    self painter isModified ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2547
        (self confirm:'Edit a new interface without saving current?') ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2548
            ^ self
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2549
        ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2550
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2551
    self painter removeAll
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2552
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2553
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2554
doPickAView
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2555
    "pick a view and setup specifications
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2556
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2557
    |painter view cls spec app|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2558
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2559
    self painter isModified ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2560
        (self confirm:'pick another interface without saving your modifications ?') ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2561
            ^ self
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2562
        ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2563
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2564
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2565
    (view := Screen current viewFromUser) notNil ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2566
        view == Screen current rootView ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2567
            painter := self painter.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2568
            spec    := UISpecification fromView:view topView.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2569
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2570
         "/ ok, got it
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2571
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2572
            (app := view application) notNil ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2573
                cls := app class
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2574
            ] ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2575
                cls := view class
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2576
            ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2577
            self setClass:cls selector:nil.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2578
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2579
            painter setupFromSpec:spec.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2580
        ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2581
    ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2582
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2583
    "Modified: / 1.11.1997 / 13:47:49 / cg"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2584
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2585
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2586
doStartApplication
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2587
    "start current edited application
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2588
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2589
    |cls app infoMessage|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2590
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2591
    self isModified ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2592
        (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2593
            self accept.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2594
            "/  "XXX must be fixed - canvas changes are not recorded in the history
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2595
            "/  so isModified returns false here
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2596
            "/
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2597
            "/ self painter isModified ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2598
            "/
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2599
                (self confirm:'Reinstall the new interface?' withCRs) ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2600
                    self doInstallSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2601
                ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2602
            "/ ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2603
        ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2604
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2605
    self painter isModified ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2606
        (self confirm:'The current interface has not yet been reinstalled!!\\Start anyway (based upon the previous interface)?' withCRs) ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2607
            ^ self
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2608
        ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2609
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2610
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2611
    (specClass isNil or:[specSelector size < 2]) ifTrue:[
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
  2612
        infoMessage := 'No class and selector defined!!'.
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2613
    ] ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2614
        cls := self resolveName:specClass.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2615
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2616
        cls isNil ifTrue:[
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
  2617
            infoMessage := 'Class does not exist!!'.
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2618
        ] ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2619
            (cls respondsTo:specSelector) ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2620
                infoMessage := ('No method for: #' 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2621
                                , specSelector , ' in ' , cls name
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2622
                                , '\\(did you install the interface?)') withCRs.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2623
            ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2624
        ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2625
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2626
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2627
    infoMessage notNil ifTrue:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2628
        ^ self information:infoMessage
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2629
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2630
    app := cls new.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2631
    (app respondsTo:#openInterface:) ifFalse:[
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2632
        ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2633
    ].        
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2634
    app openInterface:specSelector
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2635
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2636
    "Modified: / 29.10.1997 / 19:01:50 / cg"
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2637
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2638
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2639
doWindowSpec
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2640
   "create the window specification but do not write to application; instead
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2641
    open a view
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2642
   "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2643
   |code v|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2644
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2645
   code := self painter generateWindowSpecMethodSource.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2646
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2647
   v := CodeView open.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2648
   v contents:code.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2649
   v label:'windowSpec'.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2650
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2651
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2652
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2653
loadFromMessage: aMessage
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2654
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2655
    ((aMessage size > 0) and: [self checkModified])
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2656
    ifTrue:
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2657
    [
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2658
        |readStream aClass aSelector|
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2659
        readStream := aMessage readStream.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2660
        (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2661
        ifTrue:
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2662
        [
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2663
            aSelector :=  readStream upToEnd asSymbol.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2664
            self setClass: aClass selector: aSelector.
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2665
            (aClass respondsTo:aSelector) 
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2666
            ifTrue:
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2667
            [
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2668
                self painter setupFromSpec:(aClass perform:aSelector).
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2669
            ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2670
        ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2671
    ]
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2672
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2673
!
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2674
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2675
loadSubspec
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2676
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2677
    |subSpecMessage|
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2678
    (subSpecMessage := ResourceSelectionBrowser
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2679
            request: 'Load Subspec From Class'
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2680
            onSuperclass: nil
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2681
            andClass: specClass
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2682
            andSelector: specSelector
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2683
            withResourceTypes: #(canvas)) notNil
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2684
    ifTrue:
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2685
    [
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2686
        |readStream aClass aSelector|
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2687
        readStream := subSpecMessage readStream.
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2688
        (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2689
        ifTrue:
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2690
        [
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2691
            aSelector :=  readStream upToEnd asSymbol.
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2692
            (aClass name == specClass and: [aSelector == specSelector]) ifTrue: [^self warn: 'Current interface as subspec not allowed!!'].
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2693
            (aClass respondsTo:aSelector) 
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2694
            ifTrue:
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2695
            [
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2696
                self addWidgetOfSpec: (Array with: (UISubSpecification new majorKey: aClass name; minorKey: aSelector))
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2697
            ]
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2698
        ]
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  2699
    ]
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2700
! !
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2701
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2702
!UIPainter methodsFor:'user interactions - dialog'!
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2703
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2704
checkClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2705
    "check for class & superclass"
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2706
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2707
    |superclass cls|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2708
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2709
    specClass isNil ifTrue:[^ false].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2710
328
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  2711
    cls := self resolveName:specClass.
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  2712
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2713
    cls isNil ifTrue:[
328
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  2714
        superclass := self resolveName:specSuperclass.
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  2715
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  2716
        superclass isNil ifTrue:[
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2717
            self warn:'No class named ' , specSuperclass , ' exists!!'.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2718
            ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2719
        ].
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2720
        (self confirm:'Create ' , specClass , '?') ifTrue:[
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2721
            superclass subclass:(specClass asSymbol)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2722
                       instanceVariableNames:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2723
                       classVariableNames:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2724
                       poolDictionaries:''
280
1dd13e8107e2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 274
diff changeset
  2725
                       category:'Applications'.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2726
            ^ true.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2727
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2728
        ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2729
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2730
    cls isBehavior ifFalse:[
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2731
        self warn:'A global named ' , specClass , ' exists, but is no class.'.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2732
        ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2733
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2734
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2735
    specSuperclass isBehavior ifFalse:[
179
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2736
        specSuperclass isEmpty ifFalse:[
328
0e8a4296dec1 add DataSetBuilder
ca
parents: 321
diff changeset
  2737
            superclass := self resolveName:specSuperclass
179
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2738
        ] ifTrue:[
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2739
            specSuperclass := nil.
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2740
        ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2741
    ] ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2742
        superclass := specSuperclass
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2743
    ].
179
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2744
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2745
    specSuperclass notNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2746
        superclass isNil ifTrue:[
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2747
            self warn:'No class named ' , specSuperclass , ' exists!!'.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2748
            ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2749
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2750
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2751
        (cls isSubclassOf:superclass) ifFalse:[
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2752
            self information:('A global named ' , specClass , ' exists,\' ,
206
1c3fb15ffd62 checkClassAndSelector
ca
parents: 197
diff changeset
  2753
                              'but is not a subclass of ' , superclass name , '.\\' ,
1c3fb15ffd62 checkClassAndSelector
ca
parents: 197
diff changeset
  2754
                              'Check and try again if that is not what you want.') withCRs.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2755
        ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2756
    ].
179
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2757
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2758
    superclass isNil ifTrue:[
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2759
        cls notNil ifTrue:[
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2760
            specSuperclass := cls superclass name
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2761
        ]
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2762
    ].
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  2763
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2764
    ^ true
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2765
280
1dd13e8107e2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 274
diff changeset
  2766
    "Modified: 12.8.1997 / 23:39:10 / cg"
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2767
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2768
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2769
defineClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2770
    "launch a dialog to define class, superclass and method"
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2771
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2772
    |again tmp|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2773
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2774
    [
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2775
        again := false.
160
622b88baeff6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
  2776
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2777
        (tmp := specClass) isNil ifTrue:[tmp := 'NewApplication'].
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2778
        aspects at:#classNameChannel put:tmp asValue.
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2779
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2780
        (tmp := specSelector) isNil ifTrue:[tmp := 'windowSpec'].
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2781
        aspects at:#methodNameChannel put:tmp asValue.
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2782
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2783
        (tmp := specSuperclass) isNil ifTrue:[tmp := 'ApplicationModel'].
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  2784
        aspects at:#superclassNameChannel put:tmp asValue.
160
622b88baeff6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
  2785
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2786
        (self openDialogInterface:#nameAndSelectorSpec) ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2787
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2788
            specClass    := (self aspectFor:#classNameChannel) value.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2789
            specSelector := (self aspectFor:#methodNameChannel) value.
161
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  2790
            specSelector notNil ifTrue:[specSelector := specSelector asSymbol].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2791
            specSuperclass := (self aspectFor:#superclassNameChannel) value.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2792
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2793
            (again := self checkClassAndSelector not) ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2794
                self painter className:specClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2795
                        superclassName:specSuperclass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2796
                              selector:specSelector.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2797
            ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2798
        ]
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2799
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2800
    ] doWhile:[again].
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2801
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  2802
    self specClass:specClass.
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2803
!
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2804
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2805
gridMenu
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2806
    "open a dialog for grip parameters configuration
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2807
    "
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2808
    |hspace vspace bindings painter gridPara|
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2809
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2810
    painter  := self painter.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2811
    bindings := IdentityDictionary new.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2812
    gridPara := painter gridParameters copy.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2813
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2814
    bindings at:#showGrid    put:(painter gridShown asValue).
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2815
    bindings at:#alignToGrid put:(painter gridAlign asValue).
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2816
    bindings at:#hspace      put:((gridPara at:1) asValue).
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2817
    bindings at:#vspace      put:((gridPara at:2) asValue).
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2818
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2819
    (self openDialogInterface:#gridParametersSpec withBindings:bindings) ifFalse:[
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2820
        ^ self
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2821
    ].
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2822
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2823
    hspace := (bindings at:#hspace) value ? 5.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2824
    vspace := (bindings at:#vspace) value ? 5.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2825
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2826
    gridPara at:1 put:hspace.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2827
    gridPara at:2 put:vspace.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2828
    gridPara at:5 put:hspace.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2829
    gridPara at:6 put:vspace.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2830
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2831
    painter gridShown:false.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2832
    painter gridAlign:false.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2833
    painter gridParameters:gridPara.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2834
    painter gridAlign:(bindings at:#alignToGrid) value.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2835
    painter gridShown:(bindings at:#showGrid) value.
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2836
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  2837
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2838
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2839
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2840
!UIPainter methodsFor:'user interactions - move'!
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2841
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2842
doStepDown
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2843
    "move selected component after the next component in the hierarchy of
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2844
     its container widget
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2845
    "
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2846
    treeView doStepOver:1
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2847
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2848
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2849
doStepIn
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2850
    "change the container of the selected widget
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2851
    "
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2852
    treeView doStepIn
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2853
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2854
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2855
doStepOut
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2856
    "change the container of the selected widget
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2857
    "
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2858
    treeView doStepOut
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2859
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2860
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2861
doStepUp
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2862
    "move selected component before the previous component in the hierarchy of
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2863
     its container widget
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2864
    "
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2865
    treeView doStepOver:-1
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2866
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2867
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2868
!UIPainter::TreeView class methodsFor:'constants'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2869
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2870
defaultNameOfCanvas
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2871
    "returns the default name (id) of the application
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2872
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2873
    ^ 'Canvas'
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2874
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2875
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2876
!UIPainter::TreeView class methodsFor:'documentation'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2877
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2878
documentation
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2879
"
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2880
    selection in tree view; only used by the UIPainter
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2881
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2882
    [see also:]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2883
        SelectionInTreeView
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2884
        SelectionInTree
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2885
        TreeItem
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2886
        UIPainter
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2887
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2888
    [author:]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2889
        Claus Atzkern
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2890
"
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2891
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2892
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2893
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2894
491
c3af7854dbe8 image instance variables removed + release all widget icons while snap shoting
tz
parents: 490
diff changeset
  2895
!UIPainter::TreeView class methodsFor:'startup / release'!
c3af7854dbe8 image instance variables removed + release all widget icons while snap shoting
tz
parents: 490
diff changeset
  2896
c3af7854dbe8 image instance variables removed + release all widget icons while snap shoting
tz
parents: 490
diff changeset
  2897
preSnapshot
c3af7854dbe8 image instance variables removed + release all widget icons while snap shoting
tz
parents: 490
diff changeset
  2898
496
a76cca0bceb4 check Images on nil before making empty
tz
parents: 495
diff changeset
  2899
    Images notNil ifTrue: [Images removeAll]
491
c3af7854dbe8 image instance variables removed + release all widget icons while snap shoting
tz
parents: 490
diff changeset
  2900
! !
c3af7854dbe8 image instance variables removed + release all widget icons while snap shoting
tz
parents: 490
diff changeset
  2901
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2902
!UIPainter::TreeView methodsFor:'accessing'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2903
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2904
canvas
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2905
    "returns the canvas( UIPainter )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2906
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2907
  ^ model root contents view
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2908
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2909
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2910
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2911
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2912
canvas:aCanvas
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2913
    "install canvas( UIPainter )
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2914
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2915
    |props|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2916
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2917
    props := UIPainterView::ViewProperty new.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2918
    props view:aCanvas.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2919
    model root:(TreeItem name:(self class defaultNameOfCanvas) contents:props).
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2920
    model root expand.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2921
    self enableChannel:(aCanvas enableChannel).
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2922
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2923
!
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2924
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2925
canvasSpec
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2926
    "returns spec assigned to canvas
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2927
    "
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2928
    |spec|
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2929
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2930
    spec := WindowSpec new.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2931
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2932
    spec fromView:(self canvas topView) callBack:nil.
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  2933
    spec name:(listOfNodes at:1) name.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2934
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2935
    windowSpec notNil ifTrue:[
362
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  2936
        spec copyValuesFromSpec:windowSpec
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2937
    ].
362
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  2938
    ^ spec
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  2939
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  2940
    "Modified: / 29.10.1997 / 18:06:44 / cg"
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2941
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2942
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2943
canvasSpec:aSpec
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2944
    "update canvas from spec
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2945
    "
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2946
    |spec|
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2947
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2948
    self setAttributesFromWindowSpec:aSpec.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2949
    spec := aSpec copy.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2950
    spec  menu:nil.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2951
    spec flags:nil.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2952
394
1933896da0c3 sett UIBuilder isEditing to true
ca
parents: 375
diff changeset
  2953
    spec setAttributesIn:(self canvas topView) with:(UIBuilder new isEditing:true).
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2954
!
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  2955
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2956
itemOfView:aView
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2957
    "returns item assigned to view or nil
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2958
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2959
    aView notNil ifTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2960
        self allItemsDo:[:anItem|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2961
            (anItem contents view == aView) ifTrue:[^ anItem]
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2962
        ]
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2963
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2964
  ^ nil
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2965
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2966
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2967
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2968
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2969
!UIPainter::TreeView methodsFor:'accessing property'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2970
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2971
propertiesDo:aOneArgBlock
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2972
    "evaluate the argument a block on each property
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2973
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2974
    self allItemsDo:[:anItem| aOneArgBlock value:(anItem contents)]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2975
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2976
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2977
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2978
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2979
propertyDetect:aOneArgBlock
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2980
    "evaluate the block on each property
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2981
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2982
    self allItemsDo:[:anItem|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2983
        (aOneArgBlock value:(anItem contents)) ifTrue:[^ anItem contents]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2984
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2985
  ^ nil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2986
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2987
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2988
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2989
propertySelected
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2990
    "returns current selected property or nil in case of multi selection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2991
     or empty selection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2992
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2993
    |idx|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2994
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2995
    selection size == 1 ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2996
        (idx := selection first) ~~ 1 ifTrue:[          "canvas: not yet supported"
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2997
            ^ (listOfNodes at:idx) contents
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2998
        ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2999
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3000
  ^ nil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3001
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3002
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3003
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3004
!UIPainter::TreeView methodsFor:'adding & removing'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3005
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3006
addProperty:aProperty
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3007
    "add a new item
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3008
    "
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  3009
    |parent| 
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
  3010
114befd1c369 add some help text
ca
parents: 287
diff changeset
  3011
    parent := self detectItemRespondsToView:(aProperty view superView).
114befd1c369 add some help text
ca
parents: 287
diff changeset
  3012
114befd1c369 add some help text
ca
parents: 287
diff changeset
  3013
    parent notNil ifTrue:[
114befd1c369 add some help text
ca
parents: 287
diff changeset
  3014
        model add:(TreeItem name:(aProperty name) contents:aProperty) below:parent
114befd1c369 add some help text
ca
parents: 287
diff changeset
  3015
    ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3016
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3017
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3018
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3019
removeAll
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3020
    "remove all items other than canvas
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3021
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3022
    lastDrawnMaster := nil.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3023
    windowSpec := nil.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3024
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3025
    self canvas subViews copy do:[:aView|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3026
        (aView isKindOf:InputView) ifFalse:[aView destroy]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3027
    ].
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3028
    model root name:(self class defaultNameOfCanvas).
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3029
    model root children:(OrderedCollection new).
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3030
    model recomputeList.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3031
    self selection:nil.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3032
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3033
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3034
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3035
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3036
removeView:aView
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3037
    "remove a view
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3038
    "
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3039
    |item prnt|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3040
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3041
    ((item := self itemOfView:aView) notNil and:[(prnt := item parent) notNil]) ifTrue:[
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3042
        aView destroy.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3043
        prnt contents view sizeChanged:nil.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3044
        model remove:item
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3045
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3046
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3047
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3048
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3049
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3050
!UIPainter::TreeView methodsFor:'building'!
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3051
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3052
generateFullSpecForComponents:aSpecArray
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3053
    "generates a full spec for components
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3054
    "
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3055
    |fullSpec winSpec|
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3056
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3057
    fullSpec := FullSpec new.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3058
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3059
    fullSpec fromBuilder:(self canvas topView)
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3060
              components:(SpecCollection new collection:aSpecArray).
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3061
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3062
    windowSpec notNil ifTrue:[
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3063
        winSpec := fullSpec window.
362
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  3064
        winSpec copyValuesFromSpec:windowSpec
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3065
    ].    
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3066
    ^ fullSpec literalArrayEncoding.
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3067
362
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  3068
    "Modified: / 29.10.1997 / 18:05:58 / cg"
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3069
!
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3070
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3071
setAttributesFromWindowSpec:aWindowSpec
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3072
    "set windowSpec from argument a WindowSpec
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3073
    "
362
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  3074
    windowSpec := WindowSpec new copyValuesFromSpec:aWindowSpec.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3075
    self canvasNameChanged:aWindowSpec name.
362
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  3076
55154d7a4deb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
  3077
    "Modified: / 29.10.1997 / 18:06:56 / cg"
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3078
! !
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  3079
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3080
!UIPainter::TreeView methodsFor:'canvas selection'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3081
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3082
cvsSelection:aSelection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3083
    "canvas changed its selection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3084
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3085
    |sel list rcLt|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3086
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3087
    list := OrderedCollection new.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3088
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3089
    aSelection isNil ifFalse:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3090
        aSelection isCollection ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3091
            aSelection notNil ifTrue:[sel := aSelection]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3092
        ] ifFalse:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3093
            sel := Array with:aSelection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3094
        ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3095
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3096
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3097
    sel notNil ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3098
        rcLt := false.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3099
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3100
        sel do:[:aView||item|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3101
            (item := self itemOfView:aView) notNil ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3102
                list add:item.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3103
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3104
                [(item := item parent) notNil] whileTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3105
                    item hidden ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3106
                        rcLt := true.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3107
                        item expand.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3108
                    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3109
                ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3110
            ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3111
        ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3112
        rcLt ifTrue:[model recomputeList].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3113
        sel := list collect:[:anItem| listOfNodes findFirst:[:el| el == anItem]]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3114
    ] ifFalse:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3115
        sel := list
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3116
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3117
    self cvsEventsDisabledDo:[ self selection:sel ].            
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3118
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3119
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3120
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3121
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3122
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3123
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3124
cvsSelectionAdd:aView
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3125
    "canvas adds a view to current selection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3126
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3127
    |parent item rcLt oldSel|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3128
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3129
    item := self itemOfView:aView.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3130
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3131
    item notNil ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3132
        parent := item.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3133
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3134
        [ (parent := parent parent) notNil ] whileTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3135
            parent hidden ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3136
                rcLt := true.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3137
                parent expand.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3138
            ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3139
        ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3140
        rcLt == true ifTrue:[model recomputeList].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3141
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3142
        oldSel := selection copy.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3143
        self addToSelection:(listOfNodes findFirst:[:el| el == item]).
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3144
        self selectionChangedFrom:oldSel
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3145
    ].            
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3146
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3147
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3148
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3149
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3150
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3151
cvsSelectionRemove:aView
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3152
    "canvas removes a view from current selection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3153
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3154
    |parent item rcLt oldSel|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3155
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3156
    item := self itemOfView:aView.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3157
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3158
    item notNil ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3159
        parent := item.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3160
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3161
        [ (parent := parent parent) notNil ] whileTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3162
            parent hidden ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3163
                rcLt := true.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3164
                parent expand.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3165
            ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3166
        ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3167
        rcLt == true ifTrue:[model recomputeList].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3168
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3169
        oldSel := selection copy.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3170
        self removeFromSelection:(listOfNodes findFirst:[:el| el == item]).
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3171
        self selectionChangedFrom:oldSel
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3172
    ].            
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3173
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3174
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3175
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3176
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3177
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3178
!UIPainter::TreeView methodsFor:'change & update'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3179
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3180
canvasNameChanged:aName
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3181
    "called if identification name assigned to window (canvas) changed
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3182
    "
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3183
    |name node|
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3184
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3185
    node := listOfNodes at:1.
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3186
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3187
    (    aName size ~~ 0
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3188
     and:[(name := aName string withoutSeparators) size ~~ 0
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3189
     and:[(self propertyDetect:[:p| p name = name]) isNil
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3190
     and:[node name ~= name]]]
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3191
    ) ifTrue:[
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3192
        node name: name.
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3193
        self redrawLine:1.
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3194
    ].
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3195
!
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3196
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3197
layoutChanged
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3198
    "layout of any component changed; in case of single selection, the
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3199
     application will be informed to update its layout
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3200
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3201
    selection size == 1 ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3202
        self application layoutChanged
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3203
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3204
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3205
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3206
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3207
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3208
propertyChanged:aProperty
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3209
    "property of view derived from argument a property changed
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3210
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3211
    |item idx end|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3212
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3213
    item := self itemOfView:(aProperty view).
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3214
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3215
    item notNil ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3216
        item contents:aProperty.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3217
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3218
        item name = aProperty name ifFalse:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3219
            idx := self firstLineShown.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3220
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3221
            (end := self lastLineShown) > listOfNodes size ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3222
                end := listOfNodes size
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3223
            ].                          
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3224
            item name: aProperty name.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3225
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3226
            [idx <= end] whileTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3227
                (listOfNodes at:idx) == item ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3228
                    self redrawLine:idx.                "/ is visible; redraw line
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3229
                    end := 0
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3230
                ] ifFalse:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3231
                    idx := idx + 1
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3232
                ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3233
            ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3234
        ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3235
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3236
        self selectedNode == item ifTrue:[              "/ inform application
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3237
            self application propertyChanged
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3238
        ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3239
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3240
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3241
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3242
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3243
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3244
!UIPainter::TreeView methodsFor:'drag & drop'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3245
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3246
canDrop:anObjectOrCollection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3247
    "can drop ? delegate to canvas
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3248
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3249
  ^ self canvas canDrop:anObjectOrCollection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3250
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3251
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3252
drop:anObjectOrCollection at:aPoint
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3253
    "drop objects ? delegate to canvas
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3254
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3255
    self canvas drop:anObjectOrCollection at:aPoint
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3256
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3257
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3258
!UIPainter::TreeView methodsFor:'enumerating'!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3259
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3260
allItemsDo:aOneArgBlock
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3261
    "evaluate the argument a block on each item other than the canvas
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3262
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3263
    model root allChildrenDo:aOneArgBlock
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3264
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3265
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3266
! !
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3267
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3268
!UIPainter::TreeView methodsFor:'event processing'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3269
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3270
cvsEventsDisabledDo:aBlock
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3271
    "evaluate the block without raising selection changed notifications
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3272
     to canvas
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3273
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3274
    |restoreCvsEvents|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3275
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3276
    restoreCvsEvents  := cvsEventsDisabled.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3277
    cvsEventsDisabled := true.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3278
    aBlock value.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3279
    cvsEventsDisabled := restoreCvsEvents.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3280
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3281
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3282
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3283
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3284
cvsSetupListDo:aBlock
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3285
    "evaluate block without handling notifications from model; after evaluation
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3286
     the new list will be recomputed
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3287
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3288
    model removeDependent:self.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3289
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3290
    self cvsEventsDisabledDo:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3291
        self selection:nil.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3292
        aBlock value
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3293
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3294
    model addDependent:self.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3295
    model recomputeList.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3296
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3297
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3298
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3299
doubleClicked
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3300
    "disable collapse of canvas item
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3301
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3302
    self selectedNode == model root ifFalse:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3303
        super doubleClicked
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3304
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3305
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3306
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3307
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3308
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3309
!UIPainter::TreeView methodsFor:'initialization'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3310
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3311
initialize
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3312
    "initialization; set multiple select and model
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3313
    "
440
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  3314
    Images := Images ? IdentityDictionary new.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3315
    super initialize.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3316
    self multipleSelectOk:true.
368
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
  3317
    cvsEventsDisabled := false.
440
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  3318
    self showDirectoryIndicator: true.
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  3319
    self showDirectoryIndicatorForRoot: false
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3320
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3321
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3322
!UIPainter::TreeView methodsFor:'private'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3323
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3324
figureFor:aNode
440
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  3325
    "returns image for an spec item"
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  3326
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3327
    |cls image|
440
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  3328
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  3329
    cls := aNode contents spec class.
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3330
    aNode contents spec isNil ifTrue: [cls := WindowSpec].
440
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  3331
    cls := cls withAllSuperclasses detect: [:cls| cls class implements: #icon] ifNone: [^nil].
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3332
    image := Images at: cls name ifAbsent: [Images at: cls name put: cls icon].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3333
    image device ~~ device ifTrue: [image := image onDevice: device].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3334
    image extent y > 16 ifTrue: [image := image magnifiedBy: 16/image extent y].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3335
    ^image
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3336
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3337
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3338
selectionChangedFrom:oldSelection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3339
    "selection has changed. update master selection and raise notification
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3340
     to canvas in case of enabled cvs events
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3341
    "
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3342
    |sel size|
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3343
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3344
    super selectionChangedFrom:oldSelection.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3345
    size := selection size.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3346
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3347
    cvsEventsDisabled ifFalse:[
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3348
        (size ~~ 0 and:[size ~~ 1 or:[selection first ~~ 1]]) ifTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3349
            sel := OrderedCollection new.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3350
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3351
            selection do:[:i|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3352
                i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view]
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3353
            ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3354
        ].
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3355
        self canvas updateSelectionFromModel:sel
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3356
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3357
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3358
    size ~~ 0 ifTrue:[
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3359
        sel := selection first.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3360
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3361
        (listOfNodes at:sel) == lastDrawnMaster ifFalse:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3362
            self redrawLine:sel
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3363
        ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3364
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3365
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3366
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3367
!UIPainter::TreeView methodsFor:'queries'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3368
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3369
canMoveOrAlignSelection
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3370
    "returns true if any selection exists and all widgets in the selection
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3371
     can change their layout through to a move or align operation.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3372
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3373
    |canvas|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3374
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3375
    selection size == 0 ifTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3376
        ^ false
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3377
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3378
    canvas := self canvas.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3379
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3380
    selection do:[:i|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3381
        i == 1 ifTrue:[^ false].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3382
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3383
        (canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3384
            ^ false
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3385
        ]
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3386
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3387
    ^ true
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3388
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3389
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3390
canMoveSelectionIntoContainer
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3391
    "returns true in case that one component is selected and can change its container
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3392
     widget to the next element in the list which will have the same container.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3393
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3394
    |item prnt|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3395
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3396
    (     (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3397
      or:[(prnt := item parent) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3398
      or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3399
      or:[prnt contents spec class supportsSubComponents not]]]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3400
    ) ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3401
        ^ false
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3402
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3403
  ^ true
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3404
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3405
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3406
canMoveSelectionOutOfContainer
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3407
    "returns true in case that one component is selected which is contained within
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3408
     another component.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3409
    "
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3410
    |item prnt|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3411
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3412
    (     (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3413
      or:[(prnt := item parent) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3414
      or:[prnt parent isNil]]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3415
    ) ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3416
        ^ false
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3417
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3418
  ^ true
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3419
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3420
301
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3421
canResizeSelectedWidget
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3422
    "returns true in case of one widget selected and is contained
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3423
     within a widget which allows to resize sub components
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3424
    "
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3425
    |n|
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3426
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3427
    (n := self selectedNode) notNil ifTrue:[
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3428
        (n := n parent) notNil ifTrue:[
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3429
            ^ (n parent isNil or:[n contents spec class canResizeSubComponents])
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3430
        ]
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3431
    ].
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3432
    ^ false
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3433
!
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  3434
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3435
hasOneSelectionOtherThanCanvas
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3436
    "returns true in case that one selection exists other than the canvas
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3437
    "
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3438
    ^ (selection size == 1 and:[selection first ~~ 1])
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3439
!
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3440
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3441
isCanvasSelected
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3442
    "returns true in case of a single selection and the
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3443
     selection is the canvas (index 1)
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3444
    "
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  3445
    ^ (selection size == 1 and:[self isInSelection:1])
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3446
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3447
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3448
!UIPainter::TreeView methodsFor:'seraching'!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3449
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3450
detectItemRespondsToView:aView
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3451
    "detect the item responding to the view. The item of the view or the first
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3452
     subview providing the item is returned. If no property is detected nil is
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3453
     returned
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3454
    "
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3455
    |view item|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3456
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3457
    (view := aView) notNil ifTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3458
        [(item := self itemOfView:view) isNil] whileTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3459
            (view := view superView) isNil ifTrue:[^ listOfNodes at:1]
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3460
        ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3461
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3462
    ^ item
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3463
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3464
! !
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3465
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3466
!UIPainter::TreeView methodsFor:'user interactions'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3467
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3468
doStepIn
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3469
    |item prnt canvas|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3470
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3471
    (     (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3472
      or:[(prnt := item parent) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3473
      or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3474
      or:[prnt contents spec class supportsSubComponents not]]]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3475
    ) ifFalse:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3476
        canvas := self canvas.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3477
        canvas deleteSelection.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3478
        canvas setSelection:(prnt contents view) withRedraw:false.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3479
        canvas pasteWithLayout.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3480
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3481
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3482
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3483
doStepOut
250
d2d028799b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 248
diff changeset
  3484
    |item next prnt canvas|
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3485
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3486
    (     (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3487
      or:[(prnt := item parent) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3488
      or:[(next := prnt parent) isNil]]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3489
    ) ifTrue:[
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3490
        ^ self
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3491
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3492
    model removeDependent:self.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3493
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3494
    canvas := self canvas.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3495
    canvas deleteSelection.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3496
    canvas setSelection:(next contents view) withRedraw:false.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3497
    canvas pasteWithLayout.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3498
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3499
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3500
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3501
doStepOver:anIndex
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3502
    "move child 'anOffset' forward or backward in list of children
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3503
    "
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3504
    |item idx size prnt spVw view canvas|
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3505
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3506
    (    (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3507
     or:[(prnt := item parent) isNil
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3508
     or:[(size := prnt children size) < 2
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3509
     or:[(idx  := prnt indexOfChild:item) == 0]]]
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3510
    ) ifTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3511
        ^ self
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3512
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3513
    model removeDependent:self.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3514
    model removeSelection.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3515
    selection := nil.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3516
    model addDependent:self.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3517
    idx := idx + anIndex.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3518
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3519
    idx < 1 ifTrue:[idx := size]
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3520
           ifFalse:[idx > size ifTrue:[idx := 1]].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3521
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3522
    model add:item beforeIndex:idx below:prnt.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3523
    idx    := prnt indexOfChild:item.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3524
    view   := item contents view.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3525
    spVw   := prnt contents view.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3526
    canvas := self canvas.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3527
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3528
    canvas hideSelection.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3529
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3530
 "/ input view might by contained in sequence
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3531
    ((size := canvas findInputViewIn:spVw) ~~ 0 and:[idx >= size]) ifTrue:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3532
        idx := idx + 1
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3533
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3534
    spVw changeSequenceOrderFor:view to:idx.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3535
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3536
    spVw specClass isLayoutContainer ifFalse:[
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3537
        spVw subViews do:[:v| v raise ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3538
        canvas inputView raise
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3539
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3540
    canvas showSelection.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3541
    self selectNode:item.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3542
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3543
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3544
!UIPainter class methodsFor:'documentation'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3545
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3546
version
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3547
    ^ '$Header$'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3548
! !