1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: pickerbase.tex
3 %% Purpose: wxPickerBase documentation
4 %% Author: Francesco Montorsi
7 %% Copyright: (c) 2006 Francesco Montorsi
8 %% License: wxWindows license
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 \section{\class{wxPickerBase
}}\label{wxpickerbase
}
13 Base abstract class for all pickers which support an auxiliary text control.
14 This class handles all positioning and sizing of the text control like a
15 an horizontal
\helpref{wxBoxSizer
}{wxboxsizer
} would do, with the text control on
16 the left of the picker button.
17 The proportion (see
\helpref{wxSizer
}{wxsizer
} documentation for more info about
18 proportion values) of the picker control defaults to $
1$ when there isn't a text control
19 associated (see
{\tt wxPB
\_USE\_TEXTCTRL} style) and to $
0$ otherwise.
21 \wxheading{Derived from
}
23 \helpref{wxControl
}{wxcontrol
}\\
24 \helpref{wxWindow
}{wxwindow
}\\
25 \helpref{wxEvtHandler
}{wxevthandler
}\\
26 \helpref{wxObject
}{wxobject
}
28 \wxheading{Include files
}
32 \wxheading{Window styles
}
35 \begin{twocollist
}\itemsep=
0pt
36 \twocolitem{\windowstyle{wxPB
\_USE\_TEXTCTRL}}{Creates a text control to the left of the
37 picker which is completely managed by this
\helpref{wxPickerBase
}{wxpickerbase
}
43 \helpref{wxColourPickerCtrl
}{wxcolourpickerctrl
}
46 \latexignore{\rtfignore{\wxheading{Members
}}}
48 \membersection{wxPickerBase::SetInternalMargin
}\label{wxpickerbasesetinternalmargin
}
50 \func{void
}{SetInternalMargin
}{\param{int
}{margin
}}
52 Sets the margin (in pixel) between the picker and the text control.
53 This function can be used only when
\helpref{HasTextCtrl
}{wxpickerbasehastextctrl
} returns
\true.
56 \membersection{wxPickerBase::GetInternalMargin
}\label{wxpickerbasegetinternalmargin
}
58 \constfunc{int
}{GetInternalMargin
}{}
60 Returns the margin (in pixel) between the picker and the text control.
61 This function can be used only when
\helpref{HasTextCtrl
}{wxpickerbasehastextctrl
} returns
\true.
64 \membersection{wxPickerBase::SetTextCtrlProportion
}\label{wxpickerbasesettextctrlproportion
}
66 \func{void
}{SetTextCtrlProportion
}{\param{int
}{prop
}}
68 Sets the proportion value of the text control.
69 Look at the overview of wxPickerBase for more details about this.
70 This function can be used only when
\helpref{HasTextCtrl
}{wxpickerbasehastextctrl
} returns
\true.
73 \membersection{wxPickerBase::SetPickerCtrlProportion
}\label{wxpickerbasesetpickerctrlproportion
}
75 \func{void
}{SetPickerCtrlProportion
}{\param{int
}{prop
}}
77 Sets the proportion value of the picker.
78 Look at the overview of wxPickerBase for more details about this.
81 \membersection{wxPickerBase::GetTextCtrlProportion
}\label{wxpickerbasegettextctrlproportion
}
83 \constfunc{int
}{GetTextCtrlProportion
}{}
85 Returns the proportion value of the text control.
86 This function can be used only when
\helpref{HasTextCtrl
}{wxpickerbasehastextctrl
} returns
\true.
89 \membersection{wxPickerBase::GetPickerCtrlProportion
}\label{wxpickerbasegetpickerctrlproportion
}
91 \constfunc{int
}{GetPickerCtrlProportion
}{}
93 Returns the proportion value of the picker.
96 \membersection{wxPickerBase::HasTextCtrl
}\label{wxpickerbasehastextctrl
}
98 \constfunc{bool
}{HasTextCtrl
}{}
100 Returns true if this window has a valid text control (i.e. if the
\windowstyle{wxPB
\_USE\_TEXTCTRL} style was
101 given when creating this control).
104 \membersection{wxPickerBase::GetTextCtrl
}\label{wxpickerbasegetextctrl
}
106 \func{wxTextCtrl *
}{GetTextCtrl
}{}
108 Returns 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.
109 Very 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).
112 \membersection{wxPickerBase::IsTextCtrlGrowable
}\label{wxpickerbaseistextctrlgrowable
}
114 \constfunc{bool
}{IsTextCtrlGrowable
}{}
116 Returns
\true if the text control is growable.
117 This function can be used only when
\helpref{HasTextCtrl
}{wxpickerbasehastextctrl
} returns
\true.
120 \membersection{wxPickerBase::SetPickerCtrlGrowable
}\label{wxpickerbasesetpickerctrlgrowable
}
122 \func{void
}{SetPickerCtrlGrowable
}{\param{bool
}{ grow = true
}}
124 Sets the picker control as growable when
{\tt grow
} is
\true.
127 \membersection{wxPickerBase::SetTextCtrlGrowable
}\label{wxpickerbasesettextctrlgrowable
}
129 \func{void
}{SetTextCtrlGrowable
}{\param{bool
}{ grow = true
}}
131 Sets the text control as growable when
{\tt grow
} is
\true.
132 This function can be used only when
\helpref{HasTextCtrl
}{wxpickerbasehastextctrl
} returns
\true.
136 \membersection{wxPickerBase::IsPickerCtrlGrowable
}\label{wxpickerbaseispickerctrlgrowable
}
138 \constfunc{bool
}{IsPickerCtrlGrowable
}{}
140 Returns
\true if the picker control is growable.
143 \membersection{wxPickerBase::SetPickerCtrlGrowable
}\label{wxpickerbasesetpickerctrlgrowable
}
145 \func{void
}{SetPickerCtrlGrowable
}{\param{bool
}{ grow = true
}}
147 Sets the picker control as growable when
{\tt grow
} is
\true.
148 This function has effects only when
\helpref{HasTextCtrl
}{wxpickerbasehastextctrl
} returns
\true.