equal
deleted
inserted
replaced
100 layout := aView geometryLayout. |
100 layout := aView geometryLayout. |
101 |
101 |
102 layout notNil ifTrue:[ |
102 layout notNil ifTrue:[ |
103 layout isLayout ifTrue:[ |
103 layout isLayout ifTrue:[ |
104 layout isLayoutFrame ifTrue:[ ^ #LayoutFrame ]. |
104 layout isLayoutFrame ifTrue:[ ^ #LayoutFrame ]. |
|
105 layout isAlignmentOrigin ifTrue:[ ^ #AlignmentOrigin ]. |
105 layout isLayoutOrigin ifTrue:[ ^ #LayoutOrigin ]. |
106 layout isLayoutOrigin ifTrue:[ ^ #LayoutOrigin ]. |
106 layout isAlignmentOrigin ifTrue:[ ^ #AlignmentOrigin ]. |
|
107 ] ifFalse:[ |
107 ] ifFalse:[ |
108 layout isRectangle ifTrue:[ ^ #Rectangle ]. |
108 layout isRectangle ifTrue:[ ^ #Rectangle ]. |
109 layout isPoint ifTrue:[ ^ #Point ]. |
109 layout isPoint ifTrue:[ ^ #Point ]. |
110 ] |
110 ] |
111 ] ifFalse:[ |
111 ] ifFalse:[ |
113 |
113 |
114 spec canResizeSubComponents ifTrue:[ ^ #Extent ]. |
114 spec canResizeSubComponents ifTrue:[ ^ #Extent ]. |
115 ]. |
115 ]. |
116 ^ nil |
116 ^ nil |
117 |
117 |
|
118 "Modified: 28.2.1997 / 13:02:16 / cg" |
118 ! ! |
119 ! ! |
119 |
120 |
120 !UIObjectView methodsFor:'accessing'! |
121 !UIObjectView methodsFor:'accessing'! |
121 |
122 |
122 gridAlign |
123 gridAlign |
1429 |
1430 |
1430 setExtent:anExtent |
1431 setExtent:anExtent |
1431 "change extent for all selected objects |
1432 "change extent for all selected objects |
1432 " |
1433 " |
1433 self transition:#layout dimensionDo:[:v| |
1434 self transition:#layout dimensionDo:[:v| |
|
1435 v geometryLayout:nil. |
1434 v extent:anExtent. |
1436 v extent:anExtent. |
1435 ]. |
1437 ]. |
|
1438 |
|
1439 "Modified: 28.2.1997 / 12:49:00 / cg" |
1436 ! |
1440 ! |
1437 |
1441 |
1438 setToDefaultExtent |
1442 setToDefaultExtent |
1439 "change extent of all selected views to their default extent |
1443 "change extent of all selected views to their default extent |
1440 " |
1444 " |
1857 ]. |
1861 ]. |
1858 self changed:#layout |
1862 self changed:#layout |
1859 ] |
1863 ] |
1860 ! |
1864 ! |
1861 |
1865 |
|
1866 alignSingleSelection:aBlock |
|
1867 |
|
1868 |type layout| |
|
1869 |
|
1870 self withSelectionHiddenDo:[ |
|
1871 self transaction:#align selectionDo:[:aView| |
|
1872 type := self class layoutType:aView. |
|
1873 |
|
1874 type notNil ifTrue:[ |
|
1875 self undoLayoutView:aView. |
|
1876 |
|
1877 layout := aView layout. |
|
1878 |
|
1879 type == #LayoutFrame ifFalse:[ |
|
1880 layout := aView bounds asLayout |
|
1881 ]. |
|
1882 aBlock value:layout. |
|
1883 aView geometryLayout:layout. |
|
1884 ] |
|
1885 ] |
|
1886 ]. |
|
1887 self changed:#layout |
|
1888 |
|
1889 |
|
1890 |
|
1891 ! |
|
1892 |
1862 centerSelection:aOneArgBlockXorY orientation:orientation |
1893 centerSelection:aOneArgBlockXorY orientation:orientation |
1863 "center selection horizontal or vertical dependant on the block result( x or y). |
1894 "center selection horizontal or vertical dependant on the block result( x or y). |
1864 The argument to the block is the point. |
1895 The argument to the block is the point. |
1865 " |
1896 " |
1866 |superview min max delta val| |
1897 |superview min max delta val| |