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