1 #############################################################################
2 ## Name: XS/ComboBox.xs
3 ## Purpose: XS for Wx::ComboBox
4 ## Author: Mattia Barbon
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 #############################################################################
13 #include <wx/combobox.h>
14 #include <wx/textctrl.h>
15 #include "cpp/overload.h"
17 MODULE=Wx PACKAGE=Wx::ComboBox
23 MATCH_VOIDM_REDISP( newDefault )
24 MATCH_ANY_REDISP( newFull )
25 END_OVERLOAD( "Wx::ComboBox::new" )
31 RETVAL = new wxComboBox();
32 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
37 newFull( CLASS, parent, id = wxID_ANY, value = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxComboBoxNameStr )
46 wxValidator* validator
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 );
63 wxComboBox::Create( parent, id = wxID_ANY, value = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxComboBoxNameStr )
71 wxValidator* validator
78 n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
79 RETVAL = THIS->Create( parent, id, value, pos, size, n, chs,
80 style, *validator, name );
85 #if defined( __WXGTK__ ) || \
86 ( defined( __WXMAC__ ) && WXPERL_W_VERSION_GE( 2, 5, 1 ) )
88 #define WXPERL_IN_COMBOBOX
90 INCLUDE: perl -pe "s/ItemContainerImmutable/ComboBox/g" XS/ItemContainerImmutable.xs |
91 INCLUDE: perl -pe "s/ItemContainer/ComboBox/g" XS/ItemContainer.xs |
93 #undef WXPERL_IN_COMBOBOX
95 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
98 wxChoice::GetCurrentSelection()
102 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
105 wxComboBox::SetEditable( bool editable );
117 #if WXPERL_W_VERSION_GE( 2, 6, 0 ) && !defined(__WXMOTIF__)
120 wxComboBox::CanCopy()
126 wxComboBox::CanPaste()
135 wxComboBox::CanUndo()
138 wxComboBox::CanRedo()
143 wxComboBox::GetInsertionPoint()
146 wxComboBox::GetLastPosition()
149 wxComboBox::GetValue()
155 wxComboBox::Replace( from, to, text )
161 wxComboBox::Remove( from ,to )
166 wxComboBox::SetInsertionPoint( pos )
170 wxComboBox::SetInsertionPointEnd()
173 wxComboBox::SetSelection( ... )
176 MATCH_REDISP( wxPliOvl_n_n, SetMark )
177 MATCH_REDISP( wxPliOvl_n, SetSelectionN )
178 END_OVERLOAD( Wx::ComboBox::SetSelection )
181 wxComboBox::SetSelectionN( n )
184 THIS->SetSelection( n );
187 wxComboBox::SetMark( from, to )
191 THIS->SetSelection( from, to );
194 wxComboBox::SetValue( string )