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_html.h"
11
12 #include <wx/html/htmprint.h>
13
14 #include <wx/html/htmlfilt.h>
15 #include <wx/cmndata.h>
16 #include <wx/print.h>
17 #include <wx/gdicmn.h>
18 #include <wx/dc.h>
19 #include <wx/gdicmn.h>
20 #include <wx/object.h>
21 #include <wx/object.h>
22 #include <wx/object.h>
_wxHtmlPrintout_SetFonts(wxHtmlPrintout * self,const wxString * normal_face,const wxString * fixed_face,const wxArrayInt * sizes)23 void _wxHtmlPrintout_SetFonts(wxHtmlPrintout* self, const wxString * normal_face, const wxString * fixed_face, const wxArrayInt* sizes)
24 {
25 if (sizes->GetCount() != 7) {
26 wxPyErr_SetString(PyExc_ValueError, "Sequence of 7 integers expected.");
27 return;
28 }
29 self->SetFonts(*normal_face, *fixed_face, &sizes->Item(0));
30 }
31
32
33 class sipwxHtmlPrintout : public ::wxHtmlPrintout
34 {
35 public:
36 sipwxHtmlPrintout(const ::wxString&);
37 virtual ~sipwxHtmlPrintout();
38
39 /*
40 * There is a protected method for every virtual method visible from
41 * this class.
42 */
43 protected:
44 ::wxString GetTitle() const SIP_OVERRIDE;
45 bool IsPreview() const SIP_OVERRIDE;
46 void OnBeginPrinting() SIP_OVERRIDE;
47 void OnEndDocument() SIP_OVERRIDE;
48 void OnEndPrinting() SIP_OVERRIDE;
49
50 public:
51 sipSimpleWrapper *sipPySelf;
52
53 private:
54 sipwxHtmlPrintout(const sipwxHtmlPrintout &);
55 sipwxHtmlPrintout &operator = (const sipwxHtmlPrintout &);
56
57 char sipPyMethods[5];
58 };
59
sipwxHtmlPrintout(const::wxString & title)60 sipwxHtmlPrintout::sipwxHtmlPrintout(const ::wxString& title): ::wxHtmlPrintout(title), sipPySelf(SIP_NULLPTR)
61 {
62 memset(sipPyMethods, 0, sizeof (sipPyMethods));
63 }
64
~sipwxHtmlPrintout()65 sipwxHtmlPrintout::~sipwxHtmlPrintout()
66 {
67 sipInstanceDestroyedEx(&sipPySelf);
68 }
69
GetTitle() const70 ::wxString sipwxHtmlPrintout::GetTitle() const
71 {
72 sip_gilstate_t sipGILState;
73 PyObject *sipMeth;
74
75 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_GetTitle);
76
77 if (!sipMeth)
78 return ::wxHtmlPrintout::GetTitle();
79
80 extern ::wxString sipVH__html_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
81
82 return sipVH__html_16(sipGILState, 0, sipPySelf, sipMeth);
83 }
84
IsPreview() const85 bool sipwxHtmlPrintout::IsPreview() const
86 {
87 sip_gilstate_t sipGILState;
88 PyObject *sipMeth;
89
90 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,SIP_NULLPTR,sipName_IsPreview);
91
92 if (!sipMeth)
93 return ::wxHtmlPrintout::IsPreview();
94
95 extern bool sipVH__html_41(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
96
97 return sipVH__html_41(sipGILState, 0, sipPySelf, sipMeth);
98 }
99
OnBeginPrinting()100 void sipwxHtmlPrintout::OnBeginPrinting()
101 {
102 sip_gilstate_t sipGILState;
103 PyObject *sipMeth;
104
105 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,SIP_NULLPTR,sipName_OnBeginPrinting);
106
107 if (!sipMeth)
108 {
109 ::wxHtmlPrintout::OnBeginPrinting();
110 return;
111 }
112
113 extern void sipVH__html_20(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
114
115 sipVH__html_20(sipGILState, 0, sipPySelf, sipMeth);
116 }
117
OnEndDocument()118 void sipwxHtmlPrintout::OnEndDocument()
119 {
120 sip_gilstate_t sipGILState;
121 PyObject *sipMeth;
122
123 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,SIP_NULLPTR,sipName_OnEndDocument);
124
125 if (!sipMeth)
126 {
127 ::wxHtmlPrintout::OnEndDocument();
128 return;
129 }
130
131 extern void sipVH__html_20(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
132
133 sipVH__html_20(sipGILState, 0, sipPySelf, sipMeth);
134 }
135
OnEndPrinting()136 void sipwxHtmlPrintout::OnEndPrinting()
137 {
138 sip_gilstate_t sipGILState;
139 PyObject *sipMeth;
140
141 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,SIP_NULLPTR,sipName_OnEndPrinting);
142
143 if (!sipMeth)
144 {
145 ::wxHtmlPrintout::OnEndPrinting();
146 return;
147 }
148
149 extern void sipVH__html_20(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
150
151 sipVH__html_20(sipGILState, 0, sipPySelf, sipMeth);
152 }
153
154
155 PyDoc_STRVAR(doc_wxHtmlPrintout_SetFonts, "SetFonts(normal_face, fixed_face, sizes)\n"
156 "\n"
157 "This function sets font sizes and faces.");
158
159 extern "C" {static PyObject *meth_wxHtmlPrintout_SetFonts(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlPrintout_SetFonts(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)160 static PyObject *meth_wxHtmlPrintout_SetFonts(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
161 {
162 PyObject *sipParseErr = SIP_NULLPTR;
163
164 {
165 const ::wxString* normal_face;
166 int normal_faceState = 0;
167 const ::wxString* fixed_face;
168 int fixed_faceState = 0;
169 const ::wxArrayInt* sizes;
170 int sizesState = 0;
171 ::wxHtmlPrintout *sipCpp;
172
173 static const char *sipKwdList[] = {
174 sipName_normal_face,
175 sipName_fixed_face,
176 sipName_sizes,
177 };
178
179 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J1J1", &sipSelf, sipType_wxHtmlPrintout, &sipCpp, sipType_wxString,&normal_face, &normal_faceState, sipType_wxString,&fixed_face, &fixed_faceState, sipType_wxArrayInt,&sizes, &sizesState))
180 {
181 int sipIsErr = 0;
182
183 PyErr_Clear();
184 Py_BEGIN_ALLOW_THREADS
185 _wxHtmlPrintout_SetFonts(sipCpp, normal_face, fixed_face, sizes);
186 Py_END_ALLOW_THREADS
187 if (PyErr_Occurred()) sipIsErr = 1;
188 sipReleaseType(const_cast< ::wxString *>(normal_face),sipType_wxString,normal_faceState);
189 sipReleaseType(const_cast< ::wxString *>(fixed_face),sipType_wxString,fixed_faceState);
190 sipReleaseType(const_cast< ::wxArrayInt *>(sizes),sipType_wxArrayInt,sizesState);
191
192 if (sipIsErr)
193 return 0;
194
195 Py_INCREF(Py_None);
196 return Py_None;
197 }
198 }
199
200 /* Raise an exception if the arguments couldn't be parsed. */
201 sipNoMethod(sipParseErr, sipName_HtmlPrintout, sipName_SetFonts, SIP_NULLPTR);
202
203 return SIP_NULLPTR;
204 }
205
206
207 PyDoc_STRVAR(doc_wxHtmlPrintout_SetFooter, "SetFooter(footer, pg=PAGE_ALL)\n"
208 "\n"
209 "Set page footer.");
210
211 extern "C" {static PyObject *meth_wxHtmlPrintout_SetFooter(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlPrintout_SetFooter(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)212 static PyObject *meth_wxHtmlPrintout_SetFooter(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
213 {
214 PyObject *sipParseErr = SIP_NULLPTR;
215
216 {
217 const ::wxString* footer;
218 int footerState = 0;
219 int pg = wxPAGE_ALL;
220 ::wxHtmlPrintout *sipCpp;
221
222 static const char *sipKwdList[] = {
223 sipName_footer,
224 sipName_pg,
225 };
226
227 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|i", &sipSelf, sipType_wxHtmlPrintout, &sipCpp, sipType_wxString,&footer, &footerState, &pg))
228 {
229 PyErr_Clear();
230
231 Py_BEGIN_ALLOW_THREADS
232 sipCpp->SetFooter(*footer,pg);
233 Py_END_ALLOW_THREADS
234 sipReleaseType(const_cast< ::wxString *>(footer),sipType_wxString,footerState);
235
236 if (PyErr_Occurred())
237 return 0;
238
239 Py_INCREF(Py_None);
240 return Py_None;
241 }
242 }
243
244 /* Raise an exception if the arguments couldn't be parsed. */
245 sipNoMethod(sipParseErr, sipName_HtmlPrintout, sipName_SetFooter, SIP_NULLPTR);
246
247 return SIP_NULLPTR;
248 }
249
250
251 PyDoc_STRVAR(doc_wxHtmlPrintout_SetHeader, "SetHeader(header, pg=PAGE_ALL)\n"
252 "\n"
253 "Set page header.");
254
255 extern "C" {static PyObject *meth_wxHtmlPrintout_SetHeader(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlPrintout_SetHeader(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)256 static PyObject *meth_wxHtmlPrintout_SetHeader(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
257 {
258 PyObject *sipParseErr = SIP_NULLPTR;
259
260 {
261 const ::wxString* header;
262 int headerState = 0;
263 int pg = wxPAGE_ALL;
264 ::wxHtmlPrintout *sipCpp;
265
266 static const char *sipKwdList[] = {
267 sipName_header,
268 sipName_pg,
269 };
270
271 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|i", &sipSelf, sipType_wxHtmlPrintout, &sipCpp, sipType_wxString,&header, &headerState, &pg))
272 {
273 PyErr_Clear();
274
275 Py_BEGIN_ALLOW_THREADS
276 sipCpp->SetHeader(*header,pg);
277 Py_END_ALLOW_THREADS
278 sipReleaseType(const_cast< ::wxString *>(header),sipType_wxString,headerState);
279
280 if (PyErr_Occurred())
281 return 0;
282
283 Py_INCREF(Py_None);
284 return Py_None;
285 }
286 }
287
288 /* Raise an exception if the arguments couldn't be parsed. */
289 sipNoMethod(sipParseErr, sipName_HtmlPrintout, sipName_SetHeader, SIP_NULLPTR);
290
291 return SIP_NULLPTR;
292 }
293
294
295 PyDoc_STRVAR(doc_wxHtmlPrintout_SetHtmlFile, "SetHtmlFile(htmlfile)\n"
296 "\n"
297 "Prepare the class for printing this HTML file.");
298
299 extern "C" {static PyObject *meth_wxHtmlPrintout_SetHtmlFile(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlPrintout_SetHtmlFile(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)300 static PyObject *meth_wxHtmlPrintout_SetHtmlFile(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
301 {
302 PyObject *sipParseErr = SIP_NULLPTR;
303
304 {
305 const ::wxString* htmlfile;
306 int htmlfileState = 0;
307 ::wxHtmlPrintout *sipCpp;
308
309 static const char *sipKwdList[] = {
310 sipName_htmlfile,
311 };
312
313 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxHtmlPrintout, &sipCpp, sipType_wxString,&htmlfile, &htmlfileState))
314 {
315 PyErr_Clear();
316
317 Py_BEGIN_ALLOW_THREADS
318 sipCpp->SetHtmlFile(*htmlfile);
319 Py_END_ALLOW_THREADS
320 sipReleaseType(const_cast< ::wxString *>(htmlfile),sipType_wxString,htmlfileState);
321
322 if (PyErr_Occurred())
323 return 0;
324
325 Py_INCREF(Py_None);
326 return Py_None;
327 }
328 }
329
330 /* Raise an exception if the arguments couldn't be parsed. */
331 sipNoMethod(sipParseErr, sipName_HtmlPrintout, sipName_SetHtmlFile, SIP_NULLPTR);
332
333 return SIP_NULLPTR;
334 }
335
336
337 PyDoc_STRVAR(doc_wxHtmlPrintout_SetHtmlText, "SetHtmlText(html, basepath=wx.EmptyString, isdir=True)\n"
338 "\n"
339 "Prepare the class for printing this HTML text.");
340
341 extern "C" {static PyObject *meth_wxHtmlPrintout_SetHtmlText(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlPrintout_SetHtmlText(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)342 static PyObject *meth_wxHtmlPrintout_SetHtmlText(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
343 {
344 PyObject *sipParseErr = SIP_NULLPTR;
345
346 {
347 const ::wxString* html;
348 int htmlState = 0;
349 const ::wxString& basepathdef = wxEmptyString;
350 const ::wxString* basepath = &basepathdef;
351 int basepathState = 0;
352 bool isdir = 1;
353 ::wxHtmlPrintout *sipCpp;
354
355 static const char *sipKwdList[] = {
356 sipName_html,
357 sipName_basepath,
358 sipName_isdir,
359 };
360
361 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J1b", &sipSelf, sipType_wxHtmlPrintout, &sipCpp, sipType_wxString,&html, &htmlState, sipType_wxString,&basepath, &basepathState, &isdir))
362 {
363 PyErr_Clear();
364
365 Py_BEGIN_ALLOW_THREADS
366 sipCpp->SetHtmlText(*html,*basepath,isdir);
367 Py_END_ALLOW_THREADS
368 sipReleaseType(const_cast< ::wxString *>(html),sipType_wxString,htmlState);
369 sipReleaseType(const_cast< ::wxString *>(basepath),sipType_wxString,basepathState);
370
371 if (PyErr_Occurred())
372 return 0;
373
374 Py_INCREF(Py_None);
375 return Py_None;
376 }
377 }
378
379 /* Raise an exception if the arguments couldn't be parsed. */
380 sipNoMethod(sipParseErr, sipName_HtmlPrintout, sipName_SetHtmlText, SIP_NULLPTR);
381
382 return SIP_NULLPTR;
383 }
384
385
386 PyDoc_STRVAR(doc_wxHtmlPrintout_SetMargins, "SetMargins(top=25.2, bottom=25.2, left=25.2, right=25.2, spaces=5)\n"
387 "\n"
388 "Sets margins in millimeters.");
389
390 extern "C" {static PyObject *meth_wxHtmlPrintout_SetMargins(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlPrintout_SetMargins(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)391 static PyObject *meth_wxHtmlPrintout_SetMargins(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
392 {
393 PyObject *sipParseErr = SIP_NULLPTR;
394
395 {
396 float top = 25.2;
397 float bottom = 25.2;
398 float left = 25.2;
399 float right = 25.2;
400 float spaces = 5;
401 ::wxHtmlPrintout *sipCpp;
402
403 static const char *sipKwdList[] = {
404 sipName_top,
405 sipName_bottom,
406 sipName_left,
407 sipName_right,
408 sipName_spaces,
409 };
410
411 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|fffff", &sipSelf, sipType_wxHtmlPrintout, &sipCpp, &top, &bottom, &left, &right, &spaces))
412 {
413 PyErr_Clear();
414
415 Py_BEGIN_ALLOW_THREADS
416 sipCpp->SetMargins(top,bottom,left,right,spaces);
417 Py_END_ALLOW_THREADS
418
419 if (PyErr_Occurred())
420 return 0;
421
422 Py_INCREF(Py_None);
423 return Py_None;
424 }
425 }
426
427 /* Raise an exception if the arguments couldn't be parsed. */
428 sipNoMethod(sipParseErr, sipName_HtmlPrintout, sipName_SetMargins, SIP_NULLPTR);
429
430 return SIP_NULLPTR;
431 }
432
433
434 PyDoc_STRVAR(doc_wxHtmlPrintout_AddFilter, "AddFilter(filter)\n"
435 "\n"
436 "Adds a filter to the static list of filters for wxHtmlPrintout.");
437
438 extern "C" {static PyObject *meth_wxHtmlPrintout_AddFilter(PyObject *, PyObject *, PyObject *);}
meth_wxHtmlPrintout_AddFilter(PyObject *,PyObject * sipArgs,PyObject * sipKwds)439 static PyObject *meth_wxHtmlPrintout_AddFilter(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
440 {
441 PyObject *sipParseErr = SIP_NULLPTR;
442
443 {
444 ::wxHtmlFilter* filter;
445
446 static const char *sipKwdList[] = {
447 sipName_filter,
448 };
449
450 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J8", sipType_wxHtmlFilter, &filter))
451 {
452 PyErr_Clear();
453
454 Py_BEGIN_ALLOW_THREADS
455 ::wxHtmlPrintout::AddFilter(filter);
456 Py_END_ALLOW_THREADS
457
458 if (PyErr_Occurred())
459 return 0;
460
461 Py_INCREF(Py_None);
462 return Py_None;
463 }
464 }
465
466 /* Raise an exception if the arguments couldn't be parsed. */
467 sipNoMethod(sipParseErr, sipName_HtmlPrintout, sipName_AddFilter, SIP_NULLPTR);
468
469 return SIP_NULLPTR;
470 }
471
472
473 extern "C" {static PyObject *meth_wxHtmlPrintout_OnPrintPage(PyObject *, PyObject *);}
meth_wxHtmlPrintout_OnPrintPage(PyObject *,PyObject *)474 static PyObject *meth_wxHtmlPrintout_OnPrintPage(PyObject *, PyObject *)
475 {
476
477 /* Raise an exception if the arguments couldn't be parsed. */
478 sipNoMethod(SIP_NULLPTR, sipName_HtmlPrintout, sipName_OnPrintPage, SIP_NULLPTR);
479
480 return SIP_NULLPTR;
481 }
482
483
484 extern "C" {static PyObject *meth_wxHtmlPrintout_HasPage(PyObject *, PyObject *);}
meth_wxHtmlPrintout_HasPage(PyObject *,PyObject *)485 static PyObject *meth_wxHtmlPrintout_HasPage(PyObject *, PyObject *)
486 {
487
488 /* Raise an exception if the arguments couldn't be parsed. */
489 sipNoMethod(SIP_NULLPTR, sipName_HtmlPrintout, sipName_HasPage, SIP_NULLPTR);
490
491 return SIP_NULLPTR;
492 }
493
494
495 extern "C" {static PyObject *meth_wxHtmlPrintout_GetPageInfo(PyObject *, PyObject *);}
meth_wxHtmlPrintout_GetPageInfo(PyObject *,PyObject *)496 static PyObject *meth_wxHtmlPrintout_GetPageInfo(PyObject *, PyObject *)
497 {
498
499 /* Raise an exception if the arguments couldn't be parsed. */
500 sipNoMethod(SIP_NULLPTR, sipName_HtmlPrintout, sipName_GetPageInfo, SIP_NULLPTR);
501
502 return SIP_NULLPTR;
503 }
504
505
506 extern "C" {static PyObject *meth_wxHtmlPrintout_OnBeginDocument(PyObject *, PyObject *);}
meth_wxHtmlPrintout_OnBeginDocument(PyObject *,PyObject *)507 static PyObject *meth_wxHtmlPrintout_OnBeginDocument(PyObject *, PyObject *)
508 {
509
510 /* Raise an exception if the arguments couldn't be parsed. */
511 sipNoMethod(SIP_NULLPTR, sipName_HtmlPrintout, sipName_OnBeginDocument, SIP_NULLPTR);
512
513 return SIP_NULLPTR;
514 }
515
516
517 extern "C" {static PyObject *meth_wxHtmlPrintout_OnPreparePrinting(PyObject *, PyObject *);}
meth_wxHtmlPrintout_OnPreparePrinting(PyObject *,PyObject *)518 static PyObject *meth_wxHtmlPrintout_OnPreparePrinting(PyObject *, PyObject *)
519 {
520
521 /* Raise an exception if the arguments couldn't be parsed. */
522 sipNoMethod(SIP_NULLPTR, sipName_HtmlPrintout, sipName_OnPreparePrinting, SIP_NULLPTR);
523
524 return SIP_NULLPTR;
525 }
526
527
528 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
529 extern "C" {static void *cast_wxHtmlPrintout(void *, const sipTypeDef *);}
cast_wxHtmlPrintout(void * sipCppV,const sipTypeDef * targetType)530 static void *cast_wxHtmlPrintout(void *sipCppV, const sipTypeDef *targetType)
531 {
532 ::wxHtmlPrintout *sipCpp = reinterpret_cast< ::wxHtmlPrintout *>(sipCppV);
533
534 if (targetType == sipType_wxPrintout)
535 return static_cast< ::wxPrintout *>(sipCpp);
536
537 if (targetType == sipType_wxObject)
538 return static_cast< ::wxObject *>(sipCpp);
539
540 return sipCppV;
541 }
542
543
544 /* Call the instance's destructor. */
545 extern "C" {static void release_wxHtmlPrintout(void *, int);}
release_wxHtmlPrintout(void * sipCppV,int sipState)546 static void release_wxHtmlPrintout(void *sipCppV, int sipState)
547 {
548 Py_BEGIN_ALLOW_THREADS
549
550 if (sipState & SIP_DERIVED_CLASS)
551 delete reinterpret_cast<sipwxHtmlPrintout *>(sipCppV);
552 else
553 delete reinterpret_cast< ::wxHtmlPrintout *>(sipCppV);
554
555 Py_END_ALLOW_THREADS
556 }
557
558
559 extern "C" {static void dealloc_wxHtmlPrintout(sipSimpleWrapper *);}
dealloc_wxHtmlPrintout(sipSimpleWrapper * sipSelf)560 static void dealloc_wxHtmlPrintout(sipSimpleWrapper *sipSelf)
561 {
562 if (sipIsDerivedClass(sipSelf))
563 reinterpret_cast<sipwxHtmlPrintout *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
564
565 if (sipIsOwnedByPython(sipSelf))
566 {
567 release_wxHtmlPrintout(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
568 }
569 }
570
571
572 extern "C" {static void *init_type_wxHtmlPrintout(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxHtmlPrintout(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)573 static void *init_type_wxHtmlPrintout(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
574 {
575 sipwxHtmlPrintout *sipCpp = SIP_NULLPTR;
576
577 {
578 const ::wxString& titledef = "Printout";
579 const ::wxString* title = &titledef;
580 int titleState = 0;
581
582 static const char *sipKwdList[] = {
583 sipName_title,
584 };
585
586 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1", sipType_wxString,&title, &titleState))
587 {
588
589 if (!wxPyCheckForApp()) return NULL;
590
591 PyErr_Clear();
592
593 Py_BEGIN_ALLOW_THREADS
594 sipCpp = new sipwxHtmlPrintout(*title);
595 Py_END_ALLOW_THREADS
596 sipReleaseType(const_cast< ::wxString *>(title),sipType_wxString,titleState);
597
598 if (PyErr_Occurred())
599 {
600 delete sipCpp;
601 return SIP_NULLPTR;
602 }
603
604 sipCpp->sipPySelf = sipSelf;
605
606 return sipCpp;
607 }
608 }
609
610 return SIP_NULLPTR;
611 }
612
613
614 /* Define this type's super-types. */
615 static sipEncodedTypeDef supers_wxHtmlPrintout[] = {{31, 0, 1}};
616
617
618 static PyMethodDef methods_wxHtmlPrintout[] = {
619 {SIP_MLNAME_CAST(sipName_AddFilter), SIP_MLMETH_CAST(meth_wxHtmlPrintout_AddFilter), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlPrintout_AddFilter)},
620 {SIP_MLNAME_CAST(sipName_GetPageInfo), meth_wxHtmlPrintout_GetPageInfo, METH_VARARGS, SIP_NULLPTR},
621 {SIP_MLNAME_CAST(sipName_HasPage), meth_wxHtmlPrintout_HasPage, METH_VARARGS, SIP_NULLPTR},
622 {SIP_MLNAME_CAST(sipName_OnBeginDocument), meth_wxHtmlPrintout_OnBeginDocument, METH_VARARGS, SIP_NULLPTR},
623 {SIP_MLNAME_CAST(sipName_OnPreparePrinting), meth_wxHtmlPrintout_OnPreparePrinting, METH_VARARGS, SIP_NULLPTR},
624 {SIP_MLNAME_CAST(sipName_OnPrintPage), meth_wxHtmlPrintout_OnPrintPage, METH_VARARGS, SIP_NULLPTR},
625 {SIP_MLNAME_CAST(sipName_SetFonts), SIP_MLMETH_CAST(meth_wxHtmlPrintout_SetFonts), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlPrintout_SetFonts)},
626 {SIP_MLNAME_CAST(sipName_SetFooter), SIP_MLMETH_CAST(meth_wxHtmlPrintout_SetFooter), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlPrintout_SetFooter)},
627 {SIP_MLNAME_CAST(sipName_SetHeader), SIP_MLMETH_CAST(meth_wxHtmlPrintout_SetHeader), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlPrintout_SetHeader)},
628 {SIP_MLNAME_CAST(sipName_SetHtmlFile), SIP_MLMETH_CAST(meth_wxHtmlPrintout_SetHtmlFile), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlPrintout_SetHtmlFile)},
629 {SIP_MLNAME_CAST(sipName_SetHtmlText), SIP_MLMETH_CAST(meth_wxHtmlPrintout_SetHtmlText), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlPrintout_SetHtmlText)},
630 {SIP_MLNAME_CAST(sipName_SetMargins), SIP_MLMETH_CAST(meth_wxHtmlPrintout_SetMargins), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxHtmlPrintout_SetMargins)}
631 };
632
633 PyDoc_STRVAR(doc_wxHtmlPrintout, "HtmlPrintout(title=\"Printout\")\n"
634 "\n"
635 "This class serves as printout class for HTML documents.");
636
637
638 sipClassTypeDef sipTypeDef__html_wxHtmlPrintout = {
639 {
640 -1,
641 SIP_NULLPTR,
642 SIP_NULLPTR,
643 SIP_TYPE_SCC|SIP_TYPE_CLASS,
644 sipNameNr_wxHtmlPrintout,
645 {SIP_NULLPTR},
646 SIP_NULLPTR
647 },
648 {
649 sipNameNr_HtmlPrintout,
650 {0, 0, 1},
651 12, methods_wxHtmlPrintout,
652 0, SIP_NULLPTR,
653 0, SIP_NULLPTR,
654 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
655 },
656 doc_wxHtmlPrintout,
657 -1,
658 -1,
659 supers_wxHtmlPrintout,
660 SIP_NULLPTR,
661 init_type_wxHtmlPrintout,
662 SIP_NULLPTR,
663 SIP_NULLPTR,
664 #if PY_MAJOR_VERSION >= 3
665 SIP_NULLPTR,
666 SIP_NULLPTR,
667 #else
668 SIP_NULLPTR,
669 SIP_NULLPTR,
670 SIP_NULLPTR,
671 SIP_NULLPTR,
672 #endif
673 dealloc_wxHtmlPrintout,
674 SIP_NULLPTR,
675 SIP_NULLPTR,
676 SIP_NULLPTR,
677 release_wxHtmlPrintout,
678 cast_wxHtmlPrintout,
679 SIP_NULLPTR,
680 SIP_NULLPTR,
681 SIP_NULLPTR,
682 SIP_NULLPTR,
683 SIP_NULLPTR,
684 SIP_NULLPTR
685 };
686