1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
|
#############################################################################
## Name: ext/grid/XS/GridTable.xsp
## Purpose: XS++ for Wx::PlGridTable
## Author: Mattia Barbon
## Modified by:
## Created: 02/08/2003
## RCS-ID: $Id: GridTable.xsp 2304 2007-12-24 17:25:51Z mbarbon $
## Copyright: (c) 2003-2004, 2007 Mattia Barbon
## Licence: This program is free software; you can redistribute it and/or
## modify it under the same terms as Perl itself
#############################################################################
%module{Wx};
%typemap{wxPlGridTable*}{simple};
%typemap{wxGrid*}{simple};
%typemap{wxGridCellAttr*}{simple};
%typemap{wxGridCellAttr::wxAttrKind}{simple};
%file{cpp/gridtable.h};
%{
#include "cpp/v_cback.h"
class wxPlGridTable : public wxGridTableBase
{
WXPLI_DECLARE_DYNAMIC_CLASS( wxPlGridTable );
WXPLI_DECLARE_V_CBACK();
public:
wxPlGridTable( const char* package )
:m_callback( "Wx::GridTableBase" )
{
m_callback.SetSelf( wxPli_make_object( this, package ), true );
}
DEC_V_CBACK_INT__VOID( GetNumberRows );
DEC_V_CBACK_INT__VOID( GetNumberCols );
DEC_V_CBACK_BOOL__INT_INT( IsEmptyCell );
DEC_V_CBACK_WXSTRING__INT_INT( GetValue );
DEC_V_CBACK_VOID__INT_INT_WXSTRING( SetValue );
DEC_V_CBACK_WXSTRING__INT_INT( GetTypeName );
DEC_V_CBACK_BOOL__INT_INT_WXSTRING( CanGetValueAs );
DEC_V_CBACK_BOOL__INT_INT_WXSTRING( CanSetValueAs );
DEC_V_CBACK_LONG__INT_INT( GetValueAsLong );
DEC_V_CBACK_DOUBLE__INT_INT( GetValueAsDouble );
DEC_V_CBACK_BOOL__INT_INT( GetValueAsBool );
// DEC_V_CBACK_VOIDP__INT_INT_WXSTRING( GetValueAsCustom );
DEC_V_CBACK_VOID__INT_INT_LONG( SetValueAsLong );
DEC_V_CBACK_VOID__INT_INT_DOUBLE( SetValueAsDouble );
DEC_V_CBACK_VOID__INT_INT_BOOL( SetValueAsBool );
// DEC_V_CBACK_VOIDP_INT_INT_WXSTRING_VOIDP( SetValueAsCustom );
DEC_V_CBACK_VOID__WXGRID( SetView );
DEC_V_CBACK_WXGRID__VOID_const( GetView );
DEC_V_CBACK_VOID__VOID( Clear );
DEC_V_CBACK_BOOL__SIZET_SIZET( InsertRows );
DEC_V_CBACK_BOOL__SIZET( AppendRows );
DEC_V_CBACK_BOOL__SIZET_SIZET( DeleteRows );
DEC_V_CBACK_BOOL__SIZET_SIZET( InsertCols );
DEC_V_CBACK_BOOL__SIZET( AppendCols );
DEC_V_CBACK_BOOL__SIZET_SIZET( DeleteCols );
DEC_V_CBACK_WXSTRING__INT( GetRowLabelValue );
DEC_V_CBACK_WXSTRING__INT( GetColLabelValue );
DEC_V_CBACK_VOID__INT_WXSTRING( SetRowLabelValue );
DEC_V_CBACK_VOID__INT_WXSTRING( SetColLabelValue );
};
DEF_V_CBACK_INT__VOID_pure( wxPlGridTable, wxGridTableBase, GetNumberRows );
DEF_V_CBACK_INT__VOID_pure( wxPlGridTable, wxGridTableBase, GetNumberCols );
DEF_V_CBACK_BOOL__INT_INT_pure( wxPlGridTable, wxGridTableBase, IsEmptyCell );
DEF_V_CBACK_WXSTRING__INT_INT_pure( wxPlGridTable, wxGridTableBase, GetValue );
DEF_V_CBACK_VOID__INT_INT_WXSTRING_pure( wxPlGridTable, wxGridTableBase, SetValue );
DEF_V_CBACK_WXSTRING__INT_INT( wxPlGridTable, wxGridTableBase, GetTypeName );
DEF_V_CBACK_BOOL__INT_INT_WXSTRING( wxPlGridTable, wxGridTableBase, CanGetValueAs );
DEF_V_CBACK_BOOL__INT_INT_WXSTRING( wxPlGridTable, wxGridTableBase, CanSetValueAs );
DEF_V_CBACK_LONG__INT_INT( wxPlGridTable, wxGridTableBase, GetValueAsLong );
DEF_V_CBACK_DOUBLE__INT_INT( wxPlGridTable, wxGridTableBase, GetValueAsDouble );
DEF_V_CBACK_BOOL__INT_INT( wxPlGridTable, wxGridTableBase, GetValueAsBool );
// DEF_V_CBACK_VOIDP__INT_INT_WXSTRING( wxPlGridTable, wxGridTableBase, GetValueAsCustom );
DEF_V_CBACK_VOID__INT_INT_LONG( wxPlGridTable, wxGridTableBase, SetValueAsLong );
DEF_V_CBACK_VOID__INT_INT_DOUBLE( wxPlGridTable, wxGridTableBase, SetValueAsDouble );
DEF_V_CBACK_VOID__INT_INT_BOOL( wxPlGridTable, wxGridTableBase, SetValueAsBool );
// DEF_V_CBACK_VOIDP_INT_INT_WXSTRING_VOIDP( wxPlGridTable, wxGridTableBase, SetValueAsCustom );
DEF_V_CBACK_VOID__WXGRID( wxPlGridTable, wxGridTableBase, SetView );
DEF_V_CBACK_WXGRID__VOID_const( wxPlGridTable, wxGridTableBase, GetView );
DEF_V_CBACK_VOID__VOID( wxPlGridTable, wxGridTableBase, Clear );
DEF_V_CBACK_BOOL__SIZET_SIZET( wxPlGridTable, wxGridTableBase, InsertRows );
DEF_V_CBACK_BOOL__SIZET( wxPlGridTable, wxGridTableBase, AppendRows );
DEF_V_CBACK_BOOL__SIZET_SIZET( wxPlGridTable, wxGridTableBase, DeleteRows );
DEF_V_CBACK_BOOL__SIZET_SIZET( wxPlGridTable, wxGridTableBase, InsertCols );
DEF_V_CBACK_BOOL__SIZET( wxPlGridTable, wxGridTableBase, AppendCols );
DEF_V_CBACK_BOOL__SIZET_SIZET( wxPlGridTable, wxGridTableBase, DeleteCols );
DEF_V_CBACK_WXSTRING__INT( wxPlGridTable, wxGridTableBase, GetRowLabelValue );
DEF_V_CBACK_WXSTRING__INT( wxPlGridTable, wxGridTableBase, GetColLabelValue );
DEF_V_CBACK_VOID__INT_WXSTRING( wxPlGridTable, wxGridTableBase, SetRowLabelValue );
DEF_V_CBACK_VOID__INT_WXSTRING( wxPlGridTable, wxGridTableBase, SetColLabelValue );
WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlGridTable, wxGridTableBase );
%}
%file{-};
#include "cpp/gridtable.h"
#define wxGridCellAttr__wxAttrKind wxGridCellAttr::wxAttrKind
%name{Wx::PlGridTable} class wxPlGridTable
{
wxPlGridTable() %code{% RETVAL = new wxPlGridTable( CLASS ); %};
void Destroy() %code{% delete THIS; %};
wxString GetTypeName( int row, int col )
%code{% RETVAL = THIS->wxGridTableBase::GetTypeName( row, col ); %};
bool CanGetValueAs( int row, int col, const wxString& typeName )
%code{% RETVAL = THIS->wxGridTableBase::CanGetValueAs( row, col, typeName ); %};
bool CanSetValueAs( int row, int col, const wxString& typeName )
%code{% RETVAL = THIS->wxGridTableBase::CanSetValueAs( row, col, typeName ); %};
long GetValueAsLong( int row, int col )
%code{% RETVAL = THIS->wxGridTableBase::GetValueAsLong( row, col ); %};
double GetValueAsDouble( int row, int col )
%code{% RETVAL = THIS->wxGridTableBase::GetValueAsDouble( row, col ); %};
bool GetValueAsBool( int row, int col )
%code{% RETVAL = THIS->wxGridTableBase::GetValueAsBool( row, col ); %};
void SetValueAsLong( int row, int col, long value )
%code{% THIS->wxGridTableBase::SetValueAsLong( row, col, value ); %};
void SetValueAsDouble( int row, int col, double value )
%code{% THIS->wxGridTableBase::SetValueAsDouble( row, col, value ); %};
void SetValueAsBool( int row, int col, bool value )
%code{% THIS->wxGridTableBase::SetValueAsBool( row, col, value ); %};
## void* GetValueAsCustom( int row, int col, const wxString& typeName ) %code{% %};
## void SetValueAsCustom( int row, int col, const wxString& typeName, void* value ) %code{% %};
void SetView( wxGrid *grid )
%code{% THIS->wxGridTableBase::SetView( grid ); %};
wxGrid* GetView()
%code{% RETVAL = THIS->wxGridTableBase::GetView(); %};
void Clear() %code{% THIS->wxGridTableBase::Clear(); %};
bool InsertRows( size_t pos = 0, size_t numRows = 1 )
%code{% RETVAL = THIS->wxGridTableBase::InsertRows( pos, numRows ); %};
bool AppendRows( size_t numRows = 1 )
%code{% RETVAL = THIS->wxGridTableBase::AppendRows( numRows ); %};
bool DeleteRows( size_t pos = 0, size_t numRows = 1 )
%code{% RETVAL = THIS->wxGridTableBase::DeleteRows( pos, numRows ); %};
bool InsertCols( size_t pos = 0, size_t numCols = 1 )
%code{% RETVAL = THIS->wxGridTableBase::InsertCols( pos, numCols ); %};
bool AppendCols( size_t numCols = 1 )
%code{% RETVAL = THIS->wxGridTableBase::AppendCols( numCols ); %};
bool DeleteCols( size_t pos = 0, size_t numCols = 1 )
%code{% RETVAL = THIS->wxGridTableBase::DeleteCols( pos, numCols ); %};
wxString GetRowLabelValue( int row )
%code{% RETVAL = THIS->wxGridTableBase::GetRowLabelValue( row ); %};
wxString GetColLabelValue( int col )
%code{% RETVAL = THIS->wxGridTableBase::GetColLabelValue( col ); %};
void SetRowLabelValue( int row, const wxString& value )
%code{% THIS->wxGridTableBase::SetRowLabelValue( row, value ); %};
void SetColLabelValue( int col, const wxString& value )
%code{% THIS->wxGridTableBase::SetColLabelValue( col, value ); %};
## void SetAttrProvider(wxGridCellAttrProvider *attrProvider) %code{% %};
## wxGridCellAttrProvider *GetAttrProvider() const { RETVAL = m_attrProvider %code{% %}; }
bool CanHaveAttributes()
%code{% RETVAL = THIS->wxGridTableBase::CanHaveAttributes(); %};
wxGridCellAttr *GetAttr( int row, int col,
wxGridCellAttr::wxAttrKind kind )
%code{% RETVAL = THIS->wxGridTableBase::GetAttr( row, col, kind ); %};
void SetAttr(wxGridCellAttr* attr, int row, int col)
%code{% THIS->wxGridTableBase::SetAttr( attr, row, col ); %};
void SetRowAttr(wxGridCellAttr *attr, int row)
%code{% THIS->wxGridTableBase::SetRowAttr( attr, row ); %};
void SetColAttr(wxGridCellAttr *attr, int col)
%code{% THIS->wxGridTableBase::SetColAttr( attr, col ); %};
};
## Mark methods as implemented
%{
MODULE=Wx PACKAGE=Wx::GridTableBase
%}
#!sub wxGridTableBase
#!sub GetNumberRows
#!sub SetNumberRows
#!sub GetTypeName
#!sub CanGetValueAs
#!sub CanSetValueAs
#!sub GetValueAsLong
#!sub GetValueAsDouble
#!sub GetValueAsBool
#!sub SetValueAsLong
#!sub SetValueAsDouble
#!sub SetValueAsBool
#!sub SetView
#!sub GetView
#!sub Clear
#!sub IsEmptyCell
#!sub InsertRows
#!sub AppendRows
#!sub DeleteRows
#!sub InsertCols
#!sub AppendCols
#!sub DeleteCols
#!sub GetRowLabelValue
#!sub GetColLabelValue
#!sub SetRowLabelValue
#!sub SetColLabelValue
#!sub CanHaveAttributes
#!sub GetAttr
#!sub SetAttr
#!sub SetRowAttr
#!sub SetColAttr
#!sub GetValue
#!sub SetValue
|