]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/gridedit.tex
no real changes, just refactor/simplify the code to remove duplication and unnecessar...
[wxWidgets.git] / docs / latex / wx / gridedit.tex
CommitLineData
03817a5e
MB
1%
2% automatically generated by HelpGen from
3% grid.h at 11/May/00 18:30:18
4%
5
f3845e88
VZ
6\section{\class{wxGridCellBoolEditor}}\label{wxgridcellbooleditor}
7
8The editor for boolean data.
9
10\wxheading{Derived from}
11
12\helpref{wxGridCellEditor}{wxgridcelleditor}
13
14\wxheading{See also}
15
16\helpref{wxGridCellEditor}{wxgridcelleditor},\rtfsp
17\helpref{wxGridCellFloatEditor}{wxgridcellfloateditor},\rtfsp
18\helpref{wxGridCellNumberEditor}{wxgridcellnumbereditor},\rtfsp
19\helpref{wxGridCellTextEditor}{wxgridcelltexteditor},\rtfsp
20\helpref{wxGridCellChoiceEditor}{wxgridcellchoiceeditor}
21
0e10e38d
VZ
22\wxheading{Include files}
23
24<wx/grid.h>
25
a7af285d
VZ
26\wxheading{Library}
27
28\helpref{wxAdv}{librarieslist}
29
f3845e88
VZ
30\latexignore{\rtfignore{\wxheading{Members}}}
31
32
33\membersection{wxGridCellBoolEditor::wxGridCellBoolEditor}\label{wxgridcellbooleditorconstr}
34
35\func{}{wxGridCellBoolEditor}{}
36
37Default constructor.
38
39
9c71a138
VZ
40\membersection{wxGridCellBoolEditor::IsTrueValue}\label{wxgridcellbooleditoristruevalue}
41
42\func{static bool}{IsTrueValue}{\param{const wxString\& }{value}}
43
44Returns \true if the given \arg{value} is equal to the string representation of
45the truth value we currently use (see
46\helpref{UseStringValues}{wxgridcellbooleditorusestringvalues}).
47
48
49\membersection{wxGridCellBoolEditor::UseStringValues}\label{wxgridcellbooleditorusestringvalues}
50
51\func{static void}{UseStringValues}{\param{const wxString\& }{valueTrue = \_T("1")}, \param{const wxString\& }{valueFalse = \_T("")}}
52
53This method allows to customize the values returned by GetValue() method for
54the cell using this editor. By default, the default values of the arguments are
55used, i.e. \texttt{"1"} is returned if the cell is checked and an empty string
56otherwise, using this method allows to change this.
57
58
f3845e88
VZ
59\section{\class{wxGridCellChoiceEditor}}\label{wxgridcellchoiceeditor}
60
61The editor for string data allowing to choose from a list of strings.
62
63\wxheading{Derived from}
64
65\helpref{wxGridCellEditor}{wxgridcelleditor}
66
67\wxheading{See also}
68
69\helpref{wxGridCellEditor}{wxgridcelleditor},\rtfsp
70\helpref{wxGridCellFloatEditor}{wxgridcellfloateditor},\rtfsp
71\helpref{wxGridCellBoolEditor}{wxgridcellbooleditor},\rtfsp
72\helpref{wxGridCellTextEditor}{wxgridcelltexteditor},\rtfsp
73\helpref{wxGridCellNumberEditor}{wxgridcellnumbereditor}
74
a6526c73
FM
75\wxheading{Include files}
76
77<wx/grid.h>
78
79\wxheading{Library}
80
81\helpref{wxAdv}{librarieslist}
82
f3845e88
VZ
83
84\latexignore{\rtfignore{\wxheading{Members}}}
85
86
87\membersection{wxGridCellChoiceEditor::wxGridCellChoiceEditor}\label{wxgridcellchoiceeditorconstr}
88
cc81d32f 89\func{}{wxGridCellChoiceEditor}{\param{size\_t }{count = 0}, \param{const wxString }{choices[] = NULL}, \param{bool }{allowOthers = false}}
f3845e88 90
e119d049 91\func{}{wxGridCellChoiceEditor}{\param{const wxArrayString\& }{choices}, \param{bool }{allowOthers = false}}
7db33cc3 92
f3845e88
VZ
93\docparam{count}{Number of strings from which the user can choose.}
94\docparam{choices}{An array of strings from which the user can choose.}
3c771d61 95\docparam{allowOthers}{If allowOthers is true, the user can type a string not in choices array.}
f3845e88
VZ
96
97
98\membersection{wxGridCellChoiceEditor::SetParameters}\label{wxgridcellchoiceeditorsetparameters}
99
100\func{void}{SetParameters}{\param{const wxString\& }{params}}
101
102Parameters string format is "item1[,item2[...,itemN]]"
103
03817a5e
MB
104\section{\class{wxGridCellEditor}}\label{wxgridcelleditor}
105
2eebb742 106This class is responsible for providing and manipulating
03817a5e 107the in-place edit controls for the grid. Instances of wxGridCellEditor
2eebb742 108(actually, instances of derived classes since it is an abstract class) can be
03817a5e
MB
109associated with the cell attributes for individual cells, rows, columns, or
110even for the entire grid.
111
03817a5e
MB
112\wxheading{Derived from}
113
2eebb742 114wxGridCellWorker
03817a5e 115
cbc95b2c
MB
116\wxheading{See also}
117
118\helpref{wxGridCellTextEditor}{wxgridcelltexteditor},\rtfsp
119\helpref{wxGridCellFloatEditor}{wxgridcellfloateditor},\rtfsp
120\helpref{wxGridCellBoolEditor}{wxgridcellbooleditor},\rtfsp
121\helpref{wxGridCellNumberEditor}{wxgridcellnumbereditor},\rtfsp
122\helpref{wxGridCellChoiceEditor}{wxgridcellchoiceeditor}
03817a5e 123
0e10e38d
VZ
124\wxheading{Include files}
125
126<wx/grid.h>
127
a7af285d
VZ
128\wxheading{Library}
129
130\helpref{wxAdv}{librarieslist}
131
132\wxheading{Library}
133
134\helpref{wxAdv}{librarieslist}
135
03817a5e
MB
136\latexignore{\rtfignore{\wxheading{Members}}}
137
03817a5e
MB
138\membersection{wxGridCellEditor::wxGridCellEditor}\label{wxgridcelleditorwxgridcelleditor}
139
140\func{}{wxGridCellEditor}{\void}
141
03817a5e
MB
142\membersection{wxGridCellEditor::IsCreated}\label{wxgridcelleditoriscreated}
143
144\func{bool}{IsCreated}{\void}
145
03817a5e
MB
146\membersection{wxGridCellEditor::Create}\label{wxgridcelleditorcreate}
147
148\func{void}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{wxEvtHandler* }{evtHandler}}
149
2eebb742 150Creates the actual edit control.
03817a5e
MB
151
152\membersection{wxGridCellEditor::SetSize}\label{wxgridcelleditorsetsize}
153
154\func{void}{SetSize}{\param{const wxRect\& }{rect}}
155
2eebb742 156Size and position the edit control.
03817a5e
MB
157
158\membersection{wxGridCellEditor::Show}\label{wxgridcelleditorshow}
159
160\func{void}{Show}{\param{bool }{show}, \param{wxGridCellAttr* }{attr = NULL}}
161
162Show or hide the edit control, use the specified attributes to set
2eebb742 163colours/fonts for it.
03817a5e
MB
164
165\membersection{wxGridCellEditor::PaintBackground}\label{wxgridcelleditorpaintbackground}
166
167\func{void}{PaintBackground}{\param{const wxRect\& }{rectCell}, \param{wxGridCellAttr* }{attr}}
168
169Draws the part of the cell not occupied by the control: the base class
2eebb742 170version just fills it with background colour from the attribute.
03817a5e
MB
171
172\membersection{wxGridCellEditor::BeginEdit}\label{wxgridcelleditorbeginedit}
173
174\func{void}{BeginEdit}{\param{int }{row}, \param{int }{col}, \param{wxGrid* }{grid}}
175
176Fetch the value from the table and prepare the edit control
2eebb742 177to begin editing. Set the focus to the edit control.
03817a5e
MB
178
179\membersection{wxGridCellEditor::EndEdit}\label{wxgridcelleditorendedit}
180
181\func{bool}{EndEdit}{\param{int }{row}, \param{int }{col}, \param{wxGrid* }{grid}}
182
183Complete the editing of the current cell. Returns true if the value has
2eebb742 184changed. If necessary, the control may be destroyed.
03817a5e
MB
185
186\membersection{wxGridCellEditor::Reset}\label{wxgridcelleditorreset}
187
188\func{void}{Reset}{\void}
189
2eebb742 190Reset the value in the control back to its starting value.
03817a5e
MB
191
192\membersection{wxGridCellEditor::StartingKey}\label{wxgridcelleditorstartingkey}
193
194\func{void}{StartingKey}{\param{wxKeyEvent\& }{event}}
195
196If the editor is enabled by pressing keys on the grid,
197this will be called to let the editor do something about
198that first key if desired.
199
03817a5e
MB
200\membersection{wxGridCellEditor::StartingClick}\label{wxgridcelleditorstartingclick}
201
202\func{void}{StartingClick}{\void}
203
2eebb742
JS
204If the editor is enabled by clicking on the cell, this method will be
205called.
03817a5e
MB
206
207\membersection{wxGridCellEditor::HandleReturn}\label{wxgridcelleditorhandlereturn}
208
209\func{void}{HandleReturn}{\param{wxKeyEvent\& }{event}}
210
211Some types of controls on some platforms may need some help
212with the Return key.
213
03817a5e
MB
214\membersection{wxGridCellEditor::Destroy}\label{wxgridcelleditordestroy}
215
216\func{void}{Destroy}{\void}
217
2eebb742 218Final cleanup.
03817a5e
MB
219
220\membersection{wxGridCellEditor::Clone}\label{wxgridcelleditorclone}
221
222\constfunc{wxGridCellEditor*}{Clone}{\void}
223
2eebb742 224Create a new object which is the copy of this one.
03817a5e
MB
225
226\membersection{wxGridCellEditor::\destruct{wxGridCellEditor}}\label{wxgridcelleditordtor}
227
228\func{}{\destruct{wxGridCellEditor}}{\void}
229
2eebb742 230The dtor is private because only DecRef() can delete us.
03817a5e 231
cbc95b2c 232
f3845e88 233\section{\class{wxGridCellFloatEditor}}\label{wxgridcellfloateditor}
cbc95b2c 234
f3845e88 235The editor for floating point numbers data.
cbc95b2c
MB
236
237\wxheading{Derived from}
238
f3845e88 239\helpref{wxGridCellTextEditor}{wxgridcelltexteditor}\\
cbc95b2c
MB
240\helpref{wxGridCellEditor}{wxgridcelleditor}
241
242\wxheading{See also}
243
244\helpref{wxGridCellEditor}{wxgridcelleditor},\rtfsp
cbc95b2c 245\helpref{wxGridCellNumberEditor}{wxgridcellnumbereditor},\rtfsp
f3845e88
VZ
246\helpref{wxGridCellBoolEditor}{wxgridcellbooleditor},\rtfsp
247\helpref{wxGridCellTextEditor}{wxgridcelltexteditor},\rtfsp
cbc95b2c
MB
248\helpref{wxGridCellChoiceEditor}{wxgridcellchoiceeditor}
249
0e10e38d 250\wxheading{Include files}
f3845e88 251
0e10e38d 252<wx/grid.h>
cbc95b2c 253
a7af285d
VZ
254\wxheading{Library}
255
256\helpref{wxAdv}{librarieslist}
257
0e10e38d 258\latexignore{\rtfignore{\wxheading{Members}}}
cbc95b2c 259
f3845e88 260\membersection{wxGridCellFloatEditor::wxGridCellFloatEditor}\label{wxgridcellfloateditorconstr}
cbc95b2c 261
f3845e88 262\func{}{wxGridCellFloatEditor}{\param{int }{width = -1}, \param{int }{precision = -1}}
cbc95b2c 263
f3845e88
VZ
264\docparam{width}{Minimum number of characters to be shown.}
265\docparam{precision}{Number of digits after the decimal dot.}
cbc95b2c 266
f3845e88
VZ
267
268\membersection{wxGridCellFloatEditor::SetParameters}\label{wxgridcellfloateditorsetparameters}
cbc95b2c
MB
269
270\func{void}{SetParameters}{\param{const wxString\& }{params}}
271
f3845e88
VZ
272Parameters string format is "width,precision"
273
cbc95b2c
MB
274
275
276\section{\class{wxGridCellNumberEditor}}\label{wxgridcellnumbereditor}
277
278The editor for numeric integer data.
279
280\wxheading{Derived from}
281
282\helpref{wxGridCellTextEditor}{wxgridcelltexteditor}\\
283\helpref{wxGridCellEditor}{wxgridcelleditor}
284
285\wxheading{See also}
286
287\helpref{wxGridCellEditor}{wxgridcelleditor},\rtfsp
288\helpref{wxGridCellFloatEditor}{wxgridcellfloateditor},\rtfsp
289\helpref{wxGridCellBoolEditor}{wxgridcellbooleditor},\rtfsp
290\helpref{wxGridCellTextEditor}{wxgridcelltexteditor},\rtfsp
291\helpref{wxGridCellChoiceEditor}{wxgridcellchoiceeditor}
292
0e10e38d 293\wxheading{Include files}
cbc95b2c 294
0e10e38d 295<wx/grid.h>
cbc95b2c 296
a7af285d
VZ
297\wxheading{Library}
298
299\helpref{wxAdv}{librarieslist}
300
0e10e38d 301\latexignore{\rtfignore{\wxheading{Members}}}
cbc95b2c
MB
302
303\membersection{wxGridCellNumberEditor::wxGridCellNumberEditor}\label{wxgridcellnumbereditorconstr}
304
305\func{}{wxGridCellNumberEditor}{\param{int }{min = -1}, \param{int }{max = -1}}
306
307Allows to specify the range for acceptable data;
308if min == max == -1, no range checking is done
309
310
311\membersection{wxGridCellNumberEditor::GetString}\label{wxgridcellnumbereditorgetstring}
312
313\constfunc{wxString}{GetString}{\void}
314
315String representation of the value.
316
317
318\membersection{wxGridCellNumberEditor::HasRange}\label{wxgridcellnumbereditorhasrange}
319
320\constfunc{bool}{HasRange}{\void}
321
322If the return value is true, the editor uses a wxSpinCtrl to get user input,
323otherwise it uses a wxTextCtrl.
324
325
326\membersection{wxGridCellNumberEditor::SetParameters}\label{wxgridcellnumbereditorsetparameters}
327
328\func{void}{SetParameters}{\param{const wxString\& }{params}}
329
330Parameters string format is "min,max".
331
332
f3845e88 333\section{\class{wxGridCellTextEditor}}\label{wxgridcelltexteditor}
cbc95b2c 334
f3845e88 335The editor for string/text data.
cbc95b2c
MB
336
337\wxheading{Derived from}
338
339\helpref{wxGridCellEditor}{wxgridcelleditor}
340
341\wxheading{See also}
342
343\helpref{wxGridCellEditor}{wxgridcelleditor},\rtfsp
344\helpref{wxGridCellFloatEditor}{wxgridcellfloateditor},\rtfsp
f3845e88 345\helpref{wxGridCellBoolEditor}{wxgridcellbooleditor},\rtfsp
cbc95b2c 346\helpref{wxGridCellNumberEditor}{wxgridcellnumbereditor},\rtfsp
cbc95b2c
MB
347\helpref{wxGridCellChoiceEditor}{wxgridcellchoiceeditor}
348
0e10e38d
VZ
349\wxheading{Include files}
350
351<wx/grid.h>
352
a7af285d
VZ
353\wxheading{Library}
354
355\helpref{wxAdv}{librarieslist}
356
cbc95b2c
MB
357\latexignore{\rtfignore{\wxheading{Members}}}
358
359
f3845e88 360\membersection{wxGridCellTextEditor::wxGridCellTextEditor}\label{wxgridcelltexteditorconstr}
cbc95b2c 361
f3845e88 362\func{}{wxGridCellTextEditor}{\void}
cbc95b2c
MB
363
364Default constructor.
365
f3845e88 366\membersection{wxGridCellTextEditor::SetParameters}\label{wxgridcelltexteditorsetparameters}
cbc95b2c
MB
367
368\func{void}{SetParameters}{\param{const wxString\& }{params}}
369
f3845e88
VZ
370The parameters string format is "n" where n is a number representing the maximum width.
371
cbc95b2c 372