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