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/vscroll.h>
13
14 #include <wx/window.h>
15
16
17 class sipwxVarVScrollHelper : public ::wxVarVScrollHelper
18 {
19 public:
20 sipwxVarVScrollHelper( ::wxWindow*);
21 sipwxVarVScrollHelper(const ::wxVarVScrollHelper&);
22 virtual ~sipwxVarVScrollHelper();
23
24 /*
25 * There is a public method for every protected method visible from
26 * this class.
27 */
28 void sipProtectVirt_OnGetRowsHeightHint(bool,size_t,size_t) const;
29 ::wxCoord sipProtectVirt_EstimateTotalHeight(bool) const;
30 ::wxCoord sipProtect_OnGetRowHeight(size_t) const;
31 void sipProtectVirt_OnGetUnitsSizeHint(bool,size_t,size_t) const;
32 ::wxCoord sipProtectVirt_EstimateTotalSize(bool) const;
33 int sipProtectVirt_GetNonOrientationTargetSize(bool) const;
34 ::wxOrientation sipProtectVirt_GetOrientation(bool) const;
35 int sipProtectVirt_GetOrientationTargetSize(bool) const;
36 ::wxCoord sipProtectVirt_OnGetUnitSize(bool,size_t) const;
37
38 /*
39 * There is a protected method for every virtual method visible from
40 * this class.
41 */
42 protected:
43 ::wxCoord OnGetRowHeight(size_t) const SIP_OVERRIDE;
44 ::wxCoord EstimateTotalHeight() const SIP_OVERRIDE;
45 void OnGetRowsHeightHint(size_t,size_t) const SIP_OVERRIDE;
46 bool ScrollRows(int) SIP_OVERRIDE;
47 bool ScrollRowPages(int) SIP_OVERRIDE;
48 void RefreshRows(size_t,size_t) SIP_OVERRIDE;
49 void RefreshRow(size_t) SIP_OVERRIDE;
50 int GetNonOrientationTargetSize() const SIP_OVERRIDE;
51 ::wxOrientation GetOrientation() const SIP_OVERRIDE;
52 int GetOrientationTargetSize() const SIP_OVERRIDE;
53 void OnGetUnitsSizeHint(size_t,size_t) const SIP_OVERRIDE;
54 ::wxCoord EstimateTotalSize() const SIP_OVERRIDE;
55 ::wxCoord OnGetUnitSize(size_t) const SIP_OVERRIDE;
56
57 public:
58 sipSimpleWrapper *sipPySelf;
59
60 private:
61 sipwxVarVScrollHelper(const sipwxVarVScrollHelper &);
62 sipwxVarVScrollHelper &operator = (const sipwxVarVScrollHelper &);
63
64 char sipPyMethods[13];
65 };
66
sipwxVarVScrollHelper(::wxWindow * winToScroll)67 sipwxVarVScrollHelper::sipwxVarVScrollHelper( ::wxWindow*winToScroll): ::wxVarVScrollHelper(winToScroll), sipPySelf(SIP_NULLPTR)
68 {
69 memset(sipPyMethods, 0, sizeof (sipPyMethods));
70 }
71
sipwxVarVScrollHelper(const::wxVarVScrollHelper & a0)72 sipwxVarVScrollHelper::sipwxVarVScrollHelper(const ::wxVarVScrollHelper& a0): ::wxVarVScrollHelper(a0), sipPySelf(SIP_NULLPTR)
73 {
74 memset(sipPyMethods, 0, sizeof (sipPyMethods));
75 }
76
~sipwxVarVScrollHelper()77 sipwxVarVScrollHelper::~sipwxVarVScrollHelper()
78 {
79 sipInstanceDestroyedEx(&sipPySelf);
80 }
81
OnGetRowHeight(size_t row) const82 ::wxCoord sipwxVarVScrollHelper::OnGetRowHeight(size_t row) const
83 {
84 sip_gilstate_t sipGILState;
85 PyObject *sipMeth;
86
87 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,sipName_VarVScrollHelper,sipName_OnGetRowHeight);
88
89 if (!sipMeth)
90 return 0;
91
92 extern ::wxCoord sipVH__core_130(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, size_t);
93
94 return sipVH__core_130(sipGILState, 0, sipPySelf, sipMeth, row);
95 }
96
EstimateTotalHeight() const97 ::wxCoord sipwxVarVScrollHelper::EstimateTotalHeight() const
98 {
99 sip_gilstate_t sipGILState;
100 PyObject *sipMeth;
101
102 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,SIP_NULLPTR,sipName_EstimateTotalHeight);
103
104 if (!sipMeth)
105 return ::wxVarVScrollHelper::EstimateTotalHeight();
106
107 extern ::wxCoord sipVH__core_97(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
108
109 return sipVH__core_97(sipGILState, 0, sipPySelf, sipMeth);
110 }
111
OnGetRowsHeightHint(size_t rowMin,size_t rowMax) const112 void sipwxVarVScrollHelper::OnGetRowsHeightHint(size_t rowMin,size_t rowMax) const
113 {
114 sip_gilstate_t sipGILState;
115 PyObject *sipMeth;
116
117 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[2]),sipPySelf,SIP_NULLPTR,sipName_OnGetRowsHeightHint);
118
119 if (!sipMeth)
120 {
121 ::wxVarVScrollHelper::OnGetRowsHeightHint(rowMin,rowMax);
122 return;
123 }
124
125 extern void sipVH__core_129(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, size_t,size_t);
126
127 sipVH__core_129(sipGILState, 0, sipPySelf, sipMeth, rowMin, rowMax);
128 }
129
ScrollRows(int rows)130 bool sipwxVarVScrollHelper::ScrollRows(int rows)
131 {
132 sip_gilstate_t sipGILState;
133 PyObject *sipMeth;
134
135 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,SIP_NULLPTR,sipName_ScrollRows);
136
137 if (!sipMeth)
138 return ::wxVarVScrollHelper::ScrollRows(rows);
139
140 extern bool sipVH__core_132(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);
141
142 return sipVH__core_132(sipGILState, 0, sipPySelf, sipMeth, rows);
143 }
144
ScrollRowPages(int pages)145 bool sipwxVarVScrollHelper::ScrollRowPages(int pages)
146 {
147 sip_gilstate_t sipGILState;
148 PyObject *sipMeth;
149
150 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,SIP_NULLPTR,sipName_ScrollRowPages);
151
152 if (!sipMeth)
153 return ::wxVarVScrollHelper::ScrollRowPages(pages);
154
155 extern bool sipVH__core_132(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);
156
157 return sipVH__core_132(sipGILState, 0, sipPySelf, sipMeth, pages);
158 }
159
RefreshRows(size_t from_,size_t to_)160 void sipwxVarVScrollHelper::RefreshRows(size_t from_,size_t to_)
161 {
162 sip_gilstate_t sipGILState;
163 PyObject *sipMeth;
164
165 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,SIP_NULLPTR,sipName_RefreshRows);
166
167 if (!sipMeth)
168 {
169 ::wxVarVScrollHelper::RefreshRows(from_,to_);
170 return;
171 }
172
173 extern void sipVH__core_129(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, size_t,size_t);
174
175 sipVH__core_129(sipGILState, 0, sipPySelf, sipMeth, from_, to_);
176 }
177
RefreshRow(size_t row)178 void sipwxVarVScrollHelper::RefreshRow(size_t row)
179 {
180 sip_gilstate_t sipGILState;
181 PyObject *sipMeth;
182
183 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,SIP_NULLPTR,sipName_RefreshRow);
184
185 if (!sipMeth)
186 {
187 ::wxVarVScrollHelper::RefreshRow(row);
188 return;
189 }
190
191 extern void sipVH__core_131(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, size_t);
192
193 sipVH__core_131(sipGILState, 0, sipPySelf, sipMeth, row);
194 }
195
GetNonOrientationTargetSize() const196 int sipwxVarVScrollHelper::GetNonOrientationTargetSize() const
197 {
198 sip_gilstate_t sipGILState;
199 PyObject *sipMeth;
200
201 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[7]),sipPySelf,SIP_NULLPTR,sipName_GetNonOrientationTargetSize);
202
203 if (!sipMeth)
204 return ::wxVarVScrollHelper::GetNonOrientationTargetSize();
205
206 extern int sipVH__core_97(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
207
208 return sipVH__core_97(sipGILState, 0, sipPySelf, sipMeth);
209 }
210
GetOrientation() const211 ::wxOrientation sipwxVarVScrollHelper::GetOrientation() const
212 {
213 sip_gilstate_t sipGILState;
214 PyObject *sipMeth;
215
216 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[8]),sipPySelf,SIP_NULLPTR,sipName_GetOrientation);
217
218 if (!sipMeth)
219 return ::wxVarVScrollHelper::GetOrientation();
220
221 extern ::wxOrientation sipVH__core_128(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
222
223 return sipVH__core_128(sipGILState, 0, sipPySelf, sipMeth);
224 }
225
GetOrientationTargetSize() const226 int sipwxVarVScrollHelper::GetOrientationTargetSize() const
227 {
228 sip_gilstate_t sipGILState;
229 PyObject *sipMeth;
230
231 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[9]),sipPySelf,SIP_NULLPTR,sipName_GetOrientationTargetSize);
232
233 if (!sipMeth)
234 return ::wxVarVScrollHelper::GetOrientationTargetSize();
235
236 extern int sipVH__core_97(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
237
238 return sipVH__core_97(sipGILState, 0, sipPySelf, sipMeth);
239 }
240
OnGetUnitsSizeHint(size_t unitMin,size_t unitMax) const241 void sipwxVarVScrollHelper::OnGetUnitsSizeHint(size_t unitMin,size_t unitMax) const
242 {
243 sip_gilstate_t sipGILState;
244 PyObject *sipMeth;
245
246 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[10]),sipPySelf,SIP_NULLPTR,sipName_OnGetUnitsSizeHint);
247
248 if (!sipMeth)
249 {
250 ::wxVarVScrollHelper::OnGetUnitsSizeHint(unitMin,unitMax);
251 return;
252 }
253
254 extern void sipVH__core_129(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, size_t,size_t);
255
256 sipVH__core_129(sipGILState, 0, sipPySelf, sipMeth, unitMin, unitMax);
257 }
258
EstimateTotalSize() const259 ::wxCoord sipwxVarVScrollHelper::EstimateTotalSize() const
260 {
261 sip_gilstate_t sipGILState;
262 PyObject *sipMeth;
263
264 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[11]),sipPySelf,SIP_NULLPTR,sipName_EstimateTotalSize);
265
266 if (!sipMeth)
267 return ::wxVarVScrollHelper::EstimateTotalSize();
268
269 extern ::wxCoord sipVH__core_97(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
270
271 return sipVH__core_97(sipGILState, 0, sipPySelf, sipMeth);
272 }
273
OnGetUnitSize(size_t unit) const274 ::wxCoord sipwxVarVScrollHelper::OnGetUnitSize(size_t unit) const
275 {
276 sip_gilstate_t sipGILState;
277 PyObject *sipMeth;
278
279 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[12]),sipPySelf,SIP_NULLPTR,sipName_OnGetUnitSize);
280
281 if (!sipMeth)
282 return ::wxVarVScrollHelper::OnGetUnitSize(unit);
283
284 extern ::wxCoord sipVH__core_130(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, size_t);
285
286 return sipVH__core_130(sipGILState, 0, sipPySelf, sipMeth, unit);
287 }
288
sipProtectVirt_OnGetRowsHeightHint(bool sipSelfWasArg,size_t rowMin,size_t rowMax) const289 void sipwxVarVScrollHelper::sipProtectVirt_OnGetRowsHeightHint(bool sipSelfWasArg,size_t rowMin,size_t rowMax) const
290 {
291 (sipSelfWasArg ? ::wxVarVScrollHelper::OnGetRowsHeightHint(rowMin,rowMax) : OnGetRowsHeightHint(rowMin,rowMax));
292 }
293
sipProtectVirt_EstimateTotalHeight(bool sipSelfWasArg) const294 ::wxCoord sipwxVarVScrollHelper::sipProtectVirt_EstimateTotalHeight(bool sipSelfWasArg) const
295 {
296 return (sipSelfWasArg ? ::wxVarVScrollHelper::EstimateTotalHeight() : EstimateTotalHeight());
297 }
298
sipProtect_OnGetRowHeight(size_t row) const299 ::wxCoord sipwxVarVScrollHelper::sipProtect_OnGetRowHeight(size_t row) const
300 {
301 return OnGetRowHeight(row);
302 }
303
sipProtectVirt_OnGetUnitsSizeHint(bool sipSelfWasArg,size_t unitMin,size_t unitMax) const304 void sipwxVarVScrollHelper::sipProtectVirt_OnGetUnitsSizeHint(bool sipSelfWasArg,size_t unitMin,size_t unitMax) const
305 {
306 (sipSelfWasArg ? ::wxVarVScrollHelper::OnGetUnitsSizeHint(unitMin,unitMax) : OnGetUnitsSizeHint(unitMin,unitMax));
307 }
308
sipProtectVirt_EstimateTotalSize(bool sipSelfWasArg) const309 ::wxCoord sipwxVarVScrollHelper::sipProtectVirt_EstimateTotalSize(bool sipSelfWasArg) const
310 {
311 return (sipSelfWasArg ? ::wxVarVScrollHelper::EstimateTotalSize() : EstimateTotalSize());
312 }
313
sipProtectVirt_GetNonOrientationTargetSize(bool sipSelfWasArg) const314 int sipwxVarVScrollHelper::sipProtectVirt_GetNonOrientationTargetSize(bool sipSelfWasArg) const
315 {
316 return (sipSelfWasArg ? ::wxVarVScrollHelper::GetNonOrientationTargetSize() : GetNonOrientationTargetSize());
317 }
318
sipProtectVirt_GetOrientation(bool sipSelfWasArg) const319 ::wxOrientation sipwxVarVScrollHelper::sipProtectVirt_GetOrientation(bool sipSelfWasArg) const
320 {
321 return (sipSelfWasArg ? ::wxVarVScrollHelper::GetOrientation() : GetOrientation());
322 }
323
sipProtectVirt_GetOrientationTargetSize(bool sipSelfWasArg) const324 int sipwxVarVScrollHelper::sipProtectVirt_GetOrientationTargetSize(bool sipSelfWasArg) const
325 {
326 return (sipSelfWasArg ? ::wxVarVScrollHelper::GetOrientationTargetSize() : GetOrientationTargetSize());
327 }
328
sipProtectVirt_OnGetUnitSize(bool sipSelfWasArg,size_t unit) const329 ::wxCoord sipwxVarVScrollHelper::sipProtectVirt_OnGetUnitSize(bool sipSelfWasArg,size_t unit) const
330 {
331 return (sipSelfWasArg ? ::wxVarVScrollHelper::OnGetUnitSize(unit) : OnGetUnitSize(unit));
332 }
333
334
335 PyDoc_STRVAR(doc_wxVarVScrollHelper_GetRowCount, "GetRowCount() -> size_t\n"
336 "\n"
337 "Returns the number of rows the target window contains.");
338
339 extern "C" {static PyObject *meth_wxVarVScrollHelper_GetRowCount(PyObject *, PyObject *);}
meth_wxVarVScrollHelper_GetRowCount(PyObject * sipSelf,PyObject * sipArgs)340 static PyObject *meth_wxVarVScrollHelper_GetRowCount(PyObject *sipSelf, PyObject *sipArgs)
341 {
342 PyObject *sipParseErr = SIP_NULLPTR;
343
344 {
345 const ::wxVarVScrollHelper *sipCpp;
346
347 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp))
348 {
349 size_t sipRes;
350
351 PyErr_Clear();
352
353 Py_BEGIN_ALLOW_THREADS
354 sipRes = sipCpp->GetRowCount();
355 Py_END_ALLOW_THREADS
356
357 if (PyErr_Occurred())
358 return 0;
359
360 return PyLong_FromUnsignedLong(sipRes);
361 }
362 }
363
364 /* Raise an exception if the arguments couldn't be parsed. */
365 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_GetRowCount, SIP_NULLPTR);
366
367 return SIP_NULLPTR;
368 }
369
370
371 PyDoc_STRVAR(doc_wxVarVScrollHelper_GetVisibleRowsBegin, "GetVisibleRowsBegin() -> size_t\n"
372 "\n"
373 "Returns the index of the first visible row based on the scroll\n"
374 "position.");
375
376 extern "C" {static PyObject *meth_wxVarVScrollHelper_GetVisibleRowsBegin(PyObject *, PyObject *);}
meth_wxVarVScrollHelper_GetVisibleRowsBegin(PyObject * sipSelf,PyObject * sipArgs)377 static PyObject *meth_wxVarVScrollHelper_GetVisibleRowsBegin(PyObject *sipSelf, PyObject *sipArgs)
378 {
379 PyObject *sipParseErr = SIP_NULLPTR;
380
381 {
382 const ::wxVarVScrollHelper *sipCpp;
383
384 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp))
385 {
386 size_t sipRes;
387
388 PyErr_Clear();
389
390 Py_BEGIN_ALLOW_THREADS
391 sipRes = sipCpp->GetVisibleRowsBegin();
392 Py_END_ALLOW_THREADS
393
394 if (PyErr_Occurred())
395 return 0;
396
397 return PyLong_FromUnsignedLong(sipRes);
398 }
399 }
400
401 /* Raise an exception if the arguments couldn't be parsed. */
402 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_GetVisibleRowsBegin, SIP_NULLPTR);
403
404 return SIP_NULLPTR;
405 }
406
407
408 PyDoc_STRVAR(doc_wxVarVScrollHelper_GetVisibleRowsEnd, "GetVisibleRowsEnd() -> size_t\n"
409 "\n"
410 "Returns the index of the last visible row based on the scroll\n"
411 "position.");
412
413 extern "C" {static PyObject *meth_wxVarVScrollHelper_GetVisibleRowsEnd(PyObject *, PyObject *);}
meth_wxVarVScrollHelper_GetVisibleRowsEnd(PyObject * sipSelf,PyObject * sipArgs)414 static PyObject *meth_wxVarVScrollHelper_GetVisibleRowsEnd(PyObject *sipSelf, PyObject *sipArgs)
415 {
416 PyObject *sipParseErr = SIP_NULLPTR;
417
418 {
419 const ::wxVarVScrollHelper *sipCpp;
420
421 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp))
422 {
423 size_t sipRes;
424
425 PyErr_Clear();
426
427 Py_BEGIN_ALLOW_THREADS
428 sipRes = sipCpp->GetVisibleRowsEnd();
429 Py_END_ALLOW_THREADS
430
431 if (PyErr_Occurred())
432 return 0;
433
434 return PyLong_FromUnsignedLong(sipRes);
435 }
436 }
437
438 /* Raise an exception if the arguments couldn't be parsed. */
439 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_GetVisibleRowsEnd, SIP_NULLPTR);
440
441 return SIP_NULLPTR;
442 }
443
444
445 PyDoc_STRVAR(doc_wxVarVScrollHelper_IsRowVisible, "IsRowVisible(row) -> bool\n"
446 "\n"
447 "Returns true if the given row is currently visible (even if only\n"
448 "partially visible) or false otherwise.");
449
450 extern "C" {static PyObject *meth_wxVarVScrollHelper_IsRowVisible(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_IsRowVisible(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)451 static PyObject *meth_wxVarVScrollHelper_IsRowVisible(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
452 {
453 PyObject *sipParseErr = SIP_NULLPTR;
454
455 {
456 size_t row;
457 const ::wxVarVScrollHelper *sipCpp;
458
459 static const char *sipKwdList[] = {
460 sipName_row,
461 };
462
463 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B=", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &row))
464 {
465 bool sipRes;
466
467 PyErr_Clear();
468
469 Py_BEGIN_ALLOW_THREADS
470 sipRes = sipCpp->IsRowVisible(row);
471 Py_END_ALLOW_THREADS
472
473 if (PyErr_Occurred())
474 return 0;
475
476 return PyBool_FromLong(sipRes);
477 }
478 }
479
480 /* Raise an exception if the arguments couldn't be parsed. */
481 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_IsRowVisible, SIP_NULLPTR);
482
483 return SIP_NULLPTR;
484 }
485
486
487 PyDoc_STRVAR(doc_wxVarVScrollHelper_RefreshRow, "RefreshRow(row)\n"
488 "\n"
489 "Triggers a refresh for just the given row's area of the window if it's\n"
490 "visible.");
491
492 extern "C" {static PyObject *meth_wxVarVScrollHelper_RefreshRow(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_RefreshRow(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)493 static PyObject *meth_wxVarVScrollHelper_RefreshRow(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
494 {
495 PyObject *sipParseErr = SIP_NULLPTR;
496 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
497
498 {
499 size_t row;
500 ::wxVarVScrollHelper *sipCpp;
501
502 static const char *sipKwdList[] = {
503 sipName_row,
504 };
505
506 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B=", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &row))
507 {
508 PyErr_Clear();
509
510 Py_BEGIN_ALLOW_THREADS
511 (sipSelfWasArg ? sipCpp-> ::wxVarVScrollHelper::RefreshRow(row) : sipCpp->RefreshRow(row));
512 Py_END_ALLOW_THREADS
513
514 if (PyErr_Occurred())
515 return 0;
516
517 Py_INCREF(Py_None);
518 return Py_None;
519 }
520 }
521
522 /* Raise an exception if the arguments couldn't be parsed. */
523 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_RefreshRow, SIP_NULLPTR);
524
525 return SIP_NULLPTR;
526 }
527
528
529 PyDoc_STRVAR(doc_wxVarVScrollHelper_RefreshRows, "RefreshRows(from_, to_)\n"
530 "\n"
531 "Triggers a refresh for the area between the specified range of rows\n"
532 "given (inclusively).");
533
534 extern "C" {static PyObject *meth_wxVarVScrollHelper_RefreshRows(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_RefreshRows(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)535 static PyObject *meth_wxVarVScrollHelper_RefreshRows(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
536 {
537 PyObject *sipParseErr = SIP_NULLPTR;
538 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
539
540 {
541 size_t from_;
542 size_t to_;
543 ::wxVarVScrollHelper *sipCpp;
544
545 static const char *sipKwdList[] = {
546 sipName_from_,
547 sipName_to_,
548 };
549
550 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B==", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &from_, &to_))
551 {
552 PyErr_Clear();
553
554 Py_BEGIN_ALLOW_THREADS
555 (sipSelfWasArg ? sipCpp-> ::wxVarVScrollHelper::RefreshRows(from_,to_) : sipCpp->RefreshRows(from_,to_));
556 Py_END_ALLOW_THREADS
557
558 if (PyErr_Occurred())
559 return 0;
560
561 Py_INCREF(Py_None);
562 return Py_None;
563 }
564 }
565
566 /* Raise an exception if the arguments couldn't be parsed. */
567 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_RefreshRows, SIP_NULLPTR);
568
569 return SIP_NULLPTR;
570 }
571
572
573 PyDoc_STRVAR(doc_wxVarVScrollHelper_ScrollRowPages, "ScrollRowPages(pages) -> bool\n"
574 "\n"
575 "Scroll by the specified number of pages which may be positive (to\n"
576 "scroll down) or negative (to scroll up).");
577
578 extern "C" {static PyObject *meth_wxVarVScrollHelper_ScrollRowPages(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_ScrollRowPages(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)579 static PyObject *meth_wxVarVScrollHelper_ScrollRowPages(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
580 {
581 PyObject *sipParseErr = SIP_NULLPTR;
582 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
583
584 {
585 int pages;
586 ::wxVarVScrollHelper *sipCpp;
587
588 static const char *sipKwdList[] = {
589 sipName_pages,
590 };
591
592 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &pages))
593 {
594 bool sipRes;
595
596 PyErr_Clear();
597
598 Py_BEGIN_ALLOW_THREADS
599 sipRes = (sipSelfWasArg ? sipCpp-> ::wxVarVScrollHelper::ScrollRowPages(pages) : sipCpp->ScrollRowPages(pages));
600 Py_END_ALLOW_THREADS
601
602 if (PyErr_Occurred())
603 return 0;
604
605 return PyBool_FromLong(sipRes);
606 }
607 }
608
609 /* Raise an exception if the arguments couldn't be parsed. */
610 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_ScrollRowPages, SIP_NULLPTR);
611
612 return SIP_NULLPTR;
613 }
614
615
616 PyDoc_STRVAR(doc_wxVarVScrollHelper_ScrollRows, "ScrollRows(rows) -> bool\n"
617 "\n"
618 "Scroll by the specified number of rows which may be positive (to\n"
619 "scroll down) or negative (to scroll up).");
620
621 extern "C" {static PyObject *meth_wxVarVScrollHelper_ScrollRows(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_ScrollRows(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)622 static PyObject *meth_wxVarVScrollHelper_ScrollRows(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
623 {
624 PyObject *sipParseErr = SIP_NULLPTR;
625 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
626
627 {
628 int rows;
629 ::wxVarVScrollHelper *sipCpp;
630
631 static const char *sipKwdList[] = {
632 sipName_rows,
633 };
634
635 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &rows))
636 {
637 bool sipRes;
638
639 PyErr_Clear();
640
641 Py_BEGIN_ALLOW_THREADS
642 sipRes = (sipSelfWasArg ? sipCpp-> ::wxVarVScrollHelper::ScrollRows(rows) : sipCpp->ScrollRows(rows));
643 Py_END_ALLOW_THREADS
644
645 if (PyErr_Occurred())
646 return 0;
647
648 return PyBool_FromLong(sipRes);
649 }
650 }
651
652 /* Raise an exception if the arguments couldn't be parsed. */
653 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_ScrollRows, SIP_NULLPTR);
654
655 return SIP_NULLPTR;
656 }
657
658
659 PyDoc_STRVAR(doc_wxVarVScrollHelper_ScrollToRow, "ScrollToRow(row) -> bool\n"
660 "\n"
661 "Scroll to the specified row.");
662
663 extern "C" {static PyObject *meth_wxVarVScrollHelper_ScrollToRow(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_ScrollToRow(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)664 static PyObject *meth_wxVarVScrollHelper_ScrollToRow(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
665 {
666 PyObject *sipParseErr = SIP_NULLPTR;
667
668 {
669 size_t row;
670 ::wxVarVScrollHelper *sipCpp;
671
672 static const char *sipKwdList[] = {
673 sipName_row,
674 };
675
676 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B=", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &row))
677 {
678 bool sipRes;
679
680 PyErr_Clear();
681
682 Py_BEGIN_ALLOW_THREADS
683 sipRes = sipCpp->ScrollToRow(row);
684 Py_END_ALLOW_THREADS
685
686 if (PyErr_Occurred())
687 return 0;
688
689 return PyBool_FromLong(sipRes);
690 }
691 }
692
693 /* Raise an exception if the arguments couldn't be parsed. */
694 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_ScrollToRow, SIP_NULLPTR);
695
696 return SIP_NULLPTR;
697 }
698
699
700 PyDoc_STRVAR(doc_wxVarVScrollHelper_SetRowCount, "SetRowCount(rowCount)\n"
701 "\n"
702 "Set the number of rows the window contains.");
703
704 extern "C" {static PyObject *meth_wxVarVScrollHelper_SetRowCount(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_SetRowCount(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)705 static PyObject *meth_wxVarVScrollHelper_SetRowCount(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
706 {
707 PyObject *sipParseErr = SIP_NULLPTR;
708
709 {
710 size_t rowCount;
711 ::wxVarVScrollHelper *sipCpp;
712
713 static const char *sipKwdList[] = {
714 sipName_rowCount,
715 };
716
717 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B=", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &rowCount))
718 {
719 PyErr_Clear();
720
721 Py_BEGIN_ALLOW_THREADS
722 sipCpp->SetRowCount(rowCount);
723 Py_END_ALLOW_THREADS
724
725 if (PyErr_Occurred())
726 return 0;
727
728 Py_INCREF(Py_None);
729 return Py_None;
730 }
731 }
732
733 /* Raise an exception if the arguments couldn't be parsed. */
734 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_SetRowCount, SIP_NULLPTR);
735
736 return SIP_NULLPTR;
737 }
738
739
740 PyDoc_STRVAR(doc_wxVarVScrollHelper_OnGetRowsHeightHint, "OnGetRowsHeightHint(rowMin, rowMax)\n"
741 "\n"
742 "This function doesn't have to be overridden but it may be useful to do\n"
743 "so if calculating the rows' sizes is a relatively expensive operation\n"
744 "as it gives your code a chance to calculate several of them at once\n"
745 "and cache the result if necessary.");
746
747 extern "C" {static PyObject *meth_wxVarVScrollHelper_OnGetRowsHeightHint(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_OnGetRowsHeightHint(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)748 static PyObject *meth_wxVarVScrollHelper_OnGetRowsHeightHint(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
749 {
750 PyObject *sipParseErr = SIP_NULLPTR;
751 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
752
753 {
754 size_t rowMin;
755 size_t rowMax;
756 const sipwxVarVScrollHelper *sipCpp;
757
758 static const char *sipKwdList[] = {
759 sipName_rowMin,
760 sipName_rowMax,
761 };
762
763 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B==", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &rowMin, &rowMax))
764 {
765 PyErr_Clear();
766
767 Py_BEGIN_ALLOW_THREADS
768 sipCpp->sipProtectVirt_OnGetRowsHeightHint(sipSelfWasArg,rowMin,rowMax);
769 Py_END_ALLOW_THREADS
770
771 if (PyErr_Occurred())
772 return 0;
773
774 Py_INCREF(Py_None);
775 return Py_None;
776 }
777 }
778
779 /* Raise an exception if the arguments couldn't be parsed. */
780 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_OnGetRowsHeightHint, SIP_NULLPTR);
781
782 return SIP_NULLPTR;
783 }
784
785
786 PyDoc_STRVAR(doc_wxVarVScrollHelper_EstimateTotalHeight, "EstimateTotalHeight() -> Coord\n"
787 "\n"
788 "This class forwards calls from EstimateTotalSize() to this function so\n"
789 "derived classes can override either just the height or the width\n"
790 "estimation, or just estimate both differently if desired in any\n"
791 "wxHVScrolledWindow derived class.");
792
793 extern "C" {static PyObject *meth_wxVarVScrollHelper_EstimateTotalHeight(PyObject *, PyObject *);}
meth_wxVarVScrollHelper_EstimateTotalHeight(PyObject * sipSelf,PyObject * sipArgs)794 static PyObject *meth_wxVarVScrollHelper_EstimateTotalHeight(PyObject *sipSelf, PyObject *sipArgs)
795 {
796 PyObject *sipParseErr = SIP_NULLPTR;
797 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
798
799 {
800 const sipwxVarVScrollHelper *sipCpp;
801
802 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp))
803 {
804 ::wxCoord sipRes;
805
806 PyErr_Clear();
807
808 Py_BEGIN_ALLOW_THREADS
809 sipRes = sipCpp->sipProtectVirt_EstimateTotalHeight(sipSelfWasArg);
810 Py_END_ALLOW_THREADS
811
812 if (PyErr_Occurred())
813 return 0;
814
815 return SIPLong_FromLong(sipRes);
816 }
817 }
818
819 /* Raise an exception if the arguments couldn't be parsed. */
820 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_EstimateTotalHeight, SIP_NULLPTR);
821
822 return SIP_NULLPTR;
823 }
824
825
826 PyDoc_STRVAR(doc_wxVarVScrollHelper_OnGetRowHeight, "OnGetRowHeight(row) -> Coord\n"
827 "\n"
828 "This function must be overridden in the derived class, and should\n"
829 "return the height of the given row in pixels.");
830
831 extern "C" {static PyObject *meth_wxVarVScrollHelper_OnGetRowHeight(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_OnGetRowHeight(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)832 static PyObject *meth_wxVarVScrollHelper_OnGetRowHeight(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
833 {
834 PyObject *sipParseErr = SIP_NULLPTR;
835 PyObject *sipOrigSelf = sipSelf;
836
837 {
838 size_t row;
839 const sipwxVarVScrollHelper *sipCpp;
840
841 static const char *sipKwdList[] = {
842 sipName_row,
843 };
844
845 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B=", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &row))
846 {
847 ::wxCoord sipRes;
848
849 if (!sipOrigSelf)
850 {
851 sipAbstractMethod(sipName_VarVScrollHelper, sipName_OnGetRowHeight);
852 return SIP_NULLPTR;
853 }
854
855 PyErr_Clear();
856
857 Py_BEGIN_ALLOW_THREADS
858 sipRes = sipCpp->sipProtect_OnGetRowHeight(row);
859 Py_END_ALLOW_THREADS
860
861 if (PyErr_Occurred())
862 return 0;
863
864 return SIPLong_FromLong(sipRes);
865 }
866 }
867
868 /* Raise an exception if the arguments couldn't be parsed. */
869 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_OnGetRowHeight, SIP_NULLPTR);
870
871 return SIP_NULLPTR;
872 }
873
874
875 PyDoc_STRVAR(doc_wxVarVScrollHelper_OnGetUnitsSizeHint, "OnGetUnitsSizeHint(self, unitMin: int, unitMax: int)");
876
877 extern "C" {static PyObject *meth_wxVarVScrollHelper_OnGetUnitsSizeHint(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_OnGetUnitsSizeHint(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)878 static PyObject *meth_wxVarVScrollHelper_OnGetUnitsSizeHint(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
879 {
880 PyObject *sipParseErr = SIP_NULLPTR;
881 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
882
883 {
884 size_t unitMin;
885 size_t unitMax;
886 const sipwxVarVScrollHelper *sipCpp;
887
888 static const char *sipKwdList[] = {
889 sipName_unitMin,
890 sipName_unitMax,
891 };
892
893 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B==", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &unitMin, &unitMax))
894 {
895 PyErr_Clear();
896
897 Py_BEGIN_ALLOW_THREADS
898 sipCpp->sipProtectVirt_OnGetUnitsSizeHint(sipSelfWasArg,unitMin,unitMax);
899 Py_END_ALLOW_THREADS
900
901 if (PyErr_Occurred())
902 return 0;
903
904 Py_INCREF(Py_None);
905 return Py_None;
906 }
907 }
908
909 /* Raise an exception if the arguments couldn't be parsed. */
910 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_OnGetUnitsSizeHint, doc_wxVarVScrollHelper_OnGetUnitsSizeHint);
911
912 return SIP_NULLPTR;
913 }
914
915
916 PyDoc_STRVAR(doc_wxVarVScrollHelper_EstimateTotalSize, "EstimateTotalSize(self) -> int");
917
918 extern "C" {static PyObject *meth_wxVarVScrollHelper_EstimateTotalSize(PyObject *, PyObject *);}
meth_wxVarVScrollHelper_EstimateTotalSize(PyObject * sipSelf,PyObject * sipArgs)919 static PyObject *meth_wxVarVScrollHelper_EstimateTotalSize(PyObject *sipSelf, PyObject *sipArgs)
920 {
921 PyObject *sipParseErr = SIP_NULLPTR;
922 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
923
924 {
925 const sipwxVarVScrollHelper *sipCpp;
926
927 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp))
928 {
929 ::wxCoord sipRes;
930
931 PyErr_Clear();
932
933 Py_BEGIN_ALLOW_THREADS
934 sipRes = sipCpp->sipProtectVirt_EstimateTotalSize(sipSelfWasArg);
935 Py_END_ALLOW_THREADS
936
937 if (PyErr_Occurred())
938 return 0;
939
940 return SIPLong_FromLong(sipRes);
941 }
942 }
943
944 /* Raise an exception if the arguments couldn't be parsed. */
945 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_EstimateTotalSize, doc_wxVarVScrollHelper_EstimateTotalSize);
946
947 return SIP_NULLPTR;
948 }
949
950
951 PyDoc_STRVAR(doc_wxVarVScrollHelper_GetNonOrientationTargetSize, "GetNonOrientationTargetSize(self) -> int");
952
953 extern "C" {static PyObject *meth_wxVarVScrollHelper_GetNonOrientationTargetSize(PyObject *, PyObject *);}
meth_wxVarVScrollHelper_GetNonOrientationTargetSize(PyObject * sipSelf,PyObject * sipArgs)954 static PyObject *meth_wxVarVScrollHelper_GetNonOrientationTargetSize(PyObject *sipSelf, PyObject *sipArgs)
955 {
956 PyObject *sipParseErr = SIP_NULLPTR;
957 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
958
959 {
960 const sipwxVarVScrollHelper *sipCpp;
961
962 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp))
963 {
964 int sipRes;
965
966 PyErr_Clear();
967
968 Py_BEGIN_ALLOW_THREADS
969 sipRes = sipCpp->sipProtectVirt_GetNonOrientationTargetSize(sipSelfWasArg);
970 Py_END_ALLOW_THREADS
971
972 if (PyErr_Occurred())
973 return 0;
974
975 return SIPLong_FromLong(sipRes);
976 }
977 }
978
979 /* Raise an exception if the arguments couldn't be parsed. */
980 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_GetNonOrientationTargetSize, doc_wxVarVScrollHelper_GetNonOrientationTargetSize);
981
982 return SIP_NULLPTR;
983 }
984
985
986 PyDoc_STRVAR(doc_wxVarVScrollHelper_GetOrientation, "GetOrientation(self) -> Orientation");
987
988 extern "C" {static PyObject *meth_wxVarVScrollHelper_GetOrientation(PyObject *, PyObject *);}
meth_wxVarVScrollHelper_GetOrientation(PyObject * sipSelf,PyObject * sipArgs)989 static PyObject *meth_wxVarVScrollHelper_GetOrientation(PyObject *sipSelf, PyObject *sipArgs)
990 {
991 PyObject *sipParseErr = SIP_NULLPTR;
992 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
993
994 {
995 const sipwxVarVScrollHelper *sipCpp;
996
997 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp))
998 {
999 ::wxOrientation sipRes;
1000
1001 PyErr_Clear();
1002
1003 Py_BEGIN_ALLOW_THREADS
1004 sipRes = sipCpp->sipProtectVirt_GetOrientation(sipSelfWasArg);
1005 Py_END_ALLOW_THREADS
1006
1007 if (PyErr_Occurred())
1008 return 0;
1009
1010 return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxOrientation);
1011 }
1012 }
1013
1014 /* Raise an exception if the arguments couldn't be parsed. */
1015 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_GetOrientation, doc_wxVarVScrollHelper_GetOrientation);
1016
1017 return SIP_NULLPTR;
1018 }
1019
1020
1021 PyDoc_STRVAR(doc_wxVarVScrollHelper_GetOrientationTargetSize, "GetOrientationTargetSize(self) -> int");
1022
1023 extern "C" {static PyObject *meth_wxVarVScrollHelper_GetOrientationTargetSize(PyObject *, PyObject *);}
meth_wxVarVScrollHelper_GetOrientationTargetSize(PyObject * sipSelf,PyObject * sipArgs)1024 static PyObject *meth_wxVarVScrollHelper_GetOrientationTargetSize(PyObject *sipSelf, PyObject *sipArgs)
1025 {
1026 PyObject *sipParseErr = SIP_NULLPTR;
1027 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
1028
1029 {
1030 const sipwxVarVScrollHelper *sipCpp;
1031
1032 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp))
1033 {
1034 int sipRes;
1035
1036 PyErr_Clear();
1037
1038 Py_BEGIN_ALLOW_THREADS
1039 sipRes = sipCpp->sipProtectVirt_GetOrientationTargetSize(sipSelfWasArg);
1040 Py_END_ALLOW_THREADS
1041
1042 if (PyErr_Occurred())
1043 return 0;
1044
1045 return SIPLong_FromLong(sipRes);
1046 }
1047 }
1048
1049 /* Raise an exception if the arguments couldn't be parsed. */
1050 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_GetOrientationTargetSize, doc_wxVarVScrollHelper_GetOrientationTargetSize);
1051
1052 return SIP_NULLPTR;
1053 }
1054
1055
1056 PyDoc_STRVAR(doc_wxVarVScrollHelper_OnGetUnitSize, "OnGetUnitSize(self, unit: int) -> int");
1057
1058 extern "C" {static PyObject *meth_wxVarVScrollHelper_OnGetUnitSize(PyObject *, PyObject *, PyObject *);}
meth_wxVarVScrollHelper_OnGetUnitSize(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)1059 static PyObject *meth_wxVarVScrollHelper_OnGetUnitSize(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
1060 {
1061 PyObject *sipParseErr = SIP_NULLPTR;
1062 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
1063
1064 {
1065 size_t unit;
1066 const sipwxVarVScrollHelper *sipCpp;
1067
1068 static const char *sipKwdList[] = {
1069 sipName_unit,
1070 };
1071
1072 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B=", &sipSelf, sipType_wxVarVScrollHelper, &sipCpp, &unit))
1073 {
1074 ::wxCoord sipRes;
1075
1076 PyErr_Clear();
1077
1078 Py_BEGIN_ALLOW_THREADS
1079 sipRes = sipCpp->sipProtectVirt_OnGetUnitSize(sipSelfWasArg,unit);
1080 Py_END_ALLOW_THREADS
1081
1082 if (PyErr_Occurred())
1083 return 0;
1084
1085 return SIPLong_FromLong(sipRes);
1086 }
1087 }
1088
1089 /* Raise an exception if the arguments couldn't be parsed. */
1090 sipNoMethod(sipParseErr, sipName_VarVScrollHelper, sipName_OnGetUnitSize, doc_wxVarVScrollHelper_OnGetUnitSize);
1091
1092 return SIP_NULLPTR;
1093 }
1094
1095
1096 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
1097 extern "C" {static void *cast_wxVarVScrollHelper(void *, const sipTypeDef *);}
cast_wxVarVScrollHelper(void * sipCppV,const sipTypeDef * targetType)1098 static void *cast_wxVarVScrollHelper(void *sipCppV, const sipTypeDef *targetType)
1099 {
1100 ::wxVarVScrollHelper *sipCpp = reinterpret_cast< ::wxVarVScrollHelper *>(sipCppV);
1101
1102 if (targetType == sipType_wxVarScrollHelperBase)
1103 return static_cast< ::wxVarScrollHelperBase *>(sipCpp);
1104
1105 return sipCppV;
1106 }
1107
1108
1109 /* Call the instance's destructor. */
1110 extern "C" {static void release_wxVarVScrollHelper(void *, int);}
release_wxVarVScrollHelper(void * sipCppV,int sipState)1111 static void release_wxVarVScrollHelper(void *sipCppV, int sipState)
1112 {
1113 Py_BEGIN_ALLOW_THREADS
1114
1115 if (sipState & SIP_DERIVED_CLASS)
1116 delete reinterpret_cast<sipwxVarVScrollHelper *>(sipCppV);
1117 else
1118 delete reinterpret_cast< ::wxVarVScrollHelper *>(sipCppV);
1119
1120 Py_END_ALLOW_THREADS
1121 }
1122
1123
1124 extern "C" {static void dealloc_wxVarVScrollHelper(sipSimpleWrapper *);}
dealloc_wxVarVScrollHelper(sipSimpleWrapper * sipSelf)1125 static void dealloc_wxVarVScrollHelper(sipSimpleWrapper *sipSelf)
1126 {
1127 if (sipIsDerivedClass(sipSelf))
1128 reinterpret_cast<sipwxVarVScrollHelper *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
1129
1130 if (sipIsOwnedByPython(sipSelf))
1131 {
1132 release_wxVarVScrollHelper(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
1133 }
1134 }
1135
1136
1137 extern "C" {static void *init_type_wxVarVScrollHelper(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxVarVScrollHelper(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)1138 static void *init_type_wxVarVScrollHelper(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
1139 {
1140 sipwxVarVScrollHelper *sipCpp = SIP_NULLPTR;
1141
1142 {
1143 ::wxWindow* winToScroll;
1144
1145 static const char *sipKwdList[] = {
1146 sipName_winToScroll,
1147 };
1148
1149 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8", sipType_wxWindow, &winToScroll))
1150 {
1151 PyErr_Clear();
1152
1153 Py_BEGIN_ALLOW_THREADS
1154 sipCpp = new sipwxVarVScrollHelper(winToScroll);
1155 Py_END_ALLOW_THREADS
1156
1157 if (PyErr_Occurred())
1158 {
1159 delete sipCpp;
1160 return SIP_NULLPTR;
1161 }
1162
1163 sipCpp->sipPySelf = sipSelf;
1164
1165 return sipCpp;
1166 }
1167 }
1168
1169 {
1170 const ::wxVarVScrollHelper* a0;
1171
1172 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxVarVScrollHelper, &a0))
1173 {
1174 Py_BEGIN_ALLOW_THREADS
1175 sipCpp = new sipwxVarVScrollHelper(*a0);
1176 Py_END_ALLOW_THREADS
1177
1178 sipCpp->sipPySelf = sipSelf;
1179
1180 return sipCpp;
1181 }
1182 }
1183
1184 return SIP_NULLPTR;
1185 }
1186
1187
1188 /* Define this type's super-types. */
1189 static sipEncodedTypeDef supers_wxVarVScrollHelper[] = {{563, 255, 1}};
1190
1191
1192 static PyMethodDef methods_wxVarVScrollHelper[] = {
1193 {SIP_MLNAME_CAST(sipName_EstimateTotalHeight), meth_wxVarVScrollHelper_EstimateTotalHeight, METH_VARARGS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_EstimateTotalHeight)},
1194 {SIP_MLNAME_CAST(sipName_EstimateTotalSize), meth_wxVarVScrollHelper_EstimateTotalSize, METH_VARARGS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_EstimateTotalSize)},
1195 {SIP_MLNAME_CAST(sipName_GetNonOrientationTargetSize), meth_wxVarVScrollHelper_GetNonOrientationTargetSize, METH_VARARGS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_GetNonOrientationTargetSize)},
1196 {SIP_MLNAME_CAST(sipName_GetOrientation), meth_wxVarVScrollHelper_GetOrientation, METH_VARARGS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_GetOrientation)},
1197 {SIP_MLNAME_CAST(sipName_GetOrientationTargetSize), meth_wxVarVScrollHelper_GetOrientationTargetSize, METH_VARARGS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_GetOrientationTargetSize)},
1198 {SIP_MLNAME_CAST(sipName_GetRowCount), meth_wxVarVScrollHelper_GetRowCount, METH_VARARGS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_GetRowCount)},
1199 {SIP_MLNAME_CAST(sipName_GetVisibleRowsBegin), meth_wxVarVScrollHelper_GetVisibleRowsBegin, METH_VARARGS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_GetVisibleRowsBegin)},
1200 {SIP_MLNAME_CAST(sipName_GetVisibleRowsEnd), meth_wxVarVScrollHelper_GetVisibleRowsEnd, METH_VARARGS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_GetVisibleRowsEnd)},
1201 {SIP_MLNAME_CAST(sipName_IsRowVisible), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_IsRowVisible), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_IsRowVisible)},
1202 {SIP_MLNAME_CAST(sipName_OnGetRowHeight), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_OnGetRowHeight), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_OnGetRowHeight)},
1203 {SIP_MLNAME_CAST(sipName_OnGetRowsHeightHint), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_OnGetRowsHeightHint), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_OnGetRowsHeightHint)},
1204 {SIP_MLNAME_CAST(sipName_OnGetUnitSize), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_OnGetUnitSize), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_OnGetUnitSize)},
1205 {SIP_MLNAME_CAST(sipName_OnGetUnitsSizeHint), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_OnGetUnitsSizeHint), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_OnGetUnitsSizeHint)},
1206 {SIP_MLNAME_CAST(sipName_RefreshRow), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_RefreshRow), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_RefreshRow)},
1207 {SIP_MLNAME_CAST(sipName_RefreshRows), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_RefreshRows), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_RefreshRows)},
1208 {SIP_MLNAME_CAST(sipName_ScrollRowPages), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_ScrollRowPages), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_ScrollRowPages)},
1209 {SIP_MLNAME_CAST(sipName_ScrollRows), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_ScrollRows), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_ScrollRows)},
1210 {SIP_MLNAME_CAST(sipName_ScrollToRow), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_ScrollToRow), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_ScrollToRow)},
1211 {SIP_MLNAME_CAST(sipName_SetRowCount), SIP_MLMETH_CAST(meth_wxVarVScrollHelper_SetRowCount), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxVarVScrollHelper_SetRowCount)}
1212 };
1213
1214 sipVariableDef variables_wxVarVScrollHelper[] = {
1215 {PropertyVariable, sipName_VisibleRowsEnd, &methods_wxVarVScrollHelper[7], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
1216 {PropertyVariable, sipName_VisibleRowsBegin, &methods_wxVarVScrollHelper[6], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
1217 {PropertyVariable, sipName_RowCount, &methods_wxVarVScrollHelper[5], &methods_wxVarVScrollHelper[18], SIP_NULLPTR, SIP_NULLPTR},
1218 };
1219
1220 PyDoc_STRVAR(doc_wxVarVScrollHelper, "VarVScrollHelper(winToScroll)\n"
1221 "\n"
1222 "This class provides functions wrapping the wxVarScrollHelperBase\n"
1223 "class, targeted for vertical-specific scrolling.");
1224
1225
1226 sipClassTypeDef sipTypeDef__core_wxVarVScrollHelper = {
1227 {
1228 -1,
1229 SIP_NULLPTR,
1230 SIP_NULLPTR,
1231 SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
1232 sipNameNr_wxVarVScrollHelper,
1233 {SIP_NULLPTR},
1234 SIP_NULLPTR
1235 },
1236 {
1237 sipNameNr_VarVScrollHelper,
1238 {0, 0, 1},
1239 19, methods_wxVarVScrollHelper,
1240 0, SIP_NULLPTR,
1241 3, variables_wxVarVScrollHelper,
1242 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
1243 },
1244 doc_wxVarVScrollHelper,
1245 -1,
1246 -1,
1247 supers_wxVarVScrollHelper,
1248 SIP_NULLPTR,
1249 init_type_wxVarVScrollHelper,
1250 SIP_NULLPTR,
1251 SIP_NULLPTR,
1252 #if PY_MAJOR_VERSION >= 3
1253 SIP_NULLPTR,
1254 SIP_NULLPTR,
1255 #else
1256 SIP_NULLPTR,
1257 SIP_NULLPTR,
1258 SIP_NULLPTR,
1259 SIP_NULLPTR,
1260 #endif
1261 dealloc_wxVarVScrollHelper,
1262 SIP_NULLPTR,
1263 SIP_NULLPTR,
1264 SIP_NULLPTR,
1265 release_wxVarVScrollHelper,
1266 cast_wxVarVScrollHelper,
1267 SIP_NULLPTR,
1268 SIP_NULLPTR,
1269 SIP_NULLPTR,
1270 SIP_NULLPTR,
1271 SIP_NULLPTR,
1272 SIP_NULLPTR
1273 };
1274