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>
_wxGridCellAutoWrapStringEditor_EndEdit(wxGridCellAutoWrapStringEditor * self,int row,int col,const wxGrid * grid,const wxString * oldval)24     PyObject* _wxGridCellAutoWrapStringEditor_EndEdit(wxGridCellAutoWrapStringEditor* 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 sipwxGridCellAutoWrapStringEditor : public  ::wxGridCellAutoWrapStringEditor
40 {
41 public:
42     sipwxGridCellAutoWrapStringEditor();
43     virtual ~sipwxGridCellAutoWrapStringEditor();
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     sipwxGridCellAutoWrapStringEditor(const sipwxGridCellAutoWrapStringEditor &);
72     sipwxGridCellAutoWrapStringEditor &operator = (const sipwxGridCellAutoWrapStringEditor &);
73 
74     char sipPyMethods[16];
75 };
76 
sipwxGridCellAutoWrapStringEditor()77 sipwxGridCellAutoWrapStringEditor::sipwxGridCellAutoWrapStringEditor():  ::wxGridCellAutoWrapStringEditor(), sipPySelf(SIP_NULLPTR)
78 {
79     memset(sipPyMethods, 0, sizeof (sipPyMethods));
80 }
81 
~sipwxGridCellAutoWrapStringEditor()82 sipwxGridCellAutoWrapStringEditor::~sipwxGridCellAutoWrapStringEditor()
83 {
84     sipInstanceDestroyedEx(&sipPySelf);
85 }
86 
GetValue() const87  ::wxString sipwxGridCellAutoWrapStringEditor::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  ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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  ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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* sipwxGridCellAutoWrapStringEditor::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  ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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 sipwxGridCellAutoWrapStringEditor::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          ::wxGridCellAutoWrapStringEditor::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_wxGridCellAutoWrapStringEditor_BeginEdit, "BeginEdit(self, row: int, col: int, grid: Grid)");
368 
369 extern "C" {static PyObject *meth_wxGridCellAutoWrapStringEditor_BeginEdit(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellAutoWrapStringEditor_BeginEdit(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)370 static PyObject *meth_wxGridCellAutoWrapStringEditor_BeginEdit(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
371 {
372     PyObject *sipParseErr = SIP_NULLPTR;
373     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
374 
375     {
376         int row;
377         int col;
378          ::wxGrid* grid;
379          ::wxGridCellAutoWrapStringEditor *sipCpp;
380 
381         static const char *sipKwdList[] = {
382             sipName_row,
383             sipName_col,
384             sipName_grid,
385         };
386 
387         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8", &sipSelf, sipType_wxGridCellAutoWrapStringEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid))
388         {
389             PyErr_Clear();
390 
391             Py_BEGIN_ALLOW_THREADS
392             (sipSelfWasArg ? sipCpp-> ::wxGridCellAutoWrapStringEditor::BeginEdit(row,col,grid) : sipCpp->BeginEdit(row,col,grid));
393             Py_END_ALLOW_THREADS
394 
395             if (PyErr_Occurred())
396                 return 0;
397 
398             Py_INCREF(Py_None);
399             return Py_None;
400         }
401     }
402 
403     /* Raise an exception if the arguments couldn't be parsed. */
404     sipNoMethod(sipParseErr, sipName_GridCellAutoWrapStringEditor, sipName_BeginEdit, doc_wxGridCellAutoWrapStringEditor_BeginEdit);
405 
406     return SIP_NULLPTR;
407 }
408 
409 
410 PyDoc_STRVAR(doc_wxGridCellAutoWrapStringEditor_Clone, "Clone(self) -> GridCellEditor");
411 
412 extern "C" {static PyObject *meth_wxGridCellAutoWrapStringEditor_Clone(PyObject *, PyObject *);}
meth_wxGridCellAutoWrapStringEditor_Clone(PyObject * sipSelf,PyObject * sipArgs)413 static PyObject *meth_wxGridCellAutoWrapStringEditor_Clone(PyObject *sipSelf, PyObject *sipArgs)
414 {
415     PyObject *sipParseErr = SIP_NULLPTR;
416     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
417 
418     {
419         const  ::wxGridCellAutoWrapStringEditor *sipCpp;
420 
421         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridCellAutoWrapStringEditor, &sipCpp))
422         {
423              ::wxGridCellEditor*sipRes;
424 
425             PyErr_Clear();
426 
427             Py_BEGIN_ALLOW_THREADS
428             sipRes = (sipSelfWasArg ? sipCpp-> ::wxGridCellAutoWrapStringEditor::Clone() : sipCpp->Clone());
429             Py_END_ALLOW_THREADS
430 
431             if (PyErr_Occurred())
432                 return 0;
433 
434             return sipConvertFromNewType(sipRes,sipType_wxGridCellEditor,SIP_NULLPTR);
435         }
436     }
437 
438     /* Raise an exception if the arguments couldn't be parsed. */
439     sipNoMethod(sipParseErr, sipName_GridCellAutoWrapStringEditor, sipName_Clone, doc_wxGridCellAutoWrapStringEditor_Clone);
440 
441     return SIP_NULLPTR;
442 }
443 
444 
445 PyDoc_STRVAR(doc_wxGridCellAutoWrapStringEditor_Create, "Create(self, parent: Window, id: int, evtHandler: EvtHandler)");
446 
447 extern "C" {static PyObject *meth_wxGridCellAutoWrapStringEditor_Create(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellAutoWrapStringEditor_Create(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)448 static PyObject *meth_wxGridCellAutoWrapStringEditor_Create(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
449 {
450     PyObject *sipParseErr = SIP_NULLPTR;
451     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
452 
453     {
454          ::wxWindow* parent;
455          ::wxWindowID id;
456          ::wxEvtHandler* evtHandler;
457          ::wxGridCellAutoWrapStringEditor *sipCpp;
458 
459         static const char *sipKwdList[] = {
460             sipName_parent,
461             sipName_id,
462             sipName_evtHandler,
463         };
464 
465         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8iJ8", &sipSelf, sipType_wxGridCellAutoWrapStringEditor, &sipCpp, sipType_wxWindow, &parent, &id, sipType_wxEvtHandler, &evtHandler))
466         {
467             PyErr_Clear();
468 
469             Py_BEGIN_ALLOW_THREADS
470             (sipSelfWasArg ? sipCpp-> ::wxGridCellAutoWrapStringEditor::Create(parent,id,evtHandler) : sipCpp->Create(parent,id,evtHandler));
471             Py_END_ALLOW_THREADS
472 
473             if (PyErr_Occurred())
474                 return 0;
475 
476             Py_INCREF(Py_None);
477             return Py_None;
478         }
479     }
480 
481     /* Raise an exception if the arguments couldn't be parsed. */
482     sipNoMethod(sipParseErr, sipName_GridCellAutoWrapStringEditor, sipName_Create, doc_wxGridCellAutoWrapStringEditor_Create);
483 
484     return SIP_NULLPTR;
485 }
486 
487 
488 PyDoc_STRVAR(doc_wxGridCellAutoWrapStringEditor_ApplyEdit, "ApplyEdit(self, row: int, col: int, grid: Grid)");
489 
490 extern "C" {static PyObject *meth_wxGridCellAutoWrapStringEditor_ApplyEdit(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellAutoWrapStringEditor_ApplyEdit(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)491 static PyObject *meth_wxGridCellAutoWrapStringEditor_ApplyEdit(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
492 {
493     PyObject *sipParseErr = SIP_NULLPTR;
494     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
495 
496     {
497         int row;
498         int col;
499          ::wxGrid* grid;
500          ::wxGridCellAutoWrapStringEditor *sipCpp;
501 
502         static const char *sipKwdList[] = {
503             sipName_row,
504             sipName_col,
505             sipName_grid,
506         };
507 
508         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8", &sipSelf, sipType_wxGridCellAutoWrapStringEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid))
509         {
510             PyErr_Clear();
511 
512             Py_BEGIN_ALLOW_THREADS
513             (sipSelfWasArg ? sipCpp-> ::wxGridCellAutoWrapStringEditor::ApplyEdit(row,col,grid) : sipCpp->ApplyEdit(row,col,grid));
514             Py_END_ALLOW_THREADS
515 
516             if (PyErr_Occurred())
517                 return 0;
518 
519             Py_INCREF(Py_None);
520             return Py_None;
521         }
522     }
523 
524     /* Raise an exception if the arguments couldn't be parsed. */
525     sipNoMethod(sipParseErr, sipName_GridCellAutoWrapStringEditor, sipName_ApplyEdit, doc_wxGridCellAutoWrapStringEditor_ApplyEdit);
526 
527     return SIP_NULLPTR;
528 }
529 
530 
531 PyDoc_STRVAR(doc_wxGridCellAutoWrapStringEditor_Reset, "Reset(self)");
532 
533 extern "C" {static PyObject *meth_wxGridCellAutoWrapStringEditor_Reset(PyObject *, PyObject *);}
meth_wxGridCellAutoWrapStringEditor_Reset(PyObject * sipSelf,PyObject * sipArgs)534 static PyObject *meth_wxGridCellAutoWrapStringEditor_Reset(PyObject *sipSelf, PyObject *sipArgs)
535 {
536     PyObject *sipParseErr = SIP_NULLPTR;
537     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
538 
539     {
540          ::wxGridCellAutoWrapStringEditor *sipCpp;
541 
542         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridCellAutoWrapStringEditor, &sipCpp))
543         {
544             PyErr_Clear();
545 
546             Py_BEGIN_ALLOW_THREADS
547             (sipSelfWasArg ? sipCpp-> ::wxGridCellAutoWrapStringEditor::Reset() : sipCpp->Reset());
548             Py_END_ALLOW_THREADS
549 
550             if (PyErr_Occurred())
551                 return 0;
552 
553             Py_INCREF(Py_None);
554             return Py_None;
555         }
556     }
557 
558     /* Raise an exception if the arguments couldn't be parsed. */
559     sipNoMethod(sipParseErr, sipName_GridCellAutoWrapStringEditor, sipName_Reset, doc_wxGridCellAutoWrapStringEditor_Reset);
560 
561     return SIP_NULLPTR;
562 }
563 
564 
565 PyDoc_STRVAR(doc_wxGridCellAutoWrapStringEditor_GetValue, "GetValue(self) -> object");
566 
567 extern "C" {static PyObject *meth_wxGridCellAutoWrapStringEditor_GetValue(PyObject *, PyObject *);}
meth_wxGridCellAutoWrapStringEditor_GetValue(PyObject * sipSelf,PyObject * sipArgs)568 static PyObject *meth_wxGridCellAutoWrapStringEditor_GetValue(PyObject *sipSelf, PyObject *sipArgs)
569 {
570     PyObject *sipParseErr = SIP_NULLPTR;
571     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
572 
573     {
574         const  ::wxGridCellAutoWrapStringEditor *sipCpp;
575 
576         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridCellAutoWrapStringEditor, &sipCpp))
577         {
578              ::wxString*sipRes;
579 
580             PyErr_Clear();
581 
582             Py_BEGIN_ALLOW_THREADS
583             sipRes = new  ::wxString((sipSelfWasArg ? sipCpp-> ::wxGridCellAutoWrapStringEditor::GetValue() : sipCpp->GetValue()));
584             Py_END_ALLOW_THREADS
585 
586             if (PyErr_Occurred())
587                 return 0;
588 
589             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
590         }
591     }
592 
593     /* Raise an exception if the arguments couldn't be parsed. */
594     sipNoMethod(sipParseErr, sipName_GridCellAutoWrapStringEditor, sipName_GetValue, doc_wxGridCellAutoWrapStringEditor_GetValue);
595 
596     return SIP_NULLPTR;
597 }
598 
599 
600 PyDoc_STRVAR(doc_wxGridCellAutoWrapStringEditor_EndEdit, "EndEdit(row, col, grid, oldval)\n"
601 "\n"
602 "End editing the cell.\n"
603 "\n"
604 "This function must check if the current value of the editing cell\n"
605 "is valid and different from the original value in its string\n"
606 "form. If not then simply return None.  If it has changed then\n"
607 "this method should save the new value so that ApplyEdit can\n"
608 "apply it later and the string representation of the new value\n"
609 "should be returned.\n"
610 "\n"
611 "Notice that this method shoiuld not modify the grid as the\n"
612 "change could still be vetoed.");
613 
614 extern "C" {static PyObject *meth_wxGridCellAutoWrapStringEditor_EndEdit(PyObject *, PyObject *, PyObject *);}
meth_wxGridCellAutoWrapStringEditor_EndEdit(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)615 static PyObject *meth_wxGridCellAutoWrapStringEditor_EndEdit(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
616 {
617     PyObject *sipParseErr = SIP_NULLPTR;
618     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
619 
620     {
621         int row;
622         int col;
623         const  ::wxGrid* grid;
624         const  ::wxString* oldval;
625         int oldvalState = 0;
626          ::wxGridCellAutoWrapStringEditor *sipCpp;
627 
628         static const char *sipKwdList[] = {
629             sipName_row,
630             sipName_col,
631             sipName_grid,
632             sipName_oldval,
633         };
634 
635         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8J1", &sipSelf, sipType_wxGridCellAutoWrapStringEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid, sipType_wxString,&oldval, &oldvalState))
636         {
637             PyObject * sipRes = SIP_NULLPTR;
638             int sipIsErr = 0;
639 
640         PyErr_Clear();
641         Py_BEGIN_ALLOW_THREADS
642         sipRes = _wxGridCellAutoWrapStringEditor_EndEdit(sipCpp, row, col, grid, oldval);
643         Py_END_ALLOW_THREADS
644         if (PyErr_Occurred()) sipIsErr = 1;
645             sipReleaseType(const_cast< ::wxString *>(oldval),sipType_wxString,oldvalState);
646 
647             if (sipIsErr)
648                 return 0;
649 
650             return sipRes;
651         }
652     }
653 
654     /* Raise an exception if the arguments couldn't be parsed. */
655     sipNoMethod(sipParseErr, sipName_GridCellAutoWrapStringEditor, sipName_EndEdit, SIP_NULLPTR);
656 
657     return SIP_NULLPTR;
658 }
659 
660 
661 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
662 extern "C" {static void *cast_wxGridCellAutoWrapStringEditor(void *, const sipTypeDef *);}
cast_wxGridCellAutoWrapStringEditor(void * sipCppV,const sipTypeDef * targetType)663 static void *cast_wxGridCellAutoWrapStringEditor(void *sipCppV, const sipTypeDef *targetType)
664 {
665      ::wxGridCellAutoWrapStringEditor *sipCpp = reinterpret_cast< ::wxGridCellAutoWrapStringEditor *>(sipCppV);
666 
667     if (targetType == sipType_wxGridCellTextEditor)
668         return static_cast< ::wxGridCellTextEditor *>(sipCpp);
669 
670     if (targetType == sipType_wxGridCellEditor)
671         return static_cast< ::wxGridCellEditor *>(sipCpp);
672 
673     if (targetType == sipType_wxClientDataContainer)
674         return static_cast< ::wxClientDataContainer *>(sipCpp);
675 
676     if (targetType == sipType_wxRefCounter)
677         return static_cast< ::wxRefCounter *>(sipCpp);
678 
679     return sipCppV;
680 }
681 
682 
683 /* Call the instance's destructor. */
684 extern "C" {static void release_wxGridCellAutoWrapStringEditor(void *, int);}
release_wxGridCellAutoWrapStringEditor(void * sipCppV,int sipState)685 static void release_wxGridCellAutoWrapStringEditor(void *sipCppV, int sipState)
686 {
687     Py_BEGIN_ALLOW_THREADS
688 
689     if (sipState & SIP_DERIVED_CLASS)
690         delete reinterpret_cast<sipwxGridCellAutoWrapStringEditor *>(sipCppV);
691     else
692         delete reinterpret_cast< ::wxGridCellAutoWrapStringEditor *>(sipCppV);
693 
694     Py_END_ALLOW_THREADS
695 }
696 
697 
698 extern "C" {static void dealloc_wxGridCellAutoWrapStringEditor(sipSimpleWrapper *);}
dealloc_wxGridCellAutoWrapStringEditor(sipSimpleWrapper * sipSelf)699 static void dealloc_wxGridCellAutoWrapStringEditor(sipSimpleWrapper *sipSelf)
700 {
701     if (sipIsDerivedClass(sipSelf))
702         reinterpret_cast<sipwxGridCellAutoWrapStringEditor *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
703 
704     if (sipIsOwnedByPython(sipSelf))
705     {
706         release_wxGridCellAutoWrapStringEditor(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
707     }
708 }
709 
710 
711 extern "C" {static void *init_type_wxGridCellAutoWrapStringEditor(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxGridCellAutoWrapStringEditor(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject ** sipOwner,PyObject ** sipParseErr)712 static void *init_type_wxGridCellAutoWrapStringEditor(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
713 {
714     sipwxGridCellAutoWrapStringEditor *sipCpp = SIP_NULLPTR;
715 
716     {
717         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
718         {
719             PyErr_Clear();
720 
721             Py_BEGIN_ALLOW_THREADS
722             sipCpp = new sipwxGridCellAutoWrapStringEditor();
723             Py_END_ALLOW_THREADS
724 
725             *sipOwner = Py_None;
726 
727             if (PyErr_Occurred())
728             {
729                 delete sipCpp;
730                 return SIP_NULLPTR;
731             }
732 
733             sipCpp->sipPySelf = sipSelf;
734 
735             return sipCpp;
736         }
737     }
738 
739     return SIP_NULLPTR;
740 }
741 
742 
743 /* Define this type's super-types. */
744 static sipEncodedTypeDef supers_wxGridCellAutoWrapStringEditor[] = {{25, 255, 1}};
745 
746 
747 static PyMethodDef methods_wxGridCellAutoWrapStringEditor[] = {
748     {SIP_MLNAME_CAST(sipName_ApplyEdit), SIP_MLMETH_CAST(meth_wxGridCellAutoWrapStringEditor_ApplyEdit), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellAutoWrapStringEditor_ApplyEdit)},
749     {SIP_MLNAME_CAST(sipName_BeginEdit), SIP_MLMETH_CAST(meth_wxGridCellAutoWrapStringEditor_BeginEdit), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellAutoWrapStringEditor_BeginEdit)},
750     {SIP_MLNAME_CAST(sipName_Clone), meth_wxGridCellAutoWrapStringEditor_Clone, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridCellAutoWrapStringEditor_Clone)},
751     {SIP_MLNAME_CAST(sipName_Create), SIP_MLMETH_CAST(meth_wxGridCellAutoWrapStringEditor_Create), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellAutoWrapStringEditor_Create)},
752     {SIP_MLNAME_CAST(sipName_EndEdit), SIP_MLMETH_CAST(meth_wxGridCellAutoWrapStringEditor_EndEdit), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridCellAutoWrapStringEditor_EndEdit)},
753     {SIP_MLNAME_CAST(sipName_GetValue), meth_wxGridCellAutoWrapStringEditor_GetValue, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridCellAutoWrapStringEditor_GetValue)},
754     {SIP_MLNAME_CAST(sipName_Reset), meth_wxGridCellAutoWrapStringEditor_Reset, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridCellAutoWrapStringEditor_Reset)}
755 };
756 
757 PyDoc_STRVAR(doc_wxGridCellAutoWrapStringEditor, "GridCellAutoWrapStringEditor()\n"
758 "\n"
759 "Grid cell editor for wrappable string/text data.");
760 
761 
762 sipClassTypeDef sipTypeDef__grid_wxGridCellAutoWrapStringEditor = {
763     {
764         -1,
765         SIP_NULLPTR,
766         SIP_NULLPTR,
767         SIP_TYPE_CLASS,
768         sipNameNr_wxGridCellAutoWrapStringEditor,
769         {SIP_NULLPTR},
770         SIP_NULLPTR
771     },
772     {
773         sipNameNr_GridCellAutoWrapStringEditor,
774         {0, 0, 1},
775         7, methods_wxGridCellAutoWrapStringEditor,
776         0, SIP_NULLPTR,
777         0, SIP_NULLPTR,
778         {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
779     },
780     doc_wxGridCellAutoWrapStringEditor,
781     -1,
782     -1,
783     supers_wxGridCellAutoWrapStringEditor,
784     SIP_NULLPTR,
785     init_type_wxGridCellAutoWrapStringEditor,
786     SIP_NULLPTR,
787     SIP_NULLPTR,
788 #if PY_MAJOR_VERSION >= 3
789     SIP_NULLPTR,
790     SIP_NULLPTR,
791 #else
792     SIP_NULLPTR,
793     SIP_NULLPTR,
794     SIP_NULLPTR,
795     SIP_NULLPTR,
796 #endif
797     dealloc_wxGridCellAutoWrapStringEditor,
798     SIP_NULLPTR,
799     SIP_NULLPTR,
800     SIP_NULLPTR,
801     release_wxGridCellAutoWrapStringEditor,
802     cast_wxGridCellAutoWrapStringEditor,
803     SIP_NULLPTR,
804     SIP_NULLPTR,
805     SIP_NULLPTR,
806     SIP_NULLPTR,
807     SIP_NULLPTR,
808     SIP_NULLPTR
809 };
810