Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / Notebook.xs
1 #############################################################################
2 ## Name:        XS/Notebook.xs
3 ## Purpose:     XS for Wx::Notebook
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     29/10/2000
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 #############################################################################
12
13 #include <wx/notebook.h>
14
15 #if WXPERL_W_VERSION_LT( 2, 6, 0 )
16 #define wxNotebookNameStr wxT("notebook")
17 #endif
18
19 MODULE=Wx_Evt PACKAGE=Wx::NotebookEvent
20
21 wxNotebookEvent*
22 wxNotebookEvent::new( eventType = wxEVT_NULL, id = 0, sel = -1, oldSel = -1 )
23     wxEventType eventType
24     int id
25     int sel
26     int oldSel
27
28 #if WXPERL_W_VERSION_LE( 2, 5, 1 )
29
30 int
31 wxNotebookEvent::GetOldSelection()
32
33 int
34 wxNotebookEvent::GetSelection()
35
36 void
37 wxNotebookEvent::SetOldSelection( sel )
38     int sel
39
40 void
41 wxNotebookEvent::SetSelection( oldSel )
42     int oldSel
43
44 #endif
45
46 MODULE=Wx PACKAGE=Wx::Notebook
47
48 void
49 new( ... )
50   PPCODE:
51     BEGIN_OVERLOAD()
52         MATCH_VOIDM_REDISP( newDefault )
53         MATCH_ANY_REDISP( newFull )
54     END_OVERLOAD( "Wx::Notebook::new" )
55
56 wxNotebook*
57 newDefault( CLASS )
58     PlClassName CLASS
59   CODE:
60     RETVAL = new wxNotebook();
61     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
62   OUTPUT: RETVAL
63
64 wxNotebook*
65 newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxNotebookNameStr )
66     PlClassName CLASS
67     wxWindow* parent
68     wxWindowID id
69     wxPoint pos
70     wxSize size
71     long style
72     wxString name
73   CODE:
74     RETVAL = new wxNotebook( parent, id, pos, size, style, name );
75     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
76   OUTPUT:
77     RETVAL
78
79 bool
80 wxNotebook::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxNotebookNameStr )
81     wxWindow* parent
82     wxWindowID id
83     wxPoint pos
84     wxSize size
85     long style
86     wxString name
87
88 #if WXPERL_W_VERSION_LE( 2, 5, 1 )
89
90 bool
91 wxNotebook::AddPage( page, text, select = false, imageId = -1 )
92     wxWindow* page
93     wxString text
94     bool select
95     int imageId
96
97 void
98 wxNotebook::AdvanceSelection( forward = true )
99     bool forward
100
101 bool
102 wxNotebook::DeleteAllPages()
103
104 bool
105 wxNotebook::DeletePage( page )
106     int page
107
108 wxImageList*
109 wxNotebook::GetImageList()
110   OUTPUT:
111     RETVAL
112   CLEANUP:
113     wxPli_object_set_deleteable( aTHX_ ST(0), false );
114
115 wxWindow*
116 wxNotebook::GetPage( page )
117     int page
118
119 int
120 wxNotebook::GetPageCount()
121
122 int
123 wxNotebook::GetPageImage( page )
124     int page
125
126 wxString
127 wxNotebook::GetPageText( page )
128     int page
129
130 int
131 wxNotebook::GetSelection()
132
133 bool
134 wxNotebook::InsertPage( index, page, text, select = false, imageId = -1 )
135     int index
136     wxWindow* page
137     wxString text
138     bool select
139     int imageId
140
141 bool
142 wxNotebook::RemovePage( page )
143     int page
144
145 void
146 wxNotebook::SetImageList( imagelist )
147     wxImageList* imagelist
148
149 bool
150 wxNotebook::SetPageImage( page, image )
151     int page
152     int image
153
154 bool
155 wxNotebook::SetPageText( page, text )
156     int page
157     wxString text
158
159 int
160 wxNotebook::SetSelection( page )
161     int page
162
163 #endif
164
165 #if WXPERL_W_VERSION_GE( 2, 5, 2 ) && WXPERL_W_VERSION_LT( 2, 7, 0 )
166
167 void
168 wxNotebook::HitTest( point )
169     wxPoint point
170   PREINIT:
171     long flags;
172     int item;
173   PPCODE:
174     item = THIS->HitTest( point, &flags );
175     EXTEND( SP, 2 );
176     PUSHs( sv_2mortal( newSViv( item ) ) );
177     PUSHs( sv_2mortal( newSViv( flags ) ) );
178
179 #endif
180
181 int
182 wxNotebook::GetRowCount()
183
184 #if !defined( __WXMOTIF__ ) && !defined( __WXGTK__ ) || \
185   defined( __WXPERL_FORCE__ )
186
187 void
188 wxNotebook::SetPadding( padding )
189     wxSize padding
190
191 void
192 wxNotebook::SetPageSize( padding )
193     wxSize padding
194
195 #endif