1 /*
2  * Interface wrapper code.
3  *
4  * Generated by SIP 4.19.16
5  *
6  *     Copyright: (c) 2018 by Total Control Software
7  *     License:   wxWindows License
8  */
9 
10 #include "sipAPI_grid.h"
11 
12         #include <wx/grid.h>
13 
14         #include <wx/grid.h>
15         #include <wx/window.h>
16         #include <wx/event.h>
17         #include <wx/grid.h>
18         #include <wx/validate.h>
19         #include <wx/control.h>
20         #include <wx/event.h>
21         #include <wx/grid.h>
22         #include <wx/gdicmn.h>
23         #include <wx/dc.h>
_wxGridCellFloatEditor_EndEdit(wxGridCellFloatEditor * self,int row,int col,const wxGrid * grid,const wxString * oldval)24     PyObject* _wxGridCellFloatEditor_EndEdit(wxGridCellFloatEditor* self, int row, int col, const wxGrid* grid, const wxString* oldval)
25     {
26         bool rv;
27         wxString newval;
28         rv = self->EndEdit(row, col, grid, *oldval, &newval);
29         if (rv) {
30             return wx2PyString(newval);
31         }
32         else {
33             Py_INCREF(Py_None);
34             return Py_None;
35         }
36     }
37 
38 
39 class sipwxGridCellFloatEditor : public  ::wxGridCellFloatEditor
40 {
41 public:
42     sipwxGridCellFloatEditor(int,int,int);
43     virtual ~sipwxGridCellFloatEditor();
44 
45     /*
46      * There is a protected method for every virtual method visible from
47      * this class.
48      */
49 protected:
50      ::wxString GetValue() const SIP_OVERRIDE;
51     void StartingKey( ::wxKeyEvent&) SIP_OVERRIDE;
52     void StartingClick() SIP_OVERRIDE;
53     void Show(bool, ::wxGridCellAttr*) SIP_OVERRIDE;
54     void SetSize(const  ::wxRect&) SIP_OVERRIDE;
55     void Reset() SIP_OVERRIDE;
56     void PaintBackground( ::wxDC&,const  ::wxRect&,const  ::wxGridCellAttr&) SIP_OVERRIDE;
57     void HandleReturn( ::wxKeyEvent&) SIP_OVERRIDE;
58     void ApplyEdit(int,int, ::wxGrid*) SIP_OVERRIDE;
59     bool EndEdit(int,int,const  ::wxGrid*,const  ::wxString&, ::wxString*) SIP_OVERRIDE;
60     void Destroy() SIP_OVERRIDE;
61     void Create( ::wxWindow*, ::wxWindowID, ::wxEvtHandler*) SIP_OVERRIDE;
62      ::wxGridCellEditor* Clone() const SIP_OVERRIDE;
63     void BeginEdit(int,int, ::wxGrid*) SIP_OVERRIDE;
64     void SetParameters(const  ::wxString&) SIP_OVERRIDE;
65     void SetValidator(const  ::wxValidator&) SIP_OVERRIDE;
66 
67 public:
68     sipSimpleWrapper *sipPySelf;
69 
70 private:
71     sipwxGridCellFloatEditor(const sipwxGridCellFloatEditor &);
72     sipwxGridCellFloatEditor &operator = (const sipwxGridCellFloatEditor &);
73 
74     char sipPyMethods[16];
75 };
76 
sipwxGridCellFloatEditor(int width,int precision,int format)77 sipwxGridCellFloatEditor::sipwxGridCellFloatEditor(int width,int precision,int format):  ::wxGridCellFloatEditor(width,precision,format), sipPySelf(SIP_NULLPTR)
78 {
79     memset(sipPyMethods, 0, sizeof (sipPyMethods));
80 }
81 
~sipwxGridCellFloatEditor()82 sipwxGridCellFloatEditor::~sipwxGridCellFloatEditor()
83 {
84     sipInstanceDestroyedEx(&sipPySelf);
85 }
86 
GetValue() const87  ::wxString sipwxGridCellFloatEditor::GetValue() const
88 {
89     sip_gilstate_t sipGILState;
90     PyObject *sipMeth;
91 
92     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_GetValue);
93 
94     if (!sipMeth)
95         return  ::wxGridCellFloatEditor::GetValue();
96 
97     extern  ::wxString sipVH__grid_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
98 
99     return sipVH__grid_13(sipGILState, 0, sipPySelf, sipMeth);
100 }
101 
StartingKey(::wxKeyEvent & event)102 void sipwxGridCellFloatEditor::StartingKey( ::wxKeyEvent& event)
103 {
104     sip_gilstate_t sipGILState;
105     PyObject *sipMeth;
106 
107     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,SIP_NULLPTR,sipName_StartingKey);
108 
109     if (!sipMeth)
110     {
111          ::wxGridCellFloatEditor::StartingKey(event);
112         return;
113     }
114 
115     extern void sipVH__grid_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxKeyEvent&);
116 
117     sipVH__grid_9(sipGILState, 0, sipPySelf, sipMeth, event);
118 }
119 
StartingClick()120 void sipwxGridCellFloatEditor::StartingClick()
121 {
122     sip_gilstate_t sipGILState;
123     PyObject *sipMeth;
124 
125     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,SIP_NULLPTR,sipName_StartingClick);
126 
127     if (!sipMeth)
128     {
129          ::wxGridCellFloatEditor::StartingClick();
130         return;
131     }
132 
133     extern void sipVH__grid_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
134 
135     sipVH__grid_7(sipGILState, 0, sipPySelf, sipMeth);
136 }
137 
Show(bool show,::wxGridCellAttr * attr)138 void sipwxGridCellFloatEditor::Show(bool show, ::wxGridCellAttr*attr)
139 {
140     sip_gilstate_t sipGILState;
141     PyObject *sipMeth;
142 
143     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,SIP_NULLPTR,sipName_Show);
144 
145     if (!sipMeth)
146     {
147          ::wxGridCellFloatEditor::Show(show,attr);
148         return;
149     }
150 
151     extern void sipVH__grid_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, bool, ::wxGridCellAttr*);
152 
153     sipVH__grid_12(sipGILState, 0, sipPySelf, sipMeth, show, attr);
154 }
155 
SetSize(const::wxRect & rect)156 void sipwxGridCellFloatEditor::SetSize(const  ::wxRect& rect)
157 {
158     sip_gilstate_t sipGILState;
159     PyObject *sipMeth;
160 
161     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,SIP_NULLPTR,sipName_SetSize);
162 
163     if (!sipMeth)
164     {
165          ::wxGridCellFloatEditor::SetSize(rect);
166         return;
167     }
168 
169     extern void sipVH__grid_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxRect&);
170 
171     sipVH__grid_11(sipGILState, 0, sipPySelf, sipMeth, rect);
172 }
173 
Reset()174 void sipwxGridCellFloatEditor::Reset()
175 {
176     sip_gilstate_t sipGILState;
177     PyObject *sipMeth;
178 
179     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,SIP_NULLPTR,sipName_Reset);
180 
181     if (!sipMeth)
182     {
183          ::wxGridCellFloatEditor::Reset();
184         return;
185     }
186 
187     extern void sipVH__grid_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
188 
189     sipVH__grid_7(sipGILState, 0, sipPySelf, sipMeth);
190 }
191 
PaintBackground(::wxDC & dc,const::wxRect & rectCell,const::wxGridCellAttr & attr)192 void sipwxGridCellFloatEditor::PaintBackground( ::wxDC& dc,const  ::wxRect& rectCell,const  ::wxGridCellAttr& attr)
193 {
194     sip_gilstate_t sipGILState;
195     PyObject *sipMeth;
196 
197     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,SIP_NULLPTR,sipName_PaintBackground);
198 
199     if (!sipMeth)
200     {
201          ::wxGridCellFloatEditor::PaintBackground(dc,rectCell,attr);
202         return;
203     }
204 
205     extern void sipVH__grid_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxDC&,const  ::wxRect&,const  ::wxGridCellAttr&);
206 
207     sipVH__grid_10(sipGILState, 0, sipPySelf, sipMeth, dc, rectCell, attr);
208 }
209 
HandleReturn(::wxKeyEvent & event)210 void sipwxGridCellFloatEditor::HandleReturn( ::wxKeyEvent& event)
211 {
212     sip_gilstate_t sipGILState;
213     PyObject *sipMeth;
214 
215     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[7],sipPySelf,SIP_NULLPTR,sipName_HandleReturn);
216 
217     if (!sipMeth)
218     {
219          ::wxGridCellFloatEditor::HandleReturn(event);
220         return;
221     }
222 
223     extern void sipVH__grid_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxKeyEvent&);
224 
225     sipVH__grid_9(sipGILState, 0, sipPySelf, sipMeth, event);
226 }
227 
ApplyEdit(int row,int col,::wxGrid * grid)228 void sipwxGridCellFloatEditor::ApplyEdit(int row,int col, ::wxGrid*grid)
229 {
230     sip_gilstate_t sipGILState;
231     PyObject *sipMeth;
232 
233     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[8],sipPySelf,SIP_NULLPTR,sipName_ApplyEdit);
234 
235     if (!sipMeth)
236     {
237          ::wxGridCellFloatEditor::ApplyEdit(row,col,grid);
238         return;
239     }
240 
241     extern void sipVH__grid_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int, ::wxGrid*);
242 
243     sipVH__grid_4(sipGILState, 0, sipPySelf, sipMeth, row, col, grid);
244 }
245 
EndEdit(int row,int col,const::wxGrid * grid,const::wxString & oldval,::wxString * newval)246 bool sipwxGridCellFloatEditor::EndEdit(int row,int col,const  ::wxGrid*grid,const  ::wxString& oldval, ::wxString*newval)
247 {
248     sip_gilstate_t sipGILState;
249     PyObject *sipMeth;
250 
251     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],sipPySelf,SIP_NULLPTR,sipName_EndEdit);
252 
253     if (!sipMeth)
254         return  ::wxGridCellFloatEditor::EndEdit(row,col,grid,oldval,newval);
255 
256     extern bool sipVH__grid_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int,const  ::wxGrid*,const  ::wxString&, ::wxString*);
257 
258     return sipVH__grid_8(sipGILState, 0, sipPySelf, sipMeth, row, col, grid, oldval, newval);
259 }
260 
Destroy()261 void sipwxGridCellFloatEditor::Destroy()
262 {
263     sip_gilstate_t sipGILState;
264     PyObject *sipMeth;
265 
266     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[10],sipPySelf,SIP_NULLPTR,sipName_Destroy);
267 
268     if (!sipMeth)
269     {
270          ::wxGridCellFloatEditor::Destroy();
271         return;
272     }
273 
274     extern void sipVH__grid_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
275 
276     sipVH__grid_7(sipGILState, 0, sipPySelf, sipMeth);
277 }
278 
Create(::wxWindow * parent,::wxWindowID id,::wxEvtHandler * evtHandler)279 void sipwxGridCellFloatEditor::Create( ::wxWindow*parent, ::wxWindowID id, ::wxEvtHandler*evtHandler)
280 {
281     sip_gilstate_t sipGILState;
282     PyObject *sipMeth;
283 
284     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[11],sipPySelf,SIP_NULLPTR,sipName_Create);
285 
286     if (!sipMeth)
287     {
288          ::wxGridCellFloatEditor::Create(parent,id,evtHandler);
289         return;
290     }
291 
292     extern void sipVH__grid_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxWindow*, ::wxWindowID, ::wxEvtHandler*);
293 
294     sipVH__grid_6(sipGILState, 0, sipPySelf, sipMeth, parent, id, evtHandler);
295 }
296 
Clone() const297  ::wxGridCellEditor* sipwxGridCellFloatEditor::Clone() const
298 {
299     sip_gilstate_t sipGILState;
300     PyObject *sipMeth;
301 
302     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[12]),sipPySelf,SIP_NULLPTR,sipName_Clone);
303 
304     if (!sipMeth)
305         return  ::wxGridCellFloatEditor::Clone();
306 
307     extern  ::wxGridCellEditor* sipVH__grid_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
308 
309     return sipVH__grid_5(sipGILState, 0, sipPySelf, sipMeth);
310 }
311 
BeginEdit(int row,int col,::wxGrid * grid)312 void sipwxGridCellFloatEditor::BeginEdit(int row,int col, ::wxGrid*grid)
313 {
314     sip_gilstate_t sipGILState;
315     PyObject *sipMeth;
316 
317     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[13],sipPySelf,SIP_NULLPTR,sipName_BeginEdit);
318 
319     if (!sipMeth)
320     {
321          ::wxGridCellFloatEditor::BeginEdit(row,col,grid);
322         return;
323     }
324 
325     extern void sipVH__grid_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,int, ::wxGrid*);
326 
327     sipVH__grid_4(sipGILState, 0, sipPySelf, sipMeth, row, col, grid);
328 }
329 
SetParameters(const::wxString & params)330 void sipwxGridCellFloatEditor::SetParameters(const  ::wxString& params)
331 {
332     sip_gilstate_t sipGILState;
333     PyObject *sipMeth;
334 
335     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[14],sipPySelf,SIP_NULLPTR,sipName_SetParameters);
336 
337     if (!sipMeth)
338     {
339          ::wxGridCellFloatEditor::SetParameters(params);
340         return;
341     }
342 
343     extern void sipVH__grid_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxString&);
344 
345     sipVH__grid_3(sipGILState, 0, sipPySelf, sipMeth, params);
346 }
347 
SetValidator(const::wxValidator & validator)348 void sipwxGridCellFloatEditor::SetValidator(const  ::wxValidator& validator)
349 {
350     sip_gilstate_t sipGILState;
351     PyObject *sipMeth;
352 
353     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[15],sipPySelf,SIP_NULLPTR,sipName_SetValidator);
354 
355     if (!sipMeth)
356     {
357          ::wxGridCellFloatEditor::SetValidator(validator);
358         return;
359     }
360 
361     extern void sipVH__grid_14(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxValidator&);
362 
363     sipVH__grid_14(sipGILState, 0, sipPySelf, sipMeth, validator);
364 }
365 
366 
367 PyDoc_STRVAR(doc_wxGridCellFloatEditor_SetParameters, "SetParameters(params)\n"
368 "\n"
369 "The parameters string format is \"width[,precision[,format]]\" where\n"
370 "format should be chosen between f|e|g|E|G (f is used by default)");
371 
372 extern "C" {static PyObject *meth_wxGridCellFloatEditor_SetParameters(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellFloatEditor_SetParameters(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)373 static PyObject *meth_wxGridCellFloatEditor_SetParameters(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
374 {
375     PyObject *sipParseErr = SIP_NULLPTR;
376     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
377 
378     {
379         const  ::wxString* params;
380         int paramsState = 0;
381          ::wxGridCellFloatEditor *sipCpp;
382 
383         static const char *sipKwdList[] = {
384             sipName_params,
385         };
386 
387         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxGridCellFloatEditor, &sipCpp, sipType_wxString,&params, &paramsState))
388         {
389             PyErr_Clear();
390 
391             Py_BEGIN_ALLOW_THREADS
392             (sipSelfWasArg ? sipCpp-> ::wxGridCellFloatEditor::SetParameters(*params) : sipCpp->SetParameters(*params));
393             Py_END_ALLOW_THREADS
394             sipReleaseType(const_cast< ::wxString *>(params),sipType_wxString,paramsState);
395 
396             if (PyErr_Occurred())
397                 return 0;
398 
399             Py_INCREF(Py_None);
400             return Py_None;
401         }
402     }
403 
404     /* Raise an exception if the arguments couldn't be parsed. */
405     sipNoMethod(sipParseErr, sipName_GridCellFloatEditor, sipName_SetParameters, SIP_NULLPTR);
406 
407     return SIP_NULLPTR;
408 }
409 
410 
411 PyDoc_STRVAR(doc_wxGridCellFloatEditor_BeginEdit, "BeginEdit(self, row: int, col: int, grid: Grid)");
412 
413 extern "C" {static PyObject *meth_wxGridCellFloatEditor_BeginEdit(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellFloatEditor_BeginEdit(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)414 static PyObject *meth_wxGridCellFloatEditor_BeginEdit(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
415 {
416     PyObject *sipParseErr = SIP_NULLPTR;
417     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
418 
419     {
420         int row;
421         int col;
422          ::wxGrid* grid;
423          ::wxGridCellFloatEditor *sipCpp;
424 
425         static const char *sipKwdList[] = {
426             sipName_row,
427             sipName_col,
428             sipName_grid,
429         };
430 
431         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8", &sipSelf, sipType_wxGridCellFloatEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid))
432         {
433             PyErr_Clear();
434 
435             Py_BEGIN_ALLOW_THREADS
436             (sipSelfWasArg ? sipCpp-> ::wxGridCellFloatEditor::BeginEdit(row,col,grid) : sipCpp->BeginEdit(row,col,grid));
437             Py_END_ALLOW_THREADS
438 
439             if (PyErr_Occurred())
440                 return 0;
441 
442             Py_INCREF(Py_None);
443             return Py_None;
444         }
445     }
446 
447     /* Raise an exception if the arguments couldn't be parsed. */
448     sipNoMethod(sipParseErr, sipName_GridCellFloatEditor, sipName_BeginEdit, doc_wxGridCellFloatEditor_BeginEdit);
449 
450     return SIP_NULLPTR;
451 }
452 
453 
454 PyDoc_STRVAR(doc_wxGridCellFloatEditor_Clone, "Clone(self) -> GridCellEditor");
455 
456 extern "C" {static PyObject *meth_wxGridCellFloatEditor_Clone(PyObject *, PyObject *);}
meth_wxGridCellFloatEditor_Clone(PyObject * sipSelf,PyObject * sipArgs)457 static PyObject *meth_wxGridCellFloatEditor_Clone(PyObject *sipSelf, PyObject *sipArgs)
458 {
459     PyObject *sipParseErr = SIP_NULLPTR;
460     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
461 
462     {
463         const  ::wxGridCellFloatEditor *sipCpp;
464 
465         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridCellFloatEditor, &sipCpp))
466         {
467              ::wxGridCellEditor*sipRes;
468 
469             PyErr_Clear();
470 
471             Py_BEGIN_ALLOW_THREADS
472             sipRes = (sipSelfWasArg ? sipCpp-> ::wxGridCellFloatEditor::Clone() : sipCpp->Clone());
473             Py_END_ALLOW_THREADS
474 
475             if (PyErr_Occurred())
476                 return 0;
477 
478             return sipConvertFromNewType(sipRes,sipType_wxGridCellEditor,SIP_NULLPTR);
479         }
480     }
481 
482     /* Raise an exception if the arguments couldn't be parsed. */
483     sipNoMethod(sipParseErr, sipName_GridCellFloatEditor, sipName_Clone, doc_wxGridCellFloatEditor_Clone);
484 
485     return SIP_NULLPTR;
486 }
487 
488 
489 PyDoc_STRVAR(doc_wxGridCellFloatEditor_Create, "Create(self, parent: Window, id: int, evtHandler: EvtHandler)");
490 
491 extern "C" {static PyObject *meth_wxGridCellFloatEditor_Create(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellFloatEditor_Create(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)492 static PyObject *meth_wxGridCellFloatEditor_Create(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
493 {
494     PyObject *sipParseErr = SIP_NULLPTR;
495     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
496 
497     {
498          ::wxWindow* parent;
499          ::wxWindowID id;
500          ::wxEvtHandler* evtHandler;
501          ::wxGridCellFloatEditor *sipCpp;
502 
503         static const char *sipKwdList[] = {
504             sipName_parent,
505             sipName_id,
506             sipName_evtHandler,
507         };
508 
509         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8iJ8", &sipSelf, sipType_wxGridCellFloatEditor, &sipCpp, sipType_wxWindow, &parent, &id, sipType_wxEvtHandler, &evtHandler))
510         {
511             PyErr_Clear();
512 
513             Py_BEGIN_ALLOW_THREADS
514             (sipSelfWasArg ? sipCpp-> ::wxGridCellFloatEditor::Create(parent,id,evtHandler) : sipCpp->Create(parent,id,evtHandler));
515             Py_END_ALLOW_THREADS
516 
517             if (PyErr_Occurred())
518                 return 0;
519 
520             Py_INCREF(Py_None);
521             return Py_None;
522         }
523     }
524 
525     /* Raise an exception if the arguments couldn't be parsed. */
526     sipNoMethod(sipParseErr, sipName_GridCellFloatEditor, sipName_Create, doc_wxGridCellFloatEditor_Create);
527 
528     return SIP_NULLPTR;
529 }
530 
531 
532 PyDoc_STRVAR(doc_wxGridCellFloatEditor_ApplyEdit, "ApplyEdit(self, row: int, col: int, grid: Grid)");
533 
534 extern "C" {static PyObject *meth_wxGridCellFloatEditor_ApplyEdit(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellFloatEditor_ApplyEdit(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)535 static PyObject *meth_wxGridCellFloatEditor_ApplyEdit(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
536 {
537     PyObject *sipParseErr = SIP_NULLPTR;
538     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
539 
540     {
541         int row;
542         int col;
543          ::wxGrid* grid;
544          ::wxGridCellFloatEditor *sipCpp;
545 
546         static const char *sipKwdList[] = {
547             sipName_row,
548             sipName_col,
549             sipName_grid,
550         };
551 
552         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8", &sipSelf, sipType_wxGridCellFloatEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid))
553         {
554             PyErr_Clear();
555 
556             Py_BEGIN_ALLOW_THREADS
557             (sipSelfWasArg ? sipCpp-> ::wxGridCellFloatEditor::ApplyEdit(row,col,grid) : sipCpp->ApplyEdit(row,col,grid));
558             Py_END_ALLOW_THREADS
559 
560             if (PyErr_Occurred())
561                 return 0;
562 
563             Py_INCREF(Py_None);
564             return Py_None;
565         }
566     }
567 
568     /* Raise an exception if the arguments couldn't be parsed. */
569     sipNoMethod(sipParseErr, sipName_GridCellFloatEditor, sipName_ApplyEdit, doc_wxGridCellFloatEditor_ApplyEdit);
570 
571     return SIP_NULLPTR;
572 }
573 
574 
575 PyDoc_STRVAR(doc_wxGridCellFloatEditor_Reset, "Reset(self)");
576 
577 extern "C" {static PyObject *meth_wxGridCellFloatEditor_Reset(PyObject *, PyObject *);}
meth_wxGridCellFloatEditor_Reset(PyObject * sipSelf,PyObject * sipArgs)578 static PyObject *meth_wxGridCellFloatEditor_Reset(PyObject *sipSelf, PyObject *sipArgs)
579 {
580     PyObject *sipParseErr = SIP_NULLPTR;
581     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
582 
583     {
584          ::wxGridCellFloatEditor *sipCpp;
585 
586         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridCellFloatEditor, &sipCpp))
587         {
588             PyErr_Clear();
589 
590             Py_BEGIN_ALLOW_THREADS
591             (sipSelfWasArg ? sipCpp-> ::wxGridCellFloatEditor::Reset() : sipCpp->Reset());
592             Py_END_ALLOW_THREADS
593 
594             if (PyErr_Occurred())
595                 return 0;
596 
597             Py_INCREF(Py_None);
598             return Py_None;
599         }
600     }
601 
602     /* Raise an exception if the arguments couldn't be parsed. */
603     sipNoMethod(sipParseErr, sipName_GridCellFloatEditor, sipName_Reset, doc_wxGridCellFloatEditor_Reset);
604 
605     return SIP_NULLPTR;
606 }
607 
608 
609 PyDoc_STRVAR(doc_wxGridCellFloatEditor_GetValue, "GetValue(self) -> object");
610 
611 extern "C" {static PyObject *meth_wxGridCellFloatEditor_GetValue(PyObject *, PyObject *);}
meth_wxGridCellFloatEditor_GetValue(PyObject * sipSelf,PyObject * sipArgs)612 static PyObject *meth_wxGridCellFloatEditor_GetValue(PyObject *sipSelf, PyObject *sipArgs)
613 {
614     PyObject *sipParseErr = SIP_NULLPTR;
615     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
616 
617     {
618         const  ::wxGridCellFloatEditor *sipCpp;
619 
620         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridCellFloatEditor, &sipCpp))
621         {
622              ::wxString*sipRes;
623 
624             PyErr_Clear();
625 
626             Py_BEGIN_ALLOW_THREADS
627             sipRes = new  ::wxString((sipSelfWasArg ? sipCpp-> ::wxGridCellFloatEditor::GetValue() : sipCpp->GetValue()));
628             Py_END_ALLOW_THREADS
629 
630             if (PyErr_Occurred())
631                 return 0;
632 
633             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
634         }
635     }
636 
637     /* Raise an exception if the arguments couldn't be parsed. */
638     sipNoMethod(sipParseErr, sipName_GridCellFloatEditor, sipName_GetValue, doc_wxGridCellFloatEditor_GetValue);
639 
640     return SIP_NULLPTR;
641 }
642 
643 
644 PyDoc_STRVAR(doc_wxGridCellFloatEditor_EndEdit, "EndEdit(row, col, grid, oldval)\n"
645 "\n"
646 "End editing the cell.\n"
647 "\n"
648 "This function must check if the current value of the editing cell\n"
649 "is valid and different from the original value in its string\n"
650 "form. If not then simply return None.  If it has changed then\n"
651 "this method should save the new value so that ApplyEdit can\n"
652 "apply it later and the string representation of the new value\n"
653 "should be returned.\n"
654 "\n"
655 "Notice that this method shoiuld not modify the grid as the\n"
656 "change could still be vetoed.");
657 
658 extern "C" {static PyObject *meth_wxGridCellFloatEditor_EndEdit(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellFloatEditor_EndEdit(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)659 static PyObject *meth_wxGridCellFloatEditor_EndEdit(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
660 {
661     PyObject *sipParseErr = SIP_NULLPTR;
662     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
663 
664     {
665         int row;
666         int col;
667         const  ::wxGrid* grid;
668         const  ::wxString* oldval;
669         int oldvalState = 0;
670          ::wxGridCellFloatEditor *sipCpp;
671 
672         static const char *sipKwdList[] = {
673             sipName_row,
674             sipName_col,
675             sipName_grid,
676             sipName_oldval,
677         };
678 
679         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8J1", &sipSelf, sipType_wxGridCellFloatEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid, sipType_wxString,&oldval, &oldvalState))
680         {
681             PyObject * sipRes = SIP_NULLPTR;
682             int sipIsErr = 0;
683 
684         PyErr_Clear();
685         Py_BEGIN_ALLOW_THREADS
686         sipRes = _wxGridCellFloatEditor_EndEdit(sipCpp, row, col, grid, oldval);
687         Py_END_ALLOW_THREADS
688         if (PyErr_Occurred()) sipIsErr = 1;
689             sipReleaseType(const_cast< ::wxString *>(oldval),sipType_wxString,oldvalState);
690 
691             if (sipIsErr)
692                 return 0;
693 
694             return sipRes;
695         }
696     }
697 
698     /* Raise an exception if the arguments couldn't be parsed. */
699     sipNoMethod(sipParseErr, sipName_GridCellFloatEditor, sipName_EndEdit, SIP_NULLPTR);
700 
701     return SIP_NULLPTR;
702 }
703 
704 
705 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
706 extern "C" {static void *cast_wxGridCellFloatEditor(void *, const sipTypeDef *);}
cast_wxGridCellFloatEditor(void * sipCppV,const sipTypeDef * targetType)707 static void *cast_wxGridCellFloatEditor(void *sipCppV, const sipTypeDef *targetType)
708 {
709      ::wxGridCellFloatEditor *sipCpp = reinterpret_cast< ::wxGridCellFloatEditor *>(sipCppV);
710 
711     if (targetType == sipType_wxGridCellTextEditor)
712         return static_cast< ::wxGridCellTextEditor *>(sipCpp);
713 
714     if (targetType == sipType_wxGridCellEditor)
715         return static_cast< ::wxGridCellEditor *>(sipCpp);
716 
717     if (targetType == sipType_wxClientDataContainer)
718         return static_cast< ::wxClientDataContainer *>(sipCpp);
719 
720     if (targetType == sipType_wxRefCounter)
721         return static_cast< ::wxRefCounter *>(sipCpp);
722 
723     return sipCppV;
724 }
725 
726 
727 /* Call the instance's destructor. */
728 extern "C" {static void release_wxGridCellFloatEditor(void *, int);}
release_wxGridCellFloatEditor(void * sipCppV,int sipState)729 static void release_wxGridCellFloatEditor(void *sipCppV, int sipState)
730 {
731     Py_BEGIN_ALLOW_THREADS
732 
733     if (sipState & SIP_DERIVED_CLASS)
734         delete reinterpret_cast<sipwxGridCellFloatEditor *>(sipCppV);
735     else
736         delete reinterpret_cast< ::wxGridCellFloatEditor *>(sipCppV);
737 
738     Py_END_ALLOW_THREADS
739 }
740 
741 
742 extern "C" {static void dealloc_wxGridCellFloatEditor(sipSimpleWrapper *);}
dealloc_wxGridCellFloatEditor(sipSimpleWrapper * sipSelf)743 static void dealloc_wxGridCellFloatEditor(sipSimpleWrapper *sipSelf)
744 {
745     if (sipIsDerivedClass(sipSelf))
746         reinterpret_cast<sipwxGridCellFloatEditor *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
747 
748     if (sipIsOwnedByPython(sipSelf))
749     {
750         release_wxGridCellFloatEditor(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
751     }
752 }
753 
754 
755 extern "C" {static void *init_type_wxGridCellFloatEditor(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxGridCellFloatEditor(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject ** sipOwner,PyObject ** sipParseErr)756 static void *init_type_wxGridCellFloatEditor(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
757 {
758     sipwxGridCellFloatEditor *sipCpp = SIP_NULLPTR;
759 
760     {
761         int width = -1;
762         int precision = -1;
763         int format = wxGRID_FLOAT_FORMAT_DEFAULT;
764 
765         static const char *sipKwdList[] = {
766             sipName_width,
767             sipName_precision,
768             sipName_format,
769         };
770 
771         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|iii", &width, &precision, &format))
772         {
773             PyErr_Clear();
774 
775             Py_BEGIN_ALLOW_THREADS
776             sipCpp = new sipwxGridCellFloatEditor(width,precision,format);
777             Py_END_ALLOW_THREADS
778 
779             *sipOwner = Py_None;
780 
781             if (PyErr_Occurred())
782             {
783                 delete sipCpp;
784                 return SIP_NULLPTR;
785             }
786 
787             sipCpp->sipPySelf = sipSelf;
788 
789             return sipCpp;
790         }
791     }
792 
793     return SIP_NULLPTR;
794 }
795 
796 
797 /* Define this type's super-types. */
798 static sipEncodedTypeDef supers_wxGridCellFloatEditor[] = {{25, 255, 1}};
799 
800 
801 static PyMethodDef methods_wxGridCellFloatEditor[] = {
802     {SIP_MLNAME_CAST(sipName_ApplyEdit), SIP_MLMETH_CAST(meth_wxGridCellFloatEditor_ApplyEdit), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellFloatEditor_ApplyEdit)},
803     {SIP_MLNAME_CAST(sipName_BeginEdit), SIP_MLMETH_CAST(meth_wxGridCellFloatEditor_BeginEdit), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellFloatEditor_BeginEdit)},
804     {SIP_MLNAME_CAST(sipName_Clone), meth_wxGridCellFloatEditor_Clone, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridCellFloatEditor_Clone)},
805     {SIP_MLNAME_CAST(sipName_Create), SIP_MLMETH_CAST(meth_wxGridCellFloatEditor_Create), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellFloatEditor_Create)},
806     {SIP_MLNAME_CAST(sipName_EndEdit), SIP_MLMETH_CAST(meth_wxGridCellFloatEditor_EndEdit), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellFloatEditor_EndEdit)},
807     {SIP_MLNAME_CAST(sipName_GetValue), meth_wxGridCellFloatEditor_GetValue, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridCellFloatEditor_GetValue)},
808     {SIP_MLNAME_CAST(sipName_Reset), meth_wxGridCellFloatEditor_Reset, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridCellFloatEditor_Reset)},
809     {SIP_MLNAME_CAST(sipName_SetParameters), SIP_MLMETH_CAST(meth_wxGridCellFloatEditor_SetParameters), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellFloatEditor_SetParameters)}
810 };
811 
812 PyDoc_STRVAR(doc_wxGridCellFloatEditor, "GridCellFloatEditor(width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT)\n"
813 "\n"
814 "The editor for floating point numbers data.");
815 
816 
817 sipClassTypeDef sipTypeDef__grid_wxGridCellFloatEditor = {
818     {
819         -1,
820         SIP_NULLPTR,
821         SIP_NULLPTR,
822         SIP_TYPE_CLASS,
823         sipNameNr_wxGridCellFloatEditor,
824         {SIP_NULLPTR},
825         SIP_NULLPTR
826     },
827     {
828         sipNameNr_GridCellFloatEditor,
829         {0, 0, 1},
830         8, methods_wxGridCellFloatEditor,
831         0, SIP_NULLPTR,
832         0, SIP_NULLPTR,
833         {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
834     },
835     doc_wxGridCellFloatEditor,
836     -1,
837     -1,
838     supers_wxGridCellFloatEditor,
839     SIP_NULLPTR,
840     init_type_wxGridCellFloatEditor,
841     SIP_NULLPTR,
842     SIP_NULLPTR,
843 #if PY_MAJOR_VERSION >= 3
844     SIP_NULLPTR,
845     SIP_NULLPTR,
846 #else
847     SIP_NULLPTR,
848     SIP_NULLPTR,
849     SIP_NULLPTR,
850     SIP_NULLPTR,
851 #endif
852     dealloc_wxGridCellFloatEditor,
853     SIP_NULLPTR,
854     SIP_NULLPTR,
855     SIP_NULLPTR,
856     release_wxGridCellFloatEditor,
857     cast_wxGridCellFloatEditor,
858     SIP_NULLPTR,
859     SIP_NULLPTR,
860     SIP_NULLPTR,
861     SIP_NULLPTR,
862     SIP_NULLPTR,
863     SIP_NULLPTR
864 };
865