1507 "something changed in the builder view |
1507 "something changed in the builder view |
1508 " |
1508 " |
1509 |slices list prevSpecClass| |
1509 |slices list prevSpecClass| |
1510 |
1510 |
1511 (what == #selection or:[what == #tree]) ifFalse:[ |
1511 (what == #selection or:[what == #tree]) ifFalse:[ |
1512 (what == #layout and:[modified not and:[self isLayoutSpec]]) ifTrue:[ |
1512 what == #layout ifTrue:[ |
1513 modified := true. |
1513 self updateLayout |
1514 self perform:(('fetch', layoutType asString) asSymbol). |
|
1515 modified := false. |
|
1516 ]. |
1514 ]. |
1517 ^ self |
1515 ^ self |
1518 ]. |
1516 ]. |
1519 currentView := builderView singleSelection. |
1517 currentView := builderView singleSelection. |
1520 propertyAspects := nil. |
1518 propertyAspects := nil. |
1809 ] |
1807 ] |
1810 ]. |
1808 ]. |
1811 self layoutType:type. |
1809 self layoutType:type. |
1812 modified := false. |
1810 modified := false. |
1813 |
1811 |
|
1812 ! |
|
1813 |
|
1814 updateLayout |
|
1815 "layout changed but not selection |
|
1816 " |
|
1817 (currentView notNil and:[modified not and:[self isLayoutSpec]]) ifTrue:[ |
|
1818 (builderView class layoutType:currentView) == layoutType ifTrue:[ |
|
1819 modified := true. |
|
1820 self perform:(('fetch', layoutType asString) asSymbol). |
|
1821 modified := false. |
|
1822 ] ifFalse:[ |
|
1823 self showAndFetchLayout |
|
1824 ] |
|
1825 ] |
1814 ! ! |
1826 ! ! |
1815 |
1827 |
1816 !UIPropertyView methodsFor:'private layout fetch'! |
1828 !UIPropertyView methodsFor:'private layout fetch'! |
1817 |
1829 |
1818 fetchAlignmentOrigin |
1830 fetchAlignmentOrigin |
1820 " |
1832 " |
1821 |aLayout| |
1833 |aLayout| |
1822 |
1834 |
1823 aLayout := currentView geometryLayout. |
1835 aLayout := currentView geometryLayout. |
1824 |
1836 |
1825 (layoutAspects at:#leftOffset) value:(aLayout leftOffset). |
|
1826 (layoutAspects at:#leftFraction) value:(aLayout leftFraction). |
|
1827 (layoutAspects at:#topOffset) value:(aLayout topOffset). |
|
1828 (layoutAspects at:#topFraction) value:(aLayout topFraction). |
|
1829 |
|
1830 (layoutAspects at:#leftAlignmentFraction) value:(aLayout leftAlignmentFraction). |
1837 (layoutAspects at:#leftAlignmentFraction) value:(aLayout leftAlignmentFraction). |
1831 (layoutAspects at:#topAlignmentFraction) value:(aLayout topAlignmentFraction). |
1838 (layoutAspects at:#topAlignmentFraction) value:(aLayout topAlignmentFraction). |
|
1839 |
|
1840 self fetchLayoutOrigin |
1832 ! |
1841 ! |
1833 |
1842 |
1834 fetchExtent |
1843 fetchExtent |
1835 |extent| |
1844 |extent| |
1836 |
1845 |
1857 ! |
1866 ! |
1858 |
1867 |
1859 fetchLayoutOrigin |
1868 fetchLayoutOrigin |
1860 "fetch layoutOrigin |
1869 "fetch layoutOrigin |
1861 " |
1870 " |
1862 |aLayout| |
1871 |extent aLayout leftFraction topFraction leftOffset topOffset| |
1863 |
1872 |
|
1873 extent := currentView extent. |
1864 aLayout := currentView geometryLayout. |
1874 aLayout := currentView geometryLayout. |
1865 |
1875 |
1866 (layoutAspects at:#leftOffset) value:(aLayout leftOffset). |
1876 leftFraction := aLayout leftFraction. |
1867 (layoutAspects at:#leftFraction) value:(aLayout leftFraction). |
1877 topFraction := aLayout topFraction. |
1868 (layoutAspects at:#topOffset) value:(aLayout topOffset). |
1878 leftOffset := aLayout leftOffset. |
1869 (layoutAspects at:#topFraction) value:(aLayout topFraction). |
1879 topOffset := aLayout topOffset. |
|
1880 |
|
1881 (layoutAspects at:#leftOffset) value:leftOffset. |
|
1882 (layoutAspects at:#leftFraction) value:leftFraction. |
|
1883 (layoutAspects at:#topOffset) value:topOffset. |
|
1884 (layoutAspects at:#topFraction) value:topFraction. |
|
1885 |
|
1886 (layoutAspects at:#rightFraction) value:leftFraction. |
|
1887 (layoutAspects at:#rightOffset) value:(leftOffset + extent x). |
|
1888 (layoutAspects at:#bottomFraction) value:topFraction. |
|
1889 (layoutAspects at:#bottomOffset) value:(topOffset + extent y). |
|
1890 |
1870 ! |
1891 ! |
1871 |
1892 |
1872 fetchPoint |
1893 fetchPoint |
1873 "fetch point |
1894 "fetch point |
1874 " |
1895 " |
1875 |e x y p| |
1896 |e x y p| |
1876 |
1897 |
1877 p := currentView geometryLayout. |
1898 p := currentView geometryLayout. |
1878 x := p x. |
1899 x := p x. |
1879 y := p y. |
1900 y := p y. |
1880 e := currentView extent. |
1901 e := currentView computeExtent. |
1881 |
1902 |
1882 (layoutAspects at:#leftOffset) value:x. |
1903 (layoutAspects at:#leftOffset) value:x. |
1883 (layoutAspects at:#topOffset) value:y. |
1904 (layoutAspects at:#topOffset) value:y. |
1884 (layoutAspects at:#rightOffset) value:(x + e x). |
1905 (layoutAspects at:#rightOffset) value:(x + e x). |
1885 (layoutAspects at:#bottomOffset) value:(y + e y). |
1906 (layoutAspects at:#bottomOffset) value:(y + e y). |