1 #############################################################################
2 ## Name: XS/Notebook.xs
3 ## Purpose: XS for Wx::Notebook
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Notebook.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright: (c) 2000-2003, 2006 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 #############################################################################
13 #include <wx/notebook.h>
15 #if WXPERL_W_VERSION_LT( 2, 6, 0 )
16 #define wxNotebookNameStr wxT("notebook")
19 MODULE=Wx_Evt PACKAGE=Wx::NotebookEvent
22 wxNotebookEvent::new( eventType = wxEVT_NULL, id = 0, sel = -1, oldSel = -1 )
28 #if WXPERL_W_VERSION_LE( 2, 5, 1 )
31 wxNotebookEvent::GetOldSelection()
34 wxNotebookEvent::GetSelection()
37 wxNotebookEvent::SetOldSelection( sel )
41 wxNotebookEvent::SetSelection( oldSel )
46 MODULE=Wx PACKAGE=Wx::Notebook
52 MATCH_VOIDM_REDISP( newDefault )
53 MATCH_ANY_REDISP( newFull )
54 END_OVERLOAD( "Wx::Notebook::new" )
60 RETVAL = new wxNotebook();
61 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
65 newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxNotebookNameStr )
74 RETVAL = new wxNotebook( parent, id, pos, size, style, name );
75 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
80 wxNotebook::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxNotebookNameStr )
88 #if WXPERL_W_VERSION_LE( 2, 5, 1 )
91 wxNotebook::AddPage( page, text, select = false, imageId = -1 )
98 wxNotebook::AdvanceSelection( forward = true )
102 wxNotebook::DeleteAllPages()
105 wxNotebook::DeletePage( page )
109 wxNotebook::GetImageList()
113 wxPli_object_set_deleteable( aTHX_ ST(0), false );
116 wxNotebook::GetPage( page )
120 wxNotebook::GetPageCount()
123 wxNotebook::GetPageImage( page )
127 wxNotebook::GetPageText( page )
131 wxNotebook::GetSelection()
134 wxNotebook::InsertPage( index, page, text, select = false, imageId = -1 )
142 wxNotebook::RemovePage( page )
146 wxNotebook::SetImageList( imagelist )
147 wxImageList* imagelist
150 wxNotebook::SetPageImage( page, image )
155 wxNotebook::SetPageText( page, text )
160 wxNotebook::SetSelection( page )
165 #if WXPERL_W_VERSION_GE( 2, 5, 2 ) && WXPERL_W_VERSION_LT( 2, 7, 0 )
168 wxNotebook::HitTest( point )
174 item = THIS->HitTest( point, &flags );
176 PUSHs( sv_2mortal( newSViv( item ) ) );
177 PUSHs( sv_2mortal( newSViv( flags ) ) );
182 wxNotebook::GetRowCount()
184 #if !defined( __WXMOTIF__ ) && !defined( __WXGTK__ ) || \
185 defined( __WXPERL_FORCE__ )
188 wxNotebook::SetPadding( padding )
192 wxNotebook::SetPageSize( padding )