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