Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / grid / XS / GridCellEditor.xs
1 #############################################################################
2 ## Name:        ext/grid/XS/GridCellEditor.xs
3 ## Purpose:     XS for Wx::GridCellEditor*
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     13/12/2001
7 ## RCS-ID:      $Id: GridCellEditor.xs 2533 2009-03-08 19:03:35Z mbarbon $
8 ## Copyright:   (c) 2001-2007, 2009 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 MODULE=Wx PACKAGE=Wx::GridCellEditor
14
15 static void
16 wxGridCellEditor::CLONE()
17   CODE:
18     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
19
20 ## // thread OK
21 void
22 wxGridCellEditor::DESTROY()
23   CODE:
24     wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ),
25                                 SvRV( ST(0) ), ST(0) );
26     if( THIS )
27         THIS->DecRef();
28
29 bool
30 wxGridCellEditor::IsCreated()
31
32 wxControl*
33 wxGridCellEditor::GetControl()
34
35 void
36 wxGridCellEditor::SetControl( control )
37     wxControl* control
38
39 void
40 wxGridCellEditor::SetSize( rect )
41     wxRect* rect
42   CODE:
43     THIS->SetSize( *rect );
44
45 void
46 wxGridCellEditor::Show( show, attr )
47     bool show
48     wxGridCellAttr* attr
49
50 void
51 wxGridCellEditor::PaintBackground( rectCell, attr )
52     wxRect* rectCell
53     wxGridCellAttr* attr
54   CODE:
55     THIS->PaintBackground( *rectCell, attr );
56
57 void
58 wxGridCellEditor::BeginEdit( row, col, grid )
59     int row
60     int col
61     wxGrid* grid
62
63 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
64
65 bool
66 wxGridCellEditor::EndEdit( row, col, grid, oldval, newval )
67     int row
68     int col
69     wxGrid* grid
70     wxString oldval
71     wxString newval
72   C_ARGS: row, col, grid, oldval, &newval
73
74 void
75 wxGridCellEditor::ApplyEdit( row, col, grid )
76     int row
77     int col
78     wxGrid* grid
79
80 #else
81
82 bool
83 wxGridCellEditor::EndEdit( row, col, grid )
84     int row
85     int col
86     wxGrid* grid
87
88 #endif
89
90 void
91 wxGridCellEditor::Reset()
92
93 bool
94 wxGridCellEditor::IsAcceptedKey( event )
95     wxKeyEvent* event
96   CODE:
97     RETVAL = THIS->IsAcceptedKey( *event );
98   OUTPUT:
99     RETVAL
100
101 void
102 wxGridCellEditor::StartingKey( event )
103     wxKeyEvent* event
104   CODE:
105     THIS->StartingKey( *event );
106
107 void
108 wxGridCellEditor::StartingClick()
109
110 void
111 wxGridCellEditor::HandleReturn( event )
112     wxKeyEvent* event
113   CODE:
114     THIS->HandleReturn( *event );
115
116 void
117 wxGridCellEditor::Destroy()
118
119 MODULE=Wx PACKAGE=Wx::GridCellTextEditor
120
121 wxGridCellTextEditor*
122 wxGridCellTextEditor::new()
123
124 void
125 wxGridCellTextEditor::SetParameters( params )
126     wxString params
127
128 MODULE=Wx PACKAGE=Wx::GridCellAutoWrapStringEditor
129
130 wxGridCellAutoWrapStringEditor*
131 wxGridCellAutoWrapStringEditor::new()
132
133 MODULE=Wx PACKAGE=Wx::GridCellNumberEditor
134
135 wxGridCellNumberEditor*
136 wxGridCellNumberEditor::new( min = -1, max = -1 )
137     int min
138     int max
139
140 void
141 wxGridCellNumberEditor::SetParameters( params )
142     wxString params
143
144 MODULE=Wx PACKAGE=Wx::GridCellFloatEditor
145
146 wxGridCellFloatEditor*
147 wxGridCellFloatEditor::new( width = -1, precision = -1 )
148     int width
149     int precision
150
151 void
152 wxGridCellChoiceEditor::SetParameters( params )
153     wxString params
154
155 MODULE=Wx PACKAGE=Wx::GridCellBoolEditor
156
157 wxGridCellBoolEditor*
158 wxGridCellBoolEditor::new()
159
160 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
161
162 bool
163 IsTrueValue( value )
164     wxString value
165   CODE:
166     RETVAL = wxGridCellBoolEditor::IsTrueValue( value );
167   OUTPUT: RETVAL
168
169 void
170 UseStringValues( trueValue = wxT("1"), falseValue = wxT("") )
171     wxString trueValue
172     wxString falseValue
173   CODE:
174     wxGridCellBoolEditor::UseStringValues( trueValue, falseValue );
175
176 #endif
177
178 MODULE=Wx PACKAGE=Wx::GridCellChoiceEditor
179
180 wxGridCellChoiceEditor*
181 wxGridCellChoiceEditor::new( choices, allowOthers = false )
182     SV* choices
183     bool allowOthers
184   PREINIT:
185     wxString* chs;
186     int n;
187   CODE:
188     n = wxPli_av_2_stringarray( aTHX_ choices, &chs );
189     RETVAL = new wxGridCellChoiceEditor( n, chs, allowOthers );
190     delete[] chs;
191   OUTPUT:
192     RETVAL
193
194 void
195 wxGridCellChoiceEditor::SetParameters( params )
196     wxString params
197
198 MODULE=Wx PACKAGE=Wx::GridCellEnumEditor
199
200 wxGridCellEnumEditor*
201 wxGridCellEnumEditor::new( choices = wxEmptyString )
202     wxString choices
203     
204 MODULE=Wx PACKAGE=Wx::PlGridCellEditor
205
206 #include "cpp/editor.h"
207
208 SV*
209 wxPlGridCellEditor::new()
210   CODE:
211     wxPlGridCellEditor* r = new wxPlGridCellEditor( CLASS );
212     r->SetClientObject( new wxPliUserDataCD( r->m_callback.GetSelf() ) );
213     RETVAL = r->m_callback.GetSelf();
214     SvREFCNT_inc( RETVAL );
215   OUTPUT: RETVAL