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