1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _core.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13enum wxPrintBin 14{ 15 wxPRINTBIN_DEFAULT, 16 wxPRINTBIN_ONLYONE, 17 wxPRINTBIN_LOWER, 18 wxPRINTBIN_MIDDLE, 19 wxPRINTBIN_MANUAL, 20 wxPRINTBIN_ENVELOPE, 21 wxPRINTBIN_ENVMANUAL, 22 wxPRINTBIN_AUTO, 23 wxPRINTBIN_TRACTOR, 24 wxPRINTBIN_SMALLFMT, 25 wxPRINTBIN_LARGEFMT, 26 wxPRINTBIN_LARGECAPACITY, 27 wxPRINTBIN_CASSETTE, 28 wxPRINTBIN_FORMSOURCE, 29 wxPRINTBIN_USER 30}; 31 32class wxPageSetupDialogData : wxObject 33{ 34 %Docstring 35 PageSetupDialogData() 36 PageSetupDialogData(data) 37 PageSetupDialogData(printData) 38 39 This class holds a variety of information related to 40 wxPageSetupDialog. 41 %End 42 %TypeHeaderCode 43 #include <wx/cmndata.h> 44 %End 45 46public: 47 wxPageSetupDialogData(); 48 49 wxPageSetupDialogData( 50 const wxPageSetupDialogData & data 51 ); 52 53 wxPageSetupDialogData( 54 const wxPrintData & printData 55 ); 56 57 ~wxPageSetupDialogData(); 58 59 void EnableHelp( 60 bool flag 61 ); 62 %Docstring 63 EnableHelp(flag) 64 65 Enables or disables the "Help" button (Windows only). 66 %End 67 68 void EnableMargins( 69 bool flag 70 ); 71 %Docstring 72 EnableMargins(flag) 73 74 Enables or disables the margin controls (Windows only). 75 %End 76 77 void EnableOrientation( 78 bool flag 79 ); 80 %Docstring 81 EnableOrientation(flag) 82 83 Enables or disables the orientation control (Windows only). 84 %End 85 86 void EnablePaper( 87 bool flag 88 ); 89 %Docstring 90 EnablePaper(flag) 91 92 Enables or disables the paper size control (Windows only). 93 %End 94 95 void EnablePrinter( 96 bool flag 97 ); 98 %Docstring 99 EnablePrinter(flag) 100 101 Enables or disables the "Printer" button, which invokes a printer 102 setup dialog. 103 %End 104 105 bool GetDefaultInfo() const; 106 %Docstring 107 GetDefaultInfo() -> bool 108 109 Returns true if the dialog will simply return default printer 110 information (such as orientation) instead of showing a dialog (Windows 111 only). 112 %End 113 114 bool GetDefaultMinMargins() const; 115 %Docstring 116 GetDefaultMinMargins() -> bool 117 118 Returns true if the page setup dialog will take its minimum margin 119 values from the currently selected printer properties (Windows only). 120 %End 121 122 bool GetEnableHelp() const; 123 %Docstring 124 GetEnableHelp() -> bool 125 126 Returns true if the printer setup button is enabled. 127 %End 128 129 bool GetEnableMargins() const; 130 %Docstring 131 GetEnableMargins() -> bool 132 133 Returns true if the margin controls are enabled (Windows only). 134 %End 135 136 bool GetEnableOrientation() const; 137 %Docstring 138 GetEnableOrientation() -> bool 139 140 Returns true if the orientation control is enabled (Windows only). 141 %End 142 143 bool GetEnablePaper() const; 144 %Docstring 145 GetEnablePaper() -> bool 146 147 Returns true if the paper size control is enabled (Windows only). 148 %End 149 150 bool GetEnablePrinter() const; 151 %Docstring 152 GetEnablePrinter() -> bool 153 154 Returns true if the printer setup button is enabled. 155 %End 156 157 wxPoint GetMarginBottomRight() const; 158 %Docstring 159 GetMarginBottomRight() -> Point 160 161 Returns the right (x) and bottom (y) margins in millimetres. 162 %End 163 164 wxPoint GetMarginTopLeft() const; 165 %Docstring 166 GetMarginTopLeft() -> Point 167 168 Returns the left (x) and top (y) margins in millimetres. 169 %End 170 171 wxPoint GetMinMarginBottomRight() const; 172 %Docstring 173 GetMinMarginBottomRight() -> Point 174 175 Returns the right (x) and bottom (y) minimum margins the user can 176 enter (Windows only). 177 %End 178 179 wxPoint GetMinMarginTopLeft() const; 180 %Docstring 181 GetMinMarginTopLeft() -> Point 182 183 Returns the left (x) and top (y) minimum margins the user can enter 184 (Windows only). 185 %End 186 187 wxPaperSize GetPaperId() const; 188 %Docstring 189 GetPaperId() -> PaperSize 190 191 Returns the paper id (stored in the internal wxPrintData object). 192 %End 193 194 wxSize GetPaperSize() const; 195 %Docstring 196 GetPaperSize() -> Size 197 198 Returns the paper size in millimetres. 199 %End 200 201 wxPrintData & GetPrintData(); 202 %Docstring 203 GetPrintData() -> PrintData 204 205 Returns a reference to the print data associated with this object. 206 %End 207 208 bool IsOk() const; 209 %Docstring 210 IsOk() -> bool 211 212 Returns true if the print data associated with the dialog data is 213 valid. 214 %End 215 216 void SetDefaultInfo( 217 bool flag 218 ); 219 %Docstring 220 SetDefaultInfo(flag) 221 222 Pass true if the dialog will simply return default printer information 223 (such as orientation) instead of showing a dialog (Windows only). 224 %End 225 226 void SetDefaultMinMargins( 227 bool flag 228 ); 229 %Docstring 230 SetDefaultMinMargins(flag) 231 232 Pass true if the page setup dialog will take its minimum margin values 233 from the currently selected printer properties (Windows only). 234 %End 235 236 void SetMarginBottomRight( 237 const wxPoint & pt 238 ); 239 %Docstring 240 SetMarginBottomRight(pt) 241 242 Sets the right (x) and bottom (y) margins in millimetres. 243 %End 244 245 void SetMarginTopLeft( 246 const wxPoint & pt 247 ); 248 %Docstring 249 SetMarginTopLeft(pt) 250 251 Sets the left (x) and top (y) margins in millimetres. 252 %End 253 254 void SetMinMarginBottomRight( 255 const wxPoint & pt 256 ); 257 %Docstring 258 SetMinMarginBottomRight(pt) 259 260 Sets the right (x) and bottom (y) minimum margins the user can enter 261 (Windows only). 262 %End 263 264 void SetMinMarginTopLeft( 265 const wxPoint & pt 266 ); 267 %Docstring 268 SetMinMarginTopLeft(pt) 269 270 Sets the left (x) and top (y) minimum margins the user can enter 271 (Windows only). 272 %End 273 274 void SetPaperId( 275 wxPaperSize id 276 ); 277 %Docstring 278 SetPaperId(id) 279 280 Sets the paper size id. 281 %End 282 283 void SetPaperSize( 284 const wxSize & size 285 ); 286 %Docstring 287 SetPaperSize(size) 288 289 Sets the paper size in millimetres. 290 %End 291 292 void SetPrintData( 293 const wxPrintData & printData 294 ); 295 %Docstring 296 SetPrintData(printData) 297 298 Sets the print data associated with this object. 299 %End 300 301 int __nonzero__(); 302 %Docstring 303 __nonzero__() -> int 304 %End 305 %MethodCode 306 PyErr_Clear(); 307 Py_BEGIN_ALLOW_THREADS 308 sipRes = _wxPageSetupDialogData___nonzero__(sipCpp); 309 Py_END_ALLOW_THREADS 310 if (PyErr_Occurred()) sipIsErr = 1; 311 %End 312 %TypeCode 313 int _wxPageSetupDialogData___nonzero__(wxPageSetupDialogData* self) 314 { 315 return self->IsOk(); 316 } 317 %End 318 319 int __bool__(); 320 %Docstring 321 __bool__() -> int 322 %End 323 %MethodCode 324 PyErr_Clear(); 325 Py_BEGIN_ALLOW_THREADS 326 sipRes = _wxPageSetupDialogData___bool__(sipCpp); 327 Py_END_ALLOW_THREADS 328 if (PyErr_Occurred()) sipIsErr = 1; 329 %End 330 %TypeCode 331 int _wxPageSetupDialogData___bool__(wxPageSetupDialogData* self) 332 { 333 return self->IsOk(); 334 } 335 %End 336 337 %Property(name=MarginBottomRight, get=GetMarginBottomRight, set=SetMarginBottomRight) 338 %Property(name=MarginTopLeft, get=GetMarginTopLeft, set=SetMarginTopLeft) 339 %Property(name=MinMarginBottomRight, get=GetMinMarginBottomRight, set=SetMinMarginBottomRight) 340 %Property(name=MinMarginTopLeft, get=GetMinMarginTopLeft, set=SetMinMarginTopLeft) 341 %Property(name=PaperId, get=GetPaperId, set=SetPaperId) 342 %Property(name=PaperSize, get=GetPaperSize, set=SetPaperSize) 343 %Property(name=PrintData, get=GetPrintData, set=SetPrintData) 344}; // end of class wxPageSetupDialogData 345 346 347class wxPrintData : wxObject 348{ 349 %Docstring 350 PrintData() 351 PrintData(data) 352 353 This class holds a variety of information related to printers and 354 printer device contexts. 355 %End 356 %TypeHeaderCode 357 #include <wx/cmndata.h> 358 %End 359 360public: 361 wxPrintData(); 362 363 wxPrintData( 364 const wxPrintData & data 365 ); 366 367 ~wxPrintData(); 368 369 wxPrintBin GetBin() const; 370 %Docstring 371 GetBin() -> PrintBin 372 373 Returns the current bin (papersource). 374 %End 375 376 bool GetCollate() const; 377 %Docstring 378 GetCollate() -> bool 379 380 Returns true if collation is on. 381 %End 382 383 bool GetColour() const; 384 %Docstring 385 GetColour() -> bool 386 387 Returns true if colour printing is on. 388 %End 389 390 wxDuplexMode GetDuplex() const; 391 %Docstring 392 GetDuplex() -> DuplexMode 393 394 Returns the duplex mode. 395 %End 396 397 int GetNoCopies() const; 398 %Docstring 399 GetNoCopies() -> int 400 401 Returns the number of copies requested by the user. 402 %End 403 404 wxPrintOrientation GetOrientation() const; 405 %Docstring 406 GetOrientation() -> PrintOrientation 407 408 Gets the orientation. 409 %End 410 411 wxPaperSize GetPaperId() const; 412 %Docstring 413 GetPaperId() -> PaperSize 414 415 Returns the paper size id. 416 %End 417 418 const wxString & GetPrinterName() const; 419 %Docstring 420 GetPrinterName() -> String 421 422 Returns the printer name. 423 %End 424 425 wxPrintQuality GetQuality() const; 426 %Docstring 427 GetQuality() -> PrintQuality 428 429 Returns the current print quality. 430 %End 431 432 bool IsOk() const; 433 %Docstring 434 IsOk() -> bool 435 436 Returns true if the print data is valid for using in print dialogs. 437 %End 438 439 void SetBin( 440 wxPrintBin flag 441 ); 442 %Docstring 443 SetBin(flag) 444 445 Sets the current bin. 446 %End 447 448 void SetCollate( 449 bool flag 450 ); 451 %Docstring 452 SetCollate(flag) 453 454 Sets collation to on or off. 455 %End 456 457 void SetColour( 458 bool flag 459 ); 460 %Docstring 461 SetColour(flag) 462 463 Sets colour printing on or off. 464 %End 465 466 void SetDuplex( 467 wxDuplexMode mode 468 ); 469 %Docstring 470 SetDuplex(mode) 471 472 Returns the duplex mode. 473 %End 474 475 void SetNoCopies( 476 int n 477 ); 478 %Docstring 479 SetNoCopies(n) 480 481 Sets the default number of copies to be printed out. 482 %End 483 484 void SetOrientation( 485 wxPrintOrientation orientation 486 ); 487 %Docstring 488 SetOrientation(orientation) 489 490 Sets the orientation. 491 %End 492 493 void SetPaperId( 494 wxPaperSize paperId 495 ); 496 %Docstring 497 SetPaperId(paperId) 498 499 Sets the paper id. 500 %End 501 502 void SetPrinterName( 503 const wxString & printerName 504 ); 505 %Docstring 506 SetPrinterName(printerName) 507 508 Sets the printer name. 509 %End 510 511 void SetQuality( 512 wxPrintQuality quality 513 ); 514 %Docstring 515 SetQuality(quality) 516 517 Sets the desired print quality. 518 %End 519 520 wxString GetFilename() const; 521 %Docstring 522 GetFilename() -> String 523 %End 524 525 void SetFilename( 526 const wxString & filename 527 ); 528 %Docstring 529 SetFilename(filename) 530 %End 531 532 wxPrintMode GetPrintMode() const; 533 %Docstring 534 GetPrintMode() -> PrintMode 535 %End 536 537 void SetPrintMode( 538 wxPrintMode printMode 539 ); 540 %Docstring 541 SetPrintMode(printMode) 542 %End 543 544 wxSize* GetPaperSize(); 545 %Docstring 546 GetPaperSize() -> Size 547 %End 548 %MethodCode 549 PyErr_Clear(); 550 Py_BEGIN_ALLOW_THREADS 551 sipRes = _wxPrintData_GetPaperSize(sipCpp); 552 Py_END_ALLOW_THREADS 553 if (PyErr_Occurred()) sipIsErr = 1; 554 %End 555 %TypeCode 556 wxSize* _wxPrintData_GetPaperSize(wxPrintData* self) 557 { 558 return new wxSize(self->GetPaperSize()); 559 } 560 %End 561 562 void SetPaperSize(const wxSize* sz); 563 %Docstring 564 SetPaperSize(sz) 565 %End 566 %MethodCode 567 PyErr_Clear(); 568 Py_BEGIN_ALLOW_THREADS 569 _wxPrintData_SetPaperSize(sipCpp, sz); 570 Py_END_ALLOW_THREADS 571 if (PyErr_Occurred()) sipIsErr = 1; 572 %End 573 %TypeCode 574 void _wxPrintData_SetPaperSize(wxPrintData* self, const wxSize* sz) 575 { 576 self->SetPaperSize(*sz); 577 } 578 %End 579 580 int __nonzero__(); 581 %Docstring 582 __nonzero__() -> int 583 %End 584 %MethodCode 585 PyErr_Clear(); 586 Py_BEGIN_ALLOW_THREADS 587 sipRes = _wxPrintData___nonzero__(sipCpp); 588 Py_END_ALLOW_THREADS 589 if (PyErr_Occurred()) sipIsErr = 1; 590 %End 591 %TypeCode 592 int _wxPrintData___nonzero__(wxPrintData* self) 593 { 594 return self->IsOk(); 595 } 596 %End 597 598 int __bool__(); 599 %Docstring 600 __bool__() -> int 601 %End 602 %MethodCode 603 PyErr_Clear(); 604 Py_BEGIN_ALLOW_THREADS 605 sipRes = _wxPrintData___bool__(sipCpp); 606 Py_END_ALLOW_THREADS 607 if (PyErr_Occurred()) sipIsErr = 1; 608 %End 609 %TypeCode 610 int _wxPrintData___bool__(wxPrintData* self) 611 { 612 return self->IsOk(); 613 } 614 %End 615 616 PyObject* GetPrivData(); 617 %Docstring 618 GetPrivData() -> PyObject 619 %End 620 %MethodCode 621 PyErr_Clear(); 622 Py_BEGIN_ALLOW_THREADS 623 sipRes = _wxPrintData_GetPrivData(sipCpp); 624 Py_END_ALLOW_THREADS 625 if (PyErr_Occurred()) sipIsErr = 1; 626 %End 627 %TypeCode 628 PyObject* _wxPrintData_GetPrivData(wxPrintData* self) 629 { 630 PyObject* data; 631 wxPyThreadBlocker blocker; 632 data = PyBytes_FromStringAndSize(self->GetPrivData(), 633 self->GetPrivDataLen()); 634 return data; 635 } 636 %End 637 638 void SetPrivData(PyObject* data); 639 %Docstring 640 SetPrivData(data) 641 %End 642 %MethodCode 643 PyErr_Clear(); 644 Py_BEGIN_ALLOW_THREADS 645 _wxPrintData_SetPrivData(sipCpp, data); 646 Py_END_ALLOW_THREADS 647 if (PyErr_Occurred()) sipIsErr = 1; 648 %End 649 %TypeCode 650 void _wxPrintData_SetPrivData(wxPrintData* self, PyObject* data) 651 { 652 wxPyThreadBlocker blocker; 653 if (! PyBytes_Check(data)) { 654 wxPyErr_SetString(PyExc_TypeError, "Expected string object"); 655 return; 656 } 657 658 self->SetPrivData(PyBytes_AS_STRING(data), PyBytes_GET_SIZE(data)); 659 } 660 %End 661 662 public: 663 664 665 %Property(name=Bin, get=GetBin, set=SetBin) 666 %Property(name=Collate, get=GetCollate, set=SetCollate) 667 %Property(name=Colour, get=GetColour, set=SetColour) 668 %Property(name=Duplex, get=GetDuplex, set=SetDuplex) 669 %Property(name=Filename, get=GetFilename, set=SetFilename) 670 %Property(name=NoCopies, get=GetNoCopies, set=SetNoCopies) 671 %Property(name=Orientation, get=GetOrientation, set=SetOrientation) 672 %Property(name=PaperId, get=GetPaperId, set=SetPaperId) 673 %Property(name=PaperSize, get=GetPaperSize, set=SetPaperSize) 674 %Property(name=PrintMode, get=GetPrintMode, set=SetPrintMode) 675 %Property(name=PrinterName, get=GetPrinterName, set=SetPrinterName) 676 %Property(name=PrivData, get=GetPrivData, set=SetPrivData) 677 %Property(name=Quality, get=GetQuality, set=SetQuality) 678}; // end of class wxPrintData 679 680 681class wxPrintDialogData : wxObject 682{ 683 %Docstring 684 PrintDialogData() 685 PrintDialogData(dialogData) 686 PrintDialogData(printData) 687 688 This class holds information related to the visual characteristics of 689 wxPrintDialog. 690 %End 691 %TypeHeaderCode 692 #include <wx/cmndata.h> 693 %End 694 695public: 696 wxPrintDialogData(); 697 698 wxPrintDialogData( 699 const wxPrintDialogData & dialogData 700 ); 701 702 wxPrintDialogData( 703 const wxPrintData & printData 704 ); 705 706 ~wxPrintDialogData(); 707 708 void EnableHelp( 709 bool flag 710 ); 711 %Docstring 712 EnableHelp(flag) 713 714 Enables or disables the "Help" button. 715 %End 716 717 void EnablePageNumbers( 718 bool flag 719 ); 720 %Docstring 721 EnablePageNumbers(flag) 722 723 Enables or disables the "Page numbers" controls. 724 %End 725 726 void EnablePrintToFile( 727 bool flag 728 ); 729 %Docstring 730 EnablePrintToFile(flag) 731 732 Enables or disables the "Print to file" checkbox. 733 %End 734 735 void EnableSelection( 736 bool flag 737 ); 738 %Docstring 739 EnableSelection(flag) 740 741 Enables or disables the "Selection" radio button. 742 %End 743 744 bool GetAllPages() const; 745 %Docstring 746 GetAllPages() -> bool 747 748 Returns true if the user requested that all pages be printed. 749 %End 750 751 bool GetCollate() const; 752 %Docstring 753 GetCollate() -> bool 754 755 Returns true if the user requested that the document(s) be collated. 756 %End 757 758 int GetFromPage() const; 759 %Docstring 760 GetFromPage() -> int 761 762 Returns the from page number, as entered by the user. 763 %End 764 765 int GetMaxPage() const; 766 %Docstring 767 GetMaxPage() -> int 768 769 Returns the maximum page number. 770 %End 771 772 int GetMinPage() const; 773 %Docstring 774 GetMinPage() -> int 775 776 Returns the minimum page number. 777 %End 778 779 int GetNoCopies() const; 780 %Docstring 781 GetNoCopies() -> int 782 783 Returns the number of copies requested by the user. 784 %End 785 786 wxPrintData & GetPrintData(); 787 %Docstring 788 GetPrintData() -> PrintData 789 790 Returns a reference to the internal wxPrintData object. 791 %End 792 793 bool GetPrintToFile() const; 794 %Docstring 795 GetPrintToFile() -> bool 796 797 Returns true if the user has selected printing to a file. 798 %End 799 800 bool GetSelection() const; 801 %Docstring 802 GetSelection() -> bool 803 804 Returns true if the user requested that the selection be printed 805 (where "selection" is a concept specific to the application). 806 %End 807 808 int GetToPage() const; 809 %Docstring 810 GetToPage() -> int 811 812 Returns the "print to" page number, as entered by the user. 813 %End 814 815 bool IsOk() const; 816 %Docstring 817 IsOk() -> bool 818 819 Returns true if the print data is valid for using in print dialogs. 820 %End 821 822 void SetCollate( 823 bool flag 824 ); 825 %Docstring 826 SetCollate(flag) 827 828 Sets the "Collate" checkbox to true or false. 829 %End 830 831 void SetFromPage( 832 int page 833 ); 834 %Docstring 835 SetFromPage(page) 836 837 Sets the from page number. 838 %End 839 840 void SetMaxPage( 841 int page 842 ); 843 %Docstring 844 SetMaxPage(page) 845 846 Sets the maximum page number. 847 %End 848 849 void SetMinPage( 850 int page 851 ); 852 %Docstring 853 SetMinPage(page) 854 855 Sets the minimum page number. 856 %End 857 858 void SetNoCopies( 859 int n 860 ); 861 %Docstring 862 SetNoCopies(n) 863 864 Sets the default number of copies the user has requested to be printed 865 out. 866 %End 867 868 void SetPrintData( 869 const wxPrintData & printData 870 ); 871 %Docstring 872 SetPrintData(printData) 873 874 Sets the internal wxPrintData. 875 %End 876 877 void SetPrintToFile( 878 bool flag 879 ); 880 %Docstring 881 SetPrintToFile(flag) 882 883 Sets the "Print to file" checkbox to true or false. 884 %End 885 886 void SetSelection( 887 bool flag 888 ); 889 %Docstring 890 SetSelection(flag) 891 892 Selects the "Selection" radio button. 893 %End 894 895 void SetToPage( 896 int page 897 ); 898 %Docstring 899 SetToPage(page) 900 901 Sets the "print to" page number. 902 %End 903 904 int __nonzero__(); 905 %Docstring 906 __nonzero__() -> int 907 %End 908 %MethodCode 909 PyErr_Clear(); 910 Py_BEGIN_ALLOW_THREADS 911 sipRes = _wxPrintDialogData___nonzero__(sipCpp); 912 Py_END_ALLOW_THREADS 913 if (PyErr_Occurred()) sipIsErr = 1; 914 %End 915 %TypeCode 916 int _wxPrintDialogData___nonzero__(wxPrintDialogData* self) 917 { 918 return self->IsOk(); 919 } 920 %End 921 922 int __bool__(); 923 %Docstring 924 __bool__() -> int 925 %End 926 %MethodCode 927 PyErr_Clear(); 928 Py_BEGIN_ALLOW_THREADS 929 sipRes = _wxPrintDialogData___bool__(sipCpp); 930 Py_END_ALLOW_THREADS 931 if (PyErr_Occurred()) sipIsErr = 1; 932 %End 933 %TypeCode 934 int _wxPrintDialogData___bool__(wxPrintDialogData* self) 935 { 936 return self->IsOk(); 937 } 938 %End 939 940 public: 941 942 943 %Property(name=AllPages, get=GetAllPages) 944 %Property(name=Collate, get=GetCollate, set=SetCollate) 945 %Property(name=FromPage, get=GetFromPage, set=SetFromPage) 946 %Property(name=MaxPage, get=GetMaxPage, set=SetMaxPage) 947 %Property(name=MinPage, get=GetMinPage, set=SetMinPage) 948 %Property(name=NoCopies, get=GetNoCopies, set=SetNoCopies) 949 %Property(name=PrintData, get=GetPrintData, set=SetPrintData) 950 %Property(name=PrintToFile, get=GetPrintToFile, set=SetPrintToFile) 951 %Property(name=Selection, get=GetSelection, set=SetSelection) 952 %Property(name=ToPage, get=GetToPage, set=SetToPage) 953}; // end of class wxPrintDialogData 954 955 956 957//--------------------------------------------------------------------------- 958 959