Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / dataview / XS / DataViewRenderer.xsp
1 #############################################################################
2 ## Name:        ext/dataview/XS/DataViewRenderer.xsp
3 ## Purpose:     XS++ for Wx::DataView*Renderer
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     25/11/2007
7 ## RCS-ID:      $Id: DataViewRenderer.xsp 2573 2009-05-17 16:56:34Z mbarbon $
8 ## Copyright:   (c) 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 #if wxUSE_DATAVIEWCTRL
14
15 #include <wx/dataview.h>
16
17 %module{Wx};
18
19 %name{Wx::DataViewRenderer} class wxDataViewRenderer {
20 ##    wxDataViewRenderer( const wxString& varianttype,
21 ##                        wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
22
23 %{
24 static void
25 wxDataViewRenderer::CLONE()
26   CODE:
27     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
28
29 ## // thread OK
30 void
31 wxDataViewRenderer::DESTROY()
32   CODE:
33     wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) );
34     if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
35         delete THIS;
36 %}
37
38     wxDataViewColumnDisown* GetOwner();
39     wxDataViewCellMode GetMode() const;
40     void SetMode( wxDataViewCellMode mode );
41     wxString GetVariantType() const;
42 };
43
44 %name{Wx::DataViewTextRenderer} class wxDataViewTextRenderer {
45     wxDataViewRenderer( const wxString& varianttype = wxT("string"),
46                         wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
47 };
48
49 %name{Wx::DataViewTextRendererAttr} class wxDataViewTextRendererAttr {
50     wxDataViewTextRendererAttr( const wxString &varianttype = wxT("string"),
51                                 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
52                                 int align = wxDVR_DEFAULT_ALIGNMENT );
53 };
54
55 %name{Wx::DataViewProgressRenderer} class wxDataViewProgressRenderer {
56     wxDataViewProgressRenderer( const wxString& label = wxEmptyString,
57                                 const wxString& varianttype = wxT("long"),
58                                 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
59 };
60
61 %name{Wx::DataViewIconText} class wxDataViewIconText {
62     wxDataViewIconText( const wxString& text = wxEmptyString,
63                         const wxIcon& icon = wxNullIconPtr );
64
65     const wxIcon& GetIcon() const;
66     wxString GetText() const;
67     void SetIcon( const wxIcon& icon );
68     void SetText( const wxString& text );
69 };
70
71 %name{Wx::DataViewIconTextRenderer} class wxDataViewIconTextRenderer {
72     wxDataViewIconTextRenderer( const wxString& varianttype = wxT("wxDataViewIconText"),
73                                 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
74 };
75
76 %name{Wx::DataViewToggleRenderer} class wxDataViewToggleRenderer {
77     wxDataViewToggleRenderer( const wxString& varianttype = wxT("bool"),
78                               wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
79 };
80
81 %name{Wx::DataViewBitmapRenderer} class wxDataViewBitmapRenderer {
82     wxDataViewBitmapRenderer( const wxString& varianttype = wxT("wxBitmap"),
83                               wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
84 };
85
86 %name{Wx::DataViewDateRenderer} class wxDataViewDateRenderer {
87     wxDataViewDateRenderer( const wxString& varianttype = wxT("datetime"),
88                             wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE );
89 };
90
91 %name{Wx::DataViewSpinRenderer} class wxDataViewSpinRenderer {
92     wxDataViewSpinRenderer( int min, int max,
93                             wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
94                             int alignment = wxDVR_DEFAULT_ALIGNMENT );
95 };
96
97 #endif