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_richtext.h"
11 
12         #include <wx/richtext/richtextctrl.h>
13 
14         #include <wx/event.h>
15         #include <wx/richtext/richtextbuffer.h>
16         #include <wx/richtext/richtextbuffer.h>
17         #include <wx/richtext/richtextstyles.h>
18         #include <wx/object.h>
19         #include <wx/object.h>
20         #include <wx/object.h>
21 
22 
23 class sipwxRichTextEvent : public  ::wxRichTextEvent
24 {
25 public:
26     sipwxRichTextEvent( ::wxEventType,int);
27     sipwxRichTextEvent(const  ::wxRichTextEvent&);
28     virtual ~sipwxRichTextEvent();
29 
30     /*
31      * There is a protected method for every virtual method visible from
32      * this class.
33      */
34 protected:
35      ::wxEvent* Clone() const SIP_OVERRIDE;
36      ::wxEventCategory GetEventCategory() const SIP_OVERRIDE;
37 
38 public:
39     sipSimpleWrapper *sipPySelf;
40 
41 private:
42     sipwxRichTextEvent(const sipwxRichTextEvent &);
43     sipwxRichTextEvent &operator = (const sipwxRichTextEvent &);
44 
45     char sipPyMethods[2];
46 };
47 
sipwxRichTextEvent(::wxEventType commandType,int winid)48 sipwxRichTextEvent::sipwxRichTextEvent( ::wxEventType commandType,int winid):  ::wxRichTextEvent(commandType,winid), sipPySelf(SIP_NULLPTR)
49 {
50     memset(sipPyMethods, 0, sizeof (sipPyMethods));
51 }
52 
sipwxRichTextEvent(const::wxRichTextEvent & event)53 sipwxRichTextEvent::sipwxRichTextEvent(const  ::wxRichTextEvent& event):  ::wxRichTextEvent(event), sipPySelf(SIP_NULLPTR)
54 {
55     memset(sipPyMethods, 0, sizeof (sipPyMethods));
56 }
57 
~sipwxRichTextEvent()58 sipwxRichTextEvent::~sipwxRichTextEvent()
59 {
60     sipInstanceDestroyedEx(&sipPySelf);
61 }
62 
Clone() const63  ::wxEvent* sipwxRichTextEvent::Clone() const
64 {
65     sip_gilstate_t sipGILState;
66     PyObject *sipMeth;
67 
68     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_Clone);
69 
70     if (!sipMeth)
71         return  ::wxRichTextEvent::Clone();
72 
73     extern  ::wxEvent* sipVH__richtext_140(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
74 
75     return sipVH__richtext_140(sipGILState, 0, sipPySelf, sipMeth);
76 }
77 
GetEventCategory() const78  ::wxEventCategory sipwxRichTextEvent::GetEventCategory() const
79 {
80     sip_gilstate_t sipGILState;
81     PyObject *sipMeth;
82 
83     sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,SIP_NULLPTR,sipName_GetEventCategory);
84 
85     if (!sipMeth)
86         return  ::wxRichTextEvent::GetEventCategory();
87 
88     extern  ::wxEventCategory sipVH__richtext_139(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
89 
90     return sipVH__richtext_139(sipGILState, 0, sipPySelf, sipMeth);
91 }
92 
93 
94 PyDoc_STRVAR(doc_wxRichTextEvent_GetPosition, "GetPosition() -> long\n"
95 "\n"
96 "Returns the buffer position at which the event occurred.");
97 
98 extern "C" {static PyObject *meth_wxRichTextEvent_GetPosition(PyObject *, PyObject *);}
meth_wxRichTextEvent_GetPosition(PyObject * sipSelf,PyObject * sipArgs)99 static PyObject *meth_wxRichTextEvent_GetPosition(PyObject *sipSelf, PyObject *sipArgs)
100 {
101     PyObject *sipParseErr = SIP_NULLPTR;
102 
103     {
104         const  ::wxRichTextEvent *sipCpp;
105 
106         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
107         {
108             long sipRes;
109 
110             PyErr_Clear();
111 
112             Py_BEGIN_ALLOW_THREADS
113             sipRes = sipCpp->GetPosition();
114             Py_END_ALLOW_THREADS
115 
116             if (PyErr_Occurred())
117                 return 0;
118 
119             return PyLong_FromLong(sipRes);
120         }
121     }
122 
123     /* Raise an exception if the arguments couldn't be parsed. */
124     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_GetPosition, SIP_NULLPTR);
125 
126     return SIP_NULLPTR;
127 }
128 
129 
130 PyDoc_STRVAR(doc_wxRichTextEvent_SetPosition, "SetPosition(pos)\n"
131 "\n"
132 "Sets the buffer position variable.");
133 
134 extern "C" {static PyObject *meth_wxRichTextEvent_SetPosition(PyObject *, PyObject *, PyObject *);}
meth_wxRichTextEvent_SetPosition(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)135 static PyObject *meth_wxRichTextEvent_SetPosition(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
136 {
137     PyObject *sipParseErr = SIP_NULLPTR;
138 
139     {
140         long pos;
141          ::wxRichTextEvent *sipCpp;
142 
143         static const char *sipKwdList[] = {
144             sipName_pos,
145         };
146 
147         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bl", &sipSelf, sipType_wxRichTextEvent, &sipCpp, &pos))
148         {
149             PyErr_Clear();
150 
151             Py_BEGIN_ALLOW_THREADS
152             sipCpp->SetPosition(pos);
153             Py_END_ALLOW_THREADS
154 
155             if (PyErr_Occurred())
156                 return 0;
157 
158             Py_INCREF(Py_None);
159             return Py_None;
160         }
161     }
162 
163     /* Raise an exception if the arguments couldn't be parsed. */
164     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_SetPosition, SIP_NULLPTR);
165 
166     return SIP_NULLPTR;
167 }
168 
169 
170 PyDoc_STRVAR(doc_wxRichTextEvent_GetFlags, "GetFlags() -> int\n"
171 "\n"
172 "Returns flags indicating modifier keys pressed.");
173 
174 extern "C" {static PyObject *meth_wxRichTextEvent_GetFlags(PyObject *, PyObject *);}
meth_wxRichTextEvent_GetFlags(PyObject * sipSelf,PyObject * sipArgs)175 static PyObject *meth_wxRichTextEvent_GetFlags(PyObject *sipSelf, PyObject *sipArgs)
176 {
177     PyObject *sipParseErr = SIP_NULLPTR;
178 
179     {
180         const  ::wxRichTextEvent *sipCpp;
181 
182         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
183         {
184             int sipRes;
185 
186             PyErr_Clear();
187 
188             Py_BEGIN_ALLOW_THREADS
189             sipRes = sipCpp->GetFlags();
190             Py_END_ALLOW_THREADS
191 
192             if (PyErr_Occurred())
193                 return 0;
194 
195             return SIPLong_FromLong(sipRes);
196         }
197     }
198 
199     /* Raise an exception if the arguments couldn't be parsed. */
200     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_GetFlags, SIP_NULLPTR);
201 
202     return SIP_NULLPTR;
203 }
204 
205 
206 PyDoc_STRVAR(doc_wxRichTextEvent_SetFlags, "SetFlags(flags)\n"
207 "\n"
208 "Sets flags indicating modifier keys pressed.");
209 
210 extern "C" {static PyObject *meth_wxRichTextEvent_SetFlags(PyObject *, PyObject *, PyObject *);}
meth_wxRichTextEvent_SetFlags(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)211 static PyObject *meth_wxRichTextEvent_SetFlags(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
212 {
213     PyObject *sipParseErr = SIP_NULLPTR;
214 
215     {
216         int flags;
217          ::wxRichTextEvent *sipCpp;
218 
219         static const char *sipKwdList[] = {
220             sipName_flags,
221         };
222 
223         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRichTextEvent, &sipCpp, &flags))
224         {
225             PyErr_Clear();
226 
227             Py_BEGIN_ALLOW_THREADS
228             sipCpp->SetFlags(flags);
229             Py_END_ALLOW_THREADS
230 
231             if (PyErr_Occurred())
232                 return 0;
233 
234             Py_INCREF(Py_None);
235             return Py_None;
236         }
237     }
238 
239     /* Raise an exception if the arguments couldn't be parsed. */
240     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_SetFlags, SIP_NULLPTR);
241 
242     return SIP_NULLPTR;
243 }
244 
245 
246 PyDoc_STRVAR(doc_wxRichTextEvent_GetOldStyleSheet, "GetOldStyleSheet() -> RichTextStyleSheet\n"
247 "\n"
248 "Returns the old style sheet.");
249 
250 extern "C" {static PyObject *meth_wxRichTextEvent_GetOldStyleSheet(PyObject *, PyObject *);}
meth_wxRichTextEvent_GetOldStyleSheet(PyObject * sipSelf,PyObject * sipArgs)251 static PyObject *meth_wxRichTextEvent_GetOldStyleSheet(PyObject *sipSelf, PyObject *sipArgs)
252 {
253     PyObject *sipParseErr = SIP_NULLPTR;
254 
255     {
256         const  ::wxRichTextEvent *sipCpp;
257 
258         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
259         {
260              ::wxRichTextStyleSheet*sipRes;
261 
262             PyErr_Clear();
263 
264             Py_BEGIN_ALLOW_THREADS
265             sipRes = sipCpp->GetOldStyleSheet();
266             Py_END_ALLOW_THREADS
267 
268             if (PyErr_Occurred())
269                 return 0;
270 
271             return sipConvertFromType(sipRes,sipType_wxRichTextStyleSheet,SIP_NULLPTR);
272         }
273     }
274 
275     /* Raise an exception if the arguments couldn't be parsed. */
276     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_GetOldStyleSheet, SIP_NULLPTR);
277 
278     return SIP_NULLPTR;
279 }
280 
281 
282 PyDoc_STRVAR(doc_wxRichTextEvent_SetOldStyleSheet, "SetOldStyleSheet(sheet)\n"
283 "\n"
284 "Sets the old style sheet variable.");
285 
286 extern "C" {static PyObject *meth_wxRichTextEvent_SetOldStyleSheet(PyObject *, PyObject *, PyObject *);}
meth_wxRichTextEvent_SetOldStyleSheet(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)287 static PyObject *meth_wxRichTextEvent_SetOldStyleSheet(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
288 {
289     PyObject *sipParseErr = SIP_NULLPTR;
290 
291     {
292          ::wxRichTextStyleSheet* sheet;
293          ::wxRichTextEvent *sipCpp;
294 
295         static const char *sipKwdList[] = {
296             sipName_sheet,
297         };
298 
299         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextEvent, &sipCpp, sipType_wxRichTextStyleSheet, &sheet))
300         {
301             PyErr_Clear();
302 
303             Py_BEGIN_ALLOW_THREADS
304             sipCpp->SetOldStyleSheet(sheet);
305             Py_END_ALLOW_THREADS
306 
307             if (PyErr_Occurred())
308                 return 0;
309 
310             Py_INCREF(Py_None);
311             return Py_None;
312         }
313     }
314 
315     /* Raise an exception if the arguments couldn't be parsed. */
316     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_SetOldStyleSheet, SIP_NULLPTR);
317 
318     return SIP_NULLPTR;
319 }
320 
321 
322 PyDoc_STRVAR(doc_wxRichTextEvent_GetNewStyleSheet, "GetNewStyleSheet() -> RichTextStyleSheet\n"
323 "\n"
324 "Returns the new style sheet.");
325 
326 extern "C" {static PyObject *meth_wxRichTextEvent_GetNewStyleSheet(PyObject *, PyObject *);}
meth_wxRichTextEvent_GetNewStyleSheet(PyObject * sipSelf,PyObject * sipArgs)327 static PyObject *meth_wxRichTextEvent_GetNewStyleSheet(PyObject *sipSelf, PyObject *sipArgs)
328 {
329     PyObject *sipParseErr = SIP_NULLPTR;
330 
331     {
332         const  ::wxRichTextEvent *sipCpp;
333 
334         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
335         {
336              ::wxRichTextStyleSheet*sipRes;
337 
338             PyErr_Clear();
339 
340             Py_BEGIN_ALLOW_THREADS
341             sipRes = sipCpp->GetNewStyleSheet();
342             Py_END_ALLOW_THREADS
343 
344             if (PyErr_Occurred())
345                 return 0;
346 
347             return sipConvertFromType(sipRes,sipType_wxRichTextStyleSheet,SIP_NULLPTR);
348         }
349     }
350 
351     /* Raise an exception if the arguments couldn't be parsed. */
352     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_GetNewStyleSheet, SIP_NULLPTR);
353 
354     return SIP_NULLPTR;
355 }
356 
357 
358 PyDoc_STRVAR(doc_wxRichTextEvent_SetNewStyleSheet, "SetNewStyleSheet(sheet)\n"
359 "\n"
360 "Sets the new style sheet variable.");
361 
362 extern "C" {static PyObject *meth_wxRichTextEvent_SetNewStyleSheet(PyObject *, PyObject *, PyObject *);}
meth_wxRichTextEvent_SetNewStyleSheet(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)363 static PyObject *meth_wxRichTextEvent_SetNewStyleSheet(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
364 {
365     PyObject *sipParseErr = SIP_NULLPTR;
366 
367     {
368          ::wxRichTextStyleSheet* sheet;
369          ::wxRichTextEvent *sipCpp;
370 
371         static const char *sipKwdList[] = {
372             sipName_sheet,
373         };
374 
375         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextEvent, &sipCpp, sipType_wxRichTextStyleSheet, &sheet))
376         {
377             PyErr_Clear();
378 
379             Py_BEGIN_ALLOW_THREADS
380             sipCpp->SetNewStyleSheet(sheet);
381             Py_END_ALLOW_THREADS
382 
383             if (PyErr_Occurred())
384                 return 0;
385 
386             Py_INCREF(Py_None);
387             return Py_None;
388         }
389     }
390 
391     /* Raise an exception if the arguments couldn't be parsed. */
392     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_SetNewStyleSheet, SIP_NULLPTR);
393 
394     return SIP_NULLPTR;
395 }
396 
397 
398 PyDoc_STRVAR(doc_wxRichTextEvent_GetRange, "GetRange() -> RichTextRange\n"
399 "\n"
400 "Gets the range for the current operation.");
401 
402 extern "C" {static PyObject *meth_wxRichTextEvent_GetRange(PyObject *, PyObject *);}
meth_wxRichTextEvent_GetRange(PyObject * sipSelf,PyObject * sipArgs)403 static PyObject *meth_wxRichTextEvent_GetRange(PyObject *sipSelf, PyObject *sipArgs)
404 {
405     PyObject *sipParseErr = SIP_NULLPTR;
406 
407     {
408         const  ::wxRichTextEvent *sipCpp;
409 
410         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
411         {
412              ::wxRichTextRange*sipRes;
413 
414             PyErr_Clear();
415 
416             Py_BEGIN_ALLOW_THREADS
417             sipRes = new  ::wxRichTextRange(sipCpp->GetRange());
418             Py_END_ALLOW_THREADS
419 
420             if (PyErr_Occurred())
421                 return 0;
422 
423             return sipConvertFromNewType(sipRes,sipType_wxRichTextRange,SIP_NULLPTR);
424         }
425     }
426 
427     /* Raise an exception if the arguments couldn't be parsed. */
428     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_GetRange, SIP_NULLPTR);
429 
430     return SIP_NULLPTR;
431 }
432 
433 
434 PyDoc_STRVAR(doc_wxRichTextEvent_SetRange, "SetRange(range)\n"
435 "\n"
436 "Sets the range variable.");
437 
438 extern "C" {static PyObject *meth_wxRichTextEvent_SetRange(PyObject *, PyObject *, PyObject *);}
meth_wxRichTextEvent_SetRange(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)439 static PyObject *meth_wxRichTextEvent_SetRange(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
440 {
441     PyObject *sipParseErr = SIP_NULLPTR;
442 
443     {
444         const  ::wxRichTextRange* range;
445         int rangeState = 0;
446          ::wxRichTextEvent *sipCpp;
447 
448         static const char *sipKwdList[] = {
449             sipName_range,
450         };
451 
452         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRichTextEvent, &sipCpp, sipType_wxRichTextRange, &range, &rangeState))
453         {
454             PyErr_Clear();
455 
456             Py_BEGIN_ALLOW_THREADS
457             sipCpp->SetRange(*range);
458             Py_END_ALLOW_THREADS
459             sipReleaseType(const_cast< ::wxRichTextRange *>(range),sipType_wxRichTextRange,rangeState);
460 
461             if (PyErr_Occurred())
462                 return 0;
463 
464             Py_INCREF(Py_None);
465             return Py_None;
466         }
467     }
468 
469     /* Raise an exception if the arguments couldn't be parsed. */
470     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_SetRange, SIP_NULLPTR);
471 
472     return SIP_NULLPTR;
473 }
474 
475 
476 PyDoc_STRVAR(doc_wxRichTextEvent_GetCharacter, "GetCharacter() -> Char\n"
477 "\n"
478 "Returns the character pressed, within a wxEVT_RICHTEXT_CHARACTER\n"
479 "event.");
480 
481 extern "C" {static PyObject *meth_wxRichTextEvent_GetCharacter(PyObject *, PyObject *);}
meth_wxRichTextEvent_GetCharacter(PyObject * sipSelf,PyObject * sipArgs)482 static PyObject *meth_wxRichTextEvent_GetCharacter(PyObject *sipSelf, PyObject *sipArgs)
483 {
484     PyObject *sipParseErr = SIP_NULLPTR;
485 
486     {
487         const  ::wxRichTextEvent *sipCpp;
488 
489         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
490         {
491              ::wxChar sipRes;
492 
493             PyErr_Clear();
494 
495             Py_BEGIN_ALLOW_THREADS
496             sipRes = sipCpp->GetCharacter();
497             Py_END_ALLOW_THREADS
498 
499             if (PyErr_Occurred())
500                 return 0;
501 
502             return PyUnicode_FromWideChar(&sipRes,1);
503         }
504     }
505 
506     /* Raise an exception if the arguments couldn't be parsed. */
507     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_GetCharacter, SIP_NULLPTR);
508 
509     return SIP_NULLPTR;
510 }
511 
512 
513 PyDoc_STRVAR(doc_wxRichTextEvent_SetCharacter, "SetCharacter(ch)\n"
514 "\n"
515 "Sets the character variable.");
516 
517 extern "C" {static PyObject *meth_wxRichTextEvent_SetCharacter(PyObject *, PyObject *, PyObject *);}
meth_wxRichTextEvent_SetCharacter(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)518 static PyObject *meth_wxRichTextEvent_SetCharacter(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
519 {
520     PyObject *sipParseErr = SIP_NULLPTR;
521 
522     {
523          ::wxChar ch;
524          ::wxRichTextEvent *sipCpp;
525 
526         static const char *sipKwdList[] = {
527             sipName_ch,
528         };
529 
530         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bw", &sipSelf, sipType_wxRichTextEvent, &sipCpp, &ch))
531         {
532             PyErr_Clear();
533 
534             Py_BEGIN_ALLOW_THREADS
535             sipCpp->SetCharacter(ch);
536             Py_END_ALLOW_THREADS
537 
538             if (PyErr_Occurred())
539                 return 0;
540 
541             Py_INCREF(Py_None);
542             return Py_None;
543         }
544     }
545 
546     /* Raise an exception if the arguments couldn't be parsed. */
547     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_SetCharacter, SIP_NULLPTR);
548 
549     return SIP_NULLPTR;
550 }
551 
552 
553 PyDoc_STRVAR(doc_wxRichTextEvent_GetContainer, "GetContainer() -> RichTextParagraphLayoutBox\n"
554 "\n"
555 "Returns the container for which the event is relevant.");
556 
557 extern "C" {static PyObject *meth_wxRichTextEvent_GetContainer(PyObject *, PyObject *);}
meth_wxRichTextEvent_GetContainer(PyObject * sipSelf,PyObject * sipArgs)558 static PyObject *meth_wxRichTextEvent_GetContainer(PyObject *sipSelf, PyObject *sipArgs)
559 {
560     PyObject *sipParseErr = SIP_NULLPTR;
561 
562     {
563         const  ::wxRichTextEvent *sipCpp;
564 
565         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
566         {
567              ::wxRichTextParagraphLayoutBox*sipRes;
568 
569             PyErr_Clear();
570 
571             Py_BEGIN_ALLOW_THREADS
572             sipRes = sipCpp->GetContainer();
573             Py_END_ALLOW_THREADS
574 
575             if (PyErr_Occurred())
576                 return 0;
577 
578             return sipConvertFromType(sipRes,sipType_wxRichTextParagraphLayoutBox,SIP_NULLPTR);
579         }
580     }
581 
582     /* Raise an exception if the arguments couldn't be parsed. */
583     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_GetContainer, SIP_NULLPTR);
584 
585     return SIP_NULLPTR;
586 }
587 
588 
589 PyDoc_STRVAR(doc_wxRichTextEvent_SetContainer, "SetContainer(container)\n"
590 "\n"
591 "Sets the container for which the event is relevant.");
592 
593 extern "C" {static PyObject *meth_wxRichTextEvent_SetContainer(PyObject *, PyObject *, PyObject *);}
meth_wxRichTextEvent_SetContainer(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)594 static PyObject *meth_wxRichTextEvent_SetContainer(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
595 {
596     PyObject *sipParseErr = SIP_NULLPTR;
597 
598     {
599          ::wxRichTextParagraphLayoutBox* container;
600          ::wxRichTextEvent *sipCpp;
601 
602         static const char *sipKwdList[] = {
603             sipName_container,
604         };
605 
606         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextEvent, &sipCpp, sipType_wxRichTextParagraphLayoutBox, &container))
607         {
608             PyErr_Clear();
609 
610             Py_BEGIN_ALLOW_THREADS
611             sipCpp->SetContainer(container);
612             Py_END_ALLOW_THREADS
613 
614             if (PyErr_Occurred())
615                 return 0;
616 
617             Py_INCREF(Py_None);
618             return Py_None;
619         }
620     }
621 
622     /* Raise an exception if the arguments couldn't be parsed. */
623     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_SetContainer, SIP_NULLPTR);
624 
625     return SIP_NULLPTR;
626 }
627 
628 
629 PyDoc_STRVAR(doc_wxRichTextEvent_GetOldContainer, "GetOldContainer() -> RichTextParagraphLayoutBox\n"
630 "\n"
631 "Returns the old container, for a focus change event.");
632 
633 extern "C" {static PyObject *meth_wxRichTextEvent_GetOldContainer(PyObject *, PyObject *);}
meth_wxRichTextEvent_GetOldContainer(PyObject * sipSelf,PyObject * sipArgs)634 static PyObject *meth_wxRichTextEvent_GetOldContainer(PyObject *sipSelf, PyObject *sipArgs)
635 {
636     PyObject *sipParseErr = SIP_NULLPTR;
637 
638     {
639         const  ::wxRichTextEvent *sipCpp;
640 
641         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
642         {
643              ::wxRichTextParagraphLayoutBox*sipRes;
644 
645             PyErr_Clear();
646 
647             Py_BEGIN_ALLOW_THREADS
648             sipRes = sipCpp->GetOldContainer();
649             Py_END_ALLOW_THREADS
650 
651             if (PyErr_Occurred())
652                 return 0;
653 
654             return sipConvertFromType(sipRes,sipType_wxRichTextParagraphLayoutBox,SIP_NULLPTR);
655         }
656     }
657 
658     /* Raise an exception if the arguments couldn't be parsed. */
659     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_GetOldContainer, SIP_NULLPTR);
660 
661     return SIP_NULLPTR;
662 }
663 
664 
665 PyDoc_STRVAR(doc_wxRichTextEvent_SetOldContainer, "SetOldContainer(container)\n"
666 "\n"
667 "Sets the old container, for a focus change event.");
668 
669 extern "C" {static PyObject *meth_wxRichTextEvent_SetOldContainer(PyObject *, PyObject *, PyObject *);}
meth_wxRichTextEvent_SetOldContainer(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)670 static PyObject *meth_wxRichTextEvent_SetOldContainer(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
671 {
672     PyObject *sipParseErr = SIP_NULLPTR;
673 
674     {
675          ::wxRichTextParagraphLayoutBox* container;
676          ::wxRichTextEvent *sipCpp;
677 
678         static const char *sipKwdList[] = {
679             sipName_container,
680         };
681 
682         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextEvent, &sipCpp, sipType_wxRichTextParagraphLayoutBox, &container))
683         {
684             PyErr_Clear();
685 
686             Py_BEGIN_ALLOW_THREADS
687             sipCpp->SetOldContainer(container);
688             Py_END_ALLOW_THREADS
689 
690             if (PyErr_Occurred())
691                 return 0;
692 
693             Py_INCREF(Py_None);
694             return Py_None;
695         }
696     }
697 
698     /* Raise an exception if the arguments couldn't be parsed. */
699     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_SetOldContainer, SIP_NULLPTR);
700 
701     return SIP_NULLPTR;
702 }
703 
704 
705 PyDoc_STRVAR(doc_wxRichTextEvent_Clone, "Clone() -> wx.Event\n"
706 "\n"
707 "Returns a copy of the event.");
708 
709 extern "C" {static PyObject *meth_wxRichTextEvent_Clone(PyObject *, PyObject *);}
meth_wxRichTextEvent_Clone(PyObject * sipSelf,PyObject * sipArgs)710 static PyObject *meth_wxRichTextEvent_Clone(PyObject *sipSelf, PyObject *sipArgs)
711 {
712     PyObject *sipParseErr = SIP_NULLPTR;
713     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
714 
715     {
716         const  ::wxRichTextEvent *sipCpp;
717 
718         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextEvent, &sipCpp))
719         {
720              ::wxEvent*sipRes;
721 
722             PyErr_Clear();
723 
724             Py_BEGIN_ALLOW_THREADS
725             sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextEvent::Clone() : sipCpp->Clone());
726             Py_END_ALLOW_THREADS
727 
728             if (PyErr_Occurred())
729                 return 0;
730 
731             return sipConvertFromNewType(sipRes,sipType_wxEvent,SIP_NULLPTR);
732         }
733     }
734 
735     /* Raise an exception if the arguments couldn't be parsed. */
736     sipNoMethod(sipParseErr, sipName_RichTextEvent, sipName_Clone, SIP_NULLPTR);
737 
738     return SIP_NULLPTR;
739 }
740 
741 
742 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
743 extern "C" {static void *cast_wxRichTextEvent(void *, const sipTypeDef *);}
cast_wxRichTextEvent(void * sipCppV,const sipTypeDef * targetType)744 static void *cast_wxRichTextEvent(void *sipCppV, const sipTypeDef *targetType)
745 {
746      ::wxRichTextEvent *sipCpp = reinterpret_cast< ::wxRichTextEvent *>(sipCppV);
747 
748     if (targetType == sipType_wxNotifyEvent)
749         return static_cast< ::wxNotifyEvent *>(sipCpp);
750 
751     if (targetType == sipType_wxCommandEvent)
752         return static_cast< ::wxCommandEvent *>(sipCpp);
753 
754     if (targetType == sipType_wxEvent)
755         return static_cast< ::wxEvent *>(sipCpp);
756 
757     if (targetType == sipType_wxObject)
758         return static_cast< ::wxObject *>(sipCpp);
759 
760     return sipCppV;
761 }
762 
763 
764 /* Call the instance's destructor. */
765 extern "C" {static void release_wxRichTextEvent(void *, int);}
release_wxRichTextEvent(void * sipCppV,int sipState)766 static void release_wxRichTextEvent(void *sipCppV, int sipState)
767 {
768     Py_BEGIN_ALLOW_THREADS
769 
770     if (sipState & SIP_DERIVED_CLASS)
771         delete reinterpret_cast<sipwxRichTextEvent *>(sipCppV);
772     else
773         delete reinterpret_cast< ::wxRichTextEvent *>(sipCppV);
774 
775     Py_END_ALLOW_THREADS
776 }
777 
778 
779 extern "C" {static void dealloc_wxRichTextEvent(sipSimpleWrapper *);}
dealloc_wxRichTextEvent(sipSimpleWrapper * sipSelf)780 static void dealloc_wxRichTextEvent(sipSimpleWrapper *sipSelf)
781 {
782     if (sipIsDerivedClass(sipSelf))
783         reinterpret_cast<sipwxRichTextEvent *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
784 
785     if (sipIsOwnedByPython(sipSelf))
786     {
787         release_wxRichTextEvent(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
788     }
789 }
790 
791 
792 extern "C" {static void *init_type_wxRichTextEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxRichTextEvent(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)793 static void *init_type_wxRichTextEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
794 {
795     sipwxRichTextEvent *sipCpp = SIP_NULLPTR;
796 
797     {
798          ::wxEventType commandType = wxEVT_NULL;
799         int winid = 0;
800 
801         static const char *sipKwdList[] = {
802             sipName_commandType,
803             sipName_winid,
804         };
805 
806         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|ii", &commandType, &winid))
807         {
808             PyErr_Clear();
809 
810             Py_BEGIN_ALLOW_THREADS
811             sipCpp = new sipwxRichTextEvent(commandType,winid);
812             Py_END_ALLOW_THREADS
813 
814             if (PyErr_Occurred())
815             {
816                 delete sipCpp;
817                 return SIP_NULLPTR;
818             }
819 
820             sipCpp->sipPySelf = sipSelf;
821 
822             return sipCpp;
823         }
824     }
825 
826     {
827         const  ::wxRichTextEvent* event;
828 
829         static const char *sipKwdList[] = {
830             sipName_event,
831         };
832 
833         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9", sipType_wxRichTextEvent, &event))
834         {
835             PyErr_Clear();
836 
837             Py_BEGIN_ALLOW_THREADS
838             sipCpp = new sipwxRichTextEvent(*event);
839             Py_END_ALLOW_THREADS
840 
841             if (PyErr_Occurred())
842             {
843                 delete sipCpp;
844                 return SIP_NULLPTR;
845             }
846 
847             sipCpp->sipPySelf = sipSelf;
848 
849             return sipCpp;
850         }
851     }
852 
853     return SIP_NULLPTR;
854 }
855 
856 
857 /* Define this type's super-types. */
858 static sipEncodedTypeDef supers_wxRichTextEvent[] = {{40, 0, 1}};
859 
860 
861 static PyMethodDef methods_wxRichTextEvent[] = {
862     {SIP_MLNAME_CAST(sipName_Clone), meth_wxRichTextEvent_Clone, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_Clone)},
863     {SIP_MLNAME_CAST(sipName_GetCharacter), meth_wxRichTextEvent_GetCharacter, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_GetCharacter)},
864     {SIP_MLNAME_CAST(sipName_GetContainer), meth_wxRichTextEvent_GetContainer, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_GetContainer)},
865     {SIP_MLNAME_CAST(sipName_GetFlags), meth_wxRichTextEvent_GetFlags, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_GetFlags)},
866     {SIP_MLNAME_CAST(sipName_GetNewStyleSheet), meth_wxRichTextEvent_GetNewStyleSheet, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_GetNewStyleSheet)},
867     {SIP_MLNAME_CAST(sipName_GetOldContainer), meth_wxRichTextEvent_GetOldContainer, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_GetOldContainer)},
868     {SIP_MLNAME_CAST(sipName_GetOldStyleSheet), meth_wxRichTextEvent_GetOldStyleSheet, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_GetOldStyleSheet)},
869     {SIP_MLNAME_CAST(sipName_GetPosition), meth_wxRichTextEvent_GetPosition, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_GetPosition)},
870     {SIP_MLNAME_CAST(sipName_GetRange), meth_wxRichTextEvent_GetRange, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextEvent_GetRange)},
871     {SIP_MLNAME_CAST(sipName_SetCharacter), SIP_MLMETH_CAST(meth_wxRichTextEvent_SetCharacter), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextEvent_SetCharacter)},
872     {SIP_MLNAME_CAST(sipName_SetContainer), SIP_MLMETH_CAST(meth_wxRichTextEvent_SetContainer), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextEvent_SetContainer)},
873     {SIP_MLNAME_CAST(sipName_SetFlags), SIP_MLMETH_CAST(meth_wxRichTextEvent_SetFlags), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextEvent_SetFlags)},
874     {SIP_MLNAME_CAST(sipName_SetNewStyleSheet), SIP_MLMETH_CAST(meth_wxRichTextEvent_SetNewStyleSheet), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextEvent_SetNewStyleSheet)},
875     {SIP_MLNAME_CAST(sipName_SetOldContainer), SIP_MLMETH_CAST(meth_wxRichTextEvent_SetOldContainer), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextEvent_SetOldContainer)},
876     {SIP_MLNAME_CAST(sipName_SetOldStyleSheet), SIP_MLMETH_CAST(meth_wxRichTextEvent_SetOldStyleSheet), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextEvent_SetOldStyleSheet)},
877     {SIP_MLNAME_CAST(sipName_SetPosition), SIP_MLMETH_CAST(meth_wxRichTextEvent_SetPosition), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextEvent_SetPosition)},
878     {SIP_MLNAME_CAST(sipName_SetRange), SIP_MLMETH_CAST(meth_wxRichTextEvent_SetRange), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextEvent_SetRange)}
879 };
880 
881 sipVariableDef variables_wxRichTextEvent[] = {
882     {PropertyVariable, sipName_Range, &methods_wxRichTextEvent[8], &methods_wxRichTextEvent[16], SIP_NULLPTR, SIP_NULLPTR},
883     {PropertyVariable, sipName_Position, &methods_wxRichTextEvent[7], &methods_wxRichTextEvent[15], SIP_NULLPTR, SIP_NULLPTR},
884     {PropertyVariable, sipName_OldStyleSheet, &methods_wxRichTextEvent[6], &methods_wxRichTextEvent[14], SIP_NULLPTR, SIP_NULLPTR},
885     {PropertyVariable, sipName_OldContainer, &methods_wxRichTextEvent[5], &methods_wxRichTextEvent[13], SIP_NULLPTR, SIP_NULLPTR},
886     {PropertyVariable, sipName_NewStyleSheet, &methods_wxRichTextEvent[4], &methods_wxRichTextEvent[12], SIP_NULLPTR, SIP_NULLPTR},
887     {PropertyVariable, sipName_Flags, &methods_wxRichTextEvent[3], &methods_wxRichTextEvent[11], SIP_NULLPTR, SIP_NULLPTR},
888     {PropertyVariable, sipName_Container, &methods_wxRichTextEvent[2], &methods_wxRichTextEvent[10], SIP_NULLPTR, SIP_NULLPTR},
889     {PropertyVariable, sipName_Character, &methods_wxRichTextEvent[1], &methods_wxRichTextEvent[9], SIP_NULLPTR, SIP_NULLPTR},
890 };
891 
892 PyDoc_STRVAR(doc_wxRichTextEvent, "RichTextEvent(commandType=wx.wxEVT_NULL, winid=0)\n"
893 "RichTextEvent(event)\n"
894 "\n"
895 "This is the event class for wxRichTextCtrl notifications.");
896 
897 
898 sipClassTypeDef sipTypeDef__richtext_wxRichTextEvent = {
899     {
900         -1,
901         SIP_NULLPTR,
902         SIP_NULLPTR,
903         SIP_TYPE_SCC|SIP_TYPE_CLASS,
904         sipNameNr_wxRichTextEvent,
905         {SIP_NULLPTR},
906         SIP_NULLPTR
907     },
908     {
909         sipNameNr_RichTextEvent,
910         {0, 0, 1},
911         17, methods_wxRichTextEvent,
912         0, SIP_NULLPTR,
913         8, variables_wxRichTextEvent,
914         {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
915     },
916     doc_wxRichTextEvent,
917     -1,
918     -1,
919     supers_wxRichTextEvent,
920     SIP_NULLPTR,
921     init_type_wxRichTextEvent,
922     SIP_NULLPTR,
923     SIP_NULLPTR,
924 #if PY_MAJOR_VERSION >= 3
925     SIP_NULLPTR,
926     SIP_NULLPTR,
927 #else
928     SIP_NULLPTR,
929     SIP_NULLPTR,
930     SIP_NULLPTR,
931     SIP_NULLPTR,
932 #endif
933     dealloc_wxRichTextEvent,
934     SIP_NULLPTR,
935     SIP_NULLPTR,
936     SIP_NULLPTR,
937     release_wxRichTextEvent,
938     cast_wxRichTextEvent,
939     SIP_NULLPTR,
940     SIP_NULLPTR,
941     SIP_NULLPTR,
942     SIP_NULLPTR,
943     SIP_NULLPTR,
944     SIP_NULLPTR
945 };
946