Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / Choice.xs
1 #############################################################################
2 ## Name:        XS/Choice.xs
3 ## Purpose:     XS for Wx::Choice
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     08/11/2000
7 ## RCS-ID:      $Id: Choice.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/choice.h>
14
15 MODULE=Wx PACKAGE=Wx::Choice
16
17 void
18 new( ... )
19   PPCODE:
20     BEGIN_OVERLOAD()
21         MATCH_VOIDM_REDISP( newDefault )
22         MATCH_ANY_REDISP( newFull )
23     END_OVERLOAD( "Wx::Choice::new" )
24
25 wxChoice*
26 newDefault( CLASS )
27     PlClassName CLASS
28   CODE:
29     RETVAL = new wxChoice();
30     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
31   OUTPUT: RETVAL
32
33 wxChoice*
34 newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxChoiceNameStr )
35     PlClassName CLASS
36     wxWindow* parent
37     wxWindowID id
38     wxPoint pos
39     wxSize size
40     SV* choices
41     long style
42     wxValidator* validator
43     wxString name
44   PREINIT:
45     int n = 0;
46     wxString *chs = 0;
47   CODE:
48     if( choices )
49         n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
50
51     RETVAL = new wxChoice( parent, id, pos, size, n, chs, style, 
52         *validator, name );
53     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
54
55     delete[] chs;
56   OUTPUT:
57     RETVAL
58
59 bool
60 wxChoice::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxChoiceNameStr )
61     wxWindow* parent
62     wxWindowID id
63     wxPoint pos
64     wxSize size
65     SV* choices
66     long style
67     wxValidator* validator
68     wxString name
69   PREINIT:
70     int n = 0;
71     wxString *chs = 0;
72   CODE:
73     if( choices )
74         n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
75
76     RETVAL = THIS->Create( parent, id, pos, size, n, chs, style, 
77         *validator, name );
78
79     delete[] chs;
80   OUTPUT: RETVAL
81
82 void
83 wxChoice::Clear()
84
85 void
86 wxChoice::Delete( n )
87     int n
88
89 #if !defined(__WXUNIVERSAL__)
90
91 int
92 wxChoice::GetColumns()
93
94 void
95 wxChoice::SetColumns( n = 1 )
96     int n
97
98 #endif
99
100 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
101
102 int
103 wxChoice::GetCurrentSelection()
104
105 #endif
106
107 void
108 wxChoice::SetSelection( n )
109     int n
110
111 void
112 wxChoice::SetStringSelection( string )
113     wxString string