1 #############################################################################
2 ## Name: XS/BookCtrl.xsp
3 ## Purpose: XS+++ for Wx::BookCtrl
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: BookCtrl.xsp 2071 2007-07-08 15:39:02Z mbarbon $
8 ## Copyright: (c) 2003, 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 #############################################################################
16 #if WXPERL_W_VERSION_GE( 2, 5, 1 )
18 #include <wx/bookctrl.h>
22 %name{Wx::BookCtrl} class wxBookCtrl
24 size_t GetPageCount() const;
25 wxWindow *GetPage(size_t n);
26 int GetSelection() const;
27 bool SetPageText(size_t n, const wxString& strText);
28 wxString GetPageText(size_t n) const;
29 void SetImageList(wxImageList *imageList);
30 ## void AssignImageList(wxImageList *imageList)
31 ## wxImageList* GetImageList() const;
32 int GetPageImage(size_t n) const;
33 bool SetPageImage(size_t n, int imageId);
34 void SetPageSize(const wxSize& size);
35 wxSize CalcSizeFromPage(const wxSize& sizePage) const;
36 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
37 unsigned int GetInternalBorder();
38 void SetInternalBorder( unsigned int border );
40 void SetFitToCurrentPage( bool fit );
41 bool GetFitToCurrentPage();
42 wxSizer* GetControlSizer();
44 bool DeletePage(size_t n);
45 bool RemovePage(size_t n);
46 bool DeleteAllPages();
47 bool AddPage(wxWindow *page, const wxString& text, bool bSelect = false,
49 bool InsertPage(size_t n, wxWindow *page, const wxString& text,
50 bool bSelect = false, int imageId = -1 );
51 int SetSelection(size_t n);
52 void AdvanceSelection(bool forward = true);
53 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
54 int ChangeSelection(size_t n);
56 #if WXPERL_W_VERSION_GE( 2, 6, 0 )
57 wxWindow* GetCurrentPage();
63 wxBookCtrl::AssignImageList( imagelist )
64 wxImageList* imagelist
66 wxPli_object_set_deleteable( aTHX_ ST(1), false );
67 THIS->AssignImageList( imagelist );
70 wxBookCtrl::GetImageList()
74 wxPli_object_set_deleteable( aTHX_ ST(0), false );
76 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
79 wxBookCtrl::HitTest( point )
85 item = THIS->HitTest( point, &flags );
87 PUSHs( sv_2mortal( newSViv( item ) ) );
88 PUSHs( sv_2mortal( newSViv( flags ) ) );
93 %name{Wx::BookCtrlEvent} class wxBookCtrlEvent
95 int GetSelection() const;
96 void SetSelection(int nSel);
97 int GetOldSelection() const;
98 void SetOldSelection(int nOldSel);