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_core.h"
11
12 #include <wx/gdicmn.h>
13
14 #include <wx/gdicmn.h>
15 #include <wx/gdicmn.h>
_wxRect___eq__(wxRect * self,const wxRect * other)16 bool _wxRect___eq__(wxRect* self, const wxRect* other)
17 {
18 return *self == *other;
19 }
_wxRect___ne__(wxRect * self,const wxRect * other)20 bool _wxRect___ne__(wxRect* self, const wxRect* other)
21 {
22 return *self != *other;
23 }
_wxRect_Get(wxRect * self)24 PyObject* _wxRect_Get(wxRect* self)
25 {
26 wxPyThreadBlocker blocker;
27 return sipBuildResult(0, "(iiii)",
28 self->x, self->y, self->width, self->height);
29 }
30
31
32 PyDoc_STRVAR(doc_wxRect_CentreIn, "CentreIn(r, dir=BOTH) -> Rect\n"
33 "\n"
34 "Returns the rectangle having the same size as this one but centered\n"
35 "relatively to the given rectangle r.");
36
37 extern "C" {static PyObject *meth_wxRect_CentreIn(PyObject *, PyObject *, PyObject *);}
meth_wxRect_CentreIn(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)38 static PyObject *meth_wxRect_CentreIn(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
39 {
40 PyObject *sipParseErr = SIP_NULLPTR;
41
42 {
43 const ::wxRect* r;
44 int rState = 0;
45 int dir = wxBOTH;
46 const ::wxRect *sipCpp;
47
48 static const char *sipKwdList[] = {
49 sipName_r,
50 sipName_dir,
51 };
52
53 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|i", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxRect, &r, &rState, &dir))
54 {
55 ::wxRect*sipRes;
56
57 PyErr_Clear();
58
59 Py_BEGIN_ALLOW_THREADS
60 sipRes = new ::wxRect(sipCpp->CentreIn(*r,dir));
61 Py_END_ALLOW_THREADS
62 sipReleaseType(const_cast< ::wxRect *>(r),sipType_wxRect,rState);
63
64 if (PyErr_Occurred())
65 return 0;
66
67 return sipConvertFromNewType(sipRes,sipType_wxRect,SIP_NULLPTR);
68 }
69 }
70
71 /* Raise an exception if the arguments couldn't be parsed. */
72 sipNoMethod(sipParseErr, sipName_Rect, sipName_CentreIn, SIP_NULLPTR);
73
74 return SIP_NULLPTR;
75 }
76
77
78 PyDoc_STRVAR(doc_wxRect_CenterIn, "CenterIn(r, dir=BOTH) -> Rect\n"
79 "\n"
80 "Returns the rectangle having the same size as this one but centered\n"
81 "relatively to the given rectangle r.");
82
83 extern "C" {static PyObject *meth_wxRect_CenterIn(PyObject *, PyObject *, PyObject *);}
meth_wxRect_CenterIn(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)84 static PyObject *meth_wxRect_CenterIn(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
85 {
86 PyObject *sipParseErr = SIP_NULLPTR;
87
88 {
89 const ::wxRect* r;
90 int rState = 0;
91 int dir = wxBOTH;
92 const ::wxRect *sipCpp;
93
94 static const char *sipKwdList[] = {
95 sipName_r,
96 sipName_dir,
97 };
98
99 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|i", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxRect, &r, &rState, &dir))
100 {
101 ::wxRect*sipRes;
102
103 PyErr_Clear();
104
105 Py_BEGIN_ALLOW_THREADS
106 sipRes = new ::wxRect(sipCpp->CenterIn(*r,dir));
107 Py_END_ALLOW_THREADS
108 sipReleaseType(const_cast< ::wxRect *>(r),sipType_wxRect,rState);
109
110 if (PyErr_Occurred())
111 return 0;
112
113 return sipConvertFromNewType(sipRes,sipType_wxRect,SIP_NULLPTR);
114 }
115 }
116
117 /* Raise an exception if the arguments couldn't be parsed. */
118 sipNoMethod(sipParseErr, sipName_Rect, sipName_CenterIn, SIP_NULLPTR);
119
120 return SIP_NULLPTR;
121 }
122
123
124 PyDoc_STRVAR(doc_wxRect_Deflate, "Deflate(dx, dy) -> Rect\n"
125 "Deflate(diff) -> Rect\n"
126 "Deflate(diff) -> Rect\n"
127 "\n"
128 "Decrease the rectangle size.\n"
129 "\n"
130 "");
131
132 extern "C" {static PyObject *meth_wxRect_Deflate(PyObject *, PyObject *, PyObject *);}
meth_wxRect_Deflate(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)133 static PyObject *meth_wxRect_Deflate(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
134 {
135 PyObject *sipParseErr = SIP_NULLPTR;
136
137 {
138 ::wxCoord dx;
139 ::wxCoord dy;
140 ::wxRect *sipCpp;
141
142 static const char *sipKwdList[] = {
143 sipName_dx,
144 sipName_dy,
145 };
146
147 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bii", &sipSelf, sipType_wxRect, &sipCpp, &dx, &dy))
148 {
149 ::wxRect*sipRes;
150
151 PyErr_Clear();
152
153 Py_BEGIN_ALLOW_THREADS
154 sipRes = &sipCpp->Deflate(dx,dy);
155 Py_END_ALLOW_THREADS
156
157 if (PyErr_Occurred())
158 return 0;
159
160 return sipConvertFromType(sipRes,sipType_wxRect,SIP_NULLPTR);
161 }
162 }
163
164 {
165 const ::wxSize* diff;
166 int diffState = 0;
167 ::wxRect *sipCpp;
168
169 static const char *sipKwdList[] = {
170 sipName_diff,
171 };
172
173 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxSize, &diff, &diffState))
174 {
175 ::wxRect*sipRes;
176
177 PyErr_Clear();
178
179 Py_BEGIN_ALLOW_THREADS
180 sipRes = &sipCpp->Deflate(*diff);
181 Py_END_ALLOW_THREADS
182 sipReleaseType(const_cast< ::wxSize *>(diff),sipType_wxSize,diffState);
183
184 if (PyErr_Occurred())
185 return 0;
186
187 return sipConvertFromType(sipRes,sipType_wxRect,SIP_NULLPTR);
188 }
189 }
190
191 {
192 ::wxCoord diff;
193 ::wxRect *sipCpp;
194
195 static const char *sipKwdList[] = {
196 sipName_diff,
197 };
198
199 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &diff))
200 {
201 ::wxRect*sipRes;
202
203 PyErr_Clear();
204
205 Py_BEGIN_ALLOW_THREADS
206 sipRes = &sipCpp->Deflate(diff);
207 Py_END_ALLOW_THREADS
208
209 if (PyErr_Occurred())
210 return 0;
211
212 return sipConvertFromType(sipRes,sipType_wxRect,SIP_NULLPTR);
213 }
214 }
215
216 /* Raise an exception if the arguments couldn't be parsed. */
217 sipNoMethod(sipParseErr, sipName_Rect, sipName_Deflate, SIP_NULLPTR);
218
219 return SIP_NULLPTR;
220 }
221
222
223 PyDoc_STRVAR(doc_wxRect_Inflate, "Inflate(dx, dy) -> Rect\n"
224 "Inflate(diff) -> Rect\n"
225 "Inflate(diff) -> Rect\n"
226 "\n"
227 "Increases the size of the rectangle.\n"
228 "\n"
229 "");
230
231 extern "C" {static PyObject *meth_wxRect_Inflate(PyObject *, PyObject *, PyObject *);}
meth_wxRect_Inflate(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)232 static PyObject *meth_wxRect_Inflate(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
233 {
234 PyObject *sipParseErr = SIP_NULLPTR;
235
236 {
237 ::wxCoord dx;
238 ::wxCoord dy;
239 ::wxRect *sipCpp;
240
241 static const char *sipKwdList[] = {
242 sipName_dx,
243 sipName_dy,
244 };
245
246 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bii", &sipSelf, sipType_wxRect, &sipCpp, &dx, &dy))
247 {
248 ::wxRect*sipRes;
249
250 PyErr_Clear();
251
252 Py_BEGIN_ALLOW_THREADS
253 sipRes = &sipCpp->Inflate(dx,dy);
254 Py_END_ALLOW_THREADS
255
256 if (PyErr_Occurred())
257 return 0;
258
259 return sipConvertFromType(sipRes,sipType_wxRect,SIP_NULLPTR);
260 }
261 }
262
263 {
264 const ::wxSize* diff;
265 int diffState = 0;
266 ::wxRect *sipCpp;
267
268 static const char *sipKwdList[] = {
269 sipName_diff,
270 };
271
272 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxSize, &diff, &diffState))
273 {
274 ::wxRect*sipRes;
275
276 PyErr_Clear();
277
278 Py_BEGIN_ALLOW_THREADS
279 sipRes = &sipCpp->Inflate(*diff);
280 Py_END_ALLOW_THREADS
281 sipReleaseType(const_cast< ::wxSize *>(diff),sipType_wxSize,diffState);
282
283 if (PyErr_Occurred())
284 return 0;
285
286 return sipConvertFromType(sipRes,sipType_wxRect,SIP_NULLPTR);
287 }
288 }
289
290 {
291 ::wxCoord diff;
292 ::wxRect *sipCpp;
293
294 static const char *sipKwdList[] = {
295 sipName_diff,
296 };
297
298 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &diff))
299 {
300 ::wxRect*sipRes;
301
302 PyErr_Clear();
303
304 Py_BEGIN_ALLOW_THREADS
305 sipRes = &sipCpp->Inflate(diff);
306 Py_END_ALLOW_THREADS
307
308 if (PyErr_Occurred())
309 return 0;
310
311 return sipConvertFromType(sipRes,sipType_wxRect,SIP_NULLPTR);
312 }
313 }
314
315 /* Raise an exception if the arguments couldn't be parsed. */
316 sipNoMethod(sipParseErr, sipName_Rect, sipName_Inflate, SIP_NULLPTR);
317
318 return SIP_NULLPTR;
319 }
320
321
322 PyDoc_STRVAR(doc_wxRect_Offset, "Offset(dx, dy)\n"
323 "Offset(pt)\n"
324 "\n"
325 "Moves the rectangle by the specified offset.\n"
326 "");
327
328 extern "C" {static PyObject *meth_wxRect_Offset(PyObject *, PyObject *, PyObject *);}
meth_wxRect_Offset(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)329 static PyObject *meth_wxRect_Offset(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
330 {
331 PyObject *sipParseErr = SIP_NULLPTR;
332
333 {
334 ::wxCoord dx;
335 ::wxCoord dy;
336 ::wxRect *sipCpp;
337
338 static const char *sipKwdList[] = {
339 sipName_dx,
340 sipName_dy,
341 };
342
343 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bii", &sipSelf, sipType_wxRect, &sipCpp, &dx, &dy))
344 {
345 PyErr_Clear();
346
347 Py_BEGIN_ALLOW_THREADS
348 sipCpp->Offset(dx,dy);
349 Py_END_ALLOW_THREADS
350
351 if (PyErr_Occurred())
352 return 0;
353
354 Py_INCREF(Py_None);
355 return Py_None;
356 }
357 }
358
359 {
360 const ::wxPoint* pt;
361 int ptState = 0;
362 ::wxRect *sipCpp;
363
364 static const char *sipKwdList[] = {
365 sipName_pt,
366 };
367
368 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxPoint, &pt, &ptState))
369 {
370 PyErr_Clear();
371
372 Py_BEGIN_ALLOW_THREADS
373 sipCpp->Offset(*pt);
374 Py_END_ALLOW_THREADS
375 sipReleaseType(const_cast< ::wxPoint *>(pt),sipType_wxPoint,ptState);
376
377 if (PyErr_Occurred())
378 return 0;
379
380 Py_INCREF(Py_None);
381 return Py_None;
382 }
383 }
384
385 /* Raise an exception if the arguments couldn't be parsed. */
386 sipNoMethod(sipParseErr, sipName_Rect, sipName_Offset, SIP_NULLPTR);
387
388 return SIP_NULLPTR;
389 }
390
391
392 PyDoc_STRVAR(doc_wxRect_Union, "Union(rect) -> Rect\n"
393 "\n"
394 "Modifies the rectangle to contain the bounding box of this rectangle\n"
395 "and the one passed in as parameter.");
396
397 extern "C" {static PyObject *meth_wxRect_Union(PyObject *, PyObject *, PyObject *);}
meth_wxRect_Union(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)398 static PyObject *meth_wxRect_Union(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
399 {
400 PyObject *sipParseErr = SIP_NULLPTR;
401
402 {
403 const ::wxRect* rect;
404 int rectState = 0;
405 ::wxRect *sipCpp;
406
407 static const char *sipKwdList[] = {
408 sipName_rect,
409 };
410
411 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxRect, &rect, &rectState))
412 {
413 ::wxRect*sipRes;
414
415 PyErr_Clear();
416
417 Py_BEGIN_ALLOW_THREADS
418 sipRes = &sipCpp->Union(*rect);
419 Py_END_ALLOW_THREADS
420 sipReleaseType(const_cast< ::wxRect *>(rect),sipType_wxRect,rectState);
421
422 if (PyErr_Occurred())
423 return 0;
424
425 return sipConvertFromType(sipRes,sipType_wxRect,SIP_NULLPTR);
426 }
427 }
428
429 /* Raise an exception if the arguments couldn't be parsed. */
430 sipNoMethod(sipParseErr, sipName_Rect, sipName_Union, SIP_NULLPTR);
431
432 return SIP_NULLPTR;
433 }
434
435
436 PyDoc_STRVAR(doc_wxRect_Contains, "Contains(x, y) -> bool\n"
437 "Contains(pt) -> bool\n"
438 "Contains(rect) -> bool\n"
439 "\n"
440 "Returns true if the given point is inside the rectangle (or on its\n"
441 "boundary) and false otherwise.\n"
442 "\n"
443 "");
444
445 extern "C" {static PyObject *meth_wxRect_Contains(PyObject *, PyObject *, PyObject *);}
meth_wxRect_Contains(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)446 static PyObject *meth_wxRect_Contains(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
447 {
448 PyObject *sipParseErr = SIP_NULLPTR;
449
450 {
451 int x;
452 int y;
453 const ::wxRect *sipCpp;
454
455 static const char *sipKwdList[] = {
456 sipName_x,
457 sipName_y,
458 };
459
460 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bii", &sipSelf, sipType_wxRect, &sipCpp, &x, &y))
461 {
462 bool sipRes;
463
464 PyErr_Clear();
465
466 Py_BEGIN_ALLOW_THREADS
467 sipRes = sipCpp->Contains(x,y);
468 Py_END_ALLOW_THREADS
469
470 if (PyErr_Occurred())
471 return 0;
472
473 return PyBool_FromLong(sipRes);
474 }
475 }
476
477 {
478 const ::wxPoint* pt;
479 int ptState = 0;
480 const ::wxRect *sipCpp;
481
482 static const char *sipKwdList[] = {
483 sipName_pt,
484 };
485
486 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxPoint, &pt, &ptState))
487 {
488 bool sipRes;
489
490 PyErr_Clear();
491
492 Py_BEGIN_ALLOW_THREADS
493 sipRes = sipCpp->Contains(*pt);
494 Py_END_ALLOW_THREADS
495 sipReleaseType(const_cast< ::wxPoint *>(pt),sipType_wxPoint,ptState);
496
497 if (PyErr_Occurred())
498 return 0;
499
500 return PyBool_FromLong(sipRes);
501 }
502 }
503
504 {
505 const ::wxRect* rect;
506 int rectState = 0;
507 const ::wxRect *sipCpp;
508
509 static const char *sipKwdList[] = {
510 sipName_rect,
511 };
512
513 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxRect, &rect, &rectState))
514 {
515 bool sipRes;
516
517 PyErr_Clear();
518
519 Py_BEGIN_ALLOW_THREADS
520 sipRes = sipCpp->Contains(*rect);
521 Py_END_ALLOW_THREADS
522 sipReleaseType(const_cast< ::wxRect *>(rect),sipType_wxRect,rectState);
523
524 if (PyErr_Occurred())
525 return 0;
526
527 return PyBool_FromLong(sipRes);
528 }
529 }
530
531 /* Raise an exception if the arguments couldn't be parsed. */
532 sipNoMethod(sipParseErr, sipName_Rect, sipName_Contains, SIP_NULLPTR);
533
534 return SIP_NULLPTR;
535 }
536
537
538 PyDoc_STRVAR(doc_wxRect_GetBottom, "GetBottom() -> int\n"
539 "\n"
540 "Gets the bottom point of the rectangle.");
541
542 extern "C" {static PyObject *meth_wxRect_GetBottom(PyObject *, PyObject *);}
meth_wxRect_GetBottom(PyObject * sipSelf,PyObject * sipArgs)543 static PyObject *meth_wxRect_GetBottom(PyObject *sipSelf, PyObject *sipArgs)
544 {
545 PyObject *sipParseErr = SIP_NULLPTR;
546
547 {
548 const ::wxRect *sipCpp;
549
550 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
551 {
552 int sipRes;
553
554 PyErr_Clear();
555
556 Py_BEGIN_ALLOW_THREADS
557 sipRes = sipCpp->GetBottom();
558 Py_END_ALLOW_THREADS
559
560 if (PyErr_Occurred())
561 return 0;
562
563 return SIPLong_FromLong(sipRes);
564 }
565 }
566
567 /* Raise an exception if the arguments couldn't be parsed. */
568 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetBottom, SIP_NULLPTR);
569
570 return SIP_NULLPTR;
571 }
572
573
574 PyDoc_STRVAR(doc_wxRect_GetBottomLeft, "GetBottomLeft() -> Point\n"
575 "\n"
576 "Gets the position of the bottom left corner.");
577
578 extern "C" {static PyObject *meth_wxRect_GetBottomLeft(PyObject *, PyObject *);}
meth_wxRect_GetBottomLeft(PyObject * sipSelf,PyObject * sipArgs)579 static PyObject *meth_wxRect_GetBottomLeft(PyObject *sipSelf, PyObject *sipArgs)
580 {
581 PyObject *sipParseErr = SIP_NULLPTR;
582
583 {
584 const ::wxRect *sipCpp;
585
586 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
587 {
588 ::wxPoint*sipRes;
589
590 PyErr_Clear();
591
592 Py_BEGIN_ALLOW_THREADS
593 sipRes = new ::wxPoint(sipCpp->GetBottomLeft());
594 Py_END_ALLOW_THREADS
595
596 if (PyErr_Occurred())
597 return 0;
598
599 return sipConvertFromNewType(sipRes,sipType_wxPoint,SIP_NULLPTR);
600 }
601 }
602
603 /* Raise an exception if the arguments couldn't be parsed. */
604 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetBottomLeft, SIP_NULLPTR);
605
606 return SIP_NULLPTR;
607 }
608
609
610 PyDoc_STRVAR(doc_wxRect_GetBottomRight, "GetBottomRight() -> Point\n"
611 "\n"
612 "Gets the position of the bottom right corner.");
613
614 extern "C" {static PyObject *meth_wxRect_GetBottomRight(PyObject *, PyObject *);}
meth_wxRect_GetBottomRight(PyObject * sipSelf,PyObject * sipArgs)615 static PyObject *meth_wxRect_GetBottomRight(PyObject *sipSelf, PyObject *sipArgs)
616 {
617 PyObject *sipParseErr = SIP_NULLPTR;
618
619 {
620 const ::wxRect *sipCpp;
621
622 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
623 {
624 ::wxPoint*sipRes;
625
626 PyErr_Clear();
627
628 Py_BEGIN_ALLOW_THREADS
629 sipRes = new ::wxPoint(sipCpp->GetBottomRight());
630 Py_END_ALLOW_THREADS
631
632 if (PyErr_Occurred())
633 return 0;
634
635 return sipConvertFromNewType(sipRes,sipType_wxPoint,SIP_NULLPTR);
636 }
637 }
638
639 /* Raise an exception if the arguments couldn't be parsed. */
640 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetBottomRight, SIP_NULLPTR);
641
642 return SIP_NULLPTR;
643 }
644
645
646 PyDoc_STRVAR(doc_wxRect_GetHeight, "GetHeight() -> int\n"
647 "\n"
648 "Gets the height member.");
649
650 extern "C" {static PyObject *meth_wxRect_GetHeight(PyObject *, PyObject *);}
meth_wxRect_GetHeight(PyObject * sipSelf,PyObject * sipArgs)651 static PyObject *meth_wxRect_GetHeight(PyObject *sipSelf, PyObject *sipArgs)
652 {
653 PyObject *sipParseErr = SIP_NULLPTR;
654
655 {
656 const ::wxRect *sipCpp;
657
658 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
659 {
660 int sipRes;
661
662 PyErr_Clear();
663
664 Py_BEGIN_ALLOW_THREADS
665 sipRes = sipCpp->GetHeight();
666 Py_END_ALLOW_THREADS
667
668 if (PyErr_Occurred())
669 return 0;
670
671 return SIPLong_FromLong(sipRes);
672 }
673 }
674
675 /* Raise an exception if the arguments couldn't be parsed. */
676 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetHeight, SIP_NULLPTR);
677
678 return SIP_NULLPTR;
679 }
680
681
682 PyDoc_STRVAR(doc_wxRect_GetLeft, "GetLeft() -> int\n"
683 "\n"
684 "Gets the left point of the rectangle (the same as GetX()).");
685
686 extern "C" {static PyObject *meth_wxRect_GetLeft(PyObject *, PyObject *);}
meth_wxRect_GetLeft(PyObject * sipSelf,PyObject * sipArgs)687 static PyObject *meth_wxRect_GetLeft(PyObject *sipSelf, PyObject *sipArgs)
688 {
689 PyObject *sipParseErr = SIP_NULLPTR;
690
691 {
692 const ::wxRect *sipCpp;
693
694 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
695 {
696 int sipRes;
697
698 PyErr_Clear();
699
700 Py_BEGIN_ALLOW_THREADS
701 sipRes = sipCpp->GetLeft();
702 Py_END_ALLOW_THREADS
703
704 if (PyErr_Occurred())
705 return 0;
706
707 return SIPLong_FromLong(sipRes);
708 }
709 }
710
711 /* Raise an exception if the arguments couldn't be parsed. */
712 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetLeft, SIP_NULLPTR);
713
714 return SIP_NULLPTR;
715 }
716
717
718 PyDoc_STRVAR(doc_wxRect_GetPosition, "GetPosition() -> Point\n"
719 "\n"
720 "Gets the position.");
721
722 extern "C" {static PyObject *meth_wxRect_GetPosition(PyObject *, PyObject *);}
meth_wxRect_GetPosition(PyObject * sipSelf,PyObject * sipArgs)723 static PyObject *meth_wxRect_GetPosition(PyObject *sipSelf, PyObject *sipArgs)
724 {
725 PyObject *sipParseErr = SIP_NULLPTR;
726
727 {
728 const ::wxRect *sipCpp;
729
730 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
731 {
732 ::wxPoint*sipRes;
733
734 PyErr_Clear();
735
736 Py_BEGIN_ALLOW_THREADS
737 sipRes = new ::wxPoint(sipCpp->GetPosition());
738 Py_END_ALLOW_THREADS
739
740 if (PyErr_Occurred())
741 return 0;
742
743 return sipConvertFromNewType(sipRes,sipType_wxPoint,SIP_NULLPTR);
744 }
745 }
746
747 /* Raise an exception if the arguments couldn't be parsed. */
748 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetPosition, SIP_NULLPTR);
749
750 return SIP_NULLPTR;
751 }
752
753
754 PyDoc_STRVAR(doc_wxRect_GetRight, "GetRight() -> int\n"
755 "\n"
756 "Gets the right point of the rectangle.");
757
758 extern "C" {static PyObject *meth_wxRect_GetRight(PyObject *, PyObject *);}
meth_wxRect_GetRight(PyObject * sipSelf,PyObject * sipArgs)759 static PyObject *meth_wxRect_GetRight(PyObject *sipSelf, PyObject *sipArgs)
760 {
761 PyObject *sipParseErr = SIP_NULLPTR;
762
763 {
764 const ::wxRect *sipCpp;
765
766 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
767 {
768 int sipRes;
769
770 PyErr_Clear();
771
772 Py_BEGIN_ALLOW_THREADS
773 sipRes = sipCpp->GetRight();
774 Py_END_ALLOW_THREADS
775
776 if (PyErr_Occurred())
777 return 0;
778
779 return SIPLong_FromLong(sipRes);
780 }
781 }
782
783 /* Raise an exception if the arguments couldn't be parsed. */
784 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetRight, SIP_NULLPTR);
785
786 return SIP_NULLPTR;
787 }
788
789
790 PyDoc_STRVAR(doc_wxRect_GetSize, "GetSize() -> Size\n"
791 "\n"
792 "Gets the size.");
793
794 extern "C" {static PyObject *meth_wxRect_GetSize(PyObject *, PyObject *);}
meth_wxRect_GetSize(PyObject * sipSelf,PyObject * sipArgs)795 static PyObject *meth_wxRect_GetSize(PyObject *sipSelf, PyObject *sipArgs)
796 {
797 PyObject *sipParseErr = SIP_NULLPTR;
798
799 {
800 const ::wxRect *sipCpp;
801
802 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
803 {
804 ::wxSize*sipRes;
805
806 PyErr_Clear();
807
808 Py_BEGIN_ALLOW_THREADS
809 sipRes = new ::wxSize(sipCpp->GetSize());
810 Py_END_ALLOW_THREADS
811
812 if (PyErr_Occurred())
813 return 0;
814
815 return sipConvertFromNewType(sipRes,sipType_wxSize,SIP_NULLPTR);
816 }
817 }
818
819 /* Raise an exception if the arguments couldn't be parsed. */
820 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetSize, SIP_NULLPTR);
821
822 return SIP_NULLPTR;
823 }
824
825
826 PyDoc_STRVAR(doc_wxRect_GetTop, "GetTop() -> int\n"
827 "\n"
828 "Gets the top point of the rectangle (the same as GetY()).");
829
830 extern "C" {static PyObject *meth_wxRect_GetTop(PyObject *, PyObject *);}
meth_wxRect_GetTop(PyObject * sipSelf,PyObject * sipArgs)831 static PyObject *meth_wxRect_GetTop(PyObject *sipSelf, PyObject *sipArgs)
832 {
833 PyObject *sipParseErr = SIP_NULLPTR;
834
835 {
836 const ::wxRect *sipCpp;
837
838 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
839 {
840 int sipRes;
841
842 PyErr_Clear();
843
844 Py_BEGIN_ALLOW_THREADS
845 sipRes = sipCpp->GetTop();
846 Py_END_ALLOW_THREADS
847
848 if (PyErr_Occurred())
849 return 0;
850
851 return SIPLong_FromLong(sipRes);
852 }
853 }
854
855 /* Raise an exception if the arguments couldn't be parsed. */
856 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetTop, SIP_NULLPTR);
857
858 return SIP_NULLPTR;
859 }
860
861
862 PyDoc_STRVAR(doc_wxRect_GetTopLeft, "GetTopLeft() -> Point\n"
863 "\n"
864 "Gets the position of the top left corner of the rectangle, same as\n"
865 "GetPosition().");
866
867 extern "C" {static PyObject *meth_wxRect_GetTopLeft(PyObject *, PyObject *);}
meth_wxRect_GetTopLeft(PyObject * sipSelf,PyObject * sipArgs)868 static PyObject *meth_wxRect_GetTopLeft(PyObject *sipSelf, PyObject *sipArgs)
869 {
870 PyObject *sipParseErr = SIP_NULLPTR;
871
872 {
873 const ::wxRect *sipCpp;
874
875 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
876 {
877 ::wxPoint*sipRes;
878
879 PyErr_Clear();
880
881 Py_BEGIN_ALLOW_THREADS
882 sipRes = new ::wxPoint(sipCpp->GetTopLeft());
883 Py_END_ALLOW_THREADS
884
885 if (PyErr_Occurred())
886 return 0;
887
888 return sipConvertFromNewType(sipRes,sipType_wxPoint,SIP_NULLPTR);
889 }
890 }
891
892 /* Raise an exception if the arguments couldn't be parsed. */
893 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetTopLeft, SIP_NULLPTR);
894
895 return SIP_NULLPTR;
896 }
897
898
899 PyDoc_STRVAR(doc_wxRect_GetTopRight, "GetTopRight() -> Point\n"
900 "\n"
901 "Gets the position of the top right corner.");
902
903 extern "C" {static PyObject *meth_wxRect_GetTopRight(PyObject *, PyObject *);}
meth_wxRect_GetTopRight(PyObject * sipSelf,PyObject * sipArgs)904 static PyObject *meth_wxRect_GetTopRight(PyObject *sipSelf, PyObject *sipArgs)
905 {
906 PyObject *sipParseErr = SIP_NULLPTR;
907
908 {
909 const ::wxRect *sipCpp;
910
911 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
912 {
913 ::wxPoint*sipRes;
914
915 PyErr_Clear();
916
917 Py_BEGIN_ALLOW_THREADS
918 sipRes = new ::wxPoint(sipCpp->GetTopRight());
919 Py_END_ALLOW_THREADS
920
921 if (PyErr_Occurred())
922 return 0;
923
924 return sipConvertFromNewType(sipRes,sipType_wxPoint,SIP_NULLPTR);
925 }
926 }
927
928 /* Raise an exception if the arguments couldn't be parsed. */
929 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetTopRight, SIP_NULLPTR);
930
931 return SIP_NULLPTR;
932 }
933
934
935 PyDoc_STRVAR(doc_wxRect_GetWidth, "GetWidth() -> int\n"
936 "\n"
937 "Gets the width member.");
938
939 extern "C" {static PyObject *meth_wxRect_GetWidth(PyObject *, PyObject *);}
meth_wxRect_GetWidth(PyObject * sipSelf,PyObject * sipArgs)940 static PyObject *meth_wxRect_GetWidth(PyObject *sipSelf, PyObject *sipArgs)
941 {
942 PyObject *sipParseErr = SIP_NULLPTR;
943
944 {
945 const ::wxRect *sipCpp;
946
947 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
948 {
949 int sipRes;
950
951 PyErr_Clear();
952
953 Py_BEGIN_ALLOW_THREADS
954 sipRes = sipCpp->GetWidth();
955 Py_END_ALLOW_THREADS
956
957 if (PyErr_Occurred())
958 return 0;
959
960 return SIPLong_FromLong(sipRes);
961 }
962 }
963
964 /* Raise an exception if the arguments couldn't be parsed. */
965 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetWidth, SIP_NULLPTR);
966
967 return SIP_NULLPTR;
968 }
969
970
971 PyDoc_STRVAR(doc_wxRect_GetX, "GetX() -> int\n"
972 "\n"
973 "Gets the x member.");
974
975 extern "C" {static PyObject *meth_wxRect_GetX(PyObject *, PyObject *);}
meth_wxRect_GetX(PyObject * sipSelf,PyObject * sipArgs)976 static PyObject *meth_wxRect_GetX(PyObject *sipSelf, PyObject *sipArgs)
977 {
978 PyObject *sipParseErr = SIP_NULLPTR;
979
980 {
981 const ::wxRect *sipCpp;
982
983 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
984 {
985 int sipRes;
986
987 PyErr_Clear();
988
989 Py_BEGIN_ALLOW_THREADS
990 sipRes = sipCpp->GetX();
991 Py_END_ALLOW_THREADS
992
993 if (PyErr_Occurred())
994 return 0;
995
996 return SIPLong_FromLong(sipRes);
997 }
998 }
999
1000 /* Raise an exception if the arguments couldn't be parsed. */
1001 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetX, SIP_NULLPTR);
1002
1003 return SIP_NULLPTR;
1004 }
1005
1006
1007 PyDoc_STRVAR(doc_wxRect_GetY, "GetY() -> int\n"
1008 "\n"
1009 "Gets the y member.");
1010
1011 extern "C" {static PyObject *meth_wxRect_GetY(PyObject *, PyObject *);}
meth_wxRect_GetY(PyObject * sipSelf,PyObject * sipArgs)1012 static PyObject *meth_wxRect_GetY(PyObject *sipSelf, PyObject *sipArgs)
1013 {
1014 PyObject *sipParseErr = SIP_NULLPTR;
1015
1016 {
1017 const ::wxRect *sipCpp;
1018
1019 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
1020 {
1021 int sipRes;
1022
1023 PyErr_Clear();
1024
1025 Py_BEGIN_ALLOW_THREADS
1026 sipRes = sipCpp->GetY();
1027 Py_END_ALLOW_THREADS
1028
1029 if (PyErr_Occurred())
1030 return 0;
1031
1032 return SIPLong_FromLong(sipRes);
1033 }
1034 }
1035
1036 /* Raise an exception if the arguments couldn't be parsed. */
1037 sipNoMethod(sipParseErr, sipName_Rect, sipName_GetY, SIP_NULLPTR);
1038
1039 return SIP_NULLPTR;
1040 }
1041
1042
1043 PyDoc_STRVAR(doc_wxRect_Intersect, "Intersect(rect) -> Rect\n"
1044 "\n"
1045 "Modifies this rectangle to contain the overlapping portion of this\n"
1046 "rectangle and the one passed in as parameter.");
1047
1048 extern "C" {static PyObject *meth_wxRect_Intersect(PyObject *, PyObject *, PyObject *);}
meth_wxRect_Intersect(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1049 static PyObject *meth_wxRect_Intersect(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1050 {
1051 PyObject *sipParseErr = SIP_NULLPTR;
1052
1053 {
1054 const ::wxRect* rect;
1055 int rectState = 0;
1056 ::wxRect *sipCpp;
1057
1058 static const char *sipKwdList[] = {
1059 sipName_rect,
1060 };
1061
1062 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxRect, &rect, &rectState))
1063 {
1064 ::wxRect*sipRes;
1065
1066 PyErr_Clear();
1067
1068 Py_BEGIN_ALLOW_THREADS
1069 sipRes = &sipCpp->Intersect(*rect);
1070 Py_END_ALLOW_THREADS
1071 sipReleaseType(const_cast< ::wxRect *>(rect),sipType_wxRect,rectState);
1072
1073 if (PyErr_Occurred())
1074 return 0;
1075
1076 return sipConvertFromType(sipRes,sipType_wxRect,SIP_NULLPTR);
1077 }
1078 }
1079
1080 /* Raise an exception if the arguments couldn't be parsed. */
1081 sipNoMethod(sipParseErr, sipName_Rect, sipName_Intersect, SIP_NULLPTR);
1082
1083 return SIP_NULLPTR;
1084 }
1085
1086
1087 PyDoc_STRVAR(doc_wxRect_Intersects, "Intersects(rect) -> bool\n"
1088 "\n"
1089 "Returns true if this rectangle has a non-empty intersection with the\n"
1090 "rectangle rect and false otherwise.");
1091
1092 extern "C" {static PyObject *meth_wxRect_Intersects(PyObject *, PyObject *, PyObject *);}
meth_wxRect_Intersects(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1093 static PyObject *meth_wxRect_Intersects(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1094 {
1095 PyObject *sipParseErr = SIP_NULLPTR;
1096
1097 {
1098 const ::wxRect* rect;
1099 int rectState = 0;
1100 const ::wxRect *sipCpp;
1101
1102 static const char *sipKwdList[] = {
1103 sipName_rect,
1104 };
1105
1106 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxRect, &rect, &rectState))
1107 {
1108 bool sipRes;
1109
1110 PyErr_Clear();
1111
1112 Py_BEGIN_ALLOW_THREADS
1113 sipRes = sipCpp->Intersects(*rect);
1114 Py_END_ALLOW_THREADS
1115 sipReleaseType(const_cast< ::wxRect *>(rect),sipType_wxRect,rectState);
1116
1117 if (PyErr_Occurred())
1118 return 0;
1119
1120 return PyBool_FromLong(sipRes);
1121 }
1122 }
1123
1124 /* Raise an exception if the arguments couldn't be parsed. */
1125 sipNoMethod(sipParseErr, sipName_Rect, sipName_Intersects, SIP_NULLPTR);
1126
1127 return SIP_NULLPTR;
1128 }
1129
1130
1131 PyDoc_STRVAR(doc_wxRect_IsEmpty, "IsEmpty() -> bool\n"
1132 "\n"
1133 "Returns true if this rectangle has a width or height less than or\n"
1134 "equal to 0 and false otherwise.");
1135
1136 extern "C" {static PyObject *meth_wxRect_IsEmpty(PyObject *, PyObject *);}
meth_wxRect_IsEmpty(PyObject * sipSelf,PyObject * sipArgs)1137 static PyObject *meth_wxRect_IsEmpty(PyObject *sipSelf, PyObject *sipArgs)
1138 {
1139 PyObject *sipParseErr = SIP_NULLPTR;
1140
1141 {
1142 const ::wxRect *sipCpp;
1143
1144 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
1145 {
1146 bool sipRes;
1147
1148 PyErr_Clear();
1149
1150 Py_BEGIN_ALLOW_THREADS
1151 sipRes = sipCpp->IsEmpty();
1152 Py_END_ALLOW_THREADS
1153
1154 if (PyErr_Occurred())
1155 return 0;
1156
1157 return PyBool_FromLong(sipRes);
1158 }
1159 }
1160
1161 /* Raise an exception if the arguments couldn't be parsed. */
1162 sipNoMethod(sipParseErr, sipName_Rect, sipName_IsEmpty, SIP_NULLPTR);
1163
1164 return SIP_NULLPTR;
1165 }
1166
1167
1168 PyDoc_STRVAR(doc_wxRect_SetHeight, "SetHeight(height)\n"
1169 "\n"
1170 "Sets the height.");
1171
1172 extern "C" {static PyObject *meth_wxRect_SetHeight(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetHeight(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1173 static PyObject *meth_wxRect_SetHeight(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1174 {
1175 PyObject *sipParseErr = SIP_NULLPTR;
1176
1177 {
1178 int height;
1179 ::wxRect *sipCpp;
1180
1181 static const char *sipKwdList[] = {
1182 sipName_height,
1183 };
1184
1185 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &height))
1186 {
1187 PyErr_Clear();
1188
1189 Py_BEGIN_ALLOW_THREADS
1190 sipCpp->SetHeight(height);
1191 Py_END_ALLOW_THREADS
1192
1193 if (PyErr_Occurred())
1194 return 0;
1195
1196 Py_INCREF(Py_None);
1197 return Py_None;
1198 }
1199 }
1200
1201 /* Raise an exception if the arguments couldn't be parsed. */
1202 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetHeight, SIP_NULLPTR);
1203
1204 return SIP_NULLPTR;
1205 }
1206
1207
1208 PyDoc_STRVAR(doc_wxRect_SetPosition, "SetPosition(pos)\n"
1209 "\n"
1210 "Sets the position.");
1211
1212 extern "C" {static PyObject *meth_wxRect_SetPosition(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetPosition(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1213 static PyObject *meth_wxRect_SetPosition(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1214 {
1215 PyObject *sipParseErr = SIP_NULLPTR;
1216
1217 {
1218 const ::wxPoint* pos;
1219 int posState = 0;
1220 ::wxRect *sipCpp;
1221
1222 static const char *sipKwdList[] = {
1223 sipName_pos,
1224 };
1225
1226 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxPoint, &pos, &posState))
1227 {
1228 PyErr_Clear();
1229
1230 Py_BEGIN_ALLOW_THREADS
1231 sipCpp->SetPosition(*pos);
1232 Py_END_ALLOW_THREADS
1233 sipReleaseType(const_cast< ::wxPoint *>(pos),sipType_wxPoint,posState);
1234
1235 if (PyErr_Occurred())
1236 return 0;
1237
1238 Py_INCREF(Py_None);
1239 return Py_None;
1240 }
1241 }
1242
1243 /* Raise an exception if the arguments couldn't be parsed. */
1244 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetPosition, SIP_NULLPTR);
1245
1246 return SIP_NULLPTR;
1247 }
1248
1249
1250 PyDoc_STRVAR(doc_wxRect_SetSize, "SetSize(s)\n"
1251 "\n"
1252 "Sets the size.");
1253
1254 extern "C" {static PyObject *meth_wxRect_SetSize(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetSize(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1255 static PyObject *meth_wxRect_SetSize(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1256 {
1257 PyObject *sipParseErr = SIP_NULLPTR;
1258
1259 {
1260 const ::wxSize* s;
1261 int sState = 0;
1262 ::wxRect *sipCpp;
1263
1264 static const char *sipKwdList[] = {
1265 sipName_s,
1266 };
1267
1268 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxSize, &s, &sState))
1269 {
1270 PyErr_Clear();
1271
1272 Py_BEGIN_ALLOW_THREADS
1273 sipCpp->SetSize(*s);
1274 Py_END_ALLOW_THREADS
1275 sipReleaseType(const_cast< ::wxSize *>(s),sipType_wxSize,sState);
1276
1277 if (PyErr_Occurred())
1278 return 0;
1279
1280 Py_INCREF(Py_None);
1281 return Py_None;
1282 }
1283 }
1284
1285 /* Raise an exception if the arguments couldn't be parsed. */
1286 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetSize, SIP_NULLPTR);
1287
1288 return SIP_NULLPTR;
1289 }
1290
1291
1292 PyDoc_STRVAR(doc_wxRect_SetWidth, "SetWidth(width)\n"
1293 "\n"
1294 "Sets the width.");
1295
1296 extern "C" {static PyObject *meth_wxRect_SetWidth(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetWidth(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1297 static PyObject *meth_wxRect_SetWidth(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1298 {
1299 PyObject *sipParseErr = SIP_NULLPTR;
1300
1301 {
1302 int width;
1303 ::wxRect *sipCpp;
1304
1305 static const char *sipKwdList[] = {
1306 sipName_width,
1307 };
1308
1309 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &width))
1310 {
1311 PyErr_Clear();
1312
1313 Py_BEGIN_ALLOW_THREADS
1314 sipCpp->SetWidth(width);
1315 Py_END_ALLOW_THREADS
1316
1317 if (PyErr_Occurred())
1318 return 0;
1319
1320 Py_INCREF(Py_None);
1321 return Py_None;
1322 }
1323 }
1324
1325 /* Raise an exception if the arguments couldn't be parsed. */
1326 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetWidth, SIP_NULLPTR);
1327
1328 return SIP_NULLPTR;
1329 }
1330
1331
1332 PyDoc_STRVAR(doc_wxRect_SetX, "SetX(x)\n"
1333 "\n"
1334 "Sets the x position.");
1335
1336 extern "C" {static PyObject *meth_wxRect_SetX(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetX(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1337 static PyObject *meth_wxRect_SetX(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1338 {
1339 PyObject *sipParseErr = SIP_NULLPTR;
1340
1341 {
1342 int x;
1343 ::wxRect *sipCpp;
1344
1345 static const char *sipKwdList[] = {
1346 sipName_x,
1347 };
1348
1349 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &x))
1350 {
1351 PyErr_Clear();
1352
1353 Py_BEGIN_ALLOW_THREADS
1354 sipCpp->SetX(x);
1355 Py_END_ALLOW_THREADS
1356
1357 if (PyErr_Occurred())
1358 return 0;
1359
1360 Py_INCREF(Py_None);
1361 return Py_None;
1362 }
1363 }
1364
1365 /* Raise an exception if the arguments couldn't be parsed. */
1366 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetX, SIP_NULLPTR);
1367
1368 return SIP_NULLPTR;
1369 }
1370
1371
1372 PyDoc_STRVAR(doc_wxRect_SetY, "SetY(y)\n"
1373 "\n"
1374 "Sets the y position.");
1375
1376 extern "C" {static PyObject *meth_wxRect_SetY(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetY(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1377 static PyObject *meth_wxRect_SetY(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1378 {
1379 PyObject *sipParseErr = SIP_NULLPTR;
1380
1381 {
1382 int y;
1383 ::wxRect *sipCpp;
1384
1385 static const char *sipKwdList[] = {
1386 sipName_y,
1387 };
1388
1389 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &y))
1390 {
1391 PyErr_Clear();
1392
1393 Py_BEGIN_ALLOW_THREADS
1394 sipCpp->SetY(y);
1395 Py_END_ALLOW_THREADS
1396
1397 if (PyErr_Occurred())
1398 return 0;
1399
1400 Py_INCREF(Py_None);
1401 return Py_None;
1402 }
1403 }
1404
1405 /* Raise an exception if the arguments couldn't be parsed. */
1406 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetY, SIP_NULLPTR);
1407
1408 return SIP_NULLPTR;
1409 }
1410
1411
1412 PyDoc_STRVAR(doc_wxRect_SetLeft, "SetLeft(left)\n"
1413 "\n"
1414 "Set the left side of the rectangle.");
1415
1416 extern "C" {static PyObject *meth_wxRect_SetLeft(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetLeft(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1417 static PyObject *meth_wxRect_SetLeft(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1418 {
1419 PyObject *sipParseErr = SIP_NULLPTR;
1420
1421 {
1422 int left;
1423 ::wxRect *sipCpp;
1424
1425 static const char *sipKwdList[] = {
1426 sipName_left,
1427 };
1428
1429 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &left))
1430 {
1431 PyErr_Clear();
1432
1433 Py_BEGIN_ALLOW_THREADS
1434 sipCpp->SetLeft(left);
1435 Py_END_ALLOW_THREADS
1436
1437 if (PyErr_Occurred())
1438 return 0;
1439
1440 Py_INCREF(Py_None);
1441 return Py_None;
1442 }
1443 }
1444
1445 /* Raise an exception if the arguments couldn't be parsed. */
1446 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetLeft, SIP_NULLPTR);
1447
1448 return SIP_NULLPTR;
1449 }
1450
1451
1452 PyDoc_STRVAR(doc_wxRect_SetRight, "SetRight(right)\n"
1453 "\n"
1454 "Set the right side of the rectangle.");
1455
1456 extern "C" {static PyObject *meth_wxRect_SetRight(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetRight(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1457 static PyObject *meth_wxRect_SetRight(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1458 {
1459 PyObject *sipParseErr = SIP_NULLPTR;
1460
1461 {
1462 int right;
1463 ::wxRect *sipCpp;
1464
1465 static const char *sipKwdList[] = {
1466 sipName_right,
1467 };
1468
1469 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &right))
1470 {
1471 PyErr_Clear();
1472
1473 Py_BEGIN_ALLOW_THREADS
1474 sipCpp->SetRight(right);
1475 Py_END_ALLOW_THREADS
1476
1477 if (PyErr_Occurred())
1478 return 0;
1479
1480 Py_INCREF(Py_None);
1481 return Py_None;
1482 }
1483 }
1484
1485 /* Raise an exception if the arguments couldn't be parsed. */
1486 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetRight, SIP_NULLPTR);
1487
1488 return SIP_NULLPTR;
1489 }
1490
1491
1492 PyDoc_STRVAR(doc_wxRect_SetTop, "SetTop(top)\n"
1493 "\n"
1494 "Set the top edge of the rectangle.");
1495
1496 extern "C" {static PyObject *meth_wxRect_SetTop(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetTop(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1497 static PyObject *meth_wxRect_SetTop(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1498 {
1499 PyObject *sipParseErr = SIP_NULLPTR;
1500
1501 {
1502 int top;
1503 ::wxRect *sipCpp;
1504
1505 static const char *sipKwdList[] = {
1506 sipName_top,
1507 };
1508
1509 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &top))
1510 {
1511 PyErr_Clear();
1512
1513 Py_BEGIN_ALLOW_THREADS
1514 sipCpp->SetTop(top);
1515 Py_END_ALLOW_THREADS
1516
1517 if (PyErr_Occurred())
1518 return 0;
1519
1520 Py_INCREF(Py_None);
1521 return Py_None;
1522 }
1523 }
1524
1525 /* Raise an exception if the arguments couldn't be parsed. */
1526 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetTop, SIP_NULLPTR);
1527
1528 return SIP_NULLPTR;
1529 }
1530
1531
1532 PyDoc_STRVAR(doc_wxRect_SetBottom, "SetBottom(bottom)\n"
1533 "\n"
1534 "Set the bottom edge of the rectangle.");
1535
1536 extern "C" {static PyObject *meth_wxRect_SetBottom(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetBottom(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1537 static PyObject *meth_wxRect_SetBottom(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1538 {
1539 PyObject *sipParseErr = SIP_NULLPTR;
1540
1541 {
1542 int bottom;
1543 ::wxRect *sipCpp;
1544
1545 static const char *sipKwdList[] = {
1546 sipName_bottom,
1547 };
1548
1549 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxRect, &sipCpp, &bottom))
1550 {
1551 PyErr_Clear();
1552
1553 Py_BEGIN_ALLOW_THREADS
1554 sipCpp->SetBottom(bottom);
1555 Py_END_ALLOW_THREADS
1556
1557 if (PyErr_Occurred())
1558 return 0;
1559
1560 Py_INCREF(Py_None);
1561 return Py_None;
1562 }
1563 }
1564
1565 /* Raise an exception if the arguments couldn't be parsed. */
1566 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetBottom, SIP_NULLPTR);
1567
1568 return SIP_NULLPTR;
1569 }
1570
1571
1572 PyDoc_STRVAR(doc_wxRect_SetTopLeft, "SetTopLeft(p)\n"
1573 "\n"
1574 "Set the top-left point of the rectangle.");
1575
1576 extern "C" {static PyObject *meth_wxRect_SetTopLeft(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetTopLeft(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1577 static PyObject *meth_wxRect_SetTopLeft(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1578 {
1579 PyObject *sipParseErr = SIP_NULLPTR;
1580
1581 {
1582 const ::wxPoint* p;
1583 int pState = 0;
1584 ::wxRect *sipCpp;
1585
1586 static const char *sipKwdList[] = {
1587 sipName_p,
1588 };
1589
1590 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxPoint, &p, &pState))
1591 {
1592 PyErr_Clear();
1593
1594 Py_BEGIN_ALLOW_THREADS
1595 sipCpp->SetTopLeft(*p);
1596 Py_END_ALLOW_THREADS
1597 sipReleaseType(const_cast< ::wxPoint *>(p),sipType_wxPoint,pState);
1598
1599 if (PyErr_Occurred())
1600 return 0;
1601
1602 Py_INCREF(Py_None);
1603 return Py_None;
1604 }
1605 }
1606
1607 /* Raise an exception if the arguments couldn't be parsed. */
1608 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetTopLeft, SIP_NULLPTR);
1609
1610 return SIP_NULLPTR;
1611 }
1612
1613
1614 PyDoc_STRVAR(doc_wxRect_SetBottomRight, "SetBottomRight(p)\n"
1615 "\n"
1616 "Set the bottom-right point of the rectangle.");
1617
1618 extern "C" {static PyObject *meth_wxRect_SetBottomRight(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetBottomRight(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1619 static PyObject *meth_wxRect_SetBottomRight(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1620 {
1621 PyObject *sipParseErr = SIP_NULLPTR;
1622
1623 {
1624 const ::wxPoint* p;
1625 int pState = 0;
1626 ::wxRect *sipCpp;
1627
1628 static const char *sipKwdList[] = {
1629 sipName_p,
1630 };
1631
1632 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxPoint, &p, &pState))
1633 {
1634 PyErr_Clear();
1635
1636 Py_BEGIN_ALLOW_THREADS
1637 sipCpp->SetBottomRight(*p);
1638 Py_END_ALLOW_THREADS
1639 sipReleaseType(const_cast< ::wxPoint *>(p),sipType_wxPoint,pState);
1640
1641 if (PyErr_Occurred())
1642 return 0;
1643
1644 Py_INCREF(Py_None);
1645 return Py_None;
1646 }
1647 }
1648
1649 /* Raise an exception if the arguments couldn't be parsed. */
1650 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetBottomRight, SIP_NULLPTR);
1651
1652 return SIP_NULLPTR;
1653 }
1654
1655
1656 PyDoc_STRVAR(doc_wxRect_SetTopRight, "SetTopRight(p)\n"
1657 "\n"
1658 "Set the top-right point of the rectangle.");
1659
1660 extern "C" {static PyObject *meth_wxRect_SetTopRight(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetTopRight(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1661 static PyObject *meth_wxRect_SetTopRight(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1662 {
1663 PyObject *sipParseErr = SIP_NULLPTR;
1664
1665 {
1666 const ::wxPoint* p;
1667 int pState = 0;
1668 ::wxRect *sipCpp;
1669
1670 static const char *sipKwdList[] = {
1671 sipName_p,
1672 };
1673
1674 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxPoint, &p, &pState))
1675 {
1676 PyErr_Clear();
1677
1678 Py_BEGIN_ALLOW_THREADS
1679 sipCpp->SetTopRight(*p);
1680 Py_END_ALLOW_THREADS
1681 sipReleaseType(const_cast< ::wxPoint *>(p),sipType_wxPoint,pState);
1682
1683 if (PyErr_Occurred())
1684 return 0;
1685
1686 Py_INCREF(Py_None);
1687 return Py_None;
1688 }
1689 }
1690
1691 /* Raise an exception if the arguments couldn't be parsed. */
1692 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetTopRight, SIP_NULLPTR);
1693
1694 return SIP_NULLPTR;
1695 }
1696
1697
1698 PyDoc_STRVAR(doc_wxRect_SetBottomLeft, "SetBottomLeft(p)\n"
1699 "\n"
1700 "Set the bottom-left point of the rectangle.");
1701
1702 extern "C" {static PyObject *meth_wxRect_SetBottomLeft(PyObject *, PyObject *, PyObject *);}
meth_wxRect_SetBottomLeft(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1703 static PyObject *meth_wxRect_SetBottomLeft(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1704 {
1705 PyObject *sipParseErr = SIP_NULLPTR;
1706
1707 {
1708 const ::wxPoint* p;
1709 int pState = 0;
1710 ::wxRect *sipCpp;
1711
1712 static const char *sipKwdList[] = {
1713 sipName_p,
1714 };
1715
1716 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRect, &sipCpp, sipType_wxPoint, &p, &pState))
1717 {
1718 PyErr_Clear();
1719
1720 Py_BEGIN_ALLOW_THREADS
1721 sipCpp->SetBottomLeft(*p);
1722 Py_END_ALLOW_THREADS
1723 sipReleaseType(const_cast< ::wxPoint *>(p),sipType_wxPoint,pState);
1724
1725 if (PyErr_Occurred())
1726 return 0;
1727
1728 Py_INCREF(Py_None);
1729 return Py_None;
1730 }
1731 }
1732
1733 /* Raise an exception if the arguments couldn't be parsed. */
1734 sipNoMethod(sipParseErr, sipName_Rect, sipName_SetBottomLeft, SIP_NULLPTR);
1735
1736 return SIP_NULLPTR;
1737 }
1738
1739
1740 PyDoc_STRVAR(doc_wxRect_Get, "Get() -> (x, y, width, height)\n"
1741 "\n"
1742 "Return the rectangle's properties as a tuple.");
1743
1744 extern "C" {static PyObject *meth_wxRect_Get(PyObject *, PyObject *);}
meth_wxRect_Get(PyObject * sipSelf,PyObject * sipArgs)1745 static PyObject *meth_wxRect_Get(PyObject *sipSelf, PyObject *sipArgs)
1746 {
1747 PyObject *sipParseErr = SIP_NULLPTR;
1748
1749 {
1750 ::wxRect *sipCpp;
1751
1752 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRect, &sipCpp))
1753 {
1754 PyObject * sipRes = SIP_NULLPTR;
1755 int sipIsErr = 0;
1756
1757 PyErr_Clear();
1758 Py_BEGIN_ALLOW_THREADS
1759 sipRes = _wxRect_Get(sipCpp);
1760 Py_END_ALLOW_THREADS
1761 if (PyErr_Occurred()) sipIsErr = 1;
1762
1763 if (sipIsErr)
1764 return 0;
1765
1766 return sipRes;
1767 }
1768 }
1769
1770 /* Raise an exception if the arguments couldn't be parsed. */
1771 sipNoMethod(sipParseErr, sipName_Rect, sipName_Get, SIP_NULLPTR);
1772
1773 return SIP_NULLPTR;
1774 }
1775
1776
1777 extern "C" {static PyObject *slot_wxRect___mul__(PyObject *,PyObject *);}
slot_wxRect___mul__(PyObject * sipArg0,PyObject * sipArg1)1778 static PyObject *slot_wxRect___mul__(PyObject *sipArg0,PyObject *sipArg1)
1779 {
1780 PyObject *sipParseErr = SIP_NULLPTR;
1781
1782 {
1783 ::wxRect* a0;
1784 int a0State = 0;
1785 const ::wxRect* other;
1786 int otherState = 0;
1787
1788 if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1", sipType_wxRect, &a0, &a0State, sipType_wxRect, &other, &otherState))
1789 {
1790 ::wxRect*sipRes;
1791
1792 PyErr_Clear();
1793
1794 Py_BEGIN_ALLOW_THREADS
1795 sipRes = new ::wxRect((*a0 * *other));
1796 Py_END_ALLOW_THREADS
1797 sipReleaseType(a0,sipType_wxRect,a0State);
1798 sipReleaseType(const_cast< ::wxRect *>(other),sipType_wxRect,otherState);
1799
1800 if (PyErr_Occurred())
1801 return 0;
1802
1803 return sipConvertFromNewType(sipRes,sipType_wxRect,SIP_NULLPTR);
1804 }
1805 }
1806
1807 Py_XDECREF(sipParseErr);
1808
1809 if (sipParseErr == Py_None)
1810 return SIP_NULLPTR;
1811
1812 return sipPySlotExtend(&sipModuleAPI__core, mul_slot, SIP_NULLPTR, sipArg0, sipArg1);
1813 }
1814
1815
1816 extern "C" {static PyObject *slot_wxRect___add__(PyObject *,PyObject *);}
slot_wxRect___add__(PyObject * sipArg0,PyObject * sipArg1)1817 static PyObject *slot_wxRect___add__(PyObject *sipArg0,PyObject *sipArg1)
1818 {
1819 PyObject *sipParseErr = SIP_NULLPTR;
1820
1821 {
1822 ::wxRect* a0;
1823 int a0State = 0;
1824 const ::wxRect* other;
1825 int otherState = 0;
1826
1827 if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1", sipType_wxRect, &a0, &a0State, sipType_wxRect, &other, &otherState))
1828 {
1829 ::wxRect*sipRes;
1830
1831 PyErr_Clear();
1832
1833 Py_BEGIN_ALLOW_THREADS
1834 sipRes = new ::wxRect((*a0 + *other));
1835 Py_END_ALLOW_THREADS
1836 sipReleaseType(a0,sipType_wxRect,a0State);
1837 sipReleaseType(const_cast< ::wxRect *>(other),sipType_wxRect,otherState);
1838
1839 if (PyErr_Occurred())
1840 return 0;
1841
1842 return sipConvertFromNewType(sipRes,sipType_wxRect,SIP_NULLPTR);
1843 }
1844 }
1845
1846 Py_XDECREF(sipParseErr);
1847
1848 if (sipParseErr == Py_None)
1849 return SIP_NULLPTR;
1850
1851 return sipPySlotExtend(&sipModuleAPI__core, add_slot, SIP_NULLPTR, sipArg0, sipArg1);
1852 }
1853
1854
1855 extern "C" {static PyObject *slot_wxRect___ne__(PyObject *,PyObject *);}
slot_wxRect___ne__(PyObject * sipSelf,PyObject * sipArg)1856 static PyObject *slot_wxRect___ne__(PyObject *sipSelf,PyObject *sipArg)
1857 {
1858 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRect));
1859
1860 if (!sipCpp)
1861 return SIP_NULLPTR;
1862
1863 PyObject *sipParseErr = SIP_NULLPTR;
1864
1865 {
1866 const ::wxRect* other;
1867 int otherState = 0;
1868
1869 if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxRect, &other, &otherState))
1870 {
1871 bool sipRes = 0;
1872 int sipIsErr = 0;
1873
1874 PyErr_Clear();
1875 Py_BEGIN_ALLOW_THREADS
1876 sipRes = _wxRect___ne__(sipCpp, other);
1877 Py_END_ALLOW_THREADS
1878 if (PyErr_Occurred()) sipIsErr = 1;
1879 sipReleaseType(const_cast< ::wxRect *>(other),sipType_wxRect,otherState);
1880
1881 if (sipIsErr)
1882 return 0;
1883
1884 return PyBool_FromLong(sipRes);
1885 }
1886 }
1887
1888 Py_XDECREF(sipParseErr);
1889
1890 if (sipParseErr == Py_None)
1891 return SIP_NULLPTR;
1892
1893 return sipPySlotExtend(&sipModuleAPI__core, ne_slot, sipType_wxRect, sipSelf, sipArg);
1894 }
1895
1896
1897 extern "C" {static PyObject *slot_wxRect___eq__(PyObject *,PyObject *);}
slot_wxRect___eq__(PyObject * sipSelf,PyObject * sipArg)1898 static PyObject *slot_wxRect___eq__(PyObject *sipSelf,PyObject *sipArg)
1899 {
1900 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRect));
1901
1902 if (!sipCpp)
1903 return SIP_NULLPTR;
1904
1905 PyObject *sipParseErr = SIP_NULLPTR;
1906
1907 {
1908 const ::wxRect* other;
1909 int otherState = 0;
1910
1911 if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxRect, &other, &otherState))
1912 {
1913 bool sipRes = 0;
1914 int sipIsErr = 0;
1915
1916 PyErr_Clear();
1917 Py_BEGIN_ALLOW_THREADS
1918 sipRes = _wxRect___eq__(sipCpp, other);
1919 Py_END_ALLOW_THREADS
1920 if (PyErr_Occurred()) sipIsErr = 1;
1921 sipReleaseType(const_cast< ::wxRect *>(other),sipType_wxRect,otherState);
1922
1923 if (sipIsErr)
1924 return 0;
1925
1926 return PyBool_FromLong(sipRes);
1927 }
1928 }
1929
1930 Py_XDECREF(sipParseErr);
1931
1932 if (sipParseErr == Py_None)
1933 return SIP_NULLPTR;
1934
1935 return sipPySlotExtend(&sipModuleAPI__core, eq_slot, sipType_wxRect, sipSelf, sipArg);
1936 }
1937
1938
1939 extern "C" {static PyObject *slot_wxRect___imul__(PyObject *,PyObject *);}
slot_wxRect___imul__(PyObject * sipSelf,PyObject * sipArg)1940 static PyObject *slot_wxRect___imul__(PyObject *sipSelf,PyObject *sipArg)
1941 {
1942 if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_wxRect)))
1943 {
1944 Py_INCREF(Py_NotImplemented);
1945 return Py_NotImplemented;
1946 }
1947
1948 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRect));
1949
1950 if (!sipCpp)
1951 return SIP_NULLPTR;
1952
1953 PyObject *sipParseErr = SIP_NULLPTR;
1954
1955 {
1956 const ::wxRect* r;
1957 int rState = 0;
1958
1959 if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxRect, &r, &rState))
1960 {
1961 PyErr_Clear();
1962
1963 Py_BEGIN_ALLOW_THREADS
1964 sipCpp-> ::wxRect::operator*=(*r);
1965 Py_END_ALLOW_THREADS
1966 sipReleaseType(const_cast< ::wxRect *>(r),sipType_wxRect,rState);
1967
1968 if (PyErr_Occurred())
1969 return 0;
1970
1971 Py_INCREF(sipSelf);
1972 return sipSelf;
1973 }
1974 }
1975
1976 Py_XDECREF(sipParseErr);
1977
1978 if (sipParseErr == Py_None)
1979 return SIP_NULLPTR;
1980
1981 PyErr_Clear();
1982
1983 Py_INCREF(Py_NotImplemented);
1984 return Py_NotImplemented;
1985 }
1986
1987
1988 extern "C" {static PyObject *slot_wxRect___iadd__(PyObject *,PyObject *);}
slot_wxRect___iadd__(PyObject * sipSelf,PyObject * sipArg)1989 static PyObject *slot_wxRect___iadd__(PyObject *sipSelf,PyObject *sipArg)
1990 {
1991 if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_wxRect)))
1992 {
1993 Py_INCREF(Py_NotImplemented);
1994 return Py_NotImplemented;
1995 }
1996
1997 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRect));
1998
1999 if (!sipCpp)
2000 return SIP_NULLPTR;
2001
2002 PyObject *sipParseErr = SIP_NULLPTR;
2003
2004 {
2005 const ::wxRect* r;
2006 int rState = 0;
2007
2008 if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxRect, &r, &rState))
2009 {
2010 PyErr_Clear();
2011
2012 Py_BEGIN_ALLOW_THREADS
2013 sipCpp-> ::wxRect::operator+=(*r);
2014 Py_END_ALLOW_THREADS
2015 sipReleaseType(const_cast< ::wxRect *>(r),sipType_wxRect,rState);
2016
2017 if (PyErr_Occurred())
2018 return 0;
2019
2020 Py_INCREF(sipSelf);
2021 return sipSelf;
2022 }
2023 }
2024
2025 Py_XDECREF(sipParseErr);
2026
2027 if (sipParseErr == Py_None)
2028 return SIP_NULLPTR;
2029
2030 PyErr_Clear();
2031
2032 Py_INCREF(Py_NotImplemented);
2033 return Py_NotImplemented;
2034 }
2035
2036
2037 /* Call the instance's destructor. */
2038 extern "C" {static void release_wxRect(void *, int);}
release_wxRect(void * sipCppV,int)2039 static void release_wxRect(void *sipCppV, int)
2040 {
2041 Py_BEGIN_ALLOW_THREADS
2042
2043 delete reinterpret_cast< ::wxRect *>(sipCppV);
2044
2045 Py_END_ALLOW_THREADS
2046 }
2047
2048
2049 extern "C" {static void assign_wxRect(void *, SIP_SSIZE_T, void *);}
assign_wxRect(void * sipDst,SIP_SSIZE_T sipDstIdx,void * sipSrc)2050 static void assign_wxRect(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
2051 {
2052 reinterpret_cast< ::wxRect *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxRect *>(sipSrc);
2053 }
2054
2055
2056 extern "C" {static void *array_wxRect(SIP_SSIZE_T);}
array_wxRect(SIP_SSIZE_T sipNrElem)2057 static void *array_wxRect(SIP_SSIZE_T sipNrElem)
2058 {
2059 return new ::wxRect[sipNrElem];
2060 }
2061
2062
2063 extern "C" {static void *copy_wxRect(const void *, SIP_SSIZE_T);}
copy_wxRect(const void * sipSrc,SIP_SSIZE_T sipSrcIdx)2064 static void *copy_wxRect(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
2065 {
2066 return new ::wxRect(reinterpret_cast<const ::wxRect *>(sipSrc)[sipSrcIdx]);
2067 }
2068
2069
2070 extern "C" {static void dealloc_wxRect(sipSimpleWrapper *);}
dealloc_wxRect(sipSimpleWrapper * sipSelf)2071 static void dealloc_wxRect(sipSimpleWrapper *sipSelf)
2072 {
2073 if (sipIsOwnedByPython(sipSelf))
2074 {
2075 release_wxRect(sipGetAddress(sipSelf), 0);
2076 }
2077 }
2078
2079
2080 extern "C" {static void *init_type_wxRect(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxRect(sipSimpleWrapper *,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)2081 static void *init_type_wxRect(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
2082 {
2083 ::wxRect *sipCpp = SIP_NULLPTR;
2084
2085 {
2086 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
2087 {
2088 PyErr_Clear();
2089
2090 Py_BEGIN_ALLOW_THREADS
2091 sipCpp = new ::wxRect();
2092 Py_END_ALLOW_THREADS
2093
2094 if (PyErr_Occurred())
2095 {
2096 delete sipCpp;
2097 return SIP_NULLPTR;
2098 }
2099
2100 return sipCpp;
2101 }
2102 }
2103
2104 {
2105 int x;
2106 int y;
2107 int width;
2108 int height;
2109
2110 static const char *sipKwdList[] = {
2111 sipName_x,
2112 sipName_y,
2113 sipName_width,
2114 sipName_height,
2115 };
2116
2117 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "iiii", &x, &y, &width, &height))
2118 {
2119 PyErr_Clear();
2120
2121 Py_BEGIN_ALLOW_THREADS
2122 sipCpp = new ::wxRect(x,y,width,height);
2123 Py_END_ALLOW_THREADS
2124
2125 if (PyErr_Occurred())
2126 {
2127 delete sipCpp;
2128 return SIP_NULLPTR;
2129 }
2130
2131 return sipCpp;
2132 }
2133 }
2134
2135 {
2136 const ::wxPoint* pos;
2137 int posState = 0;
2138 const ::wxSize* size;
2139 int sizeState = 0;
2140
2141 static const char *sipKwdList[] = {
2142 sipName_pos,
2143 sipName_size,
2144 };
2145
2146 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1J1", sipType_wxPoint, &pos, &posState, sipType_wxSize, &size, &sizeState))
2147 {
2148 PyErr_Clear();
2149
2150 Py_BEGIN_ALLOW_THREADS
2151 sipCpp = new ::wxRect(*pos,*size);
2152 Py_END_ALLOW_THREADS
2153 sipReleaseType(const_cast< ::wxPoint *>(pos),sipType_wxPoint,posState);
2154 sipReleaseType(const_cast< ::wxSize *>(size),sipType_wxSize,sizeState);
2155
2156 if (PyErr_Occurred())
2157 {
2158 delete sipCpp;
2159 return SIP_NULLPTR;
2160 }
2161
2162 return sipCpp;
2163 }
2164 }
2165
2166 {
2167 const ::wxSize* size;
2168 int sizeState = 0;
2169
2170 static const char *sipKwdList[] = {
2171 sipName_size,
2172 };
2173
2174 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1", sipType_wxSize, &size, &sizeState))
2175 {
2176 PyErr_Clear();
2177
2178 Py_BEGIN_ALLOW_THREADS
2179 sipCpp = new ::wxRect(*size);
2180 Py_END_ALLOW_THREADS
2181 sipReleaseType(const_cast< ::wxSize *>(size),sipType_wxSize,sizeState);
2182
2183 if (PyErr_Occurred())
2184 {
2185 delete sipCpp;
2186 return SIP_NULLPTR;
2187 }
2188
2189 return sipCpp;
2190 }
2191 }
2192
2193 {
2194 const ::wxPoint* topLeft;
2195 int topLeftState = 0;
2196 const ::wxPoint* bottomRight;
2197 int bottomRightState = 0;
2198
2199 static const char *sipKwdList[] = {
2200 sipName_topLeft,
2201 sipName_bottomRight,
2202 };
2203
2204 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1J1", sipType_wxPoint, &topLeft, &topLeftState, sipType_wxPoint, &bottomRight, &bottomRightState))
2205 {
2206 PyErr_Clear();
2207
2208 Py_BEGIN_ALLOW_THREADS
2209 sipCpp = new ::wxRect(*topLeft,*bottomRight);
2210 Py_END_ALLOW_THREADS
2211 sipReleaseType(const_cast< ::wxPoint *>(topLeft),sipType_wxPoint,topLeftState);
2212 sipReleaseType(const_cast< ::wxPoint *>(bottomRight),sipType_wxPoint,bottomRightState);
2213
2214 if (PyErr_Occurred())
2215 {
2216 delete sipCpp;
2217 return SIP_NULLPTR;
2218 }
2219
2220 return sipCpp;
2221 }
2222 }
2223
2224 {
2225 const ::wxRect* a0;
2226 int a0State = 0;
2227
2228 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_wxRect, &a0, &a0State))
2229 {
2230 Py_BEGIN_ALLOW_THREADS
2231 sipCpp = new ::wxRect(*a0);
2232 Py_END_ALLOW_THREADS
2233 sipReleaseType(const_cast< ::wxRect *>(a0),sipType_wxRect,a0State);
2234
2235 return sipCpp;
2236 }
2237 }
2238
2239 return SIP_NULLPTR;
2240 }
2241
2242
2243 extern "C" {static int convertTo_wxRect(PyObject *, void **, int *, PyObject *);}
convertTo_wxRect(PyObject * sipPy,void ** sipCppPtrV,int * sipIsErr,PyObject * sipTransferObj)2244 static int convertTo_wxRect(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
2245 {
2246 ::wxRect **sipCppPtr = reinterpret_cast< ::wxRect **>(sipCppPtrV);
2247
2248 // is it just a typecheck?
2249 if (!sipIsErr) {
2250 // is it already an instance of wxRect?
2251 if (sipCanConvertToType(sipPy, sipType_wxRect, SIP_NO_CONVERTORS))
2252 return 1;
2253
2254 if (wxPyNumberSequenceCheck(sipPy, 4)) {
2255 return 1;
2256 }
2257 return 0;
2258 }
2259
2260 // otherwise do the conversion
2261 if (sipCanConvertToType(sipPy, sipType_wxRect, SIP_NO_CONVERTORS)) {
2262 // Just fetch the existing instance
2263 *sipCppPtr = reinterpret_cast<wxRect*>(sipConvertToType(
2264 sipPy, sipType_wxRect, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
2265 return 0; // not a new instance
2266 }
2267 // or create a new instance
2268 PyObject* o1 = PySequence_ITEM(sipPy, 0);
2269 PyObject* o2 = PySequence_ITEM(sipPy, 1);
2270 PyObject* o3 = PySequence_ITEM(sipPy, 2);
2271 PyObject* o4 = PySequence_ITEM(sipPy, 3);
2272 *sipCppPtr = new wxRect(wxPyInt_AsLong(o1), wxPyInt_AsLong(o2),
2273 wxPyInt_AsLong(o3), wxPyInt_AsLong(o4));
2274 Py_DECREF(o1);
2275 Py_DECREF(o2);
2276 Py_DECREF(o3);
2277 Py_DECREF(o4);
2278 return SIP_TEMPORARY;
2279 }
2280
2281
2282 /* Define this type's Python slots. */
2283 static sipPySlotDef slots_wxRect[] = {
2284 {(void *)slot_wxRect___mul__, mul_slot},
2285 {(void *)slot_wxRect___add__, add_slot},
2286 {(void *)slot_wxRect___ne__, ne_slot},
2287 {(void *)slot_wxRect___eq__, eq_slot},
2288 {(void *)slot_wxRect___imul__, imul_slot},
2289 {(void *)slot_wxRect___iadd__, iadd_slot},
2290 {0, (sipPySlotType)0}
2291 };
2292
2293
2294 static PyMethodDef methods_wxRect[] = {
2295 {SIP_MLNAME_CAST(sipName_CenterIn), SIP_MLMETH_CAST(meth_wxRect_CenterIn), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_CenterIn)},
2296 {SIP_MLNAME_CAST(sipName_CentreIn), SIP_MLMETH_CAST(meth_wxRect_CentreIn), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_CentreIn)},
2297 {SIP_MLNAME_CAST(sipName_Contains), SIP_MLMETH_CAST(meth_wxRect_Contains), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_Contains)},
2298 {SIP_MLNAME_CAST(sipName_Deflate), SIP_MLMETH_CAST(meth_wxRect_Deflate), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_Deflate)},
2299 {SIP_MLNAME_CAST(sipName_Get), meth_wxRect_Get, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_Get)},
2300 {SIP_MLNAME_CAST(sipName_GetBottom), meth_wxRect_GetBottom, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetBottom)},
2301 {SIP_MLNAME_CAST(sipName_GetBottomLeft), meth_wxRect_GetBottomLeft, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetBottomLeft)},
2302 {SIP_MLNAME_CAST(sipName_GetBottomRight), meth_wxRect_GetBottomRight, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetBottomRight)},
2303 {SIP_MLNAME_CAST(sipName_GetHeight), meth_wxRect_GetHeight, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetHeight)},
2304 {SIP_MLNAME_CAST(sipName_GetLeft), meth_wxRect_GetLeft, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetLeft)},
2305 {SIP_MLNAME_CAST(sipName_GetPosition), meth_wxRect_GetPosition, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetPosition)},
2306 {SIP_MLNAME_CAST(sipName_GetRight), meth_wxRect_GetRight, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetRight)},
2307 {SIP_MLNAME_CAST(sipName_GetSize), meth_wxRect_GetSize, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetSize)},
2308 {SIP_MLNAME_CAST(sipName_GetTop), meth_wxRect_GetTop, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetTop)},
2309 {SIP_MLNAME_CAST(sipName_GetTopLeft), meth_wxRect_GetTopLeft, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetTopLeft)},
2310 {SIP_MLNAME_CAST(sipName_GetTopRight), meth_wxRect_GetTopRight, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetTopRight)},
2311 {SIP_MLNAME_CAST(sipName_GetWidth), meth_wxRect_GetWidth, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetWidth)},
2312 {SIP_MLNAME_CAST(sipName_GetX), meth_wxRect_GetX, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetX)},
2313 {SIP_MLNAME_CAST(sipName_GetY), meth_wxRect_GetY, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_GetY)},
2314 {SIP_MLNAME_CAST(sipName_Inflate), SIP_MLMETH_CAST(meth_wxRect_Inflate), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_Inflate)},
2315 {SIP_MLNAME_CAST(sipName_Intersect), SIP_MLMETH_CAST(meth_wxRect_Intersect), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_Intersect)},
2316 {SIP_MLNAME_CAST(sipName_Intersects), SIP_MLMETH_CAST(meth_wxRect_Intersects), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_Intersects)},
2317 {SIP_MLNAME_CAST(sipName_IsEmpty), meth_wxRect_IsEmpty, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRect_IsEmpty)},
2318 {SIP_MLNAME_CAST(sipName_Offset), SIP_MLMETH_CAST(meth_wxRect_Offset), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_Offset)},
2319 {SIP_MLNAME_CAST(sipName_SetBottom), SIP_MLMETH_CAST(meth_wxRect_SetBottom), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetBottom)},
2320 {SIP_MLNAME_CAST(sipName_SetBottomLeft), SIP_MLMETH_CAST(meth_wxRect_SetBottomLeft), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetBottomLeft)},
2321 {SIP_MLNAME_CAST(sipName_SetBottomRight), SIP_MLMETH_CAST(meth_wxRect_SetBottomRight), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetBottomRight)},
2322 {SIP_MLNAME_CAST(sipName_SetHeight), SIP_MLMETH_CAST(meth_wxRect_SetHeight), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetHeight)},
2323 {SIP_MLNAME_CAST(sipName_SetLeft), SIP_MLMETH_CAST(meth_wxRect_SetLeft), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetLeft)},
2324 {SIP_MLNAME_CAST(sipName_SetPosition), SIP_MLMETH_CAST(meth_wxRect_SetPosition), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetPosition)},
2325 {SIP_MLNAME_CAST(sipName_SetRight), SIP_MLMETH_CAST(meth_wxRect_SetRight), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetRight)},
2326 {SIP_MLNAME_CAST(sipName_SetSize), SIP_MLMETH_CAST(meth_wxRect_SetSize), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetSize)},
2327 {SIP_MLNAME_CAST(sipName_SetTop), SIP_MLMETH_CAST(meth_wxRect_SetTop), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetTop)},
2328 {SIP_MLNAME_CAST(sipName_SetTopLeft), SIP_MLMETH_CAST(meth_wxRect_SetTopLeft), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetTopLeft)},
2329 {SIP_MLNAME_CAST(sipName_SetTopRight), SIP_MLMETH_CAST(meth_wxRect_SetTopRight), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetTopRight)},
2330 {SIP_MLNAME_CAST(sipName_SetWidth), SIP_MLMETH_CAST(meth_wxRect_SetWidth), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetWidth)},
2331 {SIP_MLNAME_CAST(sipName_SetX), SIP_MLMETH_CAST(meth_wxRect_SetX), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetX)},
2332 {SIP_MLNAME_CAST(sipName_SetY), SIP_MLMETH_CAST(meth_wxRect_SetY), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_SetY)},
2333 {SIP_MLNAME_CAST(sipName_Union), SIP_MLMETH_CAST(meth_wxRect_Union), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRect_Union)}
2334 };
2335
2336
2337 extern "C" {static PyObject *varget_wxRect_height(void *, PyObject *, PyObject *);}
varget_wxRect_height(void * sipSelf,PyObject *,PyObject *)2338 static PyObject *varget_wxRect_height(void *sipSelf, PyObject *, PyObject *)
2339 {
2340 int sipVal;
2341 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipSelf);
2342
2343 sipVal = sipCpp->height;
2344
2345 return SIPLong_FromLong(sipVal);
2346 }
2347
2348
2349 extern "C" {static int varset_wxRect_height(void *, PyObject *, PyObject *);}
varset_wxRect_height(void * sipSelf,PyObject * sipPy,PyObject *)2350 static int varset_wxRect_height(void *sipSelf, PyObject *sipPy, PyObject *)
2351 {
2352 int sipVal;
2353 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipSelf);
2354
2355 sipVal = sipLong_AsInt(sipPy);
2356
2357 if (PyErr_Occurred() != SIP_NULLPTR)
2358 return -1;
2359
2360 sipCpp->height = sipVal;
2361
2362 return 0;
2363 }
2364
2365
2366 extern "C" {static PyObject *varget_wxRect_width(void *, PyObject *, PyObject *);}
varget_wxRect_width(void * sipSelf,PyObject *,PyObject *)2367 static PyObject *varget_wxRect_width(void *sipSelf, PyObject *, PyObject *)
2368 {
2369 int sipVal;
2370 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipSelf);
2371
2372 sipVal = sipCpp->width;
2373
2374 return SIPLong_FromLong(sipVal);
2375 }
2376
2377
2378 extern "C" {static int varset_wxRect_width(void *, PyObject *, PyObject *);}
varset_wxRect_width(void * sipSelf,PyObject * sipPy,PyObject *)2379 static int varset_wxRect_width(void *sipSelf, PyObject *sipPy, PyObject *)
2380 {
2381 int sipVal;
2382 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipSelf);
2383
2384 sipVal = sipLong_AsInt(sipPy);
2385
2386 if (PyErr_Occurred() != SIP_NULLPTR)
2387 return -1;
2388
2389 sipCpp->width = sipVal;
2390
2391 return 0;
2392 }
2393
2394
2395 extern "C" {static PyObject *varget_wxRect_x(void *, PyObject *, PyObject *);}
varget_wxRect_x(void * sipSelf,PyObject *,PyObject *)2396 static PyObject *varget_wxRect_x(void *sipSelf, PyObject *, PyObject *)
2397 {
2398 int sipVal;
2399 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipSelf);
2400
2401 sipVal = sipCpp->x;
2402
2403 return SIPLong_FromLong(sipVal);
2404 }
2405
2406
2407 extern "C" {static int varset_wxRect_x(void *, PyObject *, PyObject *);}
varset_wxRect_x(void * sipSelf,PyObject * sipPy,PyObject *)2408 static int varset_wxRect_x(void *sipSelf, PyObject *sipPy, PyObject *)
2409 {
2410 int sipVal;
2411 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipSelf);
2412
2413 sipVal = sipLong_AsInt(sipPy);
2414
2415 if (PyErr_Occurred() != SIP_NULLPTR)
2416 return -1;
2417
2418 sipCpp->x = sipVal;
2419
2420 return 0;
2421 }
2422
2423
2424 extern "C" {static PyObject *varget_wxRect_y(void *, PyObject *, PyObject *);}
varget_wxRect_y(void * sipSelf,PyObject *,PyObject *)2425 static PyObject *varget_wxRect_y(void *sipSelf, PyObject *, PyObject *)
2426 {
2427 int sipVal;
2428 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipSelf);
2429
2430 sipVal = sipCpp->y;
2431
2432 return SIPLong_FromLong(sipVal);
2433 }
2434
2435
2436 extern "C" {static int varset_wxRect_y(void *, PyObject *, PyObject *);}
varset_wxRect_y(void * sipSelf,PyObject * sipPy,PyObject *)2437 static int varset_wxRect_y(void *sipSelf, PyObject *sipPy, PyObject *)
2438 {
2439 int sipVal;
2440 ::wxRect *sipCpp = reinterpret_cast< ::wxRect *>(sipSelf);
2441
2442 sipVal = sipLong_AsInt(sipPy);
2443
2444 if (PyErr_Occurred() != SIP_NULLPTR)
2445 return -1;
2446
2447 sipCpp->y = sipVal;
2448
2449 return 0;
2450 }
2451
2452 sipVariableDef variables_wxRect[] = {
2453 {PropertyVariable, sipName_topRight, &methods_wxRect[15], &methods_wxRect[34], SIP_NULLPTR, SIP_NULLPTR},
2454 {PropertyVariable, sipName_topLeft, &methods_wxRect[14], &methods_wxRect[33], SIP_NULLPTR, SIP_NULLPTR},
2455 {PropertyVariable, sipName_bottomRight, &methods_wxRect[7], &methods_wxRect[26], SIP_NULLPTR, SIP_NULLPTR},
2456 {PropertyVariable, sipName_bottomLeft, &methods_wxRect[6], &methods_wxRect[25], SIP_NULLPTR, SIP_NULLPTR},
2457 {PropertyVariable, sipName_bottom, &methods_wxRect[5], &methods_wxRect[24], SIP_NULLPTR, SIP_NULLPTR},
2458 {PropertyVariable, sipName_right, &methods_wxRect[11], &methods_wxRect[30], SIP_NULLPTR, SIP_NULLPTR},
2459 {PropertyVariable, sipName_top, &methods_wxRect[13], &methods_wxRect[32], SIP_NULLPTR, SIP_NULLPTR},
2460 {PropertyVariable, sipName_left, &methods_wxRect[9], &methods_wxRect[28], SIP_NULLPTR, SIP_NULLPTR},
2461 {PropertyVariable, sipName_Y, &methods_wxRect[18], &methods_wxRect[37], SIP_NULLPTR, SIP_NULLPTR},
2462 {PropertyVariable, sipName_X, &methods_wxRect[17], &methods_wxRect[36], SIP_NULLPTR, SIP_NULLPTR},
2463 {PropertyVariable, sipName_Width, &methods_wxRect[16], &methods_wxRect[35], SIP_NULLPTR, SIP_NULLPTR},
2464 {PropertyVariable, sipName_TopRight, &methods_wxRect[15], &methods_wxRect[34], SIP_NULLPTR, SIP_NULLPTR},
2465 {PropertyVariable, sipName_TopLeft, &methods_wxRect[14], &methods_wxRect[33], SIP_NULLPTR, SIP_NULLPTR},
2466 {PropertyVariable, sipName_Top, &methods_wxRect[13], &methods_wxRect[32], SIP_NULLPTR, SIP_NULLPTR},
2467 {PropertyVariable, sipName_Size, &methods_wxRect[12], &methods_wxRect[31], SIP_NULLPTR, SIP_NULLPTR},
2468 {PropertyVariable, sipName_Right, &methods_wxRect[11], &methods_wxRect[30], SIP_NULLPTR, SIP_NULLPTR},
2469 {PropertyVariable, sipName_Position, &methods_wxRect[10], &methods_wxRect[29], SIP_NULLPTR, SIP_NULLPTR},
2470 {PropertyVariable, sipName_Left, &methods_wxRect[9], &methods_wxRect[28], SIP_NULLPTR, SIP_NULLPTR},
2471 {PropertyVariable, sipName_Height, &methods_wxRect[8], &methods_wxRect[27], SIP_NULLPTR, SIP_NULLPTR},
2472 {PropertyVariable, sipName_BottomRight, &methods_wxRect[7], &methods_wxRect[26], SIP_NULLPTR, SIP_NULLPTR},
2473 {PropertyVariable, sipName_BottomLeft, &methods_wxRect[6], &methods_wxRect[25], SIP_NULLPTR, SIP_NULLPTR},
2474 {PropertyVariable, sipName_Bottom, &methods_wxRect[5], &methods_wxRect[24], SIP_NULLPTR, SIP_NULLPTR},
2475 {InstanceVariable, sipName_height, (PyMethodDef *)varget_wxRect_height, (PyMethodDef *)varset_wxRect_height, SIP_NULLPTR, SIP_NULLPTR},
2476 {InstanceVariable, sipName_width, (PyMethodDef *)varget_wxRect_width, (PyMethodDef *)varset_wxRect_width, SIP_NULLPTR, SIP_NULLPTR},
2477 {InstanceVariable, sipName_x, (PyMethodDef *)varget_wxRect_x, (PyMethodDef *)varset_wxRect_x, SIP_NULLPTR, SIP_NULLPTR},
2478 {InstanceVariable, sipName_y, (PyMethodDef *)varget_wxRect_y, (PyMethodDef *)varset_wxRect_y, SIP_NULLPTR, SIP_NULLPTR},
2479 };
2480
2481 PyDoc_STRVAR(doc_wxRect, "Rect()\n"
2482 "Rect(x, y, width, height)\n"
2483 "Rect(pos, size)\n"
2484 "Rect(size)\n"
2485 "Rect(topLeft, bottomRight)\n"
2486 "\n"
2487 "A class for manipulating rectangles.");
2488
2489
2490 sipClassTypeDef sipTypeDef__core_wxRect = {
2491 {
2492 -1,
2493 SIP_NULLPTR,
2494 SIP_NULLPTR,
2495 SIP_TYPE_CLASS,
2496 sipNameNr_wxRect,
2497 {SIP_NULLPTR},
2498 SIP_NULLPTR
2499 },
2500 {
2501 sipNameNr_Rect,
2502 {0, 0, 1},
2503 39, methods_wxRect,
2504 0, SIP_NULLPTR,
2505 26, variables_wxRect,
2506 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
2507 },
2508 doc_wxRect,
2509 -1,
2510 -1,
2511 SIP_NULLPTR,
2512 slots_wxRect,
2513 init_type_wxRect,
2514 SIP_NULLPTR,
2515 SIP_NULLPTR,
2516 #if PY_MAJOR_VERSION >= 3
2517 SIP_NULLPTR,
2518 SIP_NULLPTR,
2519 #else
2520 SIP_NULLPTR,
2521 SIP_NULLPTR,
2522 SIP_NULLPTR,
2523 SIP_NULLPTR,
2524 #endif
2525 dealloc_wxRect,
2526 assign_wxRect,
2527 array_wxRect,
2528 copy_wxRect,
2529 release_wxRect,
2530 SIP_NULLPTR,
2531 convertTo_wxRect,
2532 SIP_NULLPTR,
2533 SIP_NULLPTR,
2534 SIP_NULLPTR,
2535 SIP_NULLPTR,
2536 SIP_NULLPTR
2537 };
2538