1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxHtmlContainerCell documentation
4 %% Author: wxWidgets Team
6 %% Created: 21/Mar/99 22:45:23
8 %% Copyright: (c) wxWidgets Team
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxHtmlContainerCell
}}\label{wxhtmlcontainercell
}
14 The wxHtmlContainerCell class is an implementation of a cell that may
15 contain more cells in it. It is heavily used in the wxHTML layout algorithm.
17 \wxheading{Derived from
}
19 \helpref{wxHtmlCell
}{wxhtmlcell
}\\
20 \helpref{wxObject
}{wxobject
}
22 \wxheading{Include files
}
28 \helpref{wxHtml
}{librarieslist
}
32 \helpref{Cells Overview
}{cells
}
34 \latexignore{\rtfignore{\wxheading{Members
}}}
36 \membersection{wxHtmlContainerCell::wxHtmlContainerCell
}\label{wxhtmlcontainercellwxhtmlcontainercell
}
38 \func{}{wxHtmlContainerCell
}{\param{wxHtmlContainerCell
}{*parent
}}
40 Constructor.
{\it parent
} is pointer to parent container or NULL.
43 \membersection{wxHtmlContainerCell::GetAlignHor
}\label{wxhtmlcontainercellgetalignhor
}
45 \constfunc{int
}{GetAlignHor
}{\void}
47 Returns container's horizontal alignment.
49 \membersection{wxHtmlContainerCell::GetAlignVer
}\label{wxhtmlcontainercellgetalignver
}
51 \constfunc{int
}{GetAlignVer
}{\void}
53 Returns container's vertical alignment.
55 \membersection{wxHtmlContainerCell::GetBackgroundColour
}\label{wxhtmlcontainercellgetbackgroundcolour
}
57 \func{wxColour
}{GetBackgroundColour
}{\void}
59 Returns the background colour of the container or
{\tt wxNullColour
} if no background
62 \membersection{wxHtmlContainerCell::GetIndent
}\label{wxhtmlcontainercellgetindent
}
64 \constfunc{int
}{GetIndent
}{\param{int
}{ind
}}
66 Returns the indentation.
{\it ind
} is one of the
{\bf wxHTML
\_INDENT\_*
} constants.
68 {\bf Note:
} You must call
\helpref{GetIndentUnits
}{wxhtmlcontainercellgetindentunits
}
69 with same
{\it ind
} parameter in order to correctly interpret the returned integer value.
70 It is NOT always in pixels!
72 \membersection{wxHtmlContainerCell::GetIndentUnits
}\label{wxhtmlcontainercellgetindentunits
}
74 \constfunc{int
}{GetIndentUnits
}{\param{int
}{ind
}}
76 Returns the units of indentation for
{\it ind
} where
{\it ind
} is one
77 of the
{\bf wxHTML
\_INDENT\_*
} constants.
79 \membersection{wxHtmlContainerCell::InsertCell
}\label{wxhtmlcontainercellinsertcell
}
81 \func{void
}{InsertCell
}{\param{wxHtmlCell
}{*cell
}}
83 Inserts new cell into the container.
85 \membersection{wxHtmlContainerCell::SetAlign
}\label{wxhtmlcontainercellsetalign
}
87 \func{void
}{SetAlign
}{\param{const wxHtmlTag\&
}{tag
}}
89 Sets the container's alignment (both horizontal and vertical) according to
90 the values stored in
{\it tag
}. (Tags
{\tt ALIGN
} parameter is extracted.) In fact
91 it is only a front-end to
\helpref{SetAlignHor
}{wxhtmlcontainercellsetalignhor
}
92 and
\helpref{SetAlignVer
}{wxhtmlcontainercellsetalignver
}.
94 \membersection{wxHtmlContainerCell::SetAlignHor
}\label{wxhtmlcontainercellsetalignhor
}
96 \func{void
}{SetAlignHor
}{\param{int
}{al
}}
98 Sets the container's
{\it horizontal alignment
}. During
\helpref{Layout
}{wxhtmlcelllayout
}
99 each line is aligned according to
{\it al
} value.
101 \wxheading{Parameters
}
103 \docparam{al
}{new horizontal alignment. May be one of these values:
105 \begin{twocollist
}\itemsep=
0pt
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
}
113 \membersection{wxHtmlContainerCell::SetAlignVer
}\label{wxhtmlcontainercellsetalignver
}
115 \func{void
}{SetAlignVer
}{\param{int
}{al
}}
117 Sets the container's
{\it vertical alignment
}. This is per-line alignment!
119 \wxheading{Parameters
}
121 \docparam{al
}{new vertical alignment. May be one of these values:
123 \begin{twocollist
}\itemsep=
0pt
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
}
129 \helponly{\image{}{alignv.bmp
}}
132 \membersection{wxHtmlContainerCell::SetBackgroundColour
}\label{wxhtmlcontainercellsetbackgroundcolour
}
134 \func{void
}{SetBackgroundColour
}{\param{const wxColour\&
}{clr
}}
136 Sets the background colour for this container.
138 \membersection{wxHtmlContainerCell::SetBorder
}\label{wxhtmlcontainercellsetborder
}
140 \func{void
}{SetBorder
}{\param{const wxColour\&
}{clr1
},
\param{const wxColour\&
}{clr2
}}
142 Sets the border (frame) colours. A border is a rectangle around the container.
144 \wxheading{Parameters
}
146 \docparam{clr1
}{Colour of top and left lines
}
148 \docparam{clr2
}{Colour of bottom and right lines
}
150 \membersection{wxHtmlContainerCell::SetIndent
}\label{wxhtmlcontainercellsetindent
}
152 \func{void
}{SetIndent
}{\param{int
}{i
},
\param{int
}{what
},
\param{int
}{units = wxHTML
\_UNITS\_PIXELS}}
154 Sets the indentation (free space between borders of container and subcells).
156 \wxheading{Parameters
}
158 \docparam{i
}{Indentation value.
}
160 \docparam{what
}{Determines which of the four borders we're setting. It is OR
161 combination of following constants:
163 \begin{twocollist
}\itemsep=
0pt
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
}
173 \helponly{\image{}{indent.bmp
}}
176 \docparam{units
}{Units of
{\it i
}. This parameter affects interpretation of
{\it} value.
178 \begin{twocollist
}\itemsep=
0pt
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
185 \membersection{wxHtmlContainerCell::SetMinHeight
}\label{wxhtmlcontainercellsetminheight
}
187 \func{void
}{SetMinHeight
}{\param{int
}{h
},
\param{int
}{align = wxHTML
\_ALIGN\_TOP}}
189 Sets minimal height of the container.
191 When container's
\helpref{Layout
}{wxhtmlcelllayout
} is called, m
\_Height
192 is set depending on layout of subcells to the height of area covered
193 by layed-out subcells. Calling this method guarantees you that the height
194 of container is never smaller than
{\it h
} - even if the subcells cover
197 \wxheading{Parameters
}
199 \docparam{h
}{The minimal height.
}
201 \docparam{align
}{If height of the container is lower than the minimum height, empty space must be inserted
202 somewhere in order to ensure minimal height. This parameter is one of
{\bf wxHTML
\_ALIGN\_TOP,
203 wxHTML
\_ALIGN\_BOTTOM, wxHTML
\_ALIGN\_CENTER}. It refers to the
{\it contents
}, not to the
206 \membersection{wxHtmlContainerCell::SetWidthFloat
}\label{wxhtmlcontainercellsetwidthfloat
}
208 \func{void
}{SetWidthFloat
}{\param{int
}{w
},
\param{int
}{units
}}
210 \func{void
}{SetWidthFloat
}{\param{const wxHtmlTag\&
}{tag
},
\param{double
}{pixel
\_scale =
1.0}}
212 Sets floating width adjustment.
214 The normal behaviour of container is that its width is the same as the width of
215 parent container (and thus you can have only one sub-container per line).
216 You can change this by setting FWA.
218 {\it pixel
\_scale} is number of real pixels that equals to
1 HTML pixel.
220 \wxheading{Parameters
}
222 \docparam{w
}{Width of the container. If the value is negative it means
223 complement to full width of parent container (e.g.
224 {\tt SetWidthFloat(-
50, wxHTML
\_UNITS\_PIXELS)
} sets the width
225 of container to parent's width minus
50 pixels. This is useful when
226 creating tables - you can call SetWidthFloat(
50) and SetWidthFloat(-
50))
}
228 \docparam{units
}{Units of
{\it w
} This parameter affects the interpretation of
{\it} value.
230 \begin{twocollist
}\itemsep=
0pt
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
237 \docparam{tag
}{In the second version of method,
{\it w
} and
{\it units
}
238 info is extracted from tag's
{\tt WIDTH
} parameter.
}
240 \pythonnote{The second form of this method is named
241 SetWidthFloatFromTag in wxPython.
}