Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / RadioBox.xs
1 #############################################################################
2 ## Name:        XS/RadioBox.xs
3 ## Purpose:     XS for Wx::RadioBox
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     31/10/2000
7 ## RCS-ID:      $Id: RadioBox.xs 2285 2007-11-11 21:31:54Z mbarbon $
8 ## Copyright:   (c) 2000-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 #############################################################################
12
13 #include <wx/radiobox.h>
14 #include <wx/tooltip.h>
15
16 MODULE=Wx PACKAGE=Wx::RadioBox
17
18 void
19 new( ... )
20   PPCODE:
21     BEGIN_OVERLOAD()
22         MATCH_VOIDM_REDISP( newDefault )
23         MATCH_ANY_REDISP( newFull )
24     END_OVERLOAD( "Wx::RadioBox::new" )
25
26 wxRadioBox*
27 newDefault( CLASS )
28     PlClassName CLASS
29   CODE:
30     RETVAL = new wxRadioBox();
31     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
32   OUTPUT: RETVAL
33
34 wxRadioBox*
35 newFull( CLASS, parent, id, label, point = wxDefaultPosition, size = wxDefaultSize, choices = 0, majorDimension = 0, style = wxRA_SPECIFY_COLS, validator = (wxValidator*)&wxDefaultValidator, name = wxRadioBoxNameStr )
36     PlClassName CLASS
37     wxWindow* parent
38     wxWindowID id
39     wxString label
40     wxPoint point
41     wxSize size
42     SV* choices
43     int majorDimension
44     long style
45     wxValidator* validator
46     wxString name
47   PREINIT:
48     int n;
49     wxString* chs;
50   CODE:
51     if( choices )
52         n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
53     else {
54         n = 0;
55         chs = 0;
56     }
57
58     RETVAL = new wxRadioBox( parent, id, label, point, size,
59         n, chs, majorDimension, style, *validator, name );
60     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
61
62     delete[] chs;
63   OUTPUT:
64     RETVAL
65
66 bool
67 wxRadioBox::Create( parent, id, label, point = wxDefaultPosition, size = wxDefaultSize, choices = 0, majorDimension = 0, style = wxRA_SPECIFY_COLS, validator = (wxValidator*)&wxDefaultValidator, name = wxRadioBoxNameStr )
68     wxWindow* parent
69     wxWindowID id
70     wxString label
71     wxPoint point
72     wxSize size
73     SV* choices
74     int majorDimension
75     long style
76     wxValidator* validator
77     wxString name
78   PREINIT:
79     int n;
80     wxString* chs;
81   CODE:
82     if( choices )
83         n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
84     else {
85         n = 0;
86         chs = 0;
87     }
88
89     RETVAL = THIS->Create( parent, id, label, point, size,
90         n, chs, majorDimension, style, *validator, name );
91
92     delete[] chs;
93   OUTPUT:
94     RETVAL
95
96 void
97 wxRadioBox::EnableItem( n, enable )
98     int n
99     bool enable
100   CODE:
101     THIS->Enable( n, enable );
102
103 int
104 wxRadioBox::FindString( string )
105     wxString string
106
107 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
108
109 unsigned int
110 wxRadioBox::GetColumnCount()
111
112 unsigned int
113 wxRadioBox::GetRowCount()
114
115 int
116 wxRadioBox::GetItemFromPoint( pt )
117     wxPoint pt
118
119 #endif
120
121 wxString
122 wxRadioBox::GetString( n )
123     int n
124
125 wxString
126 wxRadioBox::GetItemLabel( n )
127     int n
128   CODE:
129     RETVAL = THIS->GetString( n );
130   OUTPUT:
131     RETVAL
132
133 int
134 wxRadioBox::GetSelection()
135
136 wxString
137 wxRadioBox::GetStringSelection()
138
139 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
140
141 bool
142 wxRadioBox::IsItemEnabled( unsigned int item )
143
144 bool
145 wxRadioBox::IsItemShown( unsigned int item )
146
147 #endif
148
149 void
150 wxRadioBox::SetString( n, label )
151     int n
152     wxString label
153
154 void
155 wxRadioBox::SetItemLabel( n, label )
156     int n
157     wxString label
158   CODE:
159     THIS->SetString( n, label );
160
161 #if wxPERL_USE_TOOLTIPS && WXPERL_W_VERSION_GE( 2, 7, 0 )
162
163 void
164 wxRadioBox::SetItemToolTip( item, text )
165     unsigned int item
166     wxString text
167
168 wxToolTip*
169 wxRadioBox::GetItemToolTip( item )
170     unsigned int item
171
172 #endif
173
174 #if wxPERL_USE_HELP && WXPERL_W_VERSION_GE( 2, 7, 0 )
175
176 void
177 wxRadioBox::SetItemHelpText( item, text )
178     unsigned int item
179     wxString text
180
181 wxString
182 wxRadioBox::GetItemHelpText( item )
183     unsigned int item
184
185 #endif
186
187 void
188 wxRadioBox::SetSelection( n )
189     int n
190
191 void
192 wxRadioBox::SetStringSelection( string )
193     wxString string
194
195 void
196 wxRadioBox::ShowItem( n, show )
197     int n
198     bool show
199   CODE:
200     THIS->Show( n, show );