]>
Commit | Line | Data |
---|---|---|
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 | ||
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 | |
ecd87e5b VZ |
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. | |
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 | |
41 | picker which is completely managed by this \helpref{wxPickerBase}{wxpickerbase} | |
42 | class.} | |
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 | ||
56 | Sets the margin (in pixel) between the picker and the text control. | |
c851c8b4 | 57 | This 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 | ||
64 | Returns the margin (in pixel) between the picker and the text control. | |
c851c8b4 | 65 | This 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 | 72 | Sets the proportion value of the text control. |
ec376c8f | 73 | Look at the overview of wxPickerBase for more details about this. |
c851c8b4 | 74 | This 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 | ||
81 | Sets the proportion value of the picker. | |
82 | Look 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 | 89 | Returns the proportion value of the text control. |
c851c8b4 | 90 | This 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 | ||
97 | Returns 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 | 104 | Returns true if this window has a valid text control (i.e. if the \windowstyle{wxPB\_USE\_TEXTCTRL} style was |
ec376c8f VZ |
105 | given when creating this control). |
106 | ||
107 | ||
a65ffcb2 | 108 | \membersection{wxPickerBase::GetTextCtrl}\label{wxpickerbasegetextctrl} |
ec376c8f VZ |
109 | |
110 | \func{wxTextCtrl *}{GetTextCtrl}{} | |
111 | ||
a65ffcb2 | 112 | 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. |
ec376c8f | 113 | 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). |
a65ffcb2 VZ |
114 | |
115 | ||
116 | \membersection{wxPickerBase::IsTextCtrlGrowable}\label{wxpickerbaseistextctrlgrowable} | |
117 | ||
118 | \constfunc{bool}{IsTextCtrlGrowable}{} | |
119 | ||
120 | Returns \true if the text control is growable. | |
c851c8b4 | 121 | This 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 | ||
128 | Sets 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 | ||
135 | Sets the text control as growable when {\tt grow} is \true. | |
c851c8b4 | 136 | This 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 | ||
144 | Returns \true if the picker control is growable. | |
145 | ||
146 | ||
147 | \membersection{wxPickerBase::SetPickerCtrlGrowable}\label{wxpickerbasesetpickerctrlgrowable} | |
148 | ||
149 | \func{void}{SetPickerCtrlGrowable}{\param{bool}{ grow = true}} | |
150 | ||
151 | Sets the picker control as growable when {\tt grow} is \true. | |
c851c8b4 | 152 | This function has effects only when \helpref{HasTextCtrl}{wxpickerbasehastextctrl} returns \true. |
a65ffcb2 | 153 |