Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / dataview / XS / DataViewColumn.xsp
1 #############################################################################
2 ## Name:        ext/dataview/XS/DataViewColumn.xsp
3 ## Purpose:     XS++ for Wx::DataViewColumn
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     25/11/2007
7 ## RCS-ID:      $Id: DataViewColumn.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 # DECLARE_OVERLOAD( wdvr, Wx::DataViewRenderer )
18
19 %module{Wx};
20
21 %name{Wx::DataViewColumn} class wxDataViewColumn {
22 %{
23 void
24 new( ... )
25   PPCODE:
26     BEGIN_OVERLOAD()
27         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_wdvr_n_n_n_n, new1, 3 )
28         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_wdvr_n_n_n_n, new2, 3 )
29     END_OVERLOAD( "Wx::DataViewColumn::new" )
30 %}
31
32     %name{new1}
33     wxDataViewColumn( const wxString& title,
34                       wxDataViewRendererDisown* renderer,
35                       unsigned int model_column,
36                       int width = wxDVC_DEFAULT_WIDTH,
37                       wxAlignment align = wxALIGN_CENTRE,
38                       int flags = wxDATAVIEW_COL_RESIZABLE );
39     %name{new2}
40     wxDataViewColumn( const wxBitmap& bitmap,
41                       wxDataViewRendererDisown* renderer,
42                       unsigned int model_column,
43                       int width = wxDVC_DEFAULT_WIDTH,
44                       wxAlignment align = wxALIGN_CENTRE,
45                       int flags = wxDATAVIEW_COL_RESIZABLE );
46
47 %{
48 static void
49 wxDataViewColumn::CLONE()
50   CODE:
51     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
52
53 ## // thread OK
54 void
55 wxDataViewColumn::DESTROY()
56   CODE:
57     wxPli_thread_sv_unregister( aTHX_ "Wx::DataViewColumn", THIS, ST(0) );
58     if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
59         delete THIS;
60 %}
61
62     void SetTitle( const wxString &title );
63     void SetAlignment( wxAlignment align );
64     void SetSortable( bool sortable );
65     void SetReorderable(bool reorderable);
66     void SetResizeable( bool resizeable );
67     void SetHidden( bool hidden );
68     void SetSortOrder( bool ascending );
69     void SetFlags( int flags );
70     void SetOwner( wxDataViewCtrl* owner );
71     void SetBitmap( const wxBitmap &bitmap );
72     void SetMinWidth( int minWidth );
73     void SetWidth( int width );
74     wxString GetTitle() const;
75     wxAlignment GetAlignment() const;
76     int GetWidth() const;
77     int GetMinWidth() const;
78     int GetFlags() const;
79     bool IsHidden() const;
80     bool IsReorderable() const;
81     bool IsResizeable() const;
82     bool IsSortable() const;
83     bool IsSortOrderAscending() const;
84     const wxBitmap& GetBitmap() const;
85     unsigned int GetModelColumn() const;
86     wxDataViewCtrl* GetOwner() const;
87     wxDataViewRendererDisown* GetRenderer() const;
88 };
89
90 #endif