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