]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/htcontnr.tex
Patches-1851591 ] dataview sample is crashing (under MSW)
[wxWidgets.git] / docs / latex / wx / htcontnr.tex
CommitLineData
c40aba83
WS
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: htcontnr.tex
3%% Purpose: wxHtmlContainerCell documentation
4%% Author: wxWidgets Team
5%% Modified by:
6%% Created: 21/Mar/99 22:45:23
7%% RCS-ID: $Id$
8%% Copyright: (c) wxWidgets Team
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
704a4b75 11
704a4b75
VS
12\section{\class{wxHtmlContainerCell}}\label{wxhtmlcontainercell}
13
448af9a4 14The wxHtmlContainerCell class is an implementation of a cell that may
22d6efa8 15contain more cells in it. It is heavily used in the wxHTML layout algorithm.
704a4b75
VS
16
17\wxheading{Derived from}
18
7376079d
VZ
19\helpref{wxHtmlCell}{wxhtmlcell}\\
20\helpref{wxObject}{wxobject}
704a4b75 21
9704b250
VS
22\wxheading{Include files}
23
24<wx/html/htmlcell.h>
25
a7af285d
VZ
26\wxheading{Library}
27
28\helpref{wxHtml}{librarieslist}
29
704a4b75
VS
30\wxheading{See Also}
31
32\helpref{Cells Overview}{cells}
33
34\latexignore{\rtfignore{\wxheading{Members}}}
35
704a4b75
VS
36\membersection{wxHtmlContainerCell::wxHtmlContainerCell}\label{wxhtmlcontainercellwxhtmlcontainercell}
37
38\func{}{wxHtmlContainerCell}{\param{wxHtmlContainerCell }{*parent}}
39
40Constructor. {\it parent} is pointer to parent container or NULL.
41
42
559fe022
VS
43\membersection{wxHtmlContainerCell::GetAlignHor}\label{wxhtmlcontainercellgetalignhor}
44
45\constfunc{int}{GetAlignHor}{\void}
46
47Returns container's horizontal alignment.
48
49\membersection{wxHtmlContainerCell::GetAlignVer}\label{wxhtmlcontainercellgetalignver}
50
51\constfunc{int}{GetAlignVer}{\void}
52
53Returns container's vertical alignment.
54
2b5f62a0
VZ
55\membersection{wxHtmlContainerCell::GetBackgroundColour}\label{wxhtmlcontainercellgetbackgroundcolour}
56
57\func{wxColour}{GetBackgroundColour}{\void}
58
59Returns the background colour of the container or {\tt wxNullColour} if no background
60colour is set.
61
559fe022
VS
62\membersection{wxHtmlContainerCell::GetIndent}\label{wxhtmlcontainercellgetindent}
63
64\constfunc{int}{GetIndent}{\param{int }{ind}}
65
dff873d1 66Returns the indentation. {\it ind} is one of the {\bf wxHTML\_INDENT\_*} constants.
559fe022 67
fa482912 68{\bf Note:} You must call \helpref{GetIndentUnits}{wxhtmlcontainercellgetindentunits}
559fe022
VS
69with same {\it ind} parameter in order to correctly interpret the returned integer value.
70It is NOT always in pixels!
71
72\membersection{wxHtmlContainerCell::GetIndentUnits}\label{wxhtmlcontainercellgetindentunits}
73
74\constfunc{int}{GetIndentUnits}{\param{int }{ind}}
75
448af9a4 76Returns the units of indentation for {\it ind} where {\it ind} is one
dff873d1 77of the {\bf wxHTML\_INDENT\_*} constants.
559fe022 78
704a4b75
VS
79\membersection{wxHtmlContainerCell::InsertCell}\label{wxhtmlcontainercellinsertcell}
80
81\func{void}{InsertCell}{\param{wxHtmlCell }{*cell}}
82
83Inserts new cell into the container.
84
559fe022
VS
85\membersection{wxHtmlContainerCell::SetAlign}\label{wxhtmlcontainercellsetalign}
86
87\func{void}{SetAlign}{\param{const wxHtmlTag\& }{tag}}
88
448af9a4 89Sets the container's alignment (both horizontal and vertical) according to
559fe022 90the values stored in {\it tag}. (Tags {\tt ALIGN} parameter is extracted.) In fact
fa482912 91it is only a front-end to \helpref{SetAlignHor}{wxhtmlcontainercellsetalignhor}
559fe022
VS
92and \helpref{SetAlignVer}{wxhtmlcontainercellsetalignver}.
93
704a4b75
VS
94\membersection{wxHtmlContainerCell::SetAlignHor}\label{wxhtmlcontainercellsetalignhor}
95
96\func{void}{SetAlignHor}{\param{int }{al}}
97
fa482912 98Sets the container's {\it horizontal alignment}. During \helpref{Layout}{wxhtmlcelllayout}
704a4b75
VS
99each line is aligned according to {\it al} value.
100
101\wxheading{Parameters}
102
103\docparam{al}{new horizontal alignment. May be one of these values:
104
448af9a4 105\begin{twocollist}\itemsep=0pt
dff873d1
VS
106\twocolitem{{\bf wxHTML\_ALIGN\_LEFT}}{lines are left-aligned (default)}
107\twocolitem{{\bf wxHTML\_ALIGN\_JUSTIFY}}{lines are justified}
108\twocolitem{{\bf wxHTML\_ALIGN\_CENTER}}{lines are centered}
109\twocolitem{{\bf wxHTML\_ALIGN\_RIGHT}}{lines are right-aligned}
704a4b75
VS
110\end{twocollist}
111}
112
704a4b75
VS
113\membersection{wxHtmlContainerCell::SetAlignVer}\label{wxhtmlcontainercellsetalignver}
114
115\func{void}{SetAlignVer}{\param{int }{al}}
116
448af9a4 117Sets the container's {\it vertical alignment}. This is per-line alignment!
704a4b75
VS
118
119\wxheading{Parameters}
120
121\docparam{al}{new vertical alignment. May be one of these values:
122
448af9a4 123\begin{twocollist}\itemsep=0pt
dff873d1
VS
124\twocolitem{{\bf wxHTML\_ALIGN\_BOTTOM}}{cells are over the line (default)}
125\twocolitem{{\bf wxHTML\_ALIGN\_CENTER}}{cells are centered on line}
126\twocolitem{{\bf wxHTML\_ALIGN\_TOP}}{cells are under the line}
704a4b75
VS
127\end{twocollist}
128
605d715d 129\helponly{\image{}{alignv.bmp}}
704a4b75
VS
130}
131
559fe022 132\membersection{wxHtmlContainerCell::SetBackgroundColour}\label{wxhtmlcontainercellsetbackgroundcolour}
704a4b75 133
559fe022 134\func{void}{SetBackgroundColour}{\param{const wxColour\& }{clr}}
704a4b75 135
fa482912 136Sets the background colour for this container.
559fe022
VS
137
138\membersection{wxHtmlContainerCell::SetBorder}\label{wxhtmlcontainercellsetborder}
139
140\func{void}{SetBorder}{\param{const wxColour\& }{clr1}, \param{const wxColour\& }{clr2}}
141
fa482912 142Sets the border (frame) colours. A border is a rectangle around the container.
559fe022
VS
143
144\wxheading{Parameters}
145
fa482912 146\docparam{clr1}{Colour of top and left lines}
559fe022 147
fa482912 148\docparam{clr2}{Colour of bottom and right lines}
704a4b75 149
704a4b75
VS
150\membersection{wxHtmlContainerCell::SetIndent}\label{wxhtmlcontainercellsetindent}
151
dff873d1 152\func{void}{SetIndent}{\param{int }{i}, \param{int }{what}, \param{int }{units = wxHTML\_UNITS\_PIXELS}}
704a4b75 153
448af9a4 154Sets the indentation (free space between borders of container and subcells).
704a4b75
VS
155
156\wxheading{Parameters}
157
158\docparam{i}{Indentation value.}
159
448af9a4 160\docparam{what}{Determines which of the four borders we're setting. It is OR
704a4b75
VS
161combination of following constants:
162
448af9a4 163\begin{twocollist}\itemsep=0pt
dff873d1
VS
164\twocolitem{{\bf wxHTML\_INDENT\_TOP}}{top border}
165\twocolitem{{\bf wxHTML\_INDENT\_BOTTOM}}{bottom}
166\twocolitem{{\bf wxHTML\_INDENT\_LEFT}}{left}
167\twocolitem{{\bf wxHTML\_INDENT\_RIGHT}}{right}
168\twocolitem{{\bf wxHTML\_INDENT\_HORIZONTAL}}{left and right}
169\twocolitem{{\bf wxHTML\_INDENT\_VERTICAL}}{top and bottom}
170\twocolitem{{\bf wxHTML\_INDENT\_ALL}}{all 4 borders}
704a4b75
VS
171\end{twocollist}
172
605d715d 173\helponly{\image{}{indent.bmp}}
704a4b75
VS
174}
175
176\docparam{units}{Units of {\it i}. This parameter affects interpretation of {\it} value.
177
448af9a4 178\begin{twocollist}\itemsep=0pt
dff873d1
VS
179\twocolitem{{\bf wxHTML\_UNITS\_PIXELS}}{{\it i} is number of pixels}
180\twocolitem{{\bf wxHTML\_UNITS\_PERCENT}}{{\it i} is interpreted as percents of width
704a4b75
VS
181of parent container}
182\end{twocollist}
183}
184
559fe022 185\membersection{wxHtmlContainerCell::SetMinHeight}\label{wxhtmlcontainercellsetminheight}
704a4b75 186
dff873d1 187\func{void}{SetMinHeight}{\param{int }{h}, \param{int }{align = wxHTML\_ALIGN\_TOP}}
704a4b75 188
b32c6ff0 189Sets minimal height of the container.
704a4b75 190
448af9a4 191When container's \helpref{Layout}{wxhtmlcelllayout} is called, m\_Height
559fe022 192is set depending on layout of subcells to the height of area covered
448af9a4 193by layed-out subcells. Calling this method guarantees you that the height
559fe022 194of container is never smaller than {\it h} - even if the subcells cover
448af9a4 195much smaller area.
704a4b75 196
559fe022 197\wxheading{Parameters}
704a4b75 198
559fe022 199\docparam{h}{The minimal height.}
704a4b75 200
448af9a4 201\docparam{align}{If height of the container is lower than the minimum height, empty space must be inserted
dff873d1 202somewhere in order to ensure minimal height. This parameter is one of {\bf wxHTML\_ALIGN\_TOP,
fa482912
JS
203wxHTML\_ALIGN\_BOTTOM, wxHTML\_ALIGN\_CENTER}. It refers to the {\it contents}, not to the
204empty place.}
704a4b75
VS
205
206\membersection{wxHtmlContainerCell::SetWidthFloat}\label{wxhtmlcontainercellsetwidthfloat}
207
208\func{void}{SetWidthFloat}{\param{int }{w}, \param{int }{units}}
209
605d715d 210\func{void}{SetWidthFloat}{\param{const wxHtmlTag\& }{tag}, \param{double }{pixel\_scale = 1.0}}
704a4b75 211
b32c6ff0 212Sets floating width adjustment.
704a4b75 213
b32c6ff0 214The normal behaviour of container is that its width is the same as the width of
704a4b75
VS
215parent container (and thus you can have only one sub-container per line).
216You can change this by setting FWA.
217
605d715d 218{\it pixel\_scale} is number of real pixels that equals to 1 HTML pixel.
edbd0635 219
704a4b75
VS
220\wxheading{Parameters}
221
222\docparam{w}{Width of the container. If the value is negative it means
b32c6ff0 223complement to full width of parent container (e.g.
dff873d1 224{\tt SetWidthFloat(-50, wxHTML\_UNITS\_PIXELS)} sets the width
704a4b75
VS
225of container to parent's width minus 50 pixels. This is useful when
226creating tables - you can call SetWidthFloat(50) and SetWidthFloat(-50))}
227
448af9a4 228\docparam{units}{Units of {\it w} This parameter affects the interpretation of {\it} value.
704a4b75 229
448af9a4 230\begin{twocollist}\itemsep=0pt
dff873d1
VS
231\twocolitem{{\bf wxHTML\_UNITS\_PIXELS}}{{\it w} is number of pixels}
232\twocolitem{{\bf wxHTML\_UNITS\_PERCENT}}{{\it w} is interpreted as percents of width
704a4b75
VS
233of parent container}
234\end{twocollist}
235}
236
237\docparam{tag}{In the second version of method, {\it w} and {\it units}
238info is extracted from tag's {\tt WIDTH} parameter.}
239
b32c6ff0
RD
240\pythonnote{The second form of this method is named
241SetWidthFloatFromTag in wxPython.}
242
243
244
245
246
247
248
249