Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / aui / XS / AuiNotebook.xsp
1 #############################################################################
2 ## Name:        ext/aui/XS/AuiNotebook.xsp
3 ## Purpose:     XS++ for Wx::AuiNotebook
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     12/11/2006
7 ## RCS-ID:      $Id: AuiNotebook.xsp 2700 2009-12-13 11:25:50Z mbarbon $
8 ## Copyright:   (c) 2006-2007, 2009 Mattia Barbon
9 ## Licence:     This program is free software; you can redistribute it and/or
10 ##              modify it under the same terms as Perl itself
11 #############################################################################
12
13 #include <wx/aui/auibook.h>
14
15 %module{Wx};
16
17 %name{Wx::AuiNotebookEvent} class wxAuiNotebookEvent
18 {
19     wxAuiNotebookEvent( wxEventType command_type = wxEVT_NULL,
20                         int win_id = 0 );
21
22     void SetSelection( int s );
23     int GetSelection() const;
24     
25     void SetOldSelection( int s );
26     int GetOldSelection() const;
27     
28     void SetDragSource( wxAuiNotebook* s );
29     wxAuiNotebook* GetDragSource() const;
30 };
31
32 %name{Wx::AuiNotebook} class wxAuiNotebook
33 {
34     %name{newDefault} wxAuiNotebook()
35         %code{% RETVAL = new wxAuiNotebook();
36                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
37              %};
38
39     %name{newFull} wxAuiNotebook( wxWindow* parent,
40                                   wxWindowID id = wxID_ANY,
41                                   const wxPoint& pos = wxDefaultPosition,
42                                   const wxSize& size = wxDefaultSize,
43                                   long style = wxAUI_NB_DEFAULT_STYLE )
44         %code{% RETVAL = new wxAuiNotebook( parent, id,
45                                             pos, size, style );
46                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
47              %};
48
49 %{
50 void
51 wxAuiNotebook::new( ... )
52   PPCODE:
53     BEGIN_OVERLOAD()
54         MATCH_VOIDM_REDISP( newDefault )
55         MATCH_ANY_REDISP( newFull )
56     END_OVERLOAD( "Wx::AuiNotebook::new" )
57 %}
58
59     bool Create( wxWindow* parent,
60                  wxWindowID id = wxID_ANY,
61                  const wxPoint& pos = wxDefaultPosition,
62                  const wxSize& size = wxDefaultSize,
63                  long style = 0 );
64
65     bool AddPage( wxWindow* page,
66                   const wxString& caption,
67                   bool select = false,
68                   const wxBitmap& bitmap = wxNullBitmapPtr );
69
70     bool InsertPage( size_t page_idx,
71                      wxWindow* page,
72                      const wxString& caption,
73                      bool select = false,
74                      const wxBitmap& bitmap = wxNullBitmapPtr );
75
76     bool DeletePage( size_t page );
77     bool RemovePage( size_t page );
78     
79     void SetWindowStyleFlag( long style );
80
81     bool SetPageText( size_t page, const wxString& text );
82 #if WXPERL_W_VERSION_GE( 2, 8, 0 )
83     wxString GetPageText( size_t page ) const;
84     bool SetPageBitmap( size_t page, const wxBitmap& bitmap );
85     const wxBitmap& GetPageBitmap( size_t index ) const;
86 #endif
87     size_t SetSelection( size_t new_page );
88     int GetSelection() const;
89     size_t GetPageCount() const;
90     wxWindow* GetPage( size_t page_idx ) const;
91
92 #if WXPERL_W_VERSION_GE( 2, 8, 0 )
93     int GetPageIndex( wxWindow* page_wnd ) const;
94 #endif
95
96 ##    void SetArtProvider( wxAuiTabArt* art );
97 ##    wxAuiTabArt* GetArtProvider() const;
98
99 #if WXPERL_W_VERSION_GE( 2, 8, 0 )
100     void Split( size_t page, int direction );
101 #endif
102
103 #if WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXPERL_W_VERSION_GE( 2, 8, 1 ) 
104     const wxAuiManager* GetAuiManager()
105         %code{% RETVAL = &THIS->GetAuiManager(); %};
106 #endif
107
108 #if WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXPERL_W_VERSION_GE( 2, 8, 5 ) 
109     void AdvanceSelection( bool advance = true );
110     int GetHeightForPageHeight( int pageHeight );
111     int GetTabCtrlHeight() const;
112
113     void SetNormalFont( const wxFont& font );
114     void SetSelectedFont( const wxFont& font );
115     void SetMeasuringFont( const wxFont& font );
116
117     void SetTabCtrlHeight( int height );
118
119     bool ShowWindowMenu();
120 #endif
121
122     void SetUniformBitmapSize( const wxSize& size );
123 };