1 #############################################################################
2 ## Name: XS/Treebook.xsp
3 ## Purpose: XS++ for Wx::Treebook
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Treebook.xsp 2148 2007-08-15 17:10:50Z mbarbon $
8 ## Copyright: (c) 2006-2007 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 #############################################################################
15 %typemap{wxTreebook*}{simple};
16 %typemap{wxTreebookEvent*}{simple};
18 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
20 #include <wx/treebook.h>
22 %name{Wx::TreebookEvent} class wxTreebookEvent
24 wxTreebookEvent( wxEventType commandType = wxEVT_NULL, int id = 0,
25 int nSel = wxNOT_FOUND, int nOldSel = wxNOT_FOUND );
27 int GetOldSelection() const;
28 int GetSelection() const;
31 %name{Wx::Treebook} class wxTreebook
33 %name{newDefault} wxTreebook()
34 %code{% RETVAL = new wxTreebook();
35 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
37 %name{newFull} wxTreebook(wxWindow *parent,
38 wxWindowID id = wxID_ANY,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
42 const wxString& name = wxEmptyString)
43 %code{% RETVAL = new wxTreebook( parent, id, pos, size, style, name );
44 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
47 bool Create(wxWindow *parent,
48 wxWindowID id = wxID_ANY,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
52 const wxString& name = wxEmptyString);
54 bool InsertSubPage( size_t pos, wxWindow* page,
55 const wxString& text, bool bSelect = false,
56 int imageId = wxNOT_FOUND );
57 bool AddSubPage( wxWindow* page, const wxString& text,
58 bool bSelect = false, int imageId = wxNOT_FOUND );
59 bool IsNodeExpanded( size_t pos ) const;
60 bool ExpandNode( size_t pos, bool expand = true );
61 bool CollapseNode( size_t pos );
62 int GetPageParent( size_t pos ) const;
63 wxTreeCtrl* GetTreeCtrl() const;
71 MATCH_VOIDM_REDISP( newDefault )
72 MATCH_ANY_REDISP( newFull )
73 END_OVERLOAD( "Wx::Treebook::new" )