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