Remove tests
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / ComboBox.xs
1 #############################################################################
2 ## Name:        XS/ComboBox.xs
3 ## Purpose:     XS for Wx::ComboBox
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     31/10/2000
7 ## RCS-ID:      $Id: ComboBox.xs 2435 2008-08-05 18:05:54Z mbarbon $
8 ## Copyright:   (c) 2000-2004, 2006-2008 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/combobox.h>
14 #include <wx/textctrl.h>
15 #include "cpp/overload.h"
16
17 MODULE=Wx PACKAGE=Wx::ComboBox
18
19 void
20 new( ... )
21   PPCODE:
22     BEGIN_OVERLOAD()
23         MATCH_VOIDM_REDISP( newDefault )
24         MATCH_ANY_REDISP( newFull )
25     END_OVERLOAD( "Wx::ComboBox::new" )
26
27 wxComboBox*
28 newDefault( CLASS )
29     PlClassName CLASS
30   CODE:
31     RETVAL = new wxComboBox();
32     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
33   OUTPUT: RETVAL
34
35
36 wxComboBox*
37 newFull( CLASS, parent, id = wxID_ANY, value = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxComboBoxNameStr )
38     PlClassName CLASS
39     wxWindow* parent
40     wxWindowID id
41     wxString value
42     wxPoint pos
43     wxSize size
44     SV* choices
45     long style
46     wxValidator* validator
47     wxString name
48   PREINIT:
49     wxString* chs = 0;
50     int n = 0;
51   CODE:
52     if( choices != 0 )
53         n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
54     RETVAL = new wxComboBox( parent, id, value, pos, size, n, chs, 
55         style, *validator, name );
56     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
57
58     delete[] chs;
59   OUTPUT:
60     RETVAL
61
62 bool
63 wxComboBox::Create( parent, id = wxID_ANY, value = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxComboBoxNameStr )
64     wxWindow* parent
65     wxWindowID id
66     wxString value
67     wxPoint pos
68     wxSize size
69     SV* choices
70     long style
71     wxValidator* validator
72     wxString name
73   PREINIT:
74     wxString* chs = 0;
75     int n = 0;
76   CODE:
77     if( choices != 0 )
78         n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
79     RETVAL = THIS->Create( parent, id, value, pos, size, n, chs, 
80         style, *validator, name );
81
82     delete[] chs;
83   OUTPUT: RETVAL
84
85 #if defined( __WXGTK__ ) || \
86     ( defined( __WXMAC__ ) && WXPERL_W_VERSION_GE( 2, 5, 1 ) )
87
88 #define WXPERL_IN_COMBOBOX
89
90 INCLUDE: perl -pe "s/ItemContainerImmutable/ComboBox/g" XS/ItemContainerImmutable.xs |
91 INCLUDE: perl -pe "s/ItemContainer/ComboBox/g" XS/ItemContainer.xs |
92
93 #undef WXPERL_IN_COMBOBOX
94
95 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
96
97 int
98 wxChoice::GetCurrentSelection()
99
100 #endif
101
102 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
103
104 void
105 wxComboBox::SetEditable( bool editable );
106
107 #endif
108
109 #endif
110
111 void
112 wxComboBox::Copy()
113
114 void
115 wxComboBox::Cut()
116
117 #if WXPERL_W_VERSION_GE( 2, 6, 0 ) && !defined(__WXMOTIF__)
118
119 bool
120 wxComboBox::CanCopy()
121
122 bool
123 wxComboBox::CanCut()
124
125 bool
126 wxComboBox::CanPaste()
127
128 void
129 wxComboBox::Undo()
130
131 void
132 wxComboBox::Redo()
133
134 bool
135 wxComboBox::CanUndo()
136
137 bool
138 wxComboBox::CanRedo()
139
140 #endif
141
142 long
143 wxComboBox::GetInsertionPoint()
144
145 wxTextPos
146 wxComboBox::GetLastPosition()
147
148 wxString
149 wxComboBox::GetValue()
150
151 void
152 wxComboBox::Paste()
153
154 void
155 wxComboBox::Replace( from, to, text )
156     long from
157     long to
158     wxString text
159
160 void
161 wxComboBox::Remove( from ,to )
162     long from
163     long to
164
165 void
166 wxComboBox::SetInsertionPoint( pos )
167     long pos
168
169 void
170 wxComboBox::SetInsertionPointEnd()
171
172 void
173 wxComboBox::SetSelection( ... )
174   PPCODE:
175     BEGIN_OVERLOAD()
176         MATCH_REDISP( wxPliOvl_n_n, SetMark )
177         MATCH_REDISP( wxPliOvl_n, SetSelectionN )
178     END_OVERLOAD( Wx::ComboBox::SetSelection )
179
180 void
181 wxComboBox::SetSelectionN( n )
182     int n
183   CODE:
184     THIS->SetSelection( n );
185
186 void
187 wxComboBox::SetMark( from, to )
188     long from
189     long to
190   CODE:
191     THIS->SetSelection( from, to );
192
193 void
194 wxComboBox::SetValue( string )
195     wxString string