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