1 #############################################################################
2 ## Name: XS/SingleChoiceDialog.xs
3 ## Purpose: XS for Wx::SingleChoiceDialog
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: SingleChoiceDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright: (c) 2001-2002, 2005 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/choicdlg.h>
14 #include "cpp/singlechoicedialog.h"
16 MODULE=Wx PACKAGE=Wx::SingleChoiceDialog
19 wxSingleChoiceDialog::new( parent, message, caption, chs, dt = &PL_sv_undef, style = wxCHOICEDLG_STYLE, pos = wxDefaultPosition )
32 n = wxPli_av_2_stringarray( aTHX_ chs, &choices );
35 RETVAL = new wxPliSingleChoiceDialog( parent, message, caption, n,
36 choices, 0, style, pos );
40 n2 = wxPli_av_2_svarray( aTHX_ dt, &data );
45 choices = 0; data = 0; n = 0;
46 croak( "supplied arrays of different size" );
48 RETVAL = new wxPliSingleChoiceDialog( parent, message, caption, n,
49 choices, data, style, pos );
57 wxSingleChoiceDialog::GetSelection()
60 wxSingleChoiceDialog::GetSelectionClientData()
64 t = THIS->GetSelectionClientData();
65 RETVAL = &PL_sv_undef;
70 SvREFCNT_inc( RETVAL );
75 wxSingleChoiceDialog::GetStringSelection()
78 wxSingleChoiceDialog::SetSelection( selection )
81 MODULE=Wx PACKAGE=Wx PREFIX=wx
88 wxGetSingleChoice( message, caption, chs, parent = 0, x = -1, y = -1, centre = true, width = wxCHOICE_WIDTH, height = wxCHOICE_HEIGHT )
102 n = wxPli_av_2_stringarray( aTHX_ chs, &choices );
103 RETVAL = wxGetSingleChoice( message, caption, n, choices, parent, x, y,
104 centre, width, height );
110 wxGetSingleChoiceIndex( message, caption, chs, parent = 0, x = -1, y = -1, centre = true, width = wxCHOICE_WIDTH, height = wxCHOICE_HEIGHT )
124 n = wxPli_av_2_stringarray( aTHX_ chs, &choices );
125 RETVAL = wxGetSingleChoiceIndex( message, caption, n, choices,
126 parent, x, y, centre, width, height );
132 wxGetSingleChoiceData( message, caption, chs, dt, parent = 0, x = -1, y = -1, centre = true, width = wxCHOICE_WIDTH, height = wxCHOICE_HEIGHT )
149 n = wxPli_av_2_stringarray( aTHX_ chs, &choices );
150 n2 = wxPli_av_2_svarray( aTHX_ dt, &data );
155 choices = 0; data = 0; n = 0;
156 croak( "supplied arrays of different sizes" );
158 rt = wxGetSingleChoiceData( message, caption, n, choices, (void**)data,
159 parent, x, y, centre, width, height );
160 RETVAL = rt ? (SV*)rt : &PL_sv_undef;
161 SvREFCNT_inc( RETVAL );