1*0bdb6530SAndrew Rist# ************************************************************* 2*0bdb6530SAndrew Rist# 3*0bdb6530SAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4*0bdb6530SAndrew Rist# or more contributor license agreements. See the NOTICE file 5*0bdb6530SAndrew Rist# distributed with this work for additional information 6*0bdb6530SAndrew Rist# regarding copyright ownership. The ASF licenses this file 7*0bdb6530SAndrew Rist# to you under the Apache License, Version 2.0 (the 8*0bdb6530SAndrew Rist# "License"); you may not use this file except in compliance 9*0bdb6530SAndrew Rist# with the License. You may obtain a copy of the License at 10*0bdb6530SAndrew Rist# 11*0bdb6530SAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12*0bdb6530SAndrew Rist# 13*0bdb6530SAndrew Rist# Unless required by applicable law or agreed to in writing, 14*0bdb6530SAndrew Rist# software distributed under the License is distributed on an 15*0bdb6530SAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*0bdb6530SAndrew Rist# KIND, either express or implied. See the License for the 17*0bdb6530SAndrew Rist# specific language governing permissions and limitations 18*0bdb6530SAndrew Rist# under the License. 19*0bdb6530SAndrew Rist# 20*0bdb6530SAndrew Rist# ************************************************************* 21cdf0e10cSrcweir--- How layout / hierarchy should work --- 22cdf0e10cSrcweir 23cdf0e10cSrcweirOn-screen: 24cdf0e10cSrcweir 25cdf0e10cSrcweir+-------------------+ 26cdf0e10cSrcweir| Label: [Entry] | 27cdf0e10cSrcweir| - - - - - - - - - | | 28cdf0e10cSrcweir| [ Ok ]| 29cdf0e10cSrcweir+-------------------+ 30cdf0e10cSrcweir 31cdf0e10cSrcweirAWT Window hierarcy: 32cdf0e10cSrcweir Window 33cdf0e10cSrcweir + Label 34cdf0e10cSrcweir + Entry 35cdf0e10cSrcweir + Ok 36cdf0e10cSrcweir 37cdf0e10cSrcweir ie. unchanged, and backwards compatible - a flat 38cdf0e10cSrcweirrepresentation. 39cdf0e10cSrcweir 40cdf0e10cSrcweirToolkit Hierachy 41cdf0e10cSrcweir 42cdf0e10cSrcweir WindowContainer [Bin?] 43cdf0e10cSrcweir + Vbox 44cdf0e10cSrcweir + HBox 45cdf0e10cSrcweir + Label 46cdf0e10cSrcweir + Entry 47cdf0e10cSrcweir + Alignment 48cdf0e10cSrcweir + Ok 49cdf0e10cSrcweir 50cdf0e10cSrcweir the layout process would happen inside the toolkit code 51cdf0e10cSrcweir(perhaps eventually genericisd itself), and the result from the 52cdf0e10cSrcweir(re-)layout process would be a set of SetPosition/SetSize calls made 53cdf0e10cSrcweirto VCL. 54cdf0e10cSrcweir 55cdf0e10cSrcweir--- code pointers --- 56cdf0e10cSrcweir 57cdf0e10cSrcweir** AWT interfaces: 58cdf0e10cSrcweir + offapi/com/sun/star/awt/* - eg. XButton.idl 59cdf0e10cSrcweir + 'XLayoutConstrains.idl' [ published & mis-named ! ] 60cdf0e10cSrcweir 61cdf0e10cSrcweir + We can build 'Layout' into the AWT at the toolkit level 62cdf0e10cSrcweir + this should be fairly easy, and wouldn't touch VCL much. 63cdf0e10cSrcweir 64cdf0e10cSrcweir** Toolkit (awt) implementation: 65cdf0e10cSrcweir + toolkit/source/awt/vclxwindows.cxx: 66cdf0e10cSrcweir + much of the implementation lurks in here ... 67cdf0e10cSrcweir + The size information is in 'vclxwindows.cxx' ... 68cdf0e10cSrcweir 69cdf0e10cSrcweir + toolkit/source/helper/unowrapper.cxx 70cdf0e10cSrcweir + factories / code to associate UNO peers with VCL windows 71cdf0e10cSrcweir + pWindow-> 72cdf0e10cSrcweir 73cdf0e10cSrcweir--- Tests --- 74cdf0e10cSrcweir 75cdf0e10cSrcweirIntegration tests: 76cdf0e10cSrcweir cf. http://www.openoffice.org/issues/show_bug.cgi?id=78747 77cdf0e10cSrcweir 78cdf0e10cSrcweir 79cdf0e10cSrcweir--- more thoughts --- 80cdf0e10cSrcweir 81cdf0e10cSrcweir** Extra Design constraints: [!?] 82cdf0e10cSrcweir + accessibility 83cdf0e10cSrcweir + QA test-tool-age ... - tests ~will need re-write (unfortunately) 84cdf0e10cSrcweir 85cdf0e10cSrcweir* New functionality we would like: 86cdf0e10cSrcweir + ShowAll (vs. Show/Hide) && HideAll ... 87cdf0e10cSrcweir 88cdf0e10cSrcweirNecessary to re- build && deliver svtools/ having delivered toolkit ... 89cdf0e10cSrcweir rm unxlngi6.pro/slo/textwindowaccessibility.* # first ... 90cdf0e10cSrcweir 91cdf0e10cSrcweir** Layout containers: 92cdf0e10cSrcweir + XIndexAccess ? - sorted container (?) 93cdf0e10cSrcweir 94cdf0e10cSrcweir* Consider 'XLayoutRoot' top-level ... 95cdf0e10cSrcweir + inherit from XNameContainer - widgets by name / id ... 96cdf0e10cSrcweir + hack a VCL dialog ? 97cdf0e10cSrcweir + we need a handle we can pass back of some form: 98cdf0e10cSrcweir + XWindowPeer getPeer() ... [ can use that I guess ? ] 99cdf0e10cSrcweir + also need a service interface ? 100cdf0e10cSrcweir + or parameters passed as Anys ? [ugh] 101cdf0e10cSrcweir 102cdf0e10cSrcweir* Decided 103cdf0e10cSrcweir + use 'layout' by itself & small patches 104cdf0e10cSrcweir to toolkit/ in ooo-build. 105cdf0e10cSrcweir 106cdf0e10cSrcweir* TODO: 107cdf0e10cSrcweir + need a 'queueResize' method ... 108cdf0e10cSrcweir + trigger on show/hide ... 109cdf0e10cSrcweir + allocateSize should take an awt::Rectangle ... 110cdf0e10cSrcweir + impl. XLayoutRoot 111cdf0e10cSrcweir + special cases: 112cdf0e10cSrcweir + radio-button-group 113cdf0e10cSrcweir + notebook 114cdf0e10cSrcweir 115cdf0e10cSrcweir* svx/source/dialog/zoom* 116cdf0e10cSrcweir 117cdf0e10cSrcweirMichael's Todo: 118cdf0e10cSrcweir + handle MetricField: 'unit' enum etc. - introspection ? or ... 119cdf0e10cSrcweir + make OK/Cancel buttons function as they should ... 120cdf0e10cSrcweir + merge layout-svtools.diff into CWS as last step before inclusion ... 121cdf0e10cSrcweir + FixedLine: 122cdf0e10cSrcweir + get sizing right ... 123cdf0e10cSrcweir + hook up new virtual methods into toolkit/ (m225) - i#80754 124cdf0e10cSrcweir + copy the crud from toolkit's custom vclxwindows.cxx 125cdf0e10cSrcweir "calcMinimumSize" logic ... 126cdf0e10cSrcweir + get ok/help/cancel buttons working ... 127cdf0e10cSrcweir 128cdf0e10cSrcweir + fix / rationalise property adding in toolkit ... 129cdf0e10cSrcweir + simplify it with the new VCLWindow base :-) 130cdf0e10cSrcweir + simplify it ... 131cdf0e10cSrcweir + spreadsheet ... 132cdf0e10cSrcweir + VCLXImageConsumer - can't be instantiated itself 133cdf0e10cSrcweir anyway ! -> bin the 'true' & just add all these 134cdf0e10cSrcweir props unconditionally ... 135cdf0e10cSrcweir 136cdf0e10cSrcweir + switch construction attributes into their own xmlns to 137cdf0e10cSrcweir avoid treading on other properties ... 138