1 #############################################################################
2 ## Name: ext/dataview/XS/DataViewIndexListModel.xsp
3 ## Purpose: XS++ for Wx::DataViewIndexListModel
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: DataViewIndexListModel.xsp 2523 2009-02-04 23:50:57Z 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 #############################################################################
13 #if wxUSE_DATAVIEWCTRL
17 #include <wx/dataview.h>
18 #include "cpp/dataviewindexmodel.h"
20 %file{cpp/dataviewindexmodel.h};
22 #include "cpp/v_cback.h"
24 class wxPlDataViewIndexListModel : public wxDataViewIndexListModel
26 WXPLI_DECLARE_V_CBACK();
28 wxPlDataViewIndexListModel( const char* package, unsigned int initial_size )
29 : wxDataViewIndexListModel( initial_size ),
30 m_callback( "Wx::PlDataViewIndexListModel" )
32 m_callback.SetSelf( wxPli_make_object( this, package ), true );
35 // DEC_V_CBACK_UINT__VOID( GetRowCount );
36 DEC_V_CBACK_UINT__VOID_const( GetColumnCount );
37 DEC_V_CBACK_WXSTRING__UINT_const( GetColumnType );
38 DEC_V_CBACK_VOID__mWXVARIANT_UINT_UINT_const( GetValueByRow );
39 DEC_V_CBACK_BOOL__WXVARIANT_UINT_UINT( SetValueByRow );
42 DEF_V_CBACK_UINT__VOID_const_pure( wxPlDataViewIndexListModel,
43 wxDataViewIndexListModel, GetColumnCount );
44 DEF_V_CBACK_WXSTRING__UINT_const_pure( wxPlDataViewIndexListModel,
45 wxDataViewIndexListModel, GetColumnType );
46 // DEF_V_CBACK_UINT__VOID_pure( wxPlDataViewIndexListModel,
47 // wxDataViewIndexListModel, GetRowCount );
48 DEF_V_CBACK_VOID__mWXVARIANT_UINT_UINT_const_pure( wxPlDataViewIndexListModel,
49 wxDataViewIndexListModel,
51 DEF_V_CBACK_BOOL__WXVARIANT_UINT_UINT_pure( wxPlDataViewIndexListModel,
52 wxDataViewIndexListModel,
57 %name{Wx::DataViewIndexListModel} class wxDataViewIndexListModel
59 ## unsigned int GetRowCount();
61 void GetValueByRow( wxVariant &variant,
62 unsigned int row, unsigned int col ) const;
64 bool SetValueByRow( const wxVariant &variant,
65 unsigned int row, unsigned int col );
68 void RowInserted( unsigned int before );
70 void RowDeleted( unsigned int row );
71 void RowChanged( unsigned int row );
72 void RowValueChanged( unsigned int row, unsigned int col );
74 unsigned int GetRow( const wxDataViewItem &item ) const;
75 wxDataViewItem& GetItem( unsigned int row ) const;
76 void Reset( unsigned int new_size );
79 %name{Wx::PlDataViewIndexListModel} class wxPlDataViewIndexListModel
81 wxPlDataViewIndexListModel( unsigned int initial_size = 0 )
82 %code{% RETVAL = new wxPlDataViewIndexListModel( CLASS, initial_size ); %};