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 _aui.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13enum wxAuiNotebookOption 14{ 15 wxAUI_NB_TOP, 16 wxAUI_NB_LEFT, 17 wxAUI_NB_RIGHT, 18 wxAUI_NB_BOTTOM, 19 wxAUI_NB_TAB_SPLIT, 20 wxAUI_NB_TAB_MOVE, 21 wxAUI_NB_TAB_EXTERNAL_MOVE, 22 wxAUI_NB_TAB_FIXED_WIDTH, 23 wxAUI_NB_SCROLL_BUTTONS, 24 wxAUI_NB_WINDOWLIST_BUTTON, 25 wxAUI_NB_CLOSE_BUTTON, 26 wxAUI_NB_CLOSE_ON_ACTIVE_TAB, 27 wxAUI_NB_CLOSE_ON_ALL_TABS, 28 wxAUI_NB_MIDDLE_CLICK_CLOSE, 29 wxAUI_NB_DEFAULT_STYLE 30}; 31 32wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSE /PyName=wxEVT_AUINOTEBOOK_PAGE_CLOSE/; 33 34wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSED /PyName=wxEVT_AUINOTEBOOK_PAGE_CLOSED/; 35 36wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGED /PyName=wxEVT_AUINOTEBOOK_PAGE_CHANGED/; 37 38wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGING /PyName=wxEVT_AUINOTEBOOK_PAGE_CHANGING/; 39 40wxEventType wxEVT_AUINOTEBOOK_BUTTON /PyName=wxEVT_AUINOTEBOOK_BUTTON/; 41 42wxEventType wxEVT_AUINOTEBOOK_BEGIN_DRAG /PyName=wxEVT_AUINOTEBOOK_BEGIN_DRAG/; 43 44wxEventType wxEVT_AUINOTEBOOK_END_DRAG /PyName=wxEVT_AUINOTEBOOK_END_DRAG/; 45 46wxEventType wxEVT_AUINOTEBOOK_DRAG_MOTION /PyName=wxEVT_AUINOTEBOOK_DRAG_MOTION/; 47 48wxEventType wxEVT_AUINOTEBOOK_ALLOW_DND /PyName=wxEVT_AUINOTEBOOK_ALLOW_DND/; 49 50wxEventType wxEVT_AUINOTEBOOK_DRAG_DONE /PyName=wxEVT_AUINOTEBOOK_DRAG_DONE/; 51 52wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN /PyName=wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN/; 53 54wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP /PyName=wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP/; 55 56wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN /PyName=wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN/; 57 58wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_UP /PyName=wxEVT_AUINOTEBOOK_TAB_RIGHT_UP/; 59 60wxEventType wxEVT_AUINOTEBOOK_BG_DCLICK /PyName=wxEVT_AUINOTEBOOK_BG_DCLICK/; 61 62class wxAuiNotebook : wxBookCtrlBase 63{ 64 %Docstring 65 AuiNotebook() 66 AuiNotebook(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=AUI_NB_DEFAULT_STYLE) 67 68 wxAuiNotebook is part of the wxAUI class framework, which represents a 69 notebook control, managing multiple windows with associated tabs. 70 %End 71 %TypeHeaderCode 72 #include <wx/aui/auibook.h> 73 %End 74 75public: 76 wxAuiNotebook(); 77 %PreMethodCode 78 if (!wxPyCheckForApp()) return NULL; 79 %End 80 81 wxAuiNotebook( 82 wxWindow * parent /TransferThis/, 83 wxWindowID id = wxID_ANY, 84 const wxPoint & pos = wxDefaultPosition, 85 const wxSize & size = wxDefaultSize, 86 long style = wxAUI_NB_DEFAULT_STYLE 87 ); 88 %PreMethodCode 89 if (!wxPyCheckForApp()) return NULL; 90 %End 91 92 bool AddPage( 93 wxWindow * page, 94 const wxString & caption, 95 bool select = false, 96 const wxBitmap & bitmap = wxNullBitmap 97 ); 98 %Docstring 99 AddPage(page, caption, select=False, bitmap=wx.NullBitmap) -> bool 100 AddPage(page, text, select, imageId) -> bool 101 102 Adds a page. 103 %End 104 105 bool AddPage( 106 wxWindow * page, 107 const wxString & text, 108 bool select, 109 int imageId 110 ); 111 112 void AdvanceSelection( 113 bool forward = true 114 ); 115 %Docstring 116 AdvanceSelection(forward=True) 117 118 Sets the selection to the next or previous page. 119 %End 120 121 int ChangeSelection( 122 size_t n 123 ); 124 %Docstring 125 ChangeSelection(n) -> int 126 127 Changes the selection for the given page, returning the previous 128 selection. 129 %End 130 131 bool Create( 132 wxWindow * parent /TransferThis/, 133 wxWindowID id = wxID_ANY, 134 const wxPoint & pos = wxDefaultPosition, 135 const wxSize & size = wxDefaultSize, 136 long style = 0 137 ); 138 %Docstring 139 Create(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0) -> bool 140 141 Creates the notebook window. 142 %End 143 144 bool DeleteAllPages(); 145 %Docstring 146 DeleteAllPages() -> bool 147 148 Deletes all pages. 149 %End 150 151 bool DeletePage( 152 size_t page 153 ); 154 %Docstring 155 DeletePage(page) -> bool 156 157 Deletes a page at the given index. 158 %End 159 160 wxAuiTabArt * GetArtProvider() const; 161 %Docstring 162 GetArtProvider() -> AuiTabArt 163 164 Returns the associated art provider. 165 %End 166 167 wxWindow * GetCurrentPage() const; 168 %Docstring 169 GetCurrentPage() -> wx.Window 170 171 Returns the currently selected page or NULL. 172 %End 173 174 int GetHeightForPageHeight( 175 int pageHeight 176 ); 177 %Docstring 178 GetHeightForPageHeight(pageHeight) -> int 179 180 Returns the desired height of the notebook for the given page height. 181 %End 182 183 wxWindow * GetPage( 184 size_t page_idx 185 ) const; 186 %Docstring 187 GetPage(page_idx) -> wx.Window 188 189 Returns the page specified by the given index. 190 %End 191 192 wxBitmap GetPageBitmap( 193 size_t page 194 ) const; 195 %Docstring 196 GetPageBitmap(page) -> wx.Bitmap 197 198 Returns the tab bitmap for the page. 199 %End 200 201 size_t GetPageCount() const; 202 %Docstring 203 GetPageCount() -> size_t 204 205 Returns the number of pages in the notebook. 206 %End 207 208 int GetPageIndex( 209 wxWindow * page_wnd 210 ) const; 211 %Docstring 212 GetPageIndex(page_wnd) -> int 213 214 Returns the page index for the specified window. 215 %End 216 217 wxString GetPageText( 218 size_t page 219 ) const; 220 %Docstring 221 GetPageText(page) -> String 222 223 Returns the tab label for the page. 224 %End 225 226 wxString GetPageToolTip( 227 size_t pageIdx 228 ) const; 229 %Docstring 230 GetPageToolTip(pageIdx) -> String 231 232 Returns the tooltip for the tab label of the page. 233 %End 234 235 int GetSelection() const; 236 %Docstring 237 GetSelection() -> int 238 239 Returns the currently selected page. 240 %End 241 242 int GetTabCtrlHeight() const; 243 %Docstring 244 GetTabCtrlHeight() -> int 245 246 Returns the height of the tab control. 247 %End 248 249 bool InsertPage( 250 size_t page_idx, 251 wxWindow * page, 252 const wxString & caption, 253 bool select = false, 254 const wxBitmap & bitmap = wxNullBitmap 255 ); 256 %Docstring 257 InsertPage(page_idx, page, caption, select=False, bitmap=wx.NullBitmap) -> bool 258 InsertPage(index, page, text, select, imageId) -> bool 259 260 InsertPage() is similar to AddPage, but allows the ability to specify 261 the insert location. 262 %End 263 264 bool InsertPage( 265 size_t index, 266 wxWindow * page, 267 const wxString & text, 268 bool select, 269 int imageId 270 ); 271 272 bool RemovePage( 273 size_t page 274 ); 275 %Docstring 276 RemovePage(page) -> bool 277 278 Removes a page, without deleting the window pointer. 279 %End 280 281 void SetArtProvider( 282 wxAuiTabArt * art /Transfer/ 283 ); 284 %Docstring 285 SetArtProvider(art) 286 287 Sets the art provider to be used by the notebook. 288 %End 289 290 bool SetFont( 291 const wxFont & font 292 ); 293 %Docstring 294 SetFont(font) -> bool 295 296 Sets the font for drawing the tab labels, using a bold version of the 297 font for selected tab labels. 298 %End 299 300 void SetMeasuringFont( 301 const wxFont & font 302 ); 303 %Docstring 304 SetMeasuringFont(font) 305 306 Sets the font for measuring tab labels. 307 %End 308 309 void SetNormalFont( 310 const wxFont & font 311 ); 312 %Docstring 313 SetNormalFont(font) 314 315 Sets the font for drawing unselected tab labels. 316 %End 317 318 bool SetPageBitmap( 319 size_t page, 320 const wxBitmap & bitmap 321 ); 322 %Docstring 323 SetPageBitmap(page, bitmap) -> bool 324 325 Sets the bitmap for the page. 326 %End 327 328 bool SetPageImage( 329 size_t n, 330 int imageId 331 ); 332 %Docstring 333 SetPageImage(n, imageId) -> bool 334 335 Sets the image index for the given page. 336 %End 337 338 bool SetPageText( 339 size_t page, 340 const wxString & text 341 ); 342 %Docstring 343 SetPageText(page, text) -> bool 344 345 Sets the tab label for the page. 346 %End 347 348 bool SetPageToolTip( 349 size_t page, 350 const wxString & text 351 ); 352 %Docstring 353 SetPageToolTip(page, text) -> bool 354 355 Sets the tooltip displayed when hovering over the tab label of the 356 page. 357 %End 358 359 void SetSelectedFont( 360 const wxFont & font 361 ); 362 %Docstring 363 SetSelectedFont(font) 364 365 Sets the font for drawing selected tab labels. 366 %End 367 368 int SetSelection( 369 size_t new_page 370 ); 371 %Docstring 372 SetSelection(new_page) -> int 373 374 Sets the page selection. 375 %End 376 377 void SetTabCtrlHeight( 378 int height 379 ); 380 %Docstring 381 SetTabCtrlHeight(height) 382 383 Sets the tab height. 384 %End 385 386 void SetUniformBitmapSize( 387 const wxSize & size 388 ); 389 %Docstring 390 SetUniformBitmapSize(size) 391 392 Ensure that all tabs have the same height, even if some of them don't 393 have bitmaps. 394 %End 395 396 void Split( 397 size_t page, 398 int direction 399 ); 400 %Docstring 401 Split(page, direction) 402 403 Split performs a split operation programmatically. 404 %End 405 406 bool ShowWindowMenu(); 407 %Docstring 408 ShowWindowMenu() -> bool 409 410 Shows the window menu for the active tab control associated with this 411 notebook, and returns true if a selection was made. 412 %End 413 414 int GetPageImage( 415 size_t nPage 416 ) const; 417 %Docstring 418 GetPageImage(nPage) -> int 419 420 Returns the image index for the given page. 421 %End 422 423 public: 424 virtual wxPoint GetClientAreaOrigin() const; 425 virtual bool Validate(); 426 virtual bool TransferDataToWindow(); 427 virtual bool TransferDataFromWindow(); 428 virtual void InitDialog(); 429 virtual bool AcceptsFocus() const; 430 virtual bool AcceptsFocusRecursively() const; 431 virtual bool AcceptsFocusFromKeyboard() const; 432 virtual void AddChild( wxWindowBase *child ); 433 virtual void RemoveChild( wxWindowBase *child ); 434 virtual void InheritAttributes(); 435 virtual bool ShouldInheritColours() const; 436 virtual void OnInternalIdle(); 437 virtual wxWindow *GetMainWindowOfCompositeControl(); 438 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 439 virtual void SetCanFocus(bool canFocus); 440 virtual bool Destroy(); 441 virtual void SetValidator( const wxValidator &validator ); 442 virtual wxValidator* GetValidator(); 443 444 445 protected: 446 virtual bool ProcessEvent(wxEvent & event); 447 virtual void DoEnable(bool enable); 448 virtual void DoGetPosition(int *x, int *y) const; 449 virtual void DoGetSize(int *width, int *height) const; 450 virtual void DoGetClientSize(int *width, int *height) const; 451 virtual wxSize DoGetBestSize() const; 452 virtual wxSize DoGetBestClientSize() const; 453 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 454 virtual void DoSetClientSize(int width, int height); 455 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 456 virtual wxSize DoGetBorderSize() const; 457 virtual void DoMoveWindow(int x, int y, int width, int height); 458 virtual void DoSetWindowVariant( wxWindowVariant variant); 459 virtual wxBorder GetDefaultBorder() const; 460 virtual wxBorder GetDefaultBorderForControl() const; 461 virtual void DoFreeze(); 462 virtual void DoThaw(); 463 virtual bool HasTransparentBackground(); 464 virtual bool TryBefore(wxEvent& event); 465 virtual bool TryAfter(wxEvent& event); 466 467 468 public: 469 470 471 static 472 wxVisualAttributes GetClassDefaultAttributes( 473 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 474 ); 475 %Docstring 476 GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes 477 %End 478 %PreMethodCode 479 if (!wxPyCheckForApp()) return NULL; 480 %End 481 482 virtual int HitTest(const wxPoint& pt, long* flags /Out/ = NULL) const; 483 484 485 public: 486 487 488 %Property(name=ArtProvider, get=GetArtProvider, set=SetArtProvider) 489 %Property(name=CurrentPage, get=GetCurrentPage) 490 %Property(name=PageCount, get=GetPageCount) 491 %Property(name=Selection, get=GetSelection, set=SetSelection) 492 %Property(name=TabCtrlHeight, get=GetTabCtrlHeight, set=SetTabCtrlHeight) 493}; // end of class wxAuiNotebook 494 495 496class wxAuiNotebookPage 497{ 498 %Docstring 499 A simple class which holds information about the notebook's pages and 500 their state. 501 %End 502 %TypeHeaderCode 503 #include <wx/aui/auibook.h> 504 %End 505 506public: 507 wxWindow * window; 508 509 wxString caption; 510 511 wxString tooltip; 512 513 wxBitmap bitmap; 514 515 wxRect rect; 516 517 bool active; 518 519}; // end of class wxAuiNotebookPage 520 521 522class wxAuiTabContainerButton 523{ 524 %Docstring 525 A simple class which holds information about wxAuiNotebook tab buttons 526 and their state. 527 %End 528 %TypeHeaderCode 529 #include <wx/aui/auibook.h> 530 %End 531 532public: 533 int id; 534 535 int curState; 536 537 int location; 538 539 wxBitmap bitmap; 540 541 wxBitmap disBitmap; 542 543 wxRect rect; 544 545}; // end of class wxAuiTabContainerButton 546 547 548class wxAuiTabContainer 549{ 550 %Docstring 551 AuiTabContainer() 552 553 wxAuiTabContainer is a class which contains information about each 554 tab. 555 %End 556 %TypeHeaderCode 557 #include <wx/aui/auibook.h> 558 %End 559 560public: 561 wxAuiTabContainer(); 562 563 virtual 564 ~wxAuiTabContainer(); 565 566 void SetArtProvider( 567 wxAuiTabArt * art 568 ); 569 %Docstring 570 SetArtProvider(art) 571 %End 572 573 wxAuiTabArt * GetArtProvider() const; 574 %Docstring 575 GetArtProvider() -> AuiTabArt 576 %End 577 578 void SetFlags( 579 unsigned int flags 580 ); 581 %Docstring 582 SetFlags(flags) 583 %End 584 585 unsigned int GetFlags() const; 586 %Docstring 587 GetFlags() -> unsignedint 588 %End 589 590 bool AddPage( 591 wxWindow * page, 592 const wxAuiNotebookPage & info 593 ); 594 %Docstring 595 AddPage(page, info) -> bool 596 %End 597 598 bool InsertPage( 599 wxWindow * page, 600 const wxAuiNotebookPage & info, 601 size_t idx 602 ); 603 %Docstring 604 InsertPage(page, info, idx) -> bool 605 %End 606 607 bool MovePage( 608 wxWindow * page, 609 size_t newIdx 610 ); 611 %Docstring 612 MovePage(page, newIdx) -> bool 613 %End 614 615 bool RemovePage( 616 wxWindow * page 617 ); 618 %Docstring 619 RemovePage(page) -> bool 620 %End 621 622 bool SetActivePage( 623 wxWindow * page 624 ); 625 %Docstring 626 SetActivePage(page) -> bool 627 SetActivePage(page) -> bool 628 %End 629 630 bool SetActivePage( 631 size_t page 632 ); 633 634 void SetNoneActive(); 635 %Docstring 636 SetNoneActive() 637 %End 638 639 int GetActivePage() const; 640 %Docstring 641 GetActivePage() -> int 642 %End 643 644 bool TabHitTest( 645 int x, 646 int y, 647 wxWindow ** hit 648 ) const; 649 %Docstring 650 TabHitTest(x, y, hit) -> bool 651 %End 652 653 bool ButtonHitTest( 654 int x, 655 int y, 656 wxAuiTabContainerButton ** hit 657 ) const; 658 %Docstring 659 ButtonHitTest(x, y, hit) -> bool 660 %End 661 662 wxWindow * GetWindowFromIdx( 663 size_t idx 664 ) const; 665 %Docstring 666 GetWindowFromIdx(idx) -> wx.Window 667 %End 668 669 int GetIdxFromWindow( 670 wxWindow * page 671 ) const; 672 %Docstring 673 GetIdxFromWindow(page) -> int 674 %End 675 676 size_t GetPageCount() const; 677 %Docstring 678 GetPageCount() -> size_t 679 %End 680 681 wxAuiNotebookPage & GetPage( 682 size_t idx 683 ); 684 %Docstring 685 GetPage(idx) -> AuiNotebookPage 686 %End 687 688 wxAuiNotebookPageArray & GetPages(); 689 %Docstring 690 GetPages() -> AuiNotebookPageArray 691 %End 692 693 void SetNormalFont( 694 const wxFont & normalFont 695 ); 696 %Docstring 697 SetNormalFont(normalFont) 698 %End 699 700 void SetSelectedFont( 701 const wxFont & selectedFont 702 ); 703 %Docstring 704 SetSelectedFont(selectedFont) 705 %End 706 707 void SetMeasuringFont( 708 const wxFont & measuringFont 709 ); 710 %Docstring 711 SetMeasuringFont(measuringFont) 712 %End 713 714 void SetColour( 715 const wxColour & colour 716 ); 717 %Docstring 718 SetColour(colour) 719 %End 720 721 void SetActiveColour( 722 const wxColour & colour 723 ); 724 %Docstring 725 SetActiveColour(colour) 726 %End 727 728 void DoShowHide(); 729 %Docstring 730 DoShowHide() 731 %End 732 733 void SetRect( 734 const wxRect & rect 735 ); 736 %Docstring 737 SetRect(rect) 738 %End 739 740 void RemoveButton( 741 int id 742 ); 743 %Docstring 744 RemoveButton(id) 745 %End 746 747 void AddButton( 748 int id, 749 int location, 750 const wxBitmap & normalBitmap = wxNullBitmap, 751 const wxBitmap & disabledBitmap = wxNullBitmap 752 ); 753 %Docstring 754 AddButton(id, location, normalBitmap=wx.NullBitmap, disabledBitmap=wx.NullBitmap) 755 %End 756 757 size_t GetTabOffset() const; 758 %Docstring 759 GetTabOffset() -> size_t 760 %End 761 762 void SetTabOffset( 763 size_t offset 764 ); 765 %Docstring 766 SetTabOffset(offset) 767 %End 768 769 bool IsTabVisible( 770 int tabPage, 771 int tabOffset, 772 wxDC * dc, 773 wxWindow * wnd 774 ); 775 %Docstring 776 IsTabVisible(tabPage, tabOffset, dc, wnd) -> bool 777 %End 778 779 void MakeTabVisible( 780 int tabPage, 781 wxWindow * win 782 ); 783 %Docstring 784 MakeTabVisible(tabPage, win) 785 %End 786 787 public: 788 789 790 %Property(name=ActivePage, get=GetActivePage, set=SetActivePage) 791 %Property(name=ArtProvider, get=GetArtProvider, set=SetArtProvider) 792 %Property(name=Flags, get=GetFlags, set=SetFlags) 793 %Property(name=PageCount, get=GetPageCount) 794 %Property(name=Pages, get=GetPages) 795 %Property(name=TabOffset, get=GetTabOffset, set=SetTabOffset) 796}; // end of class wxAuiTabContainer 797 798 799class wxAuiTabArt /Abstract/ 800{ 801 %Docstring 802 AuiTabArt() 803 804 Tab art provider defines all the drawing functions used by 805 wxAuiNotebook. 806 %End 807 %TypeHeaderCode 808 #include <wx/aui/auibook.h> 809 %End 810 811public: 812 wxAuiTabArt(); 813 814 virtual 815 wxAuiTabArt * Clone() = 0; 816 %Docstring 817 Clone() -> AuiTabArt 818 819 Clones the art object. 820 %End 821 822 virtual 823 void DrawBackground( 824 wxDC & dc, 825 wxWindow * wnd, 826 const wxRect & rect 827 ) = 0; 828 %Docstring 829 DrawBackground(dc, wnd, rect) 830 831 Draws a background on the given area. 832 %End 833 834 virtual 835 void DrawButton( 836 wxDC & dc, 837 wxWindow * wnd, 838 const wxRect & in_rect, 839 int bitmap_id, 840 int button_state, 841 int orientation, 842 wxRect * out_rect 843 ) = 0; 844 %Docstring 845 DrawButton(dc, wnd, in_rect, bitmap_id, button_state, orientation, out_rect) 846 847 Draws a button. 848 %End 849 850 virtual 851 void DrawTab( 852 wxDC & dc, 853 wxWindow * wnd, 854 const wxAuiNotebookPage & page, 855 const wxRect & rect, 856 int close_button_state, 857 wxRect * out_tab_rect, 858 wxRect * out_button_rect, 859 int * x_extent 860 ) = 0; 861 %Docstring 862 DrawTab(dc, wnd, page, rect, close_button_state, out_tab_rect, out_button_rect, x_extent) 863 864 Draws a tab. 865 %End 866 867 virtual 868 int GetBestTabCtrlSize( 869 wxWindow * , 870 const wxAuiNotebookPageArray & , 871 const wxSize & 872 ) = 0; 873 %Docstring 874 GetBestTabCtrlSize(, , ) -> int 875 876 Returns the tab control size. 877 %End 878 879 virtual 880 int GetIndentSize() = 0; 881 %Docstring 882 GetIndentSize() -> int 883 884 Returns the indent size. 885 %End 886 887 virtual 888 wxSize GetTabSize( 889 wxDC & dc, 890 wxWindow * wnd, 891 const wxString & caption, 892 const wxBitmap & bitmap, 893 bool active, 894 int close_button_state, 895 int * x_extent 896 ) = 0; 897 %Docstring 898 GetTabSize(dc, wnd, caption, bitmap, active, close_button_state, x_extent) -> wx.Size 899 900 Returns the tab size for the given caption, bitmap and state. 901 %End 902 903 virtual 904 void SetFlags( 905 unsigned int flags 906 ) = 0; 907 %Docstring 908 SetFlags(flags) 909 910 Sets flags. 911 %End 912 913 virtual 914 void SetMeasuringFont( 915 const wxFont & font 916 ) = 0; 917 %Docstring 918 SetMeasuringFont(font) 919 920 Sets the font used for calculating measurements. 921 %End 922 923 virtual 924 void SetNormalFont( 925 const wxFont & font 926 ) = 0; 927 %Docstring 928 SetNormalFont(font) 929 930 Sets the normal font for drawing labels. 931 %End 932 933 virtual 934 void SetSelectedFont( 935 const wxFont & font 936 ) = 0; 937 %Docstring 938 SetSelectedFont(font) 939 940 Sets the font for drawing text for selected UI elements. 941 %End 942 943 virtual 944 void SetColour( 945 const wxColour & colour 946 ) = 0; 947 %Docstring 948 SetColour(colour) 949 950 Sets the colour of the inactive tabs. 951 %End 952 953 virtual 954 void SetActiveColour( 955 const wxColour & colour 956 ) = 0; 957 %Docstring 958 SetActiveColour(colour) 959 960 Sets the colour of the selected tab. 961 %End 962 963 virtual 964 void SetSizingInfo( 965 const wxSize & tab_ctrl_size, 966 size_t tab_count 967 ) = 0; 968 %Docstring 969 SetSizingInfo(tab_ctrl_size, tab_count) 970 971 Sets sizing information. 972 %End 973 974 public: 975 976 977 %Property(name=IndentSize, get=GetIndentSize) 978}; // end of class wxAuiTabArt 979 980 981class wxAuiDefaultTabArt : wxAuiTabArt 982{ 983 %Docstring 984 AuiDefaultTabArt() 985 986 Default art provider for wxAuiNotebook. 987 %End 988 %TypeHeaderCode 989 #include <wx/aui/auibook.h> 990 %End 991 992public: 993 wxAuiDefaultTabArt(); 994 995 virtual 996 ~wxAuiDefaultTabArt(); 997 998 virtual 999 wxAuiTabArt * Clone(); 1000 %Docstring 1001 Clone() -> AuiTabArt 1002 1003 Clones the art object. 1004 %End 1005 1006 virtual 1007 void SetFlags( 1008 unsigned int flags 1009 ); 1010 %Docstring 1011 SetFlags(flags) 1012 1013 Sets flags. 1014 %End 1015 1016 virtual 1017 void SetSizingInfo( 1018 const wxSize & tab_ctrl_size, 1019 size_t tab_count 1020 ); 1021 %Docstring 1022 SetSizingInfo(tab_ctrl_size, tab_count) 1023 1024 Sets sizing information. 1025 %End 1026 1027 virtual 1028 void SetNormalFont( 1029 const wxFont & font 1030 ); 1031 %Docstring 1032 SetNormalFont(font) 1033 1034 Sets the normal font for drawing labels. 1035 %End 1036 1037 virtual 1038 void SetSelectedFont( 1039 const wxFont & font 1040 ); 1041 %Docstring 1042 SetSelectedFont(font) 1043 1044 Sets the font for drawing text for selected UI elements. 1045 %End 1046 1047 virtual 1048 void SetMeasuringFont( 1049 const wxFont & font 1050 ); 1051 %Docstring 1052 SetMeasuringFont(font) 1053 1054 Sets the font used for calculating measurements. 1055 %End 1056 1057 virtual 1058 void SetColour( 1059 const wxColour & colour 1060 ); 1061 %Docstring 1062 SetColour(colour) 1063 1064 Sets the colour of the inactive tabs. 1065 %End 1066 1067 virtual 1068 void SetActiveColour( 1069 const wxColour & colour 1070 ); 1071 %Docstring 1072 SetActiveColour(colour) 1073 1074 Sets the colour of the selected tab. 1075 %End 1076 1077 virtual 1078 void DrawBackground( 1079 wxDC & dc, 1080 wxWindow * wnd, 1081 const wxRect & rect 1082 ); 1083 %Docstring 1084 DrawBackground(dc, wnd, rect) 1085 1086 Draws a background on the given area. 1087 %End 1088 1089 virtual 1090 void DrawTab( 1091 wxDC & dc, 1092 wxWindow * wnd, 1093 const wxAuiNotebookPage & page, 1094 const wxRect & rect, 1095 int close_button_state, 1096 wxRect * out_tab_rect, 1097 wxRect * out_button_rect, 1098 int * x_extent 1099 ); 1100 %Docstring 1101 DrawTab(dc, wnd, page, rect, close_button_state, out_tab_rect, out_button_rect, x_extent) 1102 1103 Draws a tab. 1104 %End 1105 1106 virtual 1107 void DrawButton( 1108 wxDC & dc, 1109 wxWindow * wnd, 1110 const wxRect & in_rect, 1111 int bitmap_id, 1112 int button_state, 1113 int orientation, 1114 wxRect * out_rect 1115 ); 1116 %Docstring 1117 DrawButton(dc, wnd, in_rect, bitmap_id, button_state, orientation, out_rect) 1118 1119 Draws a button. 1120 %End 1121 1122 virtual 1123 int GetIndentSize(); 1124 %Docstring 1125 GetIndentSize() -> int 1126 1127 Returns the indent size. 1128 %End 1129 1130 virtual 1131 wxSize GetTabSize( 1132 wxDC & dc, 1133 wxWindow * wnd, 1134 const wxString & caption, 1135 const wxBitmap & bitmap, 1136 bool active, 1137 int close_button_state, 1138 int * x_extent 1139 ); 1140 %Docstring 1141 GetTabSize(dc, wnd, caption, bitmap, active, close_button_state, x_extent) -> wx.Size 1142 1143 Returns the tab size for the given caption, bitmap and state. 1144 %End 1145 1146 int ShowDropDown( 1147 wxWindow * wnd, 1148 const wxAuiNotebookPageArray & items, 1149 int activeIdx 1150 ); 1151 %Docstring 1152 ShowDropDown(wnd, items, activeIdx) -> int 1153 %End 1154 1155 virtual 1156 int GetBestTabCtrlSize( 1157 wxWindow * , 1158 const wxAuiNotebookPageArray & , 1159 const wxSize & 1160 ); 1161 %Docstring 1162 GetBestTabCtrlSize(, , ) -> int 1163 1164 Returns the tab control size. 1165 %End 1166 1167 public: 1168 1169 1170 %Property(name=IndentSize, get=GetIndentSize) 1171}; // end of class wxAuiDefaultTabArt 1172 1173 1174class wxAuiSimpleTabArt : wxAuiTabArt 1175{ 1176 %Docstring 1177 AuiSimpleTabArt() 1178 1179 Another standard tab art provider for wxAuiNotebook. 1180 %End 1181 %TypeHeaderCode 1182 #include <wx/aui/auibook.h> 1183 %End 1184 1185public: 1186 wxAuiSimpleTabArt(); 1187 1188 virtual 1189 ~wxAuiSimpleTabArt(); 1190 1191 virtual 1192 wxAuiTabArt * Clone(); 1193 %Docstring 1194 Clone() -> AuiTabArt 1195 1196 Clones the art object. 1197 %End 1198 1199 virtual 1200 void SetFlags( 1201 unsigned int flags 1202 ); 1203 %Docstring 1204 SetFlags(flags) 1205 1206 Sets flags. 1207 %End 1208 1209 virtual 1210 void SetSizingInfo( 1211 const wxSize & tab_ctrl_size, 1212 size_t tab_count 1213 ); 1214 %Docstring 1215 SetSizingInfo(tab_ctrl_size, tab_count) 1216 1217 Sets sizing information. 1218 %End 1219 1220 virtual 1221 void SetNormalFont( 1222 const wxFont & font 1223 ); 1224 %Docstring 1225 SetNormalFont(font) 1226 1227 Sets the normal font for drawing labels. 1228 %End 1229 1230 virtual 1231 void SetSelectedFont( 1232 const wxFont & font 1233 ); 1234 %Docstring 1235 SetSelectedFont(font) 1236 1237 Sets the font for drawing text for selected UI elements. 1238 %End 1239 1240 virtual 1241 void SetMeasuringFont( 1242 const wxFont & font 1243 ); 1244 %Docstring 1245 SetMeasuringFont(font) 1246 1247 Sets the font used for calculating measurements. 1248 %End 1249 1250 virtual 1251 void SetColour( 1252 const wxColour & colour 1253 ); 1254 %Docstring 1255 SetColour(colour) 1256 1257 Sets the colour of the inactive tabs. 1258 %End 1259 1260 virtual 1261 void SetActiveColour( 1262 const wxColour & colour 1263 ); 1264 %Docstring 1265 SetActiveColour(colour) 1266 1267 Sets the colour of the selected tab. 1268 %End 1269 1270 virtual 1271 void DrawBackground( 1272 wxDC & dc, 1273 wxWindow * wnd, 1274 const wxRect & rect 1275 ); 1276 %Docstring 1277 DrawBackground(dc, wnd, rect) 1278 1279 Draws a background on the given area. 1280 %End 1281 1282 virtual 1283 void DrawTab( 1284 wxDC & dc, 1285 wxWindow * wnd, 1286 const wxAuiNotebookPage & page, 1287 const wxRect & rect, 1288 int close_button_state, 1289 wxRect * out_tab_rect, 1290 wxRect * out_button_rect, 1291 int * x_extent 1292 ); 1293 %Docstring 1294 DrawTab(dc, wnd, page, rect, close_button_state, out_tab_rect, out_button_rect, x_extent) 1295 1296 Draws a tab. 1297 %End 1298 1299 virtual 1300 void DrawButton( 1301 wxDC & dc, 1302 wxWindow * wnd, 1303 const wxRect & in_rect, 1304 int bitmap_id, 1305 int button_state, 1306 int orientation, 1307 wxRect * out_rect 1308 ); 1309 %Docstring 1310 DrawButton(dc, wnd, in_rect, bitmap_id, button_state, orientation, out_rect) 1311 1312 Draws a button. 1313 %End 1314 1315 virtual 1316 int GetIndentSize(); 1317 %Docstring 1318 GetIndentSize() -> int 1319 1320 Returns the indent size. 1321 %End 1322 1323 virtual 1324 wxSize GetTabSize( 1325 wxDC & dc, 1326 wxWindow * wnd, 1327 const wxString & caption, 1328 const wxBitmap & bitmap, 1329 bool active, 1330 int close_button_state, 1331 int * x_extent 1332 ); 1333 %Docstring 1334 GetTabSize(dc, wnd, caption, bitmap, active, close_button_state, x_extent) -> wx.Size 1335 1336 Returns the tab size for the given caption, bitmap and state. 1337 %End 1338 1339 int ShowDropDown( 1340 wxWindow * wnd, 1341 const wxAuiNotebookPageArray & items, 1342 int activeIdx 1343 ); 1344 %Docstring 1345 ShowDropDown(wnd, items, activeIdx) -> int 1346 %End 1347 1348 virtual 1349 int GetBestTabCtrlSize( 1350 wxWindow * , 1351 const wxAuiNotebookPageArray & , 1352 const wxSize & 1353 ); 1354 %Docstring 1355 GetBestTabCtrlSize(, , ) -> int 1356 1357 Returns the tab control size. 1358 %End 1359 1360 public: 1361 1362 1363 %Property(name=IndentSize, get=GetIndentSize) 1364}; // end of class wxAuiSimpleTabArt 1365 1366 1367class wxAuiNotebookEvent : wxBookCtrlEvent 1368{ 1369 %Docstring 1370 AuiNotebookEvent(command_type=wx.wxEVT_NULL, win_id=0) 1371 1372 This class is used by the events generated by wxAuiNotebook. 1373 %End 1374 %TypeHeaderCode 1375 #include <wx/aui/auibook.h> 1376 %End 1377 1378public: 1379 wxAuiNotebookEvent( 1380 wxEventType command_type = wxEVT_NULL, 1381 int win_id = 0 1382 ); 1383 1384 wxEvent * Clone() /Factory/; 1385 %Docstring 1386 Clone() -> wx.Event 1387 %End 1388 1389 private: 1390 wxAuiNotebookEvent& operator=(const wxAuiNotebookEvent&); 1391 1392 1393}; // end of class wxAuiNotebookEvent 1394 1395 1396class wxAuiNotebookPageArray 1397{ 1398public: 1399 SIP_SSIZE_T __len__(); 1400 %MethodCode 1401 sipRes = sipCpp->GetCount(); 1402 %End 1403 1404 wxAuiNotebookPage& __getitem__(long index); 1405 %MethodCode 1406 if (0 > index) 1407 index += sipCpp->GetCount(); 1408 1409 if ((index < sipCpp->GetCount()) && (0 <= index)) { 1410 sipRes = &sipCpp->Item(index); 1411 } 1412 else { 1413 wxPyErr_SetString(PyExc_IndexError, "sequence index out of range"); 1414 sipError = sipErrorFail; 1415 } 1416 %End 1417 1418 1419 int __contains__(wxAuiNotebookPage& obj); 1420 %MethodCode 1421 int idx = sipCpp->Index(*obj, false); 1422 sipRes = idx != wxNOT_FOUND; 1423 %End 1424 1425 void append(wxAuiNotebookPage& obj); 1426 %MethodCode 1427 sipCpp->Add(*obj); 1428 %End 1429 1430 // TODO: add support for index(value, [start, [stop]]) 1431 int index(wxAuiNotebookPage& obj); 1432 %MethodCode 1433 int idx = sipCpp->Index(*obj, false); 1434 if (idx == wxNOT_FOUND) { 1435 sipError = sipErrorFail; 1436 wxPyErr_SetString(PyExc_ValueError, 1437 "sequence.index(x): x not in sequence"); 1438 } 1439 sipRes = idx; 1440 %End 1441}; 1442 1443%Extract(id=pycode_aui) 1444def _AuiNotebookPageArray___repr__(self): 1445 return "AuiNotebookPageArray: " + repr(list(self)) 1446AuiNotebookPageArray.__repr__ = _AuiNotebookPageArray___repr__ 1447del _AuiNotebookPageArray___repr__ 1448%End 1449 1450 1451class wxAuiTabContainerButtonArray 1452{ 1453public: 1454 SIP_SSIZE_T __len__(); 1455 %MethodCode 1456 sipRes = sipCpp->GetCount(); 1457 %End 1458 1459 wxAuiTabContainerButton& __getitem__(long index); 1460 %MethodCode 1461 if (0 > index) 1462 index += sipCpp->GetCount(); 1463 1464 if ((index < sipCpp->GetCount()) && (0 <= index)) { 1465 sipRes = &sipCpp->Item(index); 1466 } 1467 else { 1468 wxPyErr_SetString(PyExc_IndexError, "sequence index out of range"); 1469 sipError = sipErrorFail; 1470 } 1471 %End 1472 1473 1474 int __contains__(wxAuiTabContainerButton& obj); 1475 %MethodCode 1476 int idx = sipCpp->Index(*obj, false); 1477 sipRes = idx != wxNOT_FOUND; 1478 %End 1479 1480 void append(wxAuiTabContainerButton& obj); 1481 %MethodCode 1482 sipCpp->Add(*obj); 1483 %End 1484 1485 // TODO: add support for index(value, [start, [stop]]) 1486 int index(wxAuiTabContainerButton& obj); 1487 %MethodCode 1488 int idx = sipCpp->Index(*obj, false); 1489 if (idx == wxNOT_FOUND) { 1490 sipError = sipErrorFail; 1491 wxPyErr_SetString(PyExc_ValueError, 1492 "sequence.index(x): x not in sequence"); 1493 } 1494 sipRes = idx; 1495 %End 1496}; 1497 1498%Extract(id=pycode_aui) 1499def _AuiTabContainerButtonArray___repr__(self): 1500 return "AuiTabContainerButtonArray: " + repr(list(self)) 1501AuiTabContainerButtonArray.__repr__ = _AuiTabContainerButtonArray___repr__ 1502del _AuiTabContainerButtonArray___repr__ 1503%End 1504 1505 1506%Extract(id=pycode_aui) 1507EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSE, 1 ) 1508EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSED, 1 ) 1509EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGED, 1 ) 1510EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGING, 1 ) 1511EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BUTTON, 1 ) 1512EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BEGIN_DRAG, 1 ) 1513EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_END_DRAG, 1 ) 1514EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_MOTION, 1 ) 1515EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_AUINOTEBOOK_ALLOW_DND, 1 ) 1516EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_DONE, 1 ) 1517EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 ) 1518EVT_AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, 1 ) 1519EVT_AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 ) 1520EVT_AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, 1 ) 1521EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BG_DCLICK, 1 ) 1522 1523%End 1524 1525class wxAuiTabCtrl : wxControl, wxAuiTabContainer 1526{ 1527 %Docstring 1528 AuiTabCtrl(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0) 1529 %End 1530public: 1531 wxAuiTabCtrl( 1532 wxWindow* parent /TransferThis/, 1533 wxWindowID id = wxID_ANY, 1534 const wxPoint& pos = wxDefaultPosition, 1535 const wxSize& size = wxDefaultSize, 1536 long style = 0 1537 ); 1538 %PreMethodCode 1539 if (!wxPyCheckForApp()) return NULL; 1540 %End 1541 1542 bool IsDragging() const; 1543 %Docstring 1544 IsDragging() -> bool 1545 %End 1546 1547 public: 1548 virtual wxPoint GetClientAreaOrigin() const; 1549 virtual bool Validate(); 1550 virtual bool TransferDataToWindow(); 1551 virtual bool TransferDataFromWindow(); 1552 virtual void InitDialog(); 1553 virtual bool AcceptsFocus() const; 1554 virtual bool AcceptsFocusRecursively() const; 1555 virtual bool AcceptsFocusFromKeyboard() const; 1556 virtual void AddChild( wxWindowBase *child ); 1557 virtual void RemoveChild( wxWindowBase *child ); 1558 virtual void InheritAttributes(); 1559 virtual bool ShouldInheritColours() const; 1560 virtual void OnInternalIdle(); 1561 virtual wxWindow *GetMainWindowOfCompositeControl(); 1562 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 1563 virtual void SetCanFocus(bool canFocus); 1564 virtual bool Destroy(); 1565 virtual void SetValidator( const wxValidator &validator ); 1566 virtual wxValidator* GetValidator(); 1567 1568 1569 protected: 1570 virtual bool ProcessEvent(wxEvent & event); 1571 virtual void DoEnable(bool enable); 1572 virtual void DoGetPosition(int *x, int *y) const; 1573 virtual void DoGetSize(int *width, int *height) const; 1574 virtual void DoGetClientSize(int *width, int *height) const; 1575 virtual wxSize DoGetBestSize() const; 1576 virtual wxSize DoGetBestClientSize() const; 1577 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 1578 virtual void DoSetClientSize(int width, int height); 1579 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 1580 virtual wxSize DoGetBorderSize() const; 1581 virtual void DoMoveWindow(int x, int y, int width, int height); 1582 virtual void DoSetWindowVariant( wxWindowVariant variant); 1583 virtual wxBorder GetDefaultBorder() const; 1584 virtual wxBorder GetDefaultBorderForControl() const; 1585 virtual void DoFreeze(); 1586 virtual void DoThaw(); 1587 virtual bool HasTransparentBackground(); 1588 virtual bool TryBefore(wxEvent& event); 1589 virtual bool TryAfter(wxEvent& event); 1590 1591 1592 public: 1593 1594 1595 static 1596 wxVisualAttributes GetClassDefaultAttributes( 1597 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 1598 ); 1599 %Docstring 1600 GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes 1601 %End 1602 %PreMethodCode 1603 if (!wxPyCheckForApp()) return NULL; 1604 %End 1605 1606}; // end of class wxAuiTabCtrl 1607 1608 1609 1610//--------------------------------------------------------------------------- 1611 1612