156
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
|
|
14 |
|
56
|
15 |
ApplicationModel subclass:#UIPropertyView
|
111
|
16 |
instanceVariableNames:'window specClass aspects modified modifiedHolder'
|
56
|
17 |
classVariableNames:''
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'Interface-UIPainter'
|
|
20 |
!
|
|
21 |
|
156
|
22 |
UIPropertyView subclass:#Specification
|
|
23 |
instanceVariableNames:'specEdited specChannel'
|
|
24 |
classVariableNames:''
|
|
25 |
poolDictionaries:''
|
|
26 |
privateIn:UIPropertyView
|
|
27 |
!
|
|
28 |
|
140
|
29 |
UIPropertyView subclass:#Dimension
|
|
30 |
instanceVariableNames:'noteBook forView selection layoutTypes'
|
111
|
31 |
classVariableNames:''
|
|
32 |
poolDictionaries:''
|
|
33 |
privateIn:UIPropertyView
|
|
34 |
!
|
|
35 |
|
156
|
36 |
!UIPropertyView class methodsFor:'documentation'!
|
|
37 |
|
|
38 |
copyright
|
|
39 |
"
|
|
40 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
41 |
All Rights Reserved
|
|
42 |
|
|
43 |
This software is furnished under a license and may be used
|
|
44 |
only in accordance with the terms of that license and with the
|
|
45 |
inclusion of the above copyright notice. This software may not
|
|
46 |
be provided or otherwise made available to, or used by, any
|
|
47 |
other person. No title to or ownership of the software is
|
|
48 |
hereby transferred.
|
|
49 |
"
|
|
50 |
|
|
51 |
|
111
|
52 |
!
|
|
53 |
|
|
54 |
documentation
|
|
55 |
"
|
126
|
56 |
provides tools to the UIPainter accessing and manipulation properties
|
|
57 |
and/or layouts.
|
|
58 |
|
|
59 |
[see also:]
|
|
60 |
UIBuilder
|
156
|
61 |
|
|
62 |
[author:]
|
|
63 |
Claus Atzkern
|
111
|
64 |
"
|
|
65 |
|
|
66 |
! !
|
56
|
67 |
|
|
68 |
!UIPropertyView class methodsFor:'instance creation'!
|
|
69 |
|
111
|
70 |
for:aTool in:aTopview
|
|
71 |
|cls appl|
|
|
72 |
|
|
73 |
cls := Smalltalk classNamed:(self name asString, '::', aTool asString).
|
|
74 |
appl := cls new.
|
|
75 |
appl origin:0.0@0.0 corner:1.0@1.0 in:aTopview.
|
|
76 |
^ appl
|
|
77 |
!
|
|
78 |
|
|
79 |
in:aTopview
|
|
80 |
|appl|
|
|
81 |
|
|
82 |
appl := self new.
|
|
83 |
appl origin:0.0@0.0 corner:1.0@1.0 in:aTopview.
|
|
84 |
^ appl
|
|
85 |
! !
|
|
86 |
|
|
87 |
!UIPropertyView methodsFor:'accessing'!
|
|
88 |
|
|
89 |
buildFromSpec:aSpec
|
144
|
90 |
|state subViews backGroundColor v|
|
111
|
91 |
|
|
92 |
aSpec ~= specClass ifTrue:[
|
|
93 |
window destroySubViews.
|
|
94 |
|
|
95 |
aSpec notNil ifTrue:[
|
144
|
96 |
v := builder buildFromSpec:aSpec in:window.
|
111
|
97 |
window allViewBackground:(self viewBackground).
|
144
|
98 |
window realizeAllSubViews.
|
111
|
99 |
]
|
|
100 |
].
|
|
101 |
specClass := aSpec.
|
|
102 |
self modified:false
|
|
103 |
|
|
104 |
!
|
56
|
105 |
|
111
|
106 |
modified
|
|
107 |
"returns modifying state
|
|
108 |
"
|
|
109 |
^ modified
|
|
110 |
!
|
|
111 |
|
|
112 |
modified:aState
|
|
113 |
"set modifying state
|
|
114 |
"
|
|
115 |
modified := aState.
|
|
116 |
|
|
117 |
modifiedHolder notNil ifTrue:[
|
|
118 |
modifiedHolder value ~~ modified ifTrue:[
|
|
119 |
modifiedHolder value:modified
|
|
120 |
]
|
|
121 |
]
|
|
122 |
!
|
|
123 |
|
|
124 |
modifiedHolder
|
|
125 |
"returns the value holder set to true in case of modifying attributes
|
|
126 |
"
|
|
127 |
^ modifiedHolder
|
|
128 |
!
|
|
129 |
|
|
130 |
modifiedHolder:aValueHolder
|
|
131 |
"set the value holder set to true in case of modifying attributes
|
|
132 |
"
|
|
133 |
modifiedHolder notNil ifTrue:[
|
|
134 |
modifiedHolder removeDependent:self.
|
|
135 |
].
|
|
136 |
|
|
137 |
(modifiedHolder := aValueHolder) notNil ifTrue:[
|
|
138 |
modifiedHolder addDependent:self.
|
|
139 |
modifiedHolder setValue:modified.
|
|
140 |
].
|
56
|
141 |
! !
|
|
142 |
|
111
|
143 |
!UIPropertyView methodsFor:'accessing hierarchy'!
|
|
144 |
|
|
145 |
lower
|
|
146 |
"bring window to back
|
|
147 |
"
|
|
148 |
self window back
|
|
149 |
!
|
59
|
150 |
|
111
|
151 |
raise
|
|
152 |
"bring window to front
|
|
153 |
"
|
|
154 |
self window raise
|
|
155 |
!
|
|
156 |
|
|
157 |
viewBackground
|
|
158 |
^ window viewBackground
|
|
159 |
!
|
|
160 |
|
|
161 |
viewBackground:aColor
|
|
162 |
window viewBackground:aColor
|
|
163 |
!
|
|
164 |
|
|
165 |
window
|
|
166 |
"returns window application is running in
|
|
167 |
"
|
|
168 |
^ window
|
59
|
169 |
! !
|
|
170 |
|
111
|
171 |
!UIPropertyView methodsFor:'bindings'!
|
|
172 |
|
|
173 |
aspectFor:aKey
|
|
174 |
"returns aspect for a key or nil
|
|
175 |
"
|
|
176 |
aspects notNil ifTrue:[
|
|
177 |
^ aspects at:aKey ifAbsent:nil
|
|
178 |
].
|
|
179 |
^ super aspectFor:aKey
|
|
180 |
|
|
181 |
!
|
|
182 |
|
|
183 |
aspects
|
|
184 |
"returned monitored aspects
|
|
185 |
"
|
|
186 |
^ aspects
|
|
187 |
!
|
|
188 |
|
|
189 |
aspects:aListOfAspects
|
|
190 |
"set aspects to be monitored
|
|
191 |
"
|
|
192 |
(aspects := aListOfAspects) notNil ifTrue:[
|
|
193 |
aspects do:[:el | el addDependent:self ].
|
|
194 |
].
|
|
195 |
self modified:false.
|
|
196 |
! !
|
|
197 |
|
|
198 |
!UIPropertyView methodsFor:'change & update'!
|
|
199 |
|
|
200 |
update:something with:someArgument from:someone
|
|
201 |
"any attribute changed its state in the current specification
|
|
202 |
"
|
|
203 |
someone == modifiedHolder ifTrue:[
|
|
204 |
modified := modifiedHolder value
|
|
205 |
] ifFalse:[
|
|
206 |
self modified:true
|
|
207 |
]
|
|
208 |
! !
|
|
209 |
|
|
210 |
!UIPropertyView methodsFor:'initialization'!
|
|
211 |
|
|
212 |
closeRequest
|
149
|
213 |
|
111
|
214 |
modifiedHolder notNil ifTrue:[
|
|
215 |
modifiedHolder removeDependent:self.
|
|
216 |
modifiedHolder := nil.
|
|
217 |
].
|
|
218 |
|
|
219 |
super closeRequest
|
|
220 |
|
|
221 |
|
|
222 |
!
|
|
223 |
|
|
224 |
initialize
|
|
225 |
super initialize.
|
|
226 |
modified := false.
|
|
227 |
!
|
|
228 |
|
|
229 |
origin:anOrigin corner:aCorner in:aTopview
|
|
230 |
window := SimpleView origin:anOrigin corner:aCorner in:aTopview
|
|
231 |
|
|
232 |
! !
|
|
233 |
|
156
|
234 |
!UIPropertyView::Specification methodsFor:'accessing'!
|
|
235 |
|
|
236 |
specEdited
|
|
237 |
"gets current edit specification
|
|
238 |
"
|
|
239 |
^ specEdited
|
|
240 |
|
|
241 |
|
|
242 |
!
|
|
243 |
|
|
244 |
specEdited:aSpec
|
|
245 |
"sets current edit specification
|
|
246 |
"
|
|
247 |
|aspects|
|
|
248 |
|
|
249 |
self modified:false.
|
|
250 |
|
|
251 |
aSpec isNil ifTrue:[
|
|
252 |
specChannel := nil.
|
|
253 |
specEdited := nil.
|
|
254 |
] ifFalse:[
|
|
255 |
specEdited class == aSpec class ifTrue:[
|
|
256 |
specEdited := aSpec.
|
|
257 |
specChannel value:specEdited.
|
|
258 |
^ self modified:false.
|
|
259 |
].
|
|
260 |
specEdited := aSpec.
|
|
261 |
aspects := IdentityDictionary new.
|
|
262 |
specChannel := specEdited asValue.
|
|
263 |
specEdited class addBindingsTo:aspects for:specEdited channel:specChannel
|
|
264 |
].
|
|
265 |
self aspects:aspects.
|
|
266 |
self buildFromSpec:nil.
|
|
267 |
|
|
268 |
|
|
269 |
! !
|
|
270 |
|
|
271 |
!UIPropertyView::Specification methodsFor:'action'!
|
|
272 |
|
|
273 |
reload
|
|
274 |
"reload specification
|
|
275 |
"
|
|
276 |
specChannel notNil ifTrue:[
|
|
277 |
specChannel value:specEdited.
|
|
278 |
self modified:false.
|
|
279 |
]
|
|
280 |
|
|
281 |
|
|
282 |
! !
|
|
283 |
|
111
|
284 |
!UIPropertyView::Dimension class methodsFor:'interface specs'!
|
56
|
285 |
|
|
286 |
specificationAlignmentOrigin
|
62
|
287 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
288 |
|
|
289 |
"do not manually edit this - the painter/builder may not be able to
|
|
290 |
handle the specification if its corrupted."
|
|
291 |
|
56
|
292 |
"
|
111
|
293 |
UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationAlignmentOrigin
|
|
294 |
UIPropertyView::Dimension new openInterface:#specificationAlignmentOrigin
|
56
|
295 |
"
|
62
|
296 |
|
56
|
297 |
<resource: #canvas>
|
|
298 |
|
|
299 |
^
|
140
|
300 |
|
56
|
301 |
#(#FullSpec
|
|
302 |
#'window:'
|
|
303 |
#(#WindowSpec
|
62
|
304 |
#'name:' 'uIPainterView'
|
56
|
305 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
306 |
#'label:' 'unnamed'
|
78
|
307 |
#'bounds:' #(#Rectangle 0 0 250 365)
|
56
|
308 |
)
|
|
309 |
#'component:'
|
|
310 |
#(#SpecCollection
|
|
311 |
#'collection:'
|
|
312 |
#(
|
|
313 |
#(#LabelSpec
|
|
314 |
#'name:' 'label2'
|
111
|
315 |
#'layout:' #(#AlignmentOrigin 49 0 68 0 1 0)
|
56
|
316 |
#'label:' 'top'
|
66
|
317 |
#'adjust:' #right
|
56
|
318 |
)
|
|
319 |
#(#LabelSpec
|
|
320 |
#'name:' 'label3'
|
111
|
321 |
#'layout:' #(#Point 58 13)
|
56
|
322 |
#'label:' 'relative'
|
|
323 |
)
|
|
324 |
#(#LabelSpec
|
|
325 |
#'name:' 'label4'
|
111
|
326 |
#'layout:' #(#Point 154 14)
|
56
|
327 |
#'label:' 'offset'
|
|
328 |
)
|
|
329 |
#(#LabelSpec
|
|
330 |
#'name:' 'label5'
|
111
|
331 |
#'layout:' #(#AlignmentOrigin 63 0 140 0 1 0)
|
56
|
332 |
#'label:' 'align H'
|
66
|
333 |
#'adjust:' #right
|
56
|
334 |
)
|
|
335 |
#(#LabelSpec
|
|
336 |
#'name:' 'label6'
|
111
|
337 |
#'layout:' #(#AlignmentOrigin 63 0 166 0 1 0)
|
56
|
338 |
#'label:' 'align V'
|
66
|
339 |
#'adjust:' #right
|
56
|
340 |
)
|
|
341 |
#(#InputFieldSpec
|
|
342 |
#'name:' 'editField1'
|
111
|
343 |
#'layout:' #(#LayoutFrame 58 0 41 0 115 0 59 0)
|
62
|
344 |
#'model:' #leftFraction
|
|
345 |
#'tabable:' true
|
56
|
346 |
#'type:' #numberOrNil
|
|
347 |
)
|
|
348 |
#(#InputFieldSpec
|
|
349 |
#'name:' 'editField2'
|
111
|
350 |
#'layout:' #(#LayoutFrame 58 0 68 0 115 0 86 0)
|
62
|
351 |
#'model:' #topFraction
|
|
352 |
#'tabable:' true
|
56
|
353 |
#'type:' #numberOrNil
|
|
354 |
)
|
|
355 |
#(#InputFieldSpec
|
|
356 |
#'name:' 'editField5'
|
111
|
357 |
#'layout:' #(#LayoutFrame 68 0 140 0 125 0 158 0)
|
62
|
358 |
#'model:' #leftAlignmentFraction
|
|
359 |
#'tabable:' true
|
56
|
360 |
#'type:' #numberOrNil
|
|
361 |
)
|
|
362 |
#(#InputFieldSpec
|
|
363 |
#'name:' 'editField6'
|
111
|
364 |
#'layout:' #(#LayoutFrame 68 0 166 0 125 0 184 0)
|
62
|
365 |
#'model:' #topAlignmentFraction
|
|
366 |
#'tabable:' true
|
56
|
367 |
#'type:' #numberOrNil
|
|
368 |
)
|
|
369 |
#(#InputFieldSpec
|
|
370 |
#'name:' 'editField3'
|
111
|
371 |
#'layout:' #(#LayoutFrame 154 0 41 0 212 0 59 0)
|
62
|
372 |
#'model:' #leftOffset
|
|
373 |
#'tabable:' true
|
56
|
374 |
#'type:' #numberOrNil
|
|
375 |
)
|
|
376 |
#(#InputFieldSpec
|
|
377 |
#'name:' 'editField4'
|
111
|
378 |
#'layout:' #(#LayoutFrame 154 0 68 0 212 0 86 0)
|
62
|
379 |
#'model:' #topOffset
|
|
380 |
#'tabable:' true
|
56
|
381 |
#'type:' #numberOrNil
|
|
382 |
)
|
|
383 |
#(#ActionButtonSpec
|
|
384 |
#'name:' 'button1'
|
111
|
385 |
#'layout:' #(#LayoutFrame 119 0 41 0 138 0 59 0)
|
56
|
386 |
#'label:' ''
|
|
387 |
#'model:' #makeRelativeLeft
|
111
|
388 |
#'isTriggerOnDown:' false
|
|
389 |
#'autoRepeat:' false
|
56
|
390 |
)
|
|
391 |
#(#ActionButtonSpec
|
|
392 |
#'name:' 'button2'
|
111
|
393 |
#'layout:' #(#LayoutFrame 119 0 68 0 138 0 86 0)
|
56
|
394 |
#'label:' ''
|
|
395 |
#'model:' #makeRelativeTop
|
111
|
396 |
#'isTriggerOnDown:' false
|
|
397 |
#'autoRepeat:' false
|
56
|
398 |
)
|
|
399 |
#(#ActionButtonSpec
|
|
400 |
#'name:' 'button3'
|
111
|
401 |
#'layout:' #(#LayoutFrame 217 0 41 0 236 0 59 0)
|
56
|
402 |
#'label:' ''
|
|
403 |
#'model:' #makeOffsetLeft
|
111
|
404 |
#'isTriggerOnDown:' false
|
|
405 |
#'autoRepeat:' false
|
56
|
406 |
)
|
|
407 |
#(#ActionButtonSpec
|
|
408 |
#'name:' 'button4'
|
111
|
409 |
#'layout:' #(#LayoutFrame 217 0 68 0 236 0 86 0)
|
56
|
410 |
#'label:' ''
|
|
411 |
#'model:' #makeOffsetTop
|
111
|
412 |
#'isTriggerOnDown:' false
|
|
413 |
#'autoRepeat:' false
|
56
|
414 |
)
|
62
|
415 |
#(#ActionButtonSpec
|
|
416 |
#'name:' 'button8'
|
111
|
417 |
#'layout:' #(#LayoutFrame 119 0 102 0 138 0 120 0)
|
62
|
418 |
#'label:' ''
|
|
419 |
#'model:' #makeRelativeLeftTop
|
111
|
420 |
#'isTriggerOnDown:' false
|
|
421 |
#'autoRepeat:' false
|
56
|
422 |
)
|
62
|
423 |
#(#ActionButtonSpec
|
|
424 |
#'name:' 'button9'
|
111
|
425 |
#'layout:' #(#LayoutFrame 217 0 102 0 236 0 120 0)
|
62
|
426 |
#'label:' ''
|
|
427 |
#'model:' #makeOffsetLeftTop
|
111
|
428 |
#'isTriggerOnDown:' false
|
|
429 |
#'autoRepeat:' false
|
56
|
430 |
)
|
62
|
431 |
#(#LabelSpec
|
|
432 |
#'name:' 'label7'
|
111
|
433 |
#'layout:' #(#AlignmentOrigin 49 0 102 0 1 0)
|
62
|
434 |
#'label:' 'all'
|
66
|
435 |
#'adjust:' #right
|
56
|
436 |
)
|
62
|
437 |
#(#LabelSpec
|
|
438 |
#'name:' 'label1'
|
111
|
439 |
#'layout:' #(#AlignmentOrigin 49 0 41 0 1 0)
|
62
|
440 |
#'label:' 'left'
|
66
|
441 |
#'adjust:' #right
|
62
|
442 |
)
|
68
|
443 |
#(#DividerSpec
|
|
444 |
#'name:' 'separator1'
|
111
|
445 |
#'layout:' #(#Rectangle 154 142 203 153)
|
78
|
446 |
#'orientation:' #horizontal
|
68
|
447 |
)
|
|
448 |
#(#DividerSpec
|
|
449 |
#'name:' 'separator2'
|
111
|
450 |
#'layout:' #(#Rectangle 154 173 203 184)
|
78
|
451 |
#'orientation:' #horizontal
|
68
|
452 |
)
|
|
453 |
#(#DividerSpec
|
|
454 |
#'name:' 'separator3'
|
111
|
455 |
#'layout:' #(#Rectangle 145 152 155 173)
|
68
|
456 |
#'orientation:' #vertical
|
|
457 |
)
|
|
458 |
#(#DividerSpec
|
|
459 |
#'name:' 'separator4'
|
111
|
460 |
#'layout:' #(#Rectangle 203 152 213 173)
|
68
|
461 |
#'orientation:' #vertical
|
|
462 |
)
|
|
463 |
#(#ActionButtonSpec
|
|
464 |
#'name:' 'alignBR'
|
111
|
465 |
#'layout:' #(#Rectangle 201 172 213 184)
|
68
|
466 |
#'label:' ''
|
|
467 |
#'model:' #makeAlignBottomRight
|
111
|
468 |
#'isTriggerOnDown:' false
|
|
469 |
#'autoRepeat:' false
|
68
|
470 |
)
|
|
471 |
#(#ActionButtonSpec
|
|
472 |
#'name:' 'alignTL'
|
111
|
473 |
#'layout:' #(#Rectangle 145 141 157 153)
|
68
|
474 |
#'label:' ''
|
|
475 |
#'model:' #makeAlignTopLeft
|
111
|
476 |
#'isTriggerOnDown:' false
|
|
477 |
#'autoRepeat:' false
|
68
|
478 |
)
|
|
479 |
#(#ActionButtonSpec
|
|
480 |
#'name:' 'alignTR'
|
111
|
481 |
#'layout:' #(#Rectangle 201 141 213 153)
|
68
|
482 |
#'label:' ''
|
|
483 |
#'model:' #makeAlignTopRight
|
111
|
484 |
#'isTriggerOnDown:' false
|
|
485 |
#'autoRepeat:' false
|
68
|
486 |
)
|
|
487 |
#(#ActionButtonSpec
|
|
488 |
#'name:' 'alignBL'
|
111
|
489 |
#'layout:' #(#Rectangle 145 171 157 183)
|
68
|
490 |
#'label:' ''
|
|
491 |
#'model:' #makeAlignBottomLeft
|
111
|
492 |
#'isTriggerOnDown:' false
|
|
493 |
#'autoRepeat:' false
|
68
|
494 |
)
|
|
495 |
#(#ActionButtonSpec
|
|
496 |
#'name:' 'alignTC'
|
111
|
497 |
#'layout:' #(#Rectangle 173 141 185 153)
|
68
|
498 |
#'label:' ''
|
|
499 |
#'model:' #makeAlignTopCenter
|
111
|
500 |
#'isTriggerOnDown:' false
|
|
501 |
#'autoRepeat:' false
|
68
|
502 |
)
|
|
503 |
#(#ActionButtonSpec
|
|
504 |
#'name:' 'alignBC'
|
111
|
505 |
#'layout:' #(#Rectangle 173 172 185 184)
|
68
|
506 |
#'label:' ''
|
|
507 |
#'model:' #makeAlignBottomCenter
|
111
|
508 |
#'isTriggerOnDown:' false
|
|
509 |
#'autoRepeat:' false
|
68
|
510 |
)
|
|
511 |
#(#ActionButtonSpec
|
|
512 |
#'name:' 'alignLC'
|
111
|
513 |
#'layout:' #(#Rectangle 145 156 157 168)
|
68
|
514 |
#'label:' ''
|
|
515 |
#'model:' #makeAlignLeftCenter
|
111
|
516 |
#'isTriggerOnDown:' false
|
|
517 |
#'autoRepeat:' false
|
68
|
518 |
)
|
|
519 |
#(#ActionButtonSpec
|
|
520 |
#'name:' 'alignRC'
|
111
|
521 |
#'layout:' #(#Rectangle 201 156 213 168)
|
68
|
522 |
#'label:' ''
|
|
523 |
#'model:' #makeAlignRightCenter
|
111
|
524 |
#'isTriggerOnDown:' false
|
|
525 |
#'autoRepeat:' false
|
68
|
526 |
)
|
|
527 |
#(#ActionButtonSpec
|
|
528 |
#'name:' 'alignC'
|
111
|
529 |
#'layout:' #(#Rectangle 173 156 185 168)
|
68
|
530 |
#'label:' ''
|
|
531 |
#'model:' #makeAlignCenter
|
111
|
532 |
#'isTriggerOnDown:' false
|
|
533 |
#'autoRepeat:' false
|
68
|
534 |
)
|
56
|
535 |
)
|
|
536 |
)
|
|
537 |
)
|
|
538 |
!
|
|
539 |
|
62
|
540 |
specificationExtent
|
|
541 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
542 |
|
|
543 |
"do not manually edit this - the painter/builder may not be able to
|
|
544 |
handle the specification if its corrupted."
|
|
545 |
|
56
|
546 |
"
|
111
|
547 |
UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationExtent
|
|
548 |
UIPropertyView::Dimension new openInterface:#specificationExtent
|
56
|
549 |
"
|
62
|
550 |
|
56
|
551 |
<resource: #canvas>
|
|
552 |
|
|
553 |
^
|
140
|
554 |
|
56
|
555 |
#(#FullSpec
|
|
556 |
#'window:'
|
|
557 |
#(#WindowSpec
|
62
|
558 |
#'name:' 'uIPainterView'
|
56
|
559 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
560 |
#'label:' 'unnamed'
|
111
|
561 |
#'bounds:' #(#Rectangle 0 0 224 251)
|
56
|
562 |
)
|
|
563 |
#'component:'
|
|
564 |
#(#SpecCollection
|
|
565 |
#'collection:'
|
|
566 |
#(
|
|
567 |
#(#LabelSpec
|
|
568 |
#'name:' 'label1'
|
111
|
569 |
#'layout:' #(#AlignmentOrigin 99 0 45 0 1 0)
|
62
|
570 |
#'label:' 'horizontal:'
|
|
571 |
#'adjust:' #left
|
56
|
572 |
)
|
|
573 |
#(#LabelSpec
|
|
574 |
#'name:' 'label2'
|
111
|
575 |
#'layout:' #(#AlignmentOrigin 99 0 72 0 1 0)
|
62
|
576 |
#'label:' 'vertical:'
|
|
577 |
#'adjust:' #left
|
56
|
578 |
)
|
|
579 |
#(#InputFieldSpec
|
|
580 |
#'name:' 'editField1'
|
111
|
581 |
#'layout:' #(#LayoutFrame 104 0 45 0 197 0 63 0)
|
62
|
582 |
#'model:' #leftOffset
|
|
583 |
#'tabable:' true
|
56
|
584 |
#'type:' #numberOrNil
|
|
585 |
)
|
|
586 |
#(#InputFieldSpec
|
|
587 |
#'name:' 'editField2'
|
111
|
588 |
#'layout:' #(#LayoutFrame 104 0 72 0 197 0 90 0)
|
62
|
589 |
#'model:' #rightOffset
|
|
590 |
#'tabable:' true
|
56
|
591 |
#'type:' #numberOrNil
|
62
|
592 |
)
|
111
|
593 |
#(#LabelSpec
|
|
594 |
#'name:' 'extentLabel'
|
|
595 |
#'layout:' #(#LayoutFrame 9 0 20 0 63 0 37 0)
|
|
596 |
#'label:' 'Extent:'
|
|
597 |
)
|
62
|
598 |
)
|
|
599 |
)
|
|
600 |
)
|
|
601 |
!
|
|
602 |
|
|
603 |
specificationLayoutFrame
|
|
604 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
605 |
|
|
606 |
"do not manually edit this - the painter/builder may not be able to
|
|
607 |
handle the specification if its corrupted."
|
|
608 |
|
|
609 |
"
|
111
|
610 |
UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationLayoutFrame
|
|
611 |
UIPropertyView::Dimension new openInterface:#specificationLayoutFrame
|
62
|
612 |
"
|
|
613 |
|
|
614 |
<resource: #canvas>
|
|
615 |
|
|
616 |
^
|
140
|
617 |
|
62
|
618 |
#(#FullSpec
|
|
619 |
#'window:'
|
|
620 |
#(#WindowSpec
|
|
621 |
#'name:' 'uIPainterView'
|
|
622 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
623 |
#'label:' 'unnamed'
|
|
624 |
#'bounds:' #(#Rectangle 0 0 238 291)
|
|
625 |
)
|
|
626 |
#'component:'
|
|
627 |
#(#SpecCollection
|
|
628 |
#'collection:'
|
|
629 |
#(
|
|
630 |
#(#LabelSpec
|
|
631 |
#'name:' 'label left'
|
111
|
632 |
#'layout:' #(#AlignmentOrigin 60 0 43 0 1 0)
|
62
|
633 |
#'label:' 'left'
|
|
634 |
)
|
|
635 |
#(#LabelSpec
|
|
636 |
#'name:' 'label top'
|
111
|
637 |
#'layout:' #(#AlignmentOrigin 60 0 71 0 1 0)
|
62
|
638 |
#'label:' 'top'
|
|
639 |
)
|
|
640 |
#(#LabelSpec
|
|
641 |
#'name:' 'label right'
|
111
|
642 |
#'layout:' #(#AlignmentOrigin 60 0 99 0 1 0)
|
62
|
643 |
#'label:' 'right'
|
|
644 |
)
|
|
645 |
#(#LabelSpec
|
|
646 |
#'name:' 'label bottom'
|
111
|
647 |
#'layout:' #(#AlignmentOrigin 60 0 127 0 1 0)
|
62
|
648 |
#'label:' 'bottom'
|
|
649 |
)
|
|
650 |
#(#LabelSpec
|
|
651 |
#'name:' 'label relative'
|
111
|
652 |
#'layout:' #(#Point 65 14)
|
62
|
653 |
#'label:' 'relative'
|
|
654 |
)
|
|
655 |
#(#LabelSpec
|
|
656 |
#'name:' 'label offset'
|
111
|
657 |
#'layout:' #(#Point 159 14)
|
62
|
658 |
#'label:' 'offset'
|
|
659 |
)
|
|
660 |
#(#LabelSpec
|
|
661 |
#'name:' 'label all relative'
|
111
|
662 |
#'layout:' #(#AlignmentOrigin 60 0 161 0 1 0)
|
62
|
663 |
#'label:' 'all'
|
|
664 |
)
|
|
665 |
#(#InputFieldSpec
|
|
666 |
#'name:' 'relative E1'
|
111
|
667 |
#'layout:' #(#LayoutFrame 65 0 43 0 113 0 61 0)
|
62
|
668 |
#'model:' #leftFraction
|
|
669 |
#'type:' #numberOrNil
|
|
670 |
)
|
|
671 |
#(#InputFieldSpec
|
|
672 |
#'name:' 'relative E2'
|
111
|
673 |
#'layout:' #(#LayoutFrame 65 0 71 0 113 0 89 0)
|
56
|
674 |
#'model:' #topFraction
|
62
|
675 |
#'type:' #numberOrNil
|
|
676 |
)
|
|
677 |
#(#InputFieldSpec
|
|
678 |
#'name:' 'relative E3'
|
111
|
679 |
#'layout:' #(#LayoutFrame 65 0 99 0 113 0 117 0)
|
62
|
680 |
#'model:' #rightFraction
|
|
681 |
#'type:' #numberOrNil
|
|
682 |
)
|
|
683 |
#(#InputFieldSpec
|
|
684 |
#'name:' 'relative E4'
|
111
|
685 |
#'layout:' #(#LayoutFrame 65 0 127 0 113 0 145 0)
|
62
|
686 |
#'model:' #bottomFraction
|
|
687 |
#'type:' #numberOrNil
|
|
688 |
)
|
|
689 |
#(#InputFieldSpec
|
|
690 |
#'name:' 'offset E1'
|
111
|
691 |
#'layout:' #(#LayoutFrame 159 0 43 0 210 0 61 0)
|
62
|
692 |
#'model:' #leftOffset
|
|
693 |
#'type:' #numberOrNil
|
|
694 |
)
|
|
695 |
#(#InputFieldSpec
|
|
696 |
#'name:' 'offset E2'
|
111
|
697 |
#'layout:' #(#LayoutFrame 159 0 71 0 210 0 89 0)
|
62
|
698 |
#'model:' #topOffset
|
|
699 |
#'type:' #numberOrNil
|
|
700 |
)
|
|
701 |
#(#InputFieldSpec
|
|
702 |
#'name:' 'offset E3'
|
111
|
703 |
#'layout:' #(#LayoutFrame 159 0 99 0 210 0 117 0)
|
62
|
704 |
#'model:' #rightOffset
|
|
705 |
#'type:' #numberOrNil
|
|
706 |
)
|
|
707 |
#(#InputFieldSpec
|
|
708 |
#'name:' 'offset E4'
|
111
|
709 |
#'layout:' #(#LayoutFrame 159 0 127 0 210 0 145 0)
|
62
|
710 |
#'model:' #bottomOffset
|
|
711 |
#'type:' #numberOrNil
|
|
712 |
)
|
|
713 |
#(#ActionButtonSpec
|
|
714 |
#'name:' 'relative B1'
|
111
|
715 |
#'layout:' #(#LayoutFrame 117 0 43 0 136 0 61 0)
|
62
|
716 |
#'label:' ' '
|
|
717 |
#'model:' #makeRelativeLeft
|
111
|
718 |
#'isTriggerOnDown:' false
|
|
719 |
#'autoRepeat:' false
|
62
|
720 |
)
|
|
721 |
#(#ActionButtonSpec
|
|
722 |
#'name:' 'relative B2'
|
111
|
723 |
#'layout:' #(#LayoutFrame 117 0 71 0 136 0 89 0)
|
62
|
724 |
#'label:' ' '
|
|
725 |
#'model:' #makeRelativeTop
|
111
|
726 |
#'isTriggerOnDown:' false
|
|
727 |
#'autoRepeat:' false
|
62
|
728 |
)
|
|
729 |
#(#ActionButtonSpec
|
|
730 |
#'name:' 'relative B3'
|
111
|
731 |
#'layout:' #(#LayoutFrame 117 0 99 0 136 0 117 0)
|
62
|
732 |
#'label:' ' '
|
|
733 |
#'model:' #makeRelativeRight
|
111
|
734 |
#'isTriggerOnDown:' false
|
|
735 |
#'autoRepeat:' false
|
62
|
736 |
)
|
|
737 |
#(#ActionButtonSpec
|
|
738 |
#'name:' 'relative B4'
|
111
|
739 |
#'layout:' #(#LayoutFrame 117 0 127 0 136 0 145 0)
|
62
|
740 |
#'label:' ' '
|
|
741 |
#'model:' #makeRelativeBottom
|
111
|
742 |
#'isTriggerOnDown:' false
|
|
743 |
#'autoRepeat:' false
|
62
|
744 |
)
|
|
745 |
#(#ActionButtonSpec
|
|
746 |
#'name:' 'relative BAll'
|
111
|
747 |
#'layout:' #(#LayoutFrame 117 0 161 0 136 0 179 0)
|
62
|
748 |
#'label:' ' '
|
|
749 |
#'model:' #makeRelativeAll
|
111
|
750 |
#'isTriggerOnDown:' false
|
|
751 |
#'autoRepeat:' false
|
62
|
752 |
)
|
|
753 |
#(#ActionButtonSpec
|
|
754 |
#'name:' 'offset B1'
|
111
|
755 |
#'layout:' #(#LayoutFrame 214 0 43 0 233 0 61 0)
|
62
|
756 |
#'label:' ''
|
|
757 |
#'model:' #makeOffsetLeft
|
111
|
758 |
#'isTriggerOnDown:' false
|
|
759 |
#'autoRepeat:' false
|
62
|
760 |
)
|
|
761 |
#(#ActionButtonSpec
|
|
762 |
#'name:' 'offset B2'
|
111
|
763 |
#'layout:' #(#LayoutFrame 214 0 71 0 233 0 89 0)
|
62
|
764 |
#'label:' ''
|
|
765 |
#'model:' #makeOffsetTop
|
111
|
766 |
#'isTriggerOnDown:' false
|
|
767 |
#'autoRepeat:' false
|
62
|
768 |
)
|
|
769 |
#(#ActionButtonSpec
|
|
770 |
#'name:' 'offset B3'
|
111
|
771 |
#'layout:' #(#LayoutFrame 214 0 99 0 233 0 117 0)
|
62
|
772 |
#'label:' ''
|
|
773 |
#'model:' #makeOffsetRight
|
111
|
774 |
#'isTriggerOnDown:' false
|
|
775 |
#'autoRepeat:' false
|
62
|
776 |
)
|
|
777 |
#(#ActionButtonSpec
|
|
778 |
#'name:' 'offset B4'
|
111
|
779 |
#'layout:' #(#LayoutFrame 214 0 127 0 233 0 145 0)
|
62
|
780 |
#'label:' ''
|
|
781 |
#'model:' #makeOffsetBottom
|
111
|
782 |
#'isTriggerOnDown:' false
|
|
783 |
#'autoRepeat:' false
|
62
|
784 |
)
|
|
785 |
#(#ActionButtonSpec
|
|
786 |
#'name:' 'offset BAll'
|
111
|
787 |
#'layout:' #(#LayoutFrame 214 0 161 0 233 0 179 0)
|
62
|
788 |
#'label:' ' '
|
|
789 |
#'model:' #makeOffsetAll
|
111
|
790 |
#'isTriggerOnDown:' false
|
|
791 |
#'autoRepeat:' false
|
62
|
792 |
)
|
|
793 |
)
|
|
794 |
)
|
|
795 |
)
|
|
796 |
!
|
|
797 |
|
|
798 |
specificationLayoutOrigin
|
|
799 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
800 |
|
|
801 |
"do not manually edit this - the painter/builder may not be able to
|
|
802 |
handle the specification if its corrupted."
|
|
803 |
|
|
804 |
"
|
111
|
805 |
UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationLayoutOrigin
|
|
806 |
UIPropertyView::Dimension new openInterface:#specificationLayoutOrigin
|
62
|
807 |
"
|
|
808 |
|
|
809 |
<resource: #canvas>
|
|
810 |
|
|
811 |
^
|
140
|
812 |
|
62
|
813 |
#(#FullSpec
|
|
814 |
#'window:'
|
|
815 |
#(#WindowSpec
|
|
816 |
#'name:' 'uIPainterView'
|
|
817 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
818 |
#'label:' 'unnamed'
|
|
819 |
#'bounds:' #(#Rectangle 0 0 238 303)
|
|
820 |
)
|
|
821 |
#'component:'
|
|
822 |
#(#SpecCollection
|
|
823 |
#'collection:'
|
|
824 |
#(
|
|
825 |
#(#LabelSpec
|
|
826 |
#'name:' 'label1'
|
111
|
827 |
#'layout:' #(#AlignmentOrigin 52 0 44 0 1 0)
|
62
|
828 |
#'label:' 'left'
|
|
829 |
)
|
|
830 |
#(#LabelSpec
|
|
831 |
#'name:' 'label2'
|
111
|
832 |
#'layout:' #(#AlignmentOrigin 52 0 71 0 1 0)
|
62
|
833 |
#'label:' 'top'
|
|
834 |
)
|
|
835 |
#(#LabelSpec
|
|
836 |
#'name:' 'label3'
|
111
|
837 |
#'layout:' #(#Point 57 12)
|
62
|
838 |
#'label:' 'relative'
|
|
839 |
)
|
|
840 |
#(#LabelSpec
|
|
841 |
#'name:' 'label4'
|
111
|
842 |
#'layout:' #(#Point 154 13)
|
62
|
843 |
#'label:' 'offset'
|
|
844 |
)
|
|
845 |
#(#InputFieldSpec
|
|
846 |
#'name:' 'editField1'
|
111
|
847 |
#'layout:' #(#LayoutFrame 57 0 44 0 114 0 62 0)
|
62
|
848 |
#'model:' #leftFraction
|
|
849 |
#'tabable:' true
|
|
850 |
#'type:' #numberOrNil
|
|
851 |
)
|
|
852 |
#(#InputFieldSpec
|
|
853 |
#'name:' 'editField2'
|
111
|
854 |
#'layout:' #(#LayoutFrame 57 0 71 0 114 0 89 0)
|
62
|
855 |
#'model:' #topFraction
|
|
856 |
#'tabable:' true
|
|
857 |
#'type:' #numberOrNil
|
56
|
858 |
)
|
|
859 |
#(#InputFieldSpec
|
|
860 |
#'name:' 'editField3'
|
111
|
861 |
#'layout:' #(#LayoutFrame 154 0 44 0 212 0 62 0)
|
62
|
862 |
#'model:' #leftOffset
|
|
863 |
#'tabable:' true
|
56
|
864 |
#'type:' #numberOrNil
|
|
865 |
)
|
|
866 |
#(#InputFieldSpec
|
|
867 |
#'name:' 'editField4'
|
111
|
868 |
#'layout:' #(#LayoutFrame 154 0 71 0 212 0 89 0)
|
62
|
869 |
#'model:' #topOffset
|
|
870 |
#'tabable:' true
|
56
|
871 |
#'type:' #numberOrNil
|
|
872 |
)
|
|
873 |
#(#ActionButtonSpec
|
|
874 |
#'name:' 'button1'
|
111
|
875 |
#'layout:' #(#LayoutFrame 119 0 44 0 138 0 62 0)
|
56
|
876 |
#'label:' ''
|
|
877 |
#'model:' #makeRelativeLeft
|
111
|
878 |
#'isTriggerOnDown:' false
|
|
879 |
#'autoRepeat:' false
|
56
|
880 |
)
|
|
881 |
#(#ActionButtonSpec
|
|
882 |
#'name:' 'button2'
|
111
|
883 |
#'layout:' #(#LayoutFrame 119 0 71 0 138 0 89 0)
|
56
|
884 |
#'label:' ''
|
|
885 |
#'model:' #makeRelativeTop
|
111
|
886 |
#'isTriggerOnDown:' false
|
|
887 |
#'autoRepeat:' false
|
56
|
888 |
)
|
|
889 |
#(#ActionButtonSpec
|
|
890 |
#'name:' 'button3'
|
111
|
891 |
#'layout:' #(#LayoutFrame 216 0 44 0 235 0 62 0)
|
56
|
892 |
#'label:' ''
|
|
893 |
#'model:' #makeOffsetLeft
|
111
|
894 |
#'isTriggerOnDown:' false
|
|
895 |
#'autoRepeat:' false
|
56
|
896 |
)
|
|
897 |
#(#ActionButtonSpec
|
|
898 |
#'name:' 'button4'
|
111
|
899 |
#'layout:' #(#LayoutFrame 216 0 71 0 235 0 89 0)
|
56
|
900 |
#'label:' ''
|
|
901 |
#'model:' #makeOffsetTop
|
111
|
902 |
#'isTriggerOnDown:' false
|
|
903 |
#'autoRepeat:' false
|
56
|
904 |
)
|
62
|
905 |
#(#ActionButtonSpec
|
|
906 |
#'name:' 'button8'
|
111
|
907 |
#'layout:' #(#LayoutFrame 119 0 103 0 138 0 121 0)
|
62
|
908 |
#'label:' ''
|
|
909 |
#'model:' #makeRelativeLeftTop
|
111
|
910 |
#'isTriggerOnDown:' false
|
|
911 |
#'autoRepeat:' false
|
62
|
912 |
)
|
|
913 |
#(#ActionButtonSpec
|
|
914 |
#'name:' 'button9'
|
111
|
915 |
#'layout:' #(#LayoutFrame 216 0 103 0 235 0 121 0)
|
62
|
916 |
#'label:' ''
|
|
917 |
#'model:' #makeOffsetLeftTop
|
111
|
918 |
#'isTriggerOnDown:' false
|
|
919 |
#'autoRepeat:' false
|
62
|
920 |
)
|
|
921 |
#(#LabelSpec
|
|
922 |
#'name:' 'label5'
|
111
|
923 |
#'layout:' #(#AlignmentOrigin 52 0 103 0 1 0)
|
62
|
924 |
#'label:' 'all'
|
56
|
925 |
)
|
62
|
926 |
)
|
|
927 |
)
|
|
928 |
)
|
|
929 |
!
|
|
930 |
|
|
931 |
specificationPoint
|
|
932 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
933 |
|
|
934 |
"do not manually edit this - the painter/builder may not be able to
|
|
935 |
handle the specification if its corrupted."
|
|
936 |
|
|
937 |
"
|
111
|
938 |
UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationPoint
|
|
939 |
UIPropertyView::Dimension new openInterface:#specificationPoint
|
62
|
940 |
"
|
|
941 |
|
|
942 |
<resource: #canvas>
|
|
943 |
|
|
944 |
^
|
140
|
945 |
|
62
|
946 |
#(#FullSpec
|
|
947 |
#'window:'
|
|
948 |
#(#WindowSpec
|
|
949 |
#'name:' 'uIPainterView'
|
|
950 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
951 |
#'label:' 'unnamed'
|
|
952 |
#'bounds:' #(#Rectangle 0 0 238 303)
|
|
953 |
)
|
|
954 |
#'component:'
|
|
955 |
#(#SpecCollection
|
|
956 |
#'collection:'
|
|
957 |
#(
|
|
958 |
#(#LabelSpec
|
|
959 |
#'name:' 'label1'
|
111
|
960 |
#'layout:' #(#AlignmentOrigin 75 0 19 0 1 0)
|
62
|
961 |
#'label:' 'origin x:'
|
|
962 |
)
|
|
963 |
#(#LabelSpec
|
|
964 |
#'name:' 'label2'
|
111
|
965 |
#'layout:' #(#AlignmentOrigin 75 0 46 0 1 0)
|
62
|
966 |
#'label:' 'origin y:'
|
56
|
967 |
)
|
62
|
968 |
#(#InputFieldSpec
|
|
969 |
#'name:' 'editField1'
|
111
|
970 |
#'layout:' #(#LayoutFrame 77 0 19 0 170 0 37 0)
|
66
|
971 |
#'model:' #absLeft
|
62
|
972 |
#'tabable:' true
|
|
973 |
#'type:' #numberOrNil
|
|
974 |
)
|
|
975 |
#(#InputFieldSpec
|
|
976 |
#'name:' 'editField2'
|
111
|
977 |
#'layout:' #(#LayoutFrame 77 0 46 0 170 0 64 0)
|
66
|
978 |
#'model:' #absTop
|
62
|
979 |
#'tabable:' true
|
|
980 |
#'type:' #numberOrNil
|
|
981 |
)
|
56
|
982 |
)
|
|
983 |
)
|
|
984 |
)
|
62
|
985 |
!
|
56
|
986 |
|
62
|
987 |
specificationRectangle
|
|
988 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
989 |
|
|
990 |
"do not manually edit this - the painter/builder may not be able to
|
|
991 |
handle the specification if its corrupted."
|
|
992 |
|
|
993 |
"
|
111
|
994 |
UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationRectangle
|
|
995 |
UIPropertyView::Dimension new openInterface:#specificationRectangle
|
62
|
996 |
"
|
|
997 |
|
|
998 |
<resource: #canvas>
|
56
|
999 |
|
62
|
1000 |
^
|
140
|
1001 |
|
62
|
1002 |
#(#FullSpec
|
|
1003 |
#'window:'
|
|
1004 |
#(#WindowSpec
|
|
1005 |
#'name:' 'uIPainterView'
|
|
1006 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
1007 |
#'label:' 'unnamed'
|
|
1008 |
#'bounds:' #(#Rectangle 0 0 238 303)
|
|
1009 |
)
|
|
1010 |
#'component:'
|
|
1011 |
#(#SpecCollection
|
|
1012 |
#'collection:'
|
|
1013 |
#(
|
|
1014 |
#(#LabelSpec
|
|
1015 |
#'name:' 'label1'
|
111
|
1016 |
#'layout:' #(#AlignmentOrigin 80 0 19 0 1 0)
|
62
|
1017 |
#'label:' 'origin x:'
|
|
1018 |
#'adjust:' #left
|
|
1019 |
)
|
|
1020 |
#(#LabelSpec
|
|
1021 |
#'name:' 'label2'
|
111
|
1022 |
#'layout:' #(#AlignmentOrigin 80 0 46 0 1 0)
|
62
|
1023 |
#'label:' 'origin y:'
|
|
1024 |
#'adjust:' #left
|
|
1025 |
)
|
|
1026 |
#(#InputFieldSpec
|
|
1027 |
#'name:' 'editField1'
|
111
|
1028 |
#'layout:' #(#LayoutFrame 81 0 19 0 174 0 37 0)
|
62
|
1029 |
#'model:' #leftOffset
|
|
1030 |
#'tabable:' true
|
|
1031 |
#'type:' #numberOrNil
|
|
1032 |
)
|
|
1033 |
#(#InputFieldSpec
|
|
1034 |
#'name:' 'editField2'
|
111
|
1035 |
#'layout:' #(#LayoutFrame 81 0 46 0 174 0 64 0)
|
62
|
1036 |
#'model:' #topOffset
|
|
1037 |
#'tabable:' true
|
|
1038 |
#'type:' #numberOrNil
|
|
1039 |
)
|
|
1040 |
#(#LabelSpec
|
|
1041 |
#'name:' 'label4'
|
111
|
1042 |
#'layout:' #(#AlignmentOrigin 80 0 74 0 1 0)
|
62
|
1043 |
#'label:' 'corner x:'
|
|
1044 |
#'adjust:' #left
|
|
1045 |
)
|
|
1046 |
#(#LabelSpec
|
|
1047 |
#'name:' 'label5'
|
111
|
1048 |
#'layout:' #(#AlignmentOrigin 80 0 101 0 1 0)
|
62
|
1049 |
#'label:' 'corner y:'
|
|
1050 |
#'adjust:' #left
|
|
1051 |
)
|
|
1052 |
#(#InputFieldSpec
|
|
1053 |
#'name:' 'editField3'
|
111
|
1054 |
#'layout:' #(#LayoutFrame 81 0 74 0 174 0 92 0)
|
62
|
1055 |
#'model:' #rightOffset
|
|
1056 |
#'tabable:' true
|
|
1057 |
#'type:' #numberOrNil
|
|
1058 |
)
|
|
1059 |
#(#InputFieldSpec
|
|
1060 |
#'name:' 'editField4'
|
111
|
1061 |
#'layout:' #(#LayoutFrame 81 0 101 0 174 0 119 0)
|
62
|
1062 |
#'model:' #bottomOffset
|
|
1063 |
#'tabable:' true
|
|
1064 |
#'type:' #numberOrNil
|
|
1065 |
)
|
|
1066 |
)
|
|
1067 |
)
|
|
1068 |
)
|
56
|
1069 |
! !
|
|
1070 |
|
111
|
1071 |
!UIPropertyView::Dimension methodsFor:'accessing'!
|
59
|
1072 |
|
140
|
1073 |
forView
|
|
1074 |
"get the view the layout derives from
|
|
1075 |
"
|
|
1076 |
^ forView
|
|
1077 |
!
|
|
1078 |
|
111
|
1079 |
forView:aView
|
|
1080 |
"set the view the layout derives from
|
|
1081 |
"
|
122
|
1082 |
forView := aView.
|
144
|
1083 |
self update.
|
62
|
1084 |
!
|
56
|
1085 |
|
149
|
1086 |
label
|
|
1087 |
^ 'Layout'
|
|
1088 |
!
|
|
1089 |
|
111
|
1090 |
layout
|
|
1091 |
"returns current layout
|
|
1092 |
"
|
|
1093 |
|layout|
|
|
1094 |
|
|
1095 |
selection notNil ifTrue:[
|
|
1096 |
layout := self perform:(('get', selection asString) asSymbol).
|
|
1097 |
].
|
|
1098 |
^ layout
|
56
|
1099 |
!
|
|
1100 |
|
111
|
1101 |
layoutType
|
|
1102 |
"returns current layoutType
|
56
|
1103 |
"
|
111
|
1104 |
^ selection
|
144
|
1105 |
!
|
|
1106 |
|
|
1107 |
update
|
|
1108 |
"update from physical view
|
|
1109 |
"
|
|
1110 |
|superView|
|
|
1111 |
|
|
1112 |
forView notNil ifTrue:[
|
|
1113 |
superView := forView superView
|
|
1114 |
].
|
|
1115 |
noteBook enabled:((superView isNil or:[superView specClass isLayoutContainer]) not).
|
|
1116 |
self selection:(UIPainterView layoutType:forView).
|
|
1117 |
|
|
1118 |
|
111
|
1119 |
! !
|
74
|
1120 |
|
111
|
1121 |
!UIPropertyView::Dimension methodsFor:'accessing hierarchy'!
|
56
|
1122 |
|
111
|
1123 |
window
|
|
1124 |
^ noteBook
|
74
|
1125 |
|
|
1126 |
|
56
|
1127 |
! !
|
|
1128 |
|
111
|
1129 |
!UIPropertyView::Dimension methodsFor:'initialization'!
|
56
|
1130 |
|
111
|
1131 |
initialize
|
|
1132 |
"initialize channels
|
62
|
1133 |
"
|
111
|
1134 |
|layoutAspects|
|
56
|
1135 |
|
|
1136 |
super initialize.
|
|
1137 |
|
62
|
1138 |
layoutAspects := IdentityDictionary new.
|
59
|
1139 |
|
|
1140 |
#( bottomFraction bottomOffset
|
|
1141 |
leftFraction leftOffset
|
|
1142 |
topFraction topOffset
|
|
1143 |
rightFraction rightOffset
|
|
1144 |
leftAlignmentFraction topAlignmentFraction
|
66
|
1145 |
absLeft absTop
|
59
|
1146 |
)
|
111
|
1147 |
do:[:aKey|
|
|
1148 |
layoutAspects at:aKey put:(ValueHolder new)
|
59
|
1149 |
].
|
111
|
1150 |
self aspects:layoutAspects.
|
56
|
1151 |
|
|
1152 |
|
|
1153 |
!
|
|
1154 |
|
111
|
1155 |
origin:anOrigin corner:aCorner in:aTopView
|
|
1156 |
"set dimensions
|
62
|
1157 |
"
|
111
|
1158 |
noteBook := NoteBookView origin:anOrigin corner:aCorner in:aTopView.
|
|
1159 |
window := noteBook canvas.
|
59
|
1160 |
|
111
|
1161 |
noteBook direction:#bottom.
|
|
1162 |
noteBook useIndex:true.
|
|
1163 |
layoutTypes := #( #LayoutFrame #AlignmentOrigin #LayoutOrigin #Point #Rectangle ).
|
|
1164 |
noteBook list:#( 'Frame' 'Alig.Origin' 'LayoutOrigin' 'Point' 'Rectangle' ).
|
62
|
1165 |
|
111
|
1166 |
noteBook action:[:anIndex|
|
|
1167 |
anIndex notNil ifTrue:[self selection:(layoutTypes at:anIndex)].
|
59
|
1168 |
].
|
70
|
1169 |
|
111
|
1170 |
! !
|
|
1171 |
|
|
1172 |
!UIPropertyView::Dimension methodsFor:'layout access'!
|
|
1173 |
|
|
1174 |
getAlignmentOrigin
|
|
1175 |
"returns current layout as alignmentOrigin
|
|
1176 |
"
|
|
1177 |
|layout|
|
|
1178 |
|
|
1179 |
layout := AlignmentOrigin new.
|
59
|
1180 |
|
111
|
1181 |
layout leftOffset:((aspects at:#leftOffset) value) ? 0.
|
|
1182 |
layout topOffset:((aspects at:#topOffset) value) ? 0.
|
|
1183 |
layout leftFraction:((aspects at:#leftFraction) value) ? 0.
|
|
1184 |
layout topFraction:((aspects at:#topFraction) value) ? 0.
|
|
1185 |
|
|
1186 |
layout leftAlignmentFraction:((aspects at:#leftAlignmentFraction) value) ? 0.
|
|
1187 |
layout topAlignmentFraction:((aspects at:#topAlignmentFraction) value) ? 0.
|
|
1188 |
|
|
1189 |
^ layout
|
|
1190 |
!
|
|
1191 |
|
|
1192 |
getExtent
|
|
1193 |
"returns current extent
|
|
1194 |
"
|
|
1195 |
^ Point x:(((aspects at:#leftOffset) value) ? 0)
|
|
1196 |
y:(((aspects at:#rightOffset) value) ? 0)
|
64
|
1197 |
!
|
|
1198 |
|
111
|
1199 |
getLayoutFrame
|
|
1200 |
"returns current layout as layoutFrame
|
|
1201 |
"
|
|
1202 |
|layout|
|
|
1203 |
|
|
1204 |
layout := LayoutFrame new.
|
|
1205 |
|
|
1206 |
layout leftOffset:((aspects at:#leftOffset) value) ? 0.
|
|
1207 |
layout rightOffset:((aspects at:#rightOffset) value) ? 0.
|
|
1208 |
layout topOffset:((aspects at:#topOffset) value) ? 0.
|
|
1209 |
layout bottomOffset:((aspects at:#bottomOffset) value) ? 0.
|
|
1210 |
layout leftFraction:((aspects at:#leftFraction) value) ? 0.
|
|
1211 |
layout rightFraction:((aspects at:#rightFraction) value) ? 0.
|
|
1212 |
layout topFraction:((aspects at:#topFraction) value) ? 0.
|
|
1213 |
layout bottomFraction:((aspects at:#bottomFraction) value) ? 0.
|
|
1214 |
|
|
1215 |
^ layout
|
|
1216 |
!
|
|
1217 |
|
|
1218 |
getLayoutOrigin
|
|
1219 |
"returns current layout as layoutOrigin
|
64
|
1220 |
"
|
111
|
1221 |
|layout|
|
|
1222 |
|
|
1223 |
layout := LayoutOrigin new.
|
|
1224 |
|
|
1225 |
layout leftOffset:((aspects at:#leftOffset) value) ? 0.
|
|
1226 |
layout topOffset:((aspects at:#topOffset) value) ? 0.
|
|
1227 |
layout leftFraction:((aspects at:#leftFraction) value) ? 0.
|
|
1228 |
layout topFraction:((aspects at:#topFraction) value) ? 0.
|
|
1229 |
|
|
1230 |
^ layout
|
|
1231 |
!
|
|
1232 |
|
|
1233 |
getPoint
|
|
1234 |
"returns current layout as point
|
|
1235 |
"
|
|
1236 |
^ Point x:(((aspects at:#absLeft) value) ? 0)
|
|
1237 |
y:(((aspects at:#absTop) value) ? 0)
|
|
1238 |
!
|
|
1239 |
|
|
1240 |
getRectangle
|
|
1241 |
"returns current layout as rectangle
|
|
1242 |
"
|
|
1243 |
^ Rectangle left:(((aspects at:#leftOffset) value) ? 0)
|
|
1244 |
top:(((aspects at:#topOffset) value) ? 0)
|
|
1245 |
right:(((aspects at:#rightOffset) value) ? 0)
|
|
1246 |
bottom:(((aspects at:#bottomOffset) value) ? 0)
|
62
|
1247 |
! !
|
|
1248 |
|
111
|
1249 |
!UIPropertyView::Dimension methodsFor:'layout fetch'!
|
62
|
1250 |
|
|
1251 |
fetchAlignmentOrigin
|
|
1252 |
"fetch alignmentOrigin
|
|
1253 |
"
|
70
|
1254 |
|layout type extent|
|
|
1255 |
|
111
|
1256 |
type := UIPainterView layoutType:forView.
|
|
1257 |
layout := forView geometryLayout.
|
62
|
1258 |
|
70
|
1259 |
layout isLayout ifTrue:[
|
111
|
1260 |
(aspects at:#leftOffset) value:(layout leftOffset).
|
|
1261 |
(aspects at:#leftFraction) value:(layout leftFraction).
|
|
1262 |
(aspects at:#topOffset) value:(layout topOffset).
|
|
1263 |
(aspects at:#topFraction) value:(layout topFraction).
|
59
|
1264 |
|
70
|
1265 |
type == #AlignmentOrigin ifTrue:[
|
111
|
1266 |
(aspects at:#leftAlignmentFraction) value:(layout leftAlignmentFraction).
|
|
1267 |
(aspects at:#topAlignmentFraction) value:(layout topAlignmentFraction).
|
70
|
1268 |
^ self
|
|
1269 |
]
|
|
1270 |
] ifFalse:[
|
111
|
1271 |
layout := forView computeOrigin.
|
64
|
1272 |
|
111
|
1273 |
(aspects at:#leftOffset) value:(layout x).
|
|
1274 |
(aspects at:#leftFraction) value:0.
|
|
1275 |
(aspects at:#topOffset) value:(layout y).
|
|
1276 |
(aspects at:#topFraction) value:0.
|
70
|
1277 |
].
|
111
|
1278 |
(aspects at:#leftAlignmentFraction) value:0.
|
|
1279 |
(aspects at:#topAlignmentFraction) value:0.
|
62
|
1280 |
!
|
|
1281 |
|
|
1282 |
fetchExtent
|
111
|
1283 |
"fetch extent
|
|
1284 |
"
|
62
|
1285 |
|extent|
|
59
|
1286 |
|
111
|
1287 |
extent := forView computeExtent.
|
|
1288 |
|
|
1289 |
(aspects at:#leftOffset) value:(extent x).
|
|
1290 |
(aspects at:#rightOffset) value:(extent y).
|
|
1291 |
|
62
|
1292 |
!
|
|
1293 |
|
|
1294 |
fetchLayoutFrame
|
|
1295 |
"fetch layoutFrame
|
|
1296 |
"
|
70
|
1297 |
|layout|
|
59
|
1298 |
|
111
|
1299 |
layout := UIPainterView asLayoutFrameFromView:forView.
|
59
|
1300 |
|
111
|
1301 |
(aspects at:#leftOffset) value:(layout leftOffset).
|
|
1302 |
(aspects at:#leftFraction) value:(layout leftFraction).
|
|
1303 |
(aspects at:#topOffset) value:(layout topOffset).
|
|
1304 |
(aspects at:#topFraction) value:(layout topFraction).
|
|
1305 |
(aspects at:#rightOffset) value:(layout rightOffset).
|
|
1306 |
(aspects at:#bottomOffset) value:(layout bottomOffset).
|
|
1307 |
(aspects at:#rightFraction) value:(layout rightFraction).
|
|
1308 |
(aspects at:#bottomFraction) value:(layout bottomFraction).
|
62
|
1309 |
!
|
59
|
1310 |
|
62
|
1311 |
fetchLayoutOrigin
|
|
1312 |
"fetch layoutOrigin
|
|
1313 |
"
|
70
|
1314 |
|layout|
|
59
|
1315 |
|
111
|
1316 |
layout := UIPainterView asLayoutFrameFromView:forView.
|
62
|
1317 |
|
111
|
1318 |
(aspects at:#leftOffset) value:(layout leftOffset).
|
|
1319 |
(aspects at:#leftFraction) value:(layout leftFraction).
|
|
1320 |
(aspects at:#topOffset) value:(layout topOffset).
|
|
1321 |
(aspects at:#topFraction) value:(layout topFraction).
|
62
|
1322 |
!
|
59
|
1323 |
|
62
|
1324 |
fetchPoint
|
|
1325 |
"fetch point
|
|
1326 |
"
|
70
|
1327 |
|origin|
|
62
|
1328 |
|
111
|
1329 |
origin := forView computeOrigin.
|
|
1330 |
|
|
1331 |
(aspects at:#absLeft) value:(origin x).
|
|
1332 |
(aspects at:#absTop) value:(origin y).
|
|
1333 |
|
56
|
1334 |
!
|
|
1335 |
|
62
|
1336 |
fetchRectangle
|
|
1337 |
"fetch rectangle
|
|
1338 |
"
|
70
|
1339 |
|origin corner|
|
62
|
1340 |
|
111
|
1341 |
origin := forView computeOrigin.
|
|
1342 |
corner := forView computeCorner.
|
56
|
1343 |
|
111
|
1344 |
(aspects at:#leftOffset) value:(origin x).
|
|
1345 |
(aspects at:#rightOffset) value:(corner x).
|
|
1346 |
(aspects at:#topOffset) value:(origin y).
|
|
1347 |
(aspects at:#bottomOffset) value:(corner y).
|
59
|
1348 |
|
56
|
1349 |
! !
|
|
1350 |
|
111
|
1351 |
!UIPropertyView::Dimension methodsFor:'layout make align'!
|
56
|
1352 |
|
68
|
1353 |
makeAlignBottomCenter
|
|
1354 |
self makeAlignLeft:0.5 top:1
|
|
1355 |
|
111
|
1356 |
|
68
|
1357 |
!
|
|
1358 |
|
|
1359 |
makeAlignBottomLeft
|
|
1360 |
self makeAlignLeft:0 top:1
|
|
1361 |
|
111
|
1362 |
|
68
|
1363 |
!
|
|
1364 |
|
|
1365 |
makeAlignBottomRight
|
|
1366 |
self makeAlignLeft:1 top:1
|
|
1367 |
|
111
|
1368 |
|
68
|
1369 |
!
|
|
1370 |
|
|
1371 |
makeAlignCenter
|
|
1372 |
self makeAlignLeft:0.5 top:0.5
|
|
1373 |
|
|
1374 |
!
|
|
1375 |
|
70
|
1376 |
makeAlignLeft:leftAlignmentFraction top:topAlignmentFraction
|
|
1377 |
|lAF tAF lO tO ext|
|
68
|
1378 |
|
111
|
1379 |
lAF := (aspects at:#leftAlignmentFraction) value ? 0.
|
|
1380 |
tAF := (aspects at:#topAlignmentFraction) value ? 0.
|
|
1381 |
ext := forView computeExtent.
|
68
|
1382 |
|
111
|
1383 |
(aspects at:#leftAlignmentFraction) value:leftAlignmentFraction.
|
|
1384 |
(aspects at:#topAlignmentFraction) value:topAlignmentFraction.
|
70
|
1385 |
|
111
|
1386 |
lO := (aspects at:#leftOffset) value ? 0.
|
|
1387 |
tO := (aspects at:#topOffset) value ? 0.
|
68
|
1388 |
|
70
|
1389 |
lO := lO + (ext x * (leftAlignmentFraction - lAF)).
|
|
1390 |
tO := tO + (ext y * (topAlignmentFraction - tAF)).
|
68
|
1391 |
|
111
|
1392 |
(aspects at:#leftOffset) value:(lO rounded).
|
|
1393 |
(aspects at:#topOffset) value:(tO rounded).
|
68
|
1394 |
!
|
|
1395 |
|
|
1396 |
makeAlignLeftCenter
|
|
1397 |
self makeAlignLeft:0 top:0.5
|
|
1398 |
|
|
1399 |
!
|
|
1400 |
|
|
1401 |
makeAlignRightCenter
|
|
1402 |
self makeAlignLeft:1 top:0.5
|
|
1403 |
|
|
1404 |
!
|
|
1405 |
|
|
1406 |
makeAlignTopCenter
|
|
1407 |
self makeAlignLeft:0.5 top:0
|
|
1408 |
|
|
1409 |
!
|
|
1410 |
|
|
1411 |
makeAlignTopLeft
|
|
1412 |
self makeAlignLeft:0 top:0
|
|
1413 |
|
|
1414 |
!
|
|
1415 |
|
|
1416 |
makeAlignTopRight
|
|
1417 |
self makeAlignLeft:1 top:0
|
|
1418 |
|
111
|
1419 |
|
|
1420 |
! !
|
|
1421 |
|
|
1422 |
!UIPropertyView::Dimension methodsFor:'layout make relative/absolute'!
|
68
|
1423 |
|
56
|
1424 |
makeLayout:what xOrY:xOrY offset:aBool
|
70
|
1425 |
|extent fraction offset fractSymb offsetSymb|
|
56
|
1426 |
|
111
|
1427 |
extent := (forView superView computeExtent) perform:xOrY.
|
56
|
1428 |
fractSymb := (what, 'Fraction') asSymbol.
|
|
1429 |
offsetSymb := (what, 'Offset') asSymbol.
|
|
1430 |
|
111
|
1431 |
fraction := (aspects at:fractSymb) value.
|
|
1432 |
offset := (aspects at:offsetSymb) value.
|
56
|
1433 |
|
70
|
1434 |
aBool ifTrue:[
|
|
1435 |
offset := offset + ((fraction * extent) asInteger).
|
|
1436 |
fraction := 0.
|
|
1437 |
] ifFalse:[
|
|
1438 |
fraction := (fraction + (offset / extent)) asFloat.
|
56
|
1439 |
|
70
|
1440 |
(fraction > 1.0) ifTrue:[ fraction := 1.0 ].
|
|
1441 |
(fraction < 0.0) ifTrue:[ fraction := 0 ].
|
|
1442 |
offset := 0.
|
|
1443 |
].
|
111
|
1444 |
(aspects at:offsetSymb) value:offset.
|
|
1445 |
(aspects at:fractSymb) value:fraction.
|
56
|
1446 |
!
|
|
1447 |
|
|
1448 |
makeOffsetAll
|
|
1449 |
self makeOffsetLeft.
|
|
1450 |
self makeOffsetTop.
|
|
1451 |
self makeOffsetRight.
|
|
1452 |
self makeOffsetBottom.
|
|
1453 |
|
111
|
1454 |
|
56
|
1455 |
!
|
|
1456 |
|
|
1457 |
makeOffsetBottom
|
|
1458 |
self makeLayout:'bottom' xOrY:#y offset:true.
|
|
1459 |
|
111
|
1460 |
|
56
|
1461 |
!
|
|
1462 |
|
|
1463 |
makeOffsetLeft
|
|
1464 |
self makeLayout:'left' xOrY:#x offset:true.
|
|
1465 |
|
|
1466 |
!
|
|
1467 |
|
62
|
1468 |
makeOffsetLeftTop
|
|
1469 |
self makeOffsetLeft.
|
|
1470 |
self makeOffsetTop.
|
111
|
1471 |
|
62
|
1472 |
!
|
|
1473 |
|
56
|
1474 |
makeOffsetRight
|
|
1475 |
self makeLayout:'right' xOrY:#x offset:true.
|
|
1476 |
|
|
1477 |
!
|
|
1478 |
|
|
1479 |
makeOffsetTop
|
|
1480 |
self makeLayout:'top' xOrY:#y offset:true.
|
|
1481 |
|
|
1482 |
!
|
|
1483 |
|
|
1484 |
makeRelativeAll
|
|
1485 |
self makeRelativeLeft.
|
|
1486 |
self makeRelativeTop.
|
|
1487 |
self makeRelativeRight.
|
|
1488 |
self makeRelativeBottom.
|
|
1489 |
|
111
|
1490 |
|
56
|
1491 |
!
|
|
1492 |
|
|
1493 |
makeRelativeBottom
|
|
1494 |
self makeLayout:'bottom' xOrY:#y offset:false.
|
|
1495 |
|
111
|
1496 |
|
56
|
1497 |
!
|
|
1498 |
|
|
1499 |
makeRelativeLeft
|
|
1500 |
self makeLayout:'left' xOrY:#x offset:false.
|
|
1501 |
|
|
1502 |
!
|
|
1503 |
|
62
|
1504 |
makeRelativeLeftTop
|
|
1505 |
self makeRelativeLeft.
|
|
1506 |
self makeRelativeTop.
|
111
|
1507 |
|
62
|
1508 |
!
|
|
1509 |
|
56
|
1510 |
makeRelativeRight
|
|
1511 |
self makeLayout:'right' xOrY:#x offset:false.
|
|
1512 |
|
|
1513 |
!
|
|
1514 |
|
|
1515 |
makeRelativeTop
|
|
1516 |
self makeLayout:'top' xOrY:#y offset:false.
|
|
1517 |
|
|
1518 |
! !
|
|
1519 |
|
111
|
1520 |
!UIPropertyView::Dimension methodsFor:'selection'!
|
|
1521 |
|
|
1522 |
selection
|
|
1523 |
^ selection
|
74
|
1524 |
|
111
|
1525 |
!
|
|
1526 |
|
|
1527 |
selection:aLayoutType
|
|
1528 |
|spec idx|
|
74
|
1529 |
|
111
|
1530 |
selection == aLayoutType ifFalse:[
|
|
1531 |
(selection := aLayoutType) notNil ifTrue:[
|
|
1532 |
self perform:(('fetch', selection asString) asSymbol).
|
|
1533 |
spec := ('specification', selection asString) asSymbol.
|
|
1534 |
spec := self class perform:spec.
|
|
1535 |
].
|
|
1536 |
self buildFromSpec:spec.
|
126
|
1537 |
] ifTrue:[
|
|
1538 |
selection notNil ifTrue:[
|
122
|
1539 |
self perform:(('fetch', selection asString) asSymbol).
|
126
|
1540 |
self modified:false.
|
|
1541 |
]
|
111
|
1542 |
].
|
122
|
1543 |
idx := layoutTypes findFirst:[:type| type == aLayoutType ].
|
|
1544 |
noteBook setSelection:idx.
|
74
|
1545 |
|
59
|
1546 |
! !
|
|
1547 |
|
56
|
1548 |
!UIPropertyView class methodsFor:'documentation'!
|
|
1549 |
|
|
1550 |
version
|
|
1551 |
^ '$Header$'
|
|
1552 |
! !
|