]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/pickerbase.tex
added null pointer check and assert
[wxWidgets.git] / docs / latex / wx / pickerbase.tex
CommitLineData
ec376c8f
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: pickerbase.tex
3%% Purpose: wxPickerBase documentation
4%% Author: Francesco Montorsi
5%% Created: 2006-04-18
6%% RCS-ID: $Id$
7%% Copyright: (c) 2006 Francesco Montorsi
8%% License: wxWindows license
9%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
11\section{\class{wxPickerBase}}\label{wxpickerbase}
12
13Base abstract class for all pickers which support an auxiliary text control.
14This class handles all positioning and sizing of the text control like a
15an horizontal \helpref{wxBoxSizer}{wxboxsizer} would do, with the text control on
ecd87e5b
VZ
16the left of the picker button.
17The proportion (see \helpref{wxSizer}{wxsizer} documentation for more info about
18proportion values) of the picker control defaults to $1$ when there isn't a text control
19associated (see {\tt wxPB\_USE\_TEXTCTRL} style) and to $0$ otherwise.
ec376c8f
VZ
20
21\wxheading{Derived from}
22
23\helpref{wxControl}{wxcontrol}\\
24\helpref{wxWindow}{wxwindow}\\
25\helpref{wxEvtHandler}{wxevthandler}\\
26\helpref{wxObject}{wxobject}
27
28\wxheading{Include files}
29
30<wx/pickerbase.h>
31
a7af285d
VZ
32\wxheading{Library}
33
34\helpref{wxCore}{librarieslist}
35
ec376c8f
VZ
36\wxheading{Window styles}
37
38\twocolwidtha{5cm}%
39\begin{twocollist}\itemsep=0pt
40\twocolitem{\windowstyle{wxPB\_USE\_TEXTCTRL}}{Creates a text control to the left of the
41picker which is completely managed by this \helpref{wxPickerBase}{wxpickerbase}
42class.}
43\end{twocollist}
44
45\wxheading{See also}
46
47\helpref{wxColourPickerCtrl}{wxcolourpickerctrl}
48
49
50\latexignore{\rtfignore{\wxheading{Members}}}
51
52\membersection{wxPickerBase::SetInternalMargin}\label{wxpickerbasesetinternalmargin}
53
54\func{void}{SetInternalMargin}{\param{int}{margin}}
55
56Sets the margin (in pixel) between the picker and the text control.
c851c8b4 57This function can be used only when \helpref{HasTextCtrl}{wxpickerbasehastextctrl} returns \true.
ec376c8f
VZ
58
59
60\membersection{wxPickerBase::GetInternalMargin}\label{wxpickerbasegetinternalmargin}
61
62\constfunc{int}{GetInternalMargin}{}
63
64Returns the margin (in pixel) between the picker and the text control.
c851c8b4 65This function can be used only when \helpref{HasTextCtrl}{wxpickerbasehastextctrl} returns \true.
ec376c8f
VZ
66
67
68\membersection{wxPickerBase::SetTextCtrlProportion}\label{wxpickerbasesettextctrlproportion}
69
70\func{void}{SetTextCtrlProportion}{\param{int}{prop}}
71
ecd87e5b 72Sets the proportion value of the text control.
ec376c8f 73Look at the overview of wxPickerBase for more details about this.
c851c8b4 74This function can be used only when \helpref{HasTextCtrl}{wxpickerbasehastextctrl} returns \true.
ec376c8f
VZ
75
76
ecd87e5b
VZ
77\membersection{wxPickerBase::SetPickerCtrlProportion}\label{wxpickerbasesetpickerctrlproportion}
78
79\func{void}{SetPickerCtrlProportion}{\param{int}{prop}}
80
81Sets the proportion value of the picker.
82Look at the overview of wxPickerBase for more details about this.
83
84
a65ffcb2 85\membersection{wxPickerBase::GetTextCtrlProportion}\label{wxpickerbasegettextctrlproportion}
ec376c8f
VZ
86
87\constfunc{int}{GetTextCtrlProportion}{}
88
ecd87e5b 89Returns the proportion value of the text control.
c851c8b4 90This function can be used only when \helpref{HasTextCtrl}{wxpickerbasehastextctrl} returns \true.
ec376c8f
VZ
91
92
ecd87e5b
VZ
93\membersection{wxPickerBase::GetPickerCtrlProportion}\label{wxpickerbasegetpickerctrlproportion}
94
95\constfunc{int}{GetPickerCtrlProportion}{}
96
97Returns the proportion value of the picker.
98
a65ffcb2
VZ
99
100\membersection{wxPickerBase::HasTextCtrl}\label{wxpickerbasehastextctrl}
ec376c8f
VZ
101
102\constfunc{bool}{HasTextCtrl}{}
103
a65ffcb2 104Returns true if this window has a valid text control (i.e. if the \windowstyle{wxPB\_USE\_TEXTCTRL} style was
ec376c8f
VZ
105given when creating this control).
106
107
a65ffcb2 108\membersection{wxPickerBase::GetTextCtrl}\label{wxpickerbasegetextctrl}
ec376c8f
VZ
109
110\func{wxTextCtrl *}{GetTextCtrl}{}
111
a65ffcb2 112Returns a pointer to the text control handled by this window or \texttt{NULL} if the \windowstyle{wxPB\_USE\_TEXTCTRL} style was not specified when this control was created.
ec376c8f 113Very important: the contents of the text control could be containing an invalid representation of the entity which can be chosen through the picker (e.g. the user entered an invalid colour syntax because of a typo). Thus you should never parse the content of the textctrl to get the user's input; rather use the derived-class getter (e.g. \helpref{wxColourPickerCtrl::GetColour}{wxcolourpickerctrlgetcolour}, \helpref{wxFilePickerCtrl::GetPath}{wxfilepickerctrlgetpath}, etc).
a65ffcb2
VZ
114
115
116\membersection{wxPickerBase::IsTextCtrlGrowable}\label{wxpickerbaseistextctrlgrowable}
117
118\constfunc{bool}{IsTextCtrlGrowable}{}
119
120Returns \true if the text control is growable.
c851c8b4 121This function can be used only when \helpref{HasTextCtrl}{wxpickerbasehastextctrl} returns \true.
a65ffcb2
VZ
122
123
ecd87e5b
VZ
124\membersection{wxPickerBase::SetPickerCtrlGrowable}\label{wxpickerbasesetpickerctrlgrowable}
125
126\func{void}{SetPickerCtrlGrowable}{\param{bool}{ grow = true}}
127
128Sets the picker control as growable when {\tt grow} is \true.
129
130
a65ffcb2
VZ
131\membersection{wxPickerBase::SetTextCtrlGrowable}\label{wxpickerbasesettextctrlgrowable}
132
133\func{void}{SetTextCtrlGrowable}{\param{bool}{ grow = true}}
134
135Sets the text control as growable when {\tt grow} is \true.
c851c8b4 136This function can be used only when \helpref{HasTextCtrl}{wxpickerbasehastextctrl} returns \true.
a65ffcb2
VZ
137
138
139
140\membersection{wxPickerBase::IsPickerCtrlGrowable}\label{wxpickerbaseispickerctrlgrowable}
141
142\constfunc{bool}{IsPickerCtrlGrowable}{}
143
144Returns \true if the picker control is growable.
145
146