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 _richtext.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13enum wxRichTextOddEvenPage 14{ 15 wxRICHTEXT_PAGE_ODD, 16 wxRICHTEXT_PAGE_EVEN, 17 wxRICHTEXT_PAGE_ALL 18}; 19 20enum wxRichTextPageLocation 21{ 22 wxRICHTEXT_PAGE_LEFT, 23 wxRICHTEXT_PAGE_CENTRE, 24 wxRICHTEXT_PAGE_RIGHT 25}; 26 27class wxRichTextHeaderFooterData : wxObject 28{ 29 %Docstring 30 RichTextHeaderFooterData() 31 RichTextHeaderFooterData(data) 32 33 This class represents header and footer data to be passed to the 34 wxRichTextPrinting and wxRichTextPrintout classes. 35 %End 36 %TypeHeaderCode 37 #include <wx/richtext/richtextprint.h> 38 %End 39 40public: 41 wxRichTextHeaderFooterData(); 42 43 wxRichTextHeaderFooterData( 44 const wxRichTextHeaderFooterData & data 45 ); 46 47 void Clear(); 48 %Docstring 49 Clear() 50 51 Clears all text. 52 %End 53 54 void Copy( 55 const wxRichTextHeaderFooterData & data 56 ); 57 %Docstring 58 Copy(data) 59 60 Copies the data. 61 %End 62 63 const wxFont & GetFont() const; 64 %Docstring 65 GetFont() -> wx.Font 66 67 Returns the font specified for printing the header and footer. 68 %End 69 70 int GetFooterMargin() const; 71 %Docstring 72 GetFooterMargin() -> int 73 74 Returns the margin between the text and the footer. 75 %End 76 77 wxString GetFooterText( 78 wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, 79 wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE 80 ) const; 81 %Docstring 82 GetFooterText(page=RICHTEXT_PAGE_EVEN, location=RICHTEXT_PAGE_CENTRE) -> String 83 84 Returns the footer text on odd or even pages, and at a given position 85 on the page (left, centre or right). 86 %End 87 88 int GetHeaderMargin() const; 89 %Docstring 90 GetHeaderMargin() -> int 91 92 Returns the margin between the text and the header. 93 %End 94 95 wxString GetHeaderText( 96 wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, 97 wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE 98 ) const; 99 %Docstring 100 GetHeaderText(page=RICHTEXT_PAGE_EVEN, location=RICHTEXT_PAGE_CENTRE) -> String 101 102 Returns the header text on odd or even pages, and at a given position 103 on the page (left, centre or right). 104 %End 105 106 bool GetShowOnFirstPage() const; 107 %Docstring 108 GetShowOnFirstPage() -> bool 109 110 Returns true if the header and footer will be shown on the first page. 111 %End 112 113 wxString GetText( 114 int headerFooter, 115 wxRichTextOddEvenPage page, 116 wxRichTextPageLocation location 117 ) const; 118 %Docstring 119 GetText(headerFooter, page, location) -> String 120 121 Helper function for getting the header or footer text, odd or even 122 pages, and at a given position on the page (left, centre or right). 123 %End 124 125 const wxColour & GetTextColour() const; 126 %Docstring 127 GetTextColour() -> wx.Colour 128 129 Returns the text colour for drawing the header and footer. 130 %End 131 132 void Init(); 133 %Docstring 134 Init() 135 136 Initialises the object. 137 %End 138 139 void SetFont( 140 const wxFont & font 141 ); 142 %Docstring 143 SetFont(font) 144 145 Sets the font for drawing the header and footer. 146 %End 147 148 void SetFooterText( 149 const wxString & text, 150 wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, 151 wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE 152 ); 153 %Docstring 154 SetFooterText(text, page=RICHTEXT_PAGE_ALL, location=RICHTEXT_PAGE_CENTRE) 155 156 Sets the footer text on odd or even pages, and at a given position on 157 the page (left, centre or right). 158 %End 159 160 void SetHeaderText( 161 const wxString & text, 162 wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, 163 wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE 164 ); 165 %Docstring 166 SetHeaderText(text, page=RICHTEXT_PAGE_ALL, location=RICHTEXT_PAGE_CENTRE) 167 168 Sets the header text on odd or even pages, and at a given position on 169 the page (left, centre or right). 170 %End 171 172 void SetMargins( 173 int headerMargin, 174 int footerMargin 175 ); 176 %Docstring 177 SetMargins(headerMargin, footerMargin) 178 179 Sets the margins between text and header or footer, in tenths of a 180 millimeter. 181 %End 182 183 void SetShowOnFirstPage( 184 bool showOnFirstPage 185 ); 186 %Docstring 187 SetShowOnFirstPage(showOnFirstPage) 188 189 Pass true to show the header or footer on first page (the default). 190 %End 191 192 void SetText( 193 const wxString & text, 194 int headerFooter, 195 wxRichTextOddEvenPage page, 196 wxRichTextPageLocation location 197 ); 198 %Docstring 199 SetText(text, headerFooter, page, location) 200 201 Helper function for setting the header or footer text, odd or even 202 pages, and at a given position on the page (left, centre or right). 203 %End 204 205 void SetTextColour( 206 const wxColour & col 207 ); 208 %Docstring 209 SetTextColour(col) 210 211 Sets the text colour for drawing the header and footer. 212 %End 213 214 public: 215 216 217 %Property(name=Font, get=GetFont, set=SetFont) 218 %Property(name=FooterMargin, get=GetFooterMargin) 219 %Property(name=FooterText, get=GetFooterText, set=SetFooterText) 220 %Property(name=HeaderMargin, get=GetHeaderMargin) 221 %Property(name=HeaderText, get=GetHeaderText, set=SetHeaderText) 222 %Property(name=ShowOnFirstPage, get=GetShowOnFirstPage, set=SetShowOnFirstPage) 223 %Property(name=TextColour, get=GetTextColour, set=SetTextColour) 224}; // end of class wxRichTextHeaderFooterData 225 226 227class wxRichTextPrintout : wxPrintout 228{ 229 %Docstring 230 RichTextPrintout(title="Printout") 231 232 This class implements print layout for wxRichTextBuffer. 233 %End 234 %TypeHeaderCode 235 #include <wx/richtext/richtextprint.h> 236 %End 237 238public: 239 wxRichTextPrintout( 240 const wxString & title = "Printout" 241 ); 242 243 void CalculateScaling( 244 wxDC * dc, 245 wxRect & textRect, 246 wxRect & headerRect, 247 wxRect & footerRect 248 ); 249 %Docstring 250 CalculateScaling(dc, textRect, headerRect, footerRect) 251 252 Calculates scaling and text, header and footer rectangles. 253 %End 254 255 const wxRichTextHeaderFooterData & GetHeaderFooterData() const; 256 %Docstring 257 GetHeaderFooterData() -> RichTextHeaderFooterData 258 259 Returns the header and footer data associated with the printout. 260 %End 261 262 virtual 263 void GetPageInfo( 264 int * minPage /Out/, 265 int * maxPage /Out/, 266 int * selPageFrom /Out/, 267 int * selPageTo /Out/ 268 ); 269 %Docstring 270 GetPageInfo() -> (minPage, maxPage, selPageFrom, selPageTo) 271 272 Gets the page information. 273 %End 274 275 wxRichTextBuffer * GetRichTextBuffer() const; 276 %Docstring 277 GetRichTextBuffer() -> RichTextBuffer 278 279 Returns a pointer to the buffer being rendered. 280 %End 281 282 virtual 283 bool HasPage( 284 int page 285 ); 286 %Docstring 287 HasPage(page) -> bool 288 289 Returns true if the given page exists in the printout. 290 %End 291 292 virtual 293 void OnPreparePrinting(); 294 %Docstring 295 OnPreparePrinting() 296 297 Prepares for printing, laying out the buffer and calculating 298 pagination. 299 %End 300 301 virtual 302 bool OnPrintPage( 303 int page 304 ); 305 %Docstring 306 OnPrintPage(page) -> bool 307 308 Does the actual printing for this page. 309 %End 310 311 void SetHeaderFooterData( 312 const wxRichTextHeaderFooterData & data 313 ); 314 %Docstring 315 SetHeaderFooterData(data) 316 317 Sets the header and footer data associated with the printout. 318 %End 319 320 void SetMargins( 321 int top = 254, 322 int bottom = 254, 323 int left = 254, 324 int right = 254 325 ); 326 %Docstring 327 SetMargins(top=254, bottom=254, left=254, right=254) 328 329 Sets margins in 10ths of millimetre. 330 %End 331 332 void SetRichTextBuffer( 333 wxRichTextBuffer * buffer 334 ); 335 %Docstring 336 SetRichTextBuffer(buffer) 337 338 Sets the buffer to print. 339 %End 340 341 public: 342 343 344 %Property(name=HeaderFooterData, get=GetHeaderFooterData, set=SetHeaderFooterData) 345 %Property(name=RichTextBuffer, get=GetRichTextBuffer, set=SetRichTextBuffer) 346}; // end of class wxRichTextPrintout 347 348 349class wxRichTextPrinting : wxObject 350{ 351 %Docstring 352 RichTextPrinting(name="Printing", parentWindow=None) 353 354 This class provides a simple interface for performing wxRichTextBuffer 355 printing and previewing. 356 %End 357 %TypeHeaderCode 358 #include <wx/richtext/richtextprint.h> 359 %End 360 361public: 362 wxRichTextPrinting( 363 const wxString & name = "Printing", 364 wxWindow * parentWindow = NULL 365 ); 366 367 wxString GetFooterText( 368 wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, 369 wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE 370 ) const; 371 %Docstring 372 GetFooterText(page=RICHTEXT_PAGE_EVEN, location=RICHTEXT_PAGE_CENTRE) -> String 373 374 A convenience function to get the footer text. 375 %End 376 377 const wxRichTextHeaderFooterData & GetHeaderFooterData() const; 378 %Docstring 379 GetHeaderFooterData() -> RichTextHeaderFooterData 380 381 Returns the internal wxRichTextHeaderFooterData object. 382 %End 383 384 wxString GetHeaderText( 385 wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, 386 wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE 387 ) const; 388 %Docstring 389 GetHeaderText(page=RICHTEXT_PAGE_EVEN, location=RICHTEXT_PAGE_CENTRE) -> String 390 391 A convenience function to get the header text. 392 %End 393 394 wxPageSetupDialogData * GetPageSetupData(); 395 %Docstring 396 GetPageSetupData() -> wx.PageSetupDialogData 397 398 Returns a pointer to the internal page setup data. 399 %End 400 401 wxWindow * GetParentWindow() const; 402 %Docstring 403 GetParentWindow() -> wx.Window 404 405 Returns the parent window to be used for the preview window and 406 printing wait dialog. 407 %End 408 409 const wxRect & GetPreviewRect() const; 410 %Docstring 411 GetPreviewRect() -> wx.Rect 412 413 Returns the dimensions to be used for the preview window. 414 %End 415 416 wxPrintData * GetPrintData(); 417 %Docstring 418 GetPrintData() -> wx.PrintData 419 420 Returns a pointer to the internal print data. 421 %End 422 423 const wxString & GetTitle() const; 424 %Docstring 425 GetTitle() -> String 426 427 Returns the title of the preview window or printing wait caption. 428 %End 429 430 void PageSetup(); 431 %Docstring 432 PageSetup() 433 434 Shows the page setup dialog. 435 %End 436 437 bool PreviewBuffer( 438 const wxRichTextBuffer & buffer 439 ); 440 %Docstring 441 PreviewBuffer(buffer) -> bool 442 443 Shows a preview window for the given buffer. 444 %End 445 446 bool PreviewFile( 447 const wxString & richTextFile 448 ); 449 %Docstring 450 PreviewFile(richTextFile) -> bool 451 452 Shows a preview window for the given file. 453 %End 454 455 bool PrintBuffer( 456 const wxRichTextBuffer & buffer, 457 bool showPrintDialog = true 458 ); 459 %Docstring 460 PrintBuffer(buffer, showPrintDialog=True) -> bool 461 462 Prints the given buffer. 463 %End 464 465 bool PrintFile( 466 const wxString & richTextFile, 467 bool showPrintDialog = true 468 ); 469 %Docstring 470 PrintFile(richTextFile, showPrintDialog=True) -> bool 471 472 Prints the given file. 473 %End 474 475 void SetFooterText( 476 const wxString & text, 477 wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, 478 wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE 479 ); 480 %Docstring 481 SetFooterText(text, page=RICHTEXT_PAGE_ALL, location=RICHTEXT_PAGE_CENTRE) 482 483 A convenience function to set the footer text. 484 %End 485 486 void SetHeaderFooterData( 487 const wxRichTextHeaderFooterData & data 488 ); 489 %Docstring 490 SetHeaderFooterData(data) 491 492 Sets the internal wxRichTextHeaderFooterData object. 493 %End 494 495 void SetHeaderFooterFont( 496 const wxFont & font 497 ); 498 %Docstring 499 SetHeaderFooterFont(font) 500 501 Sets the wxRichTextHeaderFooterData font. 502 %End 503 504 void SetHeaderFooterTextColour( 505 const wxColour & colour 506 ); 507 %Docstring 508 SetHeaderFooterTextColour(colour) 509 510 Sets the wxRichTextHeaderFooterData text colour. 511 %End 512 513 void SetHeaderText( 514 const wxString & text, 515 wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, 516 wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE 517 ); 518 %Docstring 519 SetHeaderText(text, page=RICHTEXT_PAGE_ALL, location=RICHTEXT_PAGE_CENTRE) 520 521 A convenience function to set the header text. 522 %End 523 524 void SetPageSetupData( 525 const wxPageSetupDialogData & pageSetupData 526 ); 527 %Docstring 528 SetPageSetupData(pageSetupData) 529 530 Sets the page setup data. 531 %End 532 533 void SetParentWindow( 534 wxWindow * parent 535 ); 536 %Docstring 537 SetParentWindow(parent) 538 539 Sets the parent window to be used for the preview window and printing 540 wait dialog. 541 %End 542 543 void SetPreviewRect( 544 const wxRect & rect 545 ); 546 %Docstring 547 SetPreviewRect(rect) 548 549 Sets the dimensions to be used for the preview window. 550 %End 551 552 void SetPrintData( 553 const wxPrintData & printData 554 ); 555 %Docstring 556 SetPrintData(printData) 557 558 Sets the print data. 559 %End 560 561 void SetShowOnFirstPage( 562 bool show 563 ); 564 %Docstring 565 SetShowOnFirstPage(show) 566 567 Pass true to show the header and footer on the first page. 568 %End 569 570 void SetTitle( 571 const wxString & title 572 ); 573 %Docstring 574 SetTitle(title) 575 576 Pass the title of the preview window or printing wait caption. 577 %End 578 579 private: 580 wxRichTextPrinting(const wxRichTextPrinting&); 581 582 583 public: 584 585 586 %Property(name=FooterText, get=GetFooterText, set=SetFooterText) 587 %Property(name=HeaderFooterData, get=GetHeaderFooterData, set=SetHeaderFooterData) 588 %Property(name=HeaderText, get=GetHeaderText, set=SetHeaderText) 589 %Property(name=PageSetupData, get=GetPageSetupData, set=SetPageSetupData) 590 %Property(name=ParentWindow, get=GetParentWindow, set=SetParentWindow) 591 %Property(name=PreviewRect, get=GetPreviewRect, set=SetPreviewRect) 592 %Property(name=PrintData, get=GetPrintData, set=SetPrintData) 593 %Property(name=Title, get=GetTitle, set=SetTitle) 594}; // end of class wxRichTextPrinting 595 596 597 598//--------------------------------------------------------------------------- 599 600