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