Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / CheckListBox.xs
1 #############################################################################
2 ## Name:        XS/CheckListBox.xs
3 ## Purpose:     XS for Wx::CheckListBox
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     08/11/2000
7 ## RCS-ID:      $Id: CheckListBox.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright:   (c) 2000-2004, 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/checklst.h>
14
15 MODULE=Wx PACKAGE=Wx::CheckListBox
16
17 void
18 new( ... )
19   PPCODE:
20     BEGIN_OVERLOAD()
21         MATCH_VOIDM_REDISP( newDefault )
22         MATCH_ANY_REDISP( newFull )
23     END_OVERLOAD( "Wx::CheckListBox::new" )
24
25 wxCheckListBox*
26 newDefault( CLASS )
27     PlClassName CLASS
28   CODE:
29     RETVAL = new wxCheckListBox();
30     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
31   OUTPUT: RETVAL
32
33 wxCheckListBox*
34 newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxListBoxNameStr )
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     wxString* chs;
46     int n;
47   CODE:
48     if( choices ) 
49         n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
50     else
51     {
52         n = 0;
53         chs = 0;
54     }
55         
56     RETVAL = new wxCheckListBox( parent, id, pos, size, n, chs, 
57         style|wxLB_OWNERDRAW, *validator, name );
58     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
59
60     delete[] chs;
61   OUTPUT:
62     RETVAL
63
64 bool
65 wxCheckListBox::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxListBoxNameStr )
66     wxWindow* parent
67     wxWindowID id
68     wxPoint pos
69     wxSize size
70     SV* choices
71     long style
72     wxValidator* validator
73     wxString name
74   PREINIT:
75     wxString* chs;
76     int n;
77   CODE:
78     if( choices ) 
79         n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
80     else
81     {
82         n = 0;
83         chs = 0;
84     }
85         
86     RETVAL = THIS->Create( parent, id, pos, size, n, chs, 
87         style|wxLB_OWNERDRAW, *validator, name );
88
89     delete[] chs;
90   OUTPUT: RETVAL
91
92 void
93 wxCheckListBox::Check( item, check = false )
94     int item
95     bool check
96
97 bool
98 wxCheckListBox::IsChecked( item )
99     int item