104 ! ! |
104 ! ! |
105 |
105 |
106 !UILayoutTool class methodsFor:'help specs'! |
106 !UILayoutTool class methodsFor:'help specs'! |
107 |
107 |
108 helpSpec |
108 helpSpec |
109 "return a dictionary filled with helpKey -> helptext associations. |
109 "This resource specification was automatically generated |
110 These are used by the activeHelp tool." |
110 by the UIHelpTool of ST/X." |
111 |
111 |
112 " |
112 "Do not manually edit this!! If it is corrupted, |
113 UIHelpTool openOnClass:UILayoutTool |
113 the UIHelpTool may not be able to read the specification." |
114 " |
114 |
115 |
115 " |
116 ^ super helpSpec addPairsFrom:#( |
116 UIHelpTool openOnClass:UILayoutTool |
|
117 " |
|
118 |
|
119 <resource: #help> |
|
120 |
|
121 ^super helpSpec addPairsFrom:#( |
|
122 |
|
123 #cornerX |
|
124 'Absolute corner x of the selected widget.' |
|
125 |
|
126 #cornerY |
|
127 'Absolute corner y of the selected widget.' |
|
128 |
|
129 #layoutTool |
|
130 'Tool to set the layout of the selected widget.' |
117 |
131 |
118 #leftAbsolute |
132 #leftAbsolute |
119 'Offset of the left edge; positive is to the right, negative to the left.' |
133 'Offset of the left edge; positive is to the right, negative to the left.' |
120 |
134 |
|
135 #leftRelative |
|
136 'Relative origin x of the selected widget.' |
|
137 |
|
138 #makeLeftAbsolute |
|
139 'Computes current left offset and relative origin x to an absolute origin x.' |
|
140 |
|
141 #makeLeftRelative |
|
142 'Compute current relative origin x and offset of the left edge to a relative origin x.' |
|
143 |
|
144 #makeTopAbsolute |
|
145 'Computes current top offset and relative origin y to an absolute origin y.' |
|
146 |
|
147 #makeTopRelative |
|
148 'Computes current relative origin y and offset of the top edge to a relative origin y.' |
|
149 |
|
150 #originX |
|
151 'Absolute origin x of the selected widget.' |
|
152 |
121 #originY |
153 #originY |
122 'Absolute origin y of the selected widget.' |
154 'Absolute origin y of the selected widget.' |
123 |
155 |
124 #cornerY |
|
125 'Absolute corner y of the selected widget.' |
|
126 |
|
127 #makeLeftAbsolute |
|
128 'Computes current left offset and relative origin x to an absolute origin x.' |
|
129 |
|
130 #topAbsolute |
156 #topAbsolute |
131 'Offset of the top edge; positive is to the bottom, negative to the top.' |
157 'Offset of the top edge; positive is to the bottom, negative to the top.' |
132 |
158 |
133 #makeTopRelative |
|
134 'Computes current relative origin y and offset of the top edge to a relative origin y.' |
|
135 |
|
136 #leftRelative |
|
137 'Relative origin x of the selected widget.' |
|
138 |
|
139 #makeLeftRelative |
|
140 'Compute current relative origin x and offset of the left edge to a relative origin x.' |
|
141 |
|
142 #topRelative |
159 #topRelative |
143 'Relative origin y of the selected widget.' |
160 'Relative origin y of the selected widget.' |
144 |
161 |
145 #originX |
|
146 'Absolute origin x of the selected widget.' |
|
147 |
|
148 #cornerX |
|
149 'Absolute corner x of the selected widget.' |
|
150 |
|
151 #layoutTool |
|
152 'Tool to set the layout of the selected widget.' |
|
153 |
|
154 #makeTopAbsolute |
|
155 'Computes current top offset and relative origin y to an absolute origin y.' |
|
156 |
|
157 ) |
162 ) |
158 ! ! |
163 ! ! |
159 |
164 |
160 !UILayoutTool class methodsFor:'interface specs'! |
165 !UILayoutTool class methodsFor:'interface specs'! |
161 |
166 |
162 layoutOriginSpec |
167 layoutOriginSpec |
163 "this window spec was automatically generated by the ST/X UIPainter" |
168 "This resource specification was automatically generated |
164 |
169 by the UIPainter of ST/X." |
165 "do not manually edit this - the painter/builder may not be able to |
170 |
166 handle the specification if its corrupted." |
171 "Do not manually edit this!! If it is corrupted, |
|
172 the UIPainter may not be able to read the specification." |
167 |
173 |
168 " |
174 " |
169 UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec |
175 UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec |
170 UILayoutTool new openInterface:#layoutOriginSpec |
176 UILayoutTool new openInterface:#layoutOriginSpec |
171 " |
177 " |
342 ) |
349 ) |
343 |
350 |
344 ! |
351 ! |
345 |
352 |
346 windowSpec |
353 windowSpec |
347 "this window spec was automatically generated by the ST/X UIPainter" |
354 "This resource specification was automatically generated |
348 |
355 by the UIPainter of ST/X." |
349 "do not manually edit this - the painter/builder may not be able to |
356 |
350 handle the specification if its corrupted." |
357 "Do not manually edit this!! If it is corrupted, |
|
358 the UIPainter may not be able to read the specification." |
351 |
359 |
352 " |
360 " |
353 UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec |
361 UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec |
354 UILayoutTool new openInterface:#windowSpec |
362 UILayoutTool new openInterface:#windowSpec |
355 " |
363 UILayoutTool open |
356 "UILayoutTool open" |
364 " |
357 |
365 |
358 <resource: #canvas> |
366 <resource: #canvas> |
359 |
367 |
360 ^ |
368 ^ |
361 |
369 |
362 #(#FullSpec |
370 #(#FullSpec |
363 #'window:' |
371 #window: |
364 #(#WindowSpec |
372 #(#WindowSpec |
365 #'name:' 'uIPainterView' |
373 #name: 'UILayoutTool' |
366 #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
374 #layout: #(#LayoutFrame 571 0 290 0 870 0 589 0) |
367 #'label:' 'unnamed canvas' |
375 #label: 'UILayoutTool' |
368 #'bounds:' #(#Rectangle 0 0 300 300) |
376 #min: #(#Point 10 10) |
369 ) |
377 #max: #(#Point 1152 900) |
370 #'component:' |
378 #bounds: #(#Rectangle 571 290 871 590) |
|
379 #usePreferredExtent: false |
|
380 ) |
|
381 #component: |
371 #(#SpecCollection |
382 #(#SpecCollection |
372 #'collection:' |
383 #collection: |
373 #( |
384 #( |
374 #(#NoteBookViewSpec |
385 #(#NoteBookViewSpec |
375 #'name:' 'NoteBook' |
386 #name: 'NoteBook' |
376 #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
387 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
377 #'activeHelpKey:' #layoutTool |
388 #activeHelpKey: #layoutTool |
378 #'enableChannel:' #enableChannel |
389 #enableChannel: #enableChannel |
379 #'tabable:' true |
390 #tabable: true |
380 #'menu:' #noteBookList |
391 #model: #noteBookModel |
381 #'style:' |
392 #menu: #noteBookList |
382 #(#FontDescription |
393 #style: #(#FontDescription #helvetica #medium #roman #'10') |
383 #helvetica #medium |
394 #direction: #bottom |
384 #roman #'10' |
395 #canvas: #noteBookView |
385 ) |
|
386 #'model:' #noteBookModel |
|
387 #'tabWidget:' #Window |
|
388 #'direction:' #bottom |
|
389 #'canvas:' #noteBookView |
|
390 ) |
396 ) |
391 ) |
397 ) |
392 ) |
398 ) |
393 ) |
399 ) |
394 ! ! |
400 ! ! |
706 noteBook := self noteBookView. |
712 noteBook := self noteBookView. |
707 noteBook client:appl. |
713 noteBook client:appl. |
708 |
714 |
709 appl notNil ifTrue:[ |
715 appl notNil ifTrue:[ |
710 noteBook scrolledView allViewBackground:(noteBook viewBackground). |
716 noteBook scrolledView allViewBackground:(noteBook viewBackground). |
|
717 masterApplication updateFonts |
711 ] |
718 ] |
712 ]. |
719 ]. |
713 self update |
720 self update |
714 |
721 |
715 ! ! |
722 ! ! |
716 |
723 |
717 !UILayoutTool::AlignmentOrigin class methodsFor:'help specs'! |
724 !UILayoutTool::AlignmentOrigin class methodsFor:'help specs'! |
718 |
725 |
719 helpSpec |
726 helpSpec |
720 "return a dictionary filled with helpKey -> helptext associations. |
727 "This resource specification was automatically generated |
721 These are used by the activeHelp tool." |
728 by the UIHelpTool of ST/X." |
722 |
729 |
723 " |
730 "Do not manually edit this!! If it is corrupted, |
724 UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin |
731 the UIHelpTool may not be able to read the specification." |
725 " |
732 |
726 |
733 " |
727 ^ super helpSpec addPairsFrom:#( |
734 UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin |
|
735 " |
|
736 |
|
737 <resource: #help> |
|
738 |
|
739 ^super helpSpec addPairsFrom:#( |
|
740 |
|
741 #alignBottomCenter |
|
742 'Aligns the selected widget bottomCenter to location.' |
|
743 |
|
744 #alignBottomLeft |
|
745 'Aligns the selected widget bottomLeft to location.' |
|
746 |
|
747 #alignBottomRight |
|
748 'Aligns the selected widget bottomRight to location.' |
|
749 |
|
750 #alignCenter |
|
751 'Aligns the selected widget center to location.' |
|
752 |
|
753 #alignHorizontal |
|
754 'Horizontal inset to the location point of the selected widget.' |
728 |
755 |
729 #alignLeftCenter |
756 #alignLeftCenter |
730 'Aligns the selected widget leftCenter to location.' |
757 'Aligns the selected widget leftCenter to location.' |
731 |
758 |
732 #alignBottomCenter |
759 #alignRightCenter |
733 'Aligns the selected widget bottomCenter to location.' |
760 'Aligns the selected widget rightCenter to location.' |
734 |
|
735 #alignHorizontal |
|
736 'Horizontal inset to the location point of the selected widget.' |
|
737 |
|
738 #alignBottomRight |
|
739 'Aligns the selected widget bottomRight to location.' |
|
740 |
761 |
741 #alignTopCenter |
762 #alignTopCenter |
742 'Aligns the selected widget topCenter to location.' |
763 'Aligns the selected widget topCenter to location.' |
743 |
764 |
744 #alignTopLeft |
765 #alignTopLeft |
745 'Aligns the selected widget topLeft to location.' |
766 'Aligns the selected widget topLeft to location.' |
746 |
767 |
747 #alignTopRight |
768 #alignTopRight |
748 'Aligns the selected widget topRight to location.' |
769 'Aligns the selected widget topRight to location.' |
749 |
770 |
750 #alignCenter |
|
751 'Aligns the selected widget center to location.' |
|
752 |
|
753 #alignVertical |
771 #alignVertical |
754 'Vertical inset to the location point of the widget.' |
772 'Vertical inset to the location point of the widget.' |
755 |
773 |
756 #alignBottomLeft |
|
757 'Aligns the selected widget bottomLeft to location.' |
|
758 |
|
759 #alignRightCenter |
|
760 'Aligns the selected widget rightCenter to location.' |
|
761 |
|
762 ) |
774 ) |
763 ! ! |
775 ! ! |
764 |
776 |
765 !UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'! |
777 !UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'! |
766 |
778 |
767 windowSpec |
779 windowSpec |
768 "this window spec was automatically generated by the ST/X UIPainter" |
780 "This resource specification was automatically generated |
769 |
781 by the UIPainter of ST/X." |
770 "do not manually edit this - the painter/builder may not be able to |
782 |
771 handle the specification if its corrupted." |
783 "Do not manually edit this!! If it is corrupted, |
|
784 the UIPainter may not be able to read the specification." |
772 |
785 |
773 " |
786 " |
774 UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec |
787 UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec |
775 UILayoutTool::AlignmentOrigin new openInterface:#windowSpec |
788 UILayoutTool::AlignmentOrigin new openInterface:#windowSpec |
776 " |
789 UILayoutTool::AlignmentOrigin open |
777 "UILayoutTool::AlignmentOrigin open" |
790 " |
778 |
791 |
779 <resource: #canvas> |
792 <resource: #canvas> |
780 |
793 |
781 ^ |
794 ^ |
782 |
795 |
783 #(#FullSpec |
796 #(#FullSpec |
784 #window: |
797 #window: |
785 #(#WindowSpec |
798 #(#WindowSpec |
786 #name: 'uIPainterView' |
799 #name: 'UILayoutTool-AlignmentOrigin' |
787 #layout: #(#LayoutFrame 31 0 423 0 298 0 627 0) |
800 #layout: #(#LayoutFrame 206 0 285 0 473 0 489 0) |
788 #label: 'AlignmentOrigin' |
801 #label: 'UILayoutTool-AlignmentOrigin' |
789 #min: #(#Point 10 10) |
802 #min: #(#Point 10 10) |
790 #max: #(#Point 1152 900) |
803 #max: #(#Point 1152 900) |
791 #bounds: #(#Rectangle 31 423 299 628) |
804 #bounds: #(#Rectangle 206 285 474 490) |
792 #usePreferredExtent: false |
805 #usePreferredExtent: false |
793 ) |
806 ) |
794 #component: |
807 #component: |
795 #(#SpecCollection |
808 #(#SpecCollection |
796 #collection: |
809 #collection: |
797 #( |
810 #( |
798 #(#UISubSpecification |
811 #(#UISubSpecification |
799 #name: 'subSpecification' |
812 #name: 'subSpec' |
800 #layout: #(#LayoutOrigin 0 0 0 0) |
813 #layout: #(#LayoutOrigin 0 0 0 0) |
801 #majorKey: #UILayoutTool |
814 #majorKey: #UILayoutTool |
802 #minorKey: #layoutOriginSpec |
815 #minorKey: #layoutOriginSpec |
803 ) |
816 ) |
804 #(#LabelSpec |
817 #(#LabelSpec |
805 #name: 'label5' |
818 #name: 'alignHLabel' |
806 #layout: #(#AlignmentOrigin 78 0 102 0 1 0) |
819 #layout: #(#AlignmentOrigin 78 0 102 0 1 0) |
807 #label: 'Align H:' |
820 #label: 'Align H:' |
808 #adjust: #right |
821 #adjust: #right |
809 ) |
822 ) |
810 #(#LabelSpec |
823 #(#LabelSpec |
811 #name: 'label6' |
824 #name: 'alignVLabel' |
812 #layout: #(#AlignmentOrigin 78 0 128 0 1 0) |
825 #layout: #(#AlignmentOrigin 78 0 128 0 1 0) |
813 #label: 'Align V:' |
826 #label: 'Align V:' |
814 #adjust: #right |
827 #adjust: #right |
815 ) |
828 ) |
816 #(#InputFieldSpec |
829 #(#InputFieldSpec |
817 #name: 'editField5' |
830 #name: 'leftAlignmentFractionField' |
818 #layout: #(#LayoutFrame 80 0 99 0 137 0 121 0) |
831 #layout: #(#LayoutFrame 80 0 99 0 137 0 121 0) |
819 #activeHelpKey: #alignHorizontal |
832 #activeHelpKey: #alignHorizontal |
820 #tabable: true |
833 #tabable: true |
821 #model: #leftAlignmentFraction |
834 #model: #leftAlignmentFraction |
822 #type: #numberOrNil |
835 #type: #numberOrNil |
823 ) |
836 ) |
824 #(#InputFieldSpec |
837 #(#InputFieldSpec |
825 #name: 'editField6' |
838 #name: 'topAlignmentFractionField' |
826 #layout: #(#LayoutFrame 80 0 125 0 137 0 147 0) |
839 #layout: #(#LayoutFrame 80 0 125 0 137 0 147 0) |
827 #activeHelpKey: #alignVertical |
840 #activeHelpKey: #alignVertical |
828 #tabable: true |
841 #tabable: true |
829 #model: #topAlignmentFraction |
842 #model: #topAlignmentFraction |
830 #type: #numberOrNil |
843 #type: #numberOrNil |
1155 ! ! |
1173 ! ! |
1156 |
1174 |
1157 !UILayoutTool::LayoutFrame class methodsFor:'help specs'! |
1175 !UILayoutTool::LayoutFrame class methodsFor:'help specs'! |
1158 |
1176 |
1159 helpSpec |
1177 helpSpec |
1160 "return a dictionary filled with helpKey -> helptext associations. |
1178 "This resource specification was automatically generated |
1161 These are used by the activeHelp tool." |
1179 by the UIHelpTool of ST/X." |
1162 |
1180 |
1163 " |
1181 "Do not manually edit this!! If it is corrupted, |
1164 UIHelpTool openOnClass:UILayoutTool::LayoutFrame |
1182 the UIHelpTool may not be able to read the specification." |
1165 " |
1183 |
1166 |
1184 " |
1167 ^ super helpSpec addPairsFrom:#( |
1185 UIHelpTool openOnClass:UILayoutTool::LayoutFrame |
|
1186 " |
|
1187 |
|
1188 <resource: #help> |
|
1189 |
|
1190 ^super helpSpec addPairsFrom:#( |
|
1191 |
|
1192 #bottomAbsolute |
|
1193 'Offset of the bottom edge; positive is to the bottom, negative to the top.' |
|
1194 |
|
1195 #bottomRelative |
|
1196 'Relative corner y of the selected widget.' |
|
1197 |
|
1198 #makeBottomAbsolute |
|
1199 'Computes current bottom offset and relative corner y to an absolute corner y.' |
|
1200 |
|
1201 #makeBottomRelative |
|
1202 'Computes current relative corner y and offset of the bottom edge to a relative corner y.' |
|
1203 |
|
1204 #makeRightAbsolute |
|
1205 'Computes current right offset and relative corner x to an absolute corner x.' |
1168 |
1206 |
1169 #makeRightRelative |
1207 #makeRightRelative |
1170 'Computes current relative corner x and offset of the right edge to a relative corner x.' |
1208 'Computes current relative corner x and offset of the right edge to a relative corner x.' |
1171 |
1209 |
1172 #makeBottomAbsolute |
1210 #rightAbsolute |
1173 'Computes current bottom offset and relative corner y to an absolute corner y.' |
1211 'Offset of the right edge; positive is to the right, negative to the left.' |
1174 |
|
1175 #bottomAbsolute |
|
1176 'Offset of the bottom edge; positive is to the bottom, negative to the top.' |
|
1177 |
1212 |
1178 #rightRelative |
1213 #rightRelative |
1179 'Relative corner x of the selected widget.' |
1214 'Relative corner x of the selected widget.' |
1180 |
|
1181 #makeBottomRelative |
|
1182 'Computes current relative corner y and offset of the bottom edge to a relative corner y.' |
|
1183 |
|
1184 #makeRightAbsolute |
|
1185 'Computes current right offset and relative corner x to an absolute corner x.' |
|
1186 |
|
1187 #bottomRelative |
|
1188 'Relative corner y of the selected widget.' |
|
1189 |
|
1190 #rightAbsolute |
|
1191 'Offset of the right edge; positive is to the right, negative to the left.' |
|
1192 |
1215 |
1193 ) |
1216 ) |
1194 ! ! |
1217 ! ! |
1195 |
1218 |
1196 !UILayoutTool::LayoutFrame class methodsFor:'interface specs'! |
1219 !UILayoutTool::LayoutFrame class methodsFor:'interface specs'! |
1338 ! ! |
1361 ! ! |
1339 |
1362 |
1340 !UILayoutTool::LayoutOrigin class methodsFor:'interface specs'! |
1363 !UILayoutTool::LayoutOrigin class methodsFor:'interface specs'! |
1341 |
1364 |
1342 windowSpec |
1365 windowSpec |
1343 "this window spec was automatically generated by the ST/X UIPainter" |
1366 "This resource specification was automatically generated |
1344 |
1367 by the UIPainter of ST/X." |
1345 "do not manually edit this - the painter/builder may not be able to |
1368 |
1346 handle the specification if its corrupted." |
1369 "Do not manually edit this!! If it is corrupted, |
|
1370 the UIPainter may not be able to read the specification." |
1347 |
1371 |
1348 " |
1372 " |
1349 UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec |
1373 UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec |
1350 UILayoutTool::LayoutOrigin new openInterface:#windowSpec |
1374 UILayoutTool::LayoutOrigin new openInterface:#windowSpec |
1351 " |
1375 UILayoutTool::LayoutOrigin open |
1352 "UILayoutTool::LayoutOrigin open" |
1376 " |
1353 |
|
1354 <resource: #canvas> |
|
1355 |
|
1356 ^ |
|
1357 |
|
1358 #(#FullSpec |
|
1359 #'window:' |
|
1360 #(#WindowSpec |
|
1361 #'name:' 'uIPainterView' |
|
1362 #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1363 #'label:' 'unnamed' |
|
1364 #'bounds:' #(#Rectangle 0 0 258 93) |
|
1365 ) |
|
1366 #'component:' |
|
1367 #(#SpecCollection |
|
1368 #'collection:' |
|
1369 #( |
|
1370 #(#UISubSpecification |
|
1371 #'name:' 'subSpecification' |
|
1372 #'layout:' #(#LayoutOrigin 0 0 0 0) |
|
1373 #'majorKey:' #UILayoutTool |
|
1374 #'minorKey:' #layoutOriginSpec |
|
1375 ) |
|
1376 ) |
|
1377 ) |
|
1378 ) |
|
1379 ! ! |
|
1380 |
|
1381 !UILayoutTool::LayoutOrigin methodsFor:'accessing'! |
|
1382 |
|
1383 fetch:aView |
|
1384 "fetch layoutOrigin |
|
1385 " |
|
1386 |layout| |
|
1387 |
|
1388 layout := UIPainterView asLayoutFrameFromView:aView. |
|
1389 |
|
1390 (self aspectFor:#leftOffset) value:(layout leftOffset). |
|
1391 (self aspectFor:#leftFraction) value:(layout leftFraction). |
|
1392 (self aspectFor:#topOffset) value:(layout topOffset). |
|
1393 (self aspectFor:#topFraction) value:(layout topFraction). |
|
1394 |
|
1395 |
|
1396 ! |
|
1397 |
|
1398 layout |
|
1399 "returns current layout as layoutOrigin |
|
1400 " |
|
1401 |layout| |
|
1402 |
|
1403 layout := Smalltalk::LayoutOrigin new. |
|
1404 |
|
1405 layout leftOffset:((self aspectFor:#leftOffset) value) ? 0. |
|
1406 layout topOffset:((self aspectFor:#topOffset) value) ? 0. |
|
1407 layout leftFraction:((self aspectFor:#leftFraction) value) ? 0. |
|
1408 layout topFraction:((self aspectFor:#topFraction) value) ? 0. |
|
1409 |
|
1410 ^ layout |
|
1411 |
|
1412 ! ! |
|
1413 |
|
1414 !UILayoutTool::Point class methodsFor:'interface specs'! |
|
1415 |
|
1416 windowSpec |
|
1417 "this window spec was automatically generated by the ST/X UIPainter" |
|
1418 |
|
1419 "do not manually edit this - the painter/builder may not be able to |
|
1420 handle the specification if its corrupted." |
|
1421 |
|
1422 " |
|
1423 UIPainter new openOnClass:UILayoutTool::Point andSelector:#windowSpec |
|
1424 UILayoutTool::Point new openInterface:#windowSpec |
|
1425 " |
|
1426 "UILayoutTool::Point open" |
|
1427 |
|
1428 <resource: #canvas> |
|
1429 |
|
1430 ^ |
|
1431 |
|
1432 #(#FullSpec |
|
1433 #'window:' |
|
1434 #(#WindowSpec |
|
1435 #'name:' 'uIPainterView' |
|
1436 #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1437 #'label:' 'unnamed' |
|
1438 #'bounds:' #(#Rectangle 0 0 194 66) |
|
1439 ) |
|
1440 #'component:' |
|
1441 #(#SpecCollection |
|
1442 #'collection:' |
|
1443 #( |
|
1444 #(#UISubSpecification |
|
1445 #'name:' 'subSpecification' |
|
1446 #'layout:' #(#LayoutOrigin 0 0 0 0) |
|
1447 #'majorKey:' #UILayoutTool |
|
1448 #'minorKey:' #layoutPointSpec |
|
1449 ) |
|
1450 ) |
|
1451 ) |
|
1452 ) |
|
1453 ! ! |
|
1454 |
|
1455 !UILayoutTool::Point methodsFor:'accessing'! |
|
1456 |
|
1457 fetch:aView |
|
1458 "fetch point |
|
1459 " |
|
1460 |origin| |
|
1461 |
|
1462 origin := aView computeOrigin. |
|
1463 |
|
1464 (self aspectFor:#leftOffset) value:(origin x). |
|
1465 (self aspectFor:#topOffset) value:(origin y). |
|
1466 |
|
1467 |
|
1468 ! |
|
1469 |
|
1470 layout |
|
1471 "returns current layout as point |
|
1472 " |
|
1473 ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
|
1474 y:(((self aspectFor:#topOffset) value) ? 0) |
|
1475 |
|
1476 ! ! |
|
1477 |
|
1478 !UILayoutTool::Rectangle class methodsFor:'interface specs'! |
|
1479 |
|
1480 windowSpec |
|
1481 "this window spec was automatically generated by the ST/X UIPainter" |
|
1482 |
|
1483 "do not manually edit this - the painter/builder may not be able to |
|
1484 handle the specification if its corrupted." |
|
1485 |
|
1486 " |
|
1487 UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec |
|
1488 UILayoutTool::Rectangle new openInterface:#windowSpec |
|
1489 " |
|
1490 "UILayoutTool::Rectangle open" |
|
1491 |
1377 |
1492 <resource: #canvas> |
1378 <resource: #canvas> |
1493 |
1379 |
1494 ^ |
1380 ^ |
1495 |
1381 |
1496 #(#FullSpec |
1382 #(#FullSpec |
1497 #window: |
1383 #window: |
1498 #(#WindowSpec |
1384 #(#WindowSpec |
1499 #name: 'uIPainterView' |
1385 #name: 'UILayoutTool-LayoutOrigin' |
1500 #layout: #(#LayoutFrame 31 0 423 0 254 0 568 0) |
1386 #layout: #(#LayoutFrame 417 0 298 0 674 0 390 0) |
1501 #label: 'unnamed' |
1387 #label: 'UILayoutTool-LayoutOrigin' |
1502 #min: #(#Point 10 10) |
1388 #min: #(#Point 10 10) |
1503 #max: #(#Point 1152 900) |
1389 #max: #(#Point 1152 900) |
1504 #bounds: #(#Rectangle 31 423 255 569) |
1390 #bounds: #(#Rectangle 417 298 675 391) |
|
1391 #usePreferredExtent: false |
|
1392 ) |
|
1393 #component: |
|
1394 #(#SpecCollection |
|
1395 #collection: |
|
1396 #( |
|
1397 #(#UISubSpecification |
|
1398 #name: 'subSpec' |
|
1399 #layout: #(#LayoutOrigin 0 0 0 0) |
|
1400 #majorKey: #UILayoutTool |
|
1401 #minorKey: #layoutOriginSpec |
|
1402 ) |
|
1403 ) |
|
1404 ) |
|
1405 ) |
|
1406 ! ! |
|
1407 |
|
1408 !UILayoutTool::LayoutOrigin methodsFor:'accessing'! |
|
1409 |
|
1410 fetch:aView |
|
1411 "fetch layoutOrigin |
|
1412 " |
|
1413 |layout| |
|
1414 |
|
1415 layout := UIPainterView asLayoutFrameFromView:aView. |
|
1416 |
|
1417 (self aspectFor:#leftOffset) value:(layout leftOffset). |
|
1418 (self aspectFor:#leftFraction) value:(layout leftFraction). |
|
1419 (self aspectFor:#topOffset) value:(layout topOffset). |
|
1420 (self aspectFor:#topFraction) value:(layout topFraction). |
|
1421 |
|
1422 |
|
1423 ! |
|
1424 |
|
1425 layout |
|
1426 "returns current layout as layoutOrigin |
|
1427 " |
|
1428 |layout| |
|
1429 |
|
1430 layout := Smalltalk::LayoutOrigin new. |
|
1431 |
|
1432 layout leftOffset:((self aspectFor:#leftOffset) value) ? 0. |
|
1433 layout topOffset:((self aspectFor:#topOffset) value) ? 0. |
|
1434 layout leftFraction:((self aspectFor:#leftFraction) value) ? 0. |
|
1435 layout topFraction:((self aspectFor:#topFraction) value) ? 0. |
|
1436 |
|
1437 ^ layout |
|
1438 |
|
1439 ! ! |
|
1440 |
|
1441 !UILayoutTool::Point class methodsFor:'interface specs'! |
|
1442 |
|
1443 windowSpec |
|
1444 "This resource specification was automatically generated |
|
1445 by the UIPainter of ST/X." |
|
1446 |
|
1447 "Do not manually edit this!! If it is corrupted, |
|
1448 the UIPainter may not be able to read the specification." |
|
1449 |
|
1450 " |
|
1451 UIPainter new openOnClass:UILayoutTool::Point andSelector:#windowSpec |
|
1452 UILayoutTool::Point new openInterface:#windowSpec |
|
1453 UILayoutTool::Point open |
|
1454 " |
|
1455 |
|
1456 <resource: #canvas> |
|
1457 |
|
1458 ^ |
|
1459 |
|
1460 #(#FullSpec |
|
1461 #window: |
|
1462 #(#WindowSpec |
|
1463 #name: 'UILayoutTool-Point' |
|
1464 #layout: #(#LayoutFrame 427 0 336 0 635 0 423 0) |
|
1465 #label: 'UILayoutTool-Point' |
|
1466 #min: #(#Point 10 10) |
|
1467 #max: #(#Point 1152 900) |
|
1468 #bounds: #(#Rectangle 427 336 636 424) |
|
1469 #usePreferredExtent: false |
|
1470 ) |
|
1471 #component: |
|
1472 #(#SpecCollection |
|
1473 #collection: |
|
1474 #( |
|
1475 #(#UISubSpecification |
|
1476 #name: 'subSpec' |
|
1477 #layout: #(#LayoutOrigin 0 0 0 0) |
|
1478 #majorKey: #UILayoutTool |
|
1479 #minorKey: #layoutPointSpec |
|
1480 ) |
|
1481 ) |
|
1482 ) |
|
1483 ) |
|
1484 ! ! |
|
1485 |
|
1486 !UILayoutTool::Point methodsFor:'accessing'! |
|
1487 |
|
1488 fetch:aView |
|
1489 "fetch point |
|
1490 " |
|
1491 |origin| |
|
1492 |
|
1493 origin := aView computeOrigin. |
|
1494 |
|
1495 (self aspectFor:#leftOffset) value:(origin x). |
|
1496 (self aspectFor:#topOffset) value:(origin y). |
|
1497 |
|
1498 |
|
1499 ! |
|
1500 |
|
1501 layout |
|
1502 "returns current layout as point |
|
1503 " |
|
1504 ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
|
1505 y:(((self aspectFor:#topOffset) value) ? 0) |
|
1506 |
|
1507 ! ! |
|
1508 |
|
1509 !UILayoutTool::Rectangle class methodsFor:'interface specs'! |
|
1510 |
|
1511 windowSpec |
|
1512 "This resource specification was automatically generated |
|
1513 by the UIPainter of ST/X." |
|
1514 |
|
1515 "Do not manually edit this!! If it is corrupted, |
|
1516 the UIPainter may not be able to read the specification." |
|
1517 |
|
1518 " |
|
1519 UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec |
|
1520 UILayoutTool::Rectangle new openInterface:#windowSpec |
|
1521 UILayoutTool::Rectangle open |
|
1522 " |
|
1523 |
|
1524 <resource: #canvas> |
|
1525 |
|
1526 ^ |
|
1527 |
|
1528 #(#FullSpec |
|
1529 #window: |
|
1530 #(#WindowSpec |
|
1531 #name: 'UILayoutTool-Rectangle' |
|
1532 #layout: #(#LayoutFrame 357 0 349 0 580 0 494 0) |
|
1533 #label: 'UILayoutTool-Rectangle' |
|
1534 #min: #(#Point 10 10) |
|
1535 #max: #(#Point 1152 900) |
|
1536 #bounds: #(#Rectangle 357 349 581 495) |
1505 #usePreferredExtent: false |
1537 #usePreferredExtent: false |
1506 ) |
1538 ) |
1507 #component: |
1539 #component: |
1508 #(#SpecCollection |
1540 #(#SpecCollection |
1509 #collection: |
1541 #collection: |