Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / grid / XS / GridCellRenderer.xs
1 #############################################################################
2 ## Name:        ext/grid/XS/GridCellRenderer.xs
3 ## Purpose:     XS for Wx::GridCellRenderer*
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     13/12/2001
7 ## RCS-ID:      $Id: GridCellRenderer.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright:   (c) 2001-2007 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::GridCellRenderer
14
15 void
16 wxGridCellRenderer::Draw( grid, attr, dc, rect, row, col, isSelected )
17     wxGrid* grid
18     wxGridCellAttr* attr
19     wxDC* dc
20     wxRect* rect
21     int row
22     int col
23     bool isSelected
24   CODE:
25     THIS->Draw( *grid, *attr, *dc, *rect, row, col, isSelected );
26
27 wxSize*
28 wxGridCellRenderer::GetBestSize( grid, attr, dc, row, col )
29     wxGrid* grid
30     wxGridCellAttr* attr
31     wxDC* dc
32     int row
33     int col
34   CODE:
35     RETVAL = new wxSize( THIS->GetBestSize( *grid, *attr, *dc, row, col ) );
36   OUTPUT:
37     RETVAL
38
39 static void
40 wxGridCellRenderer::CLONE()
41   CODE:
42     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
43
44 ## // thread OK
45 void
46 wxGridCellRenderer::DESTROY()
47   CODE:
48     wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ),
49                                 SvRV( ST(0) ), ST(0) );
50     if( THIS )
51         THIS->DecRef();
52
53 void
54 wxGridCellRenderer::SetParameters( parameters )
55     wxString parameters
56
57 MODULE=Wx PACKAGE=Wx::GridCellStringRenderer
58
59 wxGridCellStringRenderer*
60 wxGridCellStringRenderer::new()
61
62 MODULE=Wx PACKAGE=Wx::GridCellNumberRenderer
63
64 wxGridCellNumberRenderer*
65 wxGridCellNumberRenderer::new()
66
67 MODULE=Wx PACKAGE=Wx::GridCellFloatRenderer
68
69 wxGridCellFloatRenderer*
70 wxGridCellFloatRenderer::new( width = -1, precision = -1 )
71     int width
72     int precision
73
74 int
75 wxGridCellFloatRenderer::GetWidth()
76
77 int
78 wxGridCellFloatRenderer::GetPrecision()
79
80 void
81 wxGridCellFloatRenderer::SetWidth( width )
82     int width
83
84 void
85 wxGridCellFloatRenderer::SetPrecision( precision )
86     int precision
87
88 MODULE=Wx PACKAGE=Wx::GridCellBoolRenderer
89
90 wxGridCellBoolRenderer*
91 wxGridCellBoolRenderer::new()
92
93 MODULE=Wx PACKAGE=Wx::GridCellAutoWrapStringRenderer
94
95 wxGridCellAutoWrapStringRenderer*
96 wxGridCellAutoWrapStringRenderer::new()
97
98 MODULE=Wx PACKAGE=Wx::GridCellEnumRenderer
99
100 wxGridCellEnumRenderer*
101 wxGridCellEnumRenderer::new( choices = wxEmptyString )
102     wxString choices
103     
104 MODULE=Wx PACKAGE=Wx::GridCellDateTimeRenderer   
105
106 #if WXPERL_W_VERSION_LT( 2, 6, 0 )
107 #define wxDefaultDateTimeFormat wxT("%c")
108 #endif
109
110 wxGridCellDateTimeRenderer*
111 wxGridCellDateTimeRenderer::new( outformat = wxDefaultDateTimeFormat, informat = wxDefaultDateTimeFormat )
112     wxString outformat
113     wxString informat    
114
115 MODULE=Wx PACKAGE=Wx::PlGridCellRenderer
116
117 #include "cpp/renderer.h"
118
119 SV*
120 wxPlGridCellRenderer::new()
121   CODE:
122     wxPlGridCellRenderer* r = new wxPlGridCellRenderer( CLASS );
123     r->SetClientObject( new wxPliUserDataCD( r->m_callback.GetSelf() ) );
124     RETVAL = r->m_callback.GetSelf();
125     SvREFCNT_inc( RETVAL );
126   OUTPUT: RETVAL
127
128 void
129 wxPlGridCellRenderer::Draw( grid, attr, dc, rect, row, col, isSelected )
130     wxGrid* grid
131     wxGridCellAttr* attr
132     wxDC* dc
133     wxRect* rect
134     int row
135     int col
136     bool isSelected
137   CODE:
138     THIS->wxGridCellRenderer::Draw( *grid, *attr, *dc, *rect,
139                                     row, col, isSelected );