Some wxGrid related classes now support OOR.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-04-18 05:37:09 +00:00
parent e3dbf5934e
commit 33ff77f695
4 changed files with 386 additions and 176 deletions
+5 -1
View File
@@ -84,6 +84,11 @@ Python instance object with a class that raises an exception whenever
a method call (or other attribute access) is attempted. This works
for any class that is OOR aware.
Added OOR support for wxGridCellRenderer, wxGridCellEditor,
wxGridCellAttr, wxGridCellAttrProvider, wxGridTableBase and their
derived classes..
2.3.2.1
@@ -96,7 +101,6 @@ Added some patches from library contributors.
2.3.2
-----
Added EVT_HELP, EVT_HELP_RANGE, EVT_DETAILED_HELP,
+103 -7
View File
@@ -40,6 +40,8 @@
%{
// Put some wx default wxChar* values into wxStrings.
DECLARE_DEF_STRING(PanelNameStr);
DECLARE_DEF_STRING2(DateTimeFormatStr, wxT("%c"));
static const wxString wxPyEmptyString(wxT(""));
%}
//---------------------------------------------------------------------------
@@ -444,6 +446,50 @@
%}
//---------------------------------------------------------------------------
// OOR related typemaps and helper functions
%typemap(python, out) wxGridCellRenderer* { $target = wxPyMake_wxGridCellRenderer($source); }
%typemap(python, out) wxGridCellEditor* { $target = wxPyMake_wxGridCellEditor($source); }
%typemap(python, out) wxGridCellAttr* { $target = wxPyMake_wxGridCellAttr($source); }
%typemap(python, out) wxGridCellAttrProvider* { $target = wxPyMake_wxGridCellAttrProvider($source); }
%typemap(python, out) wxGridTableBase* { $target = wxPyMake_wxGridTableBase($source); }
%{
#define wxPyMake_TEMPLATE(TYPE) \
PyObject* wxPyMake_##TYPE(TYPE* source) { \
PyObject* target = NULL; \
if (source) { \
/* Check if there is already a pointer to a Python object in the \
OOR data that we can use. */ \
wxPyOORClientData* data = (wxPyOORClientData*)source->GetClientObject(); \
if (data) { \
target = data->m_obj; \
Py_INCREF(target); \
} \
/* Otherwise make a new wrapper for it the old fashioned way and \
give it the OOR treatment */ \
if (! target) { \
target = wxPyConstructObject(source, #TYPE, FALSE); \
if (target) \
source->SetClientObject(new wxPyOORClientData(target)); \
} \
} else { /* source was NULL so return None. */ \
Py_INCREF(Py_None); target = Py_None; \
} \
return target; \
} \
wxPyMake_TEMPLATE(wxGridCellRenderer)
wxPyMake_TEMPLATE(wxGridCellEditor)
wxPyMake_TEMPLATE(wxGridCellAttr)
wxPyMake_TEMPLATE(wxGridCellAttrProvider)
wxPyMake_TEMPLATE(wxGridTableBase)
%}
//---------------------------------------------------------------------------
@@ -451,8 +497,6 @@
class wxGridCellCoords;
class wxGridCellAttr;
#define wxGRID_VALUE_STRING "string"
#define wxGRID_VALUE_BOOL "bool"
#define wxGRID_VALUE_NUMBER "long"
@@ -460,6 +504,9 @@ class wxGridCellAttr;
#define wxGRID_VALUE_CHOICE "choice"
#define wxGRID_VALUE_TEXT "string"
#define wxGRID_VALUE_LONG "long"
#define wxGRID_VALUE_CHOICEINT "choiceint"
#define wxGRID_VALUE_DATETIME "datetime"
%readonly
wxGridCellCoords wxGridNoCellCoords;
@@ -475,6 +522,12 @@ wxRect wxGridNoCellRect;
class wxGridCellRenderer
{
public:
%addmethods {
void _setOORInfo(PyObject* _self) {
self->SetClientObject(new wxPyOORClientData(_self));
}
}
void SetParameters(const wxString& params);
void IncRef();
void DecRef();
@@ -589,6 +642,7 @@ public:
wxPyGridCellRenderer();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyGridCellRenderer)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void base_SetParameters(const wxString& params);
};
@@ -600,6 +654,7 @@ class wxGridCellStringRenderer : public wxGridCellRenderer
{
public:
wxGridCellStringRenderer();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -607,6 +662,7 @@ class wxGridCellNumberRenderer : public wxGridCellStringRenderer
{
public:
wxGridCellNumberRenderer();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -614,6 +670,7 @@ class wxGridCellFloatRenderer : public wxGridCellStringRenderer
{
public:
wxGridCellFloatRenderer(int width = -1, int precision = -1);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
int GetWidth() const;
void SetWidth(int width);
@@ -626,21 +683,24 @@ class wxGridCellBoolRenderer : public wxGridCellRenderer
{
public:
wxGridCellBoolRenderer();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
class wxGridCellDateTimeRenderer : public wxGridCellStringRenderer
{
public:
wxGridCellDateTimeRenderer(wxString outformat = "%c",
wxString informat = "%c");
wxGridCellDateTimeRenderer(wxString outformat = wxPyDateTimeFormatStr,
wxString informat = wxPyDateTimeFormatStr);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
class wxGridCellEnumRenderer : public wxGridCellStringRenderer
{
public:
wxGridCellEnumRenderer( const wxString& choices = "" );
wxGridCellEnumRenderer( const wxString& choices = wxPyEmptyString );
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -648,6 +708,7 @@ class wxGridCellAutoWrapStringRenderer : public wxGridCellStringRenderer
{
public:
wxGridCellAutoWrapStringRenderer();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -658,6 +719,12 @@ public:
class wxGridCellEditor
{
public:
%addmethods {
void _setOORInfo(PyObject* _self) {
self->SetClientObject(new wxPyOORClientData(_self));
}
}
bool IsCreated();
wxControl* GetControl();
void SetControl(wxControl* control);
@@ -812,6 +879,7 @@ public:
wxPyGridCellEditor();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyGridCellEditor)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void base_SetSize(const wxRect& rect);
void base_Show(bool show, wxGridCellAttr *attr = NULL);
@@ -831,6 +899,7 @@ class wxGridCellTextEditor : public wxGridCellEditor
{
public:
wxGridCellTextEditor();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -838,6 +907,7 @@ class wxGridCellNumberEditor : public wxGridCellTextEditor
{
public:
wxGridCellNumberEditor(int min = -1, int max = -1);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -845,6 +915,7 @@ class wxGridCellFloatEditor : public wxGridCellTextEditor
{
public:
wxGridCellFloatEditor();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -852,6 +923,7 @@ class wxGridCellBoolEditor : public wxGridCellEditor
{
public:
wxGridCellBoolEditor();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
class wxGridCellChoiceEditor : public wxGridCellEditor
@@ -860,13 +932,15 @@ public:
wxGridCellChoiceEditor(int LCOUNT = 0,
const wxString* choices = NULL,
bool allowOthers = FALSE);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
class wxGridCellEnumEditor : public wxGridCellChoiceEditor
{
public:
wxGridCellEnumEditor( const wxString& choices = "" );
wxGridCellEnumEditor( const wxString& choices = wxPyEmptyString );
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -874,6 +948,7 @@ class wxGridCellAutoWrapStringEditor : public wxGridCellTextEditor
{
public:
wxGridCellAutoWrapStringEditor();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
@@ -894,7 +969,14 @@ public:
Merged
};
%addmethods {
void _setOORInfo(PyObject* _self) {
self->SetClientObject(new wxPyOORClientData(_self));
}
}
wxGridCellAttr(wxGridCellAttr *attrDefault = NULL);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxGridCellAttr *Clone() const;
void MergeWith(wxGridCellAttr *mergefrom);
@@ -936,6 +1018,13 @@ class wxGridCellAttrProvider
public:
wxGridCellAttrProvider();
// ???? virtual ~wxGridCellAttrProvider();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%addmethods {
void _setOORInfo(PyObject* _self) {
self->SetClientObject(new wxPyOORClientData(_self));
}
}
wxGridCellAttr *GetAttr(int row, int col,
wxGridCellAttr::wxAttrKind kind) const;
@@ -986,13 +1075,18 @@ public:
// Grid Table Base class and Python aware version
class wxGridTableBase : public wxObject
{
public:
// wxGridTableBase(); This is an ABC
//~wxGridTableBase();
%addmethods {
void _setOORInfo(PyObject* _self) {
self->SetClientObject(new wxPyOORClientData(_self));
}
}
void SetAttrProvider(wxGridCellAttrProvider *attrProvider);
wxGridCellAttrProvider *GetAttrProvider() const;
void SetView( wxGrid *grid );
@@ -1180,6 +1274,7 @@ public:
wxPyGridTableBase();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyGridTableBase)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%addmethods { void Destroy() { delete self; } }
@@ -1213,6 +1308,7 @@ class wxGridStringTable : public wxGridTableBase
{
public:
wxGridStringTable( int numRows=0, int numCols=0 );
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
//---------------------------------------------------------------------------
+241 -150
View File
File diff suppressed because it is too large Load Diff
+37 -18
View File
@@ -69,6 +69,9 @@ class wxGridCellRendererPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def _setOORInfo(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellRenderer__setOORInfo,(self,) + _args, _kwargs)
return val
def SetParameters(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellRenderer_SetParameters,(self,) + _args, _kwargs)
return val
@@ -87,7 +90,6 @@ class wxGridCellRendererPtr :
return val
def Clone(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellRenderer_Clone,(self,) + _args, _kwargs)
if val: val = wxGridCellRendererPtr(val)
return val
def __repr__(self):
return "<C wxGridCellRenderer instance at %s>" % (self.this,)
@@ -115,6 +117,7 @@ class wxPyGridCellRenderer(wxPyGridCellRendererPtr):
self.this = apply(gridc.new_wxPyGridCellRenderer,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyGridCellRenderer)
self._setOORInfo(self)
@@ -129,6 +132,7 @@ class wxGridCellStringRenderer(wxGridCellStringRendererPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellStringRenderer,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -143,6 +147,7 @@ class wxGridCellNumberRenderer(wxGridCellNumberRendererPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellNumberRenderer,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -169,6 +174,7 @@ class wxGridCellFloatRenderer(wxGridCellFloatRendererPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellFloatRenderer,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -183,6 +189,7 @@ class wxGridCellBoolRenderer(wxGridCellBoolRendererPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellBoolRenderer,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -197,6 +204,7 @@ class wxGridCellDateTimeRenderer(wxGridCellDateTimeRendererPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellDateTimeRenderer,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -211,6 +219,7 @@ class wxGridCellEnumRenderer(wxGridCellEnumRendererPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellEnumRenderer,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -225,6 +234,7 @@ class wxGridCellAutoWrapStringRenderer(wxGridCellAutoWrapStringRendererPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellAutoWrapStringRenderer,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -233,6 +243,9 @@ class wxGridCellEditorPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def _setOORInfo(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellEditor__setOORInfo,(self,) + _args, _kwargs)
return val
def IsCreated(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellEditor_IsCreated,(self,) + _args, _kwargs)
return val
@@ -265,7 +278,6 @@ class wxGridCellEditorPtr :
return val
def Clone(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellEditor_Clone,(self,) + _args, _kwargs)
if val: val = wxGridCellEditorPtr(val)
return val
def SetSize(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellEditor_SetSize,(self,) + _args, _kwargs)
@@ -341,6 +353,7 @@ class wxPyGridCellEditor(wxPyGridCellEditorPtr):
self.this = apply(gridc.new_wxPyGridCellEditor,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyGridCellEditor)
self._setOORInfo(self)
@@ -355,6 +368,7 @@ class wxGridCellTextEditor(wxGridCellTextEditorPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellTextEditor,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -369,6 +383,7 @@ class wxGridCellNumberEditor(wxGridCellNumberEditorPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellNumberEditor,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -383,6 +398,7 @@ class wxGridCellFloatEditor(wxGridCellFloatEditorPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellFloatEditor,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -397,6 +413,7 @@ class wxGridCellBoolEditor(wxGridCellBoolEditorPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellBoolEditor,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -411,6 +428,7 @@ class wxGridCellChoiceEditor(wxGridCellChoiceEditorPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellChoiceEditor,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -425,6 +443,7 @@ class wxGridCellEnumEditor(wxGridCellEnumEditorPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellEnumEditor,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -439,6 +458,7 @@ class wxGridCellAutoWrapStringEditor(wxGridCellAutoWrapStringEditorPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellAutoWrapStringEditor,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -453,9 +473,11 @@ class wxGridCellAttrPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def _setOORInfo(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttr__setOORInfo,(self,) + _args, _kwargs)
return val
def Clone(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttr_Clone,(self,) + _args, _kwargs)
if val: val = wxGridCellAttrPtr(val)
return val
def MergeWith(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttr_MergeWith,(self,) + _args, _kwargs)
@@ -528,11 +550,9 @@ class wxGridCellAttrPtr :
return val
def GetRenderer(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttr_GetRenderer,(self,) + _args, _kwargs)
if val: val = wxGridCellRendererPtr(val)
return val
def GetEditor(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttr_GetEditor,(self,) + _args, _kwargs)
if val: val = wxGridCellEditorPtr(val)
return val
def IsReadOnly(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttr_IsReadOnly,(self,) + _args, _kwargs)
@@ -546,6 +566,7 @@ class wxGridCellAttr(wxGridCellAttrPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellAttr,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -554,9 +575,11 @@ class wxGridCellAttrProviderPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def _setOORInfo(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttrProvider__setOORInfo,(self,) + _args, _kwargs)
return val
def GetAttr(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttrProvider_GetAttr,(self,) + _args, _kwargs)
if val: val = wxGridCellAttrPtr(val)
return val
def SetAttr(self, *_args, **_kwargs):
val = apply(gridc.wxGridCellAttrProvider_SetAttr,(self,) + _args, _kwargs)
@@ -579,6 +602,7 @@ class wxGridCellAttrProvider(wxGridCellAttrProviderPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridCellAttrProvider,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -592,7 +616,6 @@ class wxPyGridCellAttrProviderPtr(wxGridCellAttrProviderPtr):
return val
def base_GetAttr(self, *_args, **_kwargs):
val = apply(gridc.wxPyGridCellAttrProvider_base_GetAttr,(self,) + _args, _kwargs)
if val: val = wxGridCellAttrPtr(val)
return val
def base_SetAttr(self, *_args, **_kwargs):
val = apply(gridc.wxPyGridCellAttrProvider_base_SetAttr,(self,) + _args, _kwargs)
@@ -618,12 +641,14 @@ class wxGridTableBasePtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setOORInfo(self, *_args, **_kwargs):
val = apply(gridc.wxGridTableBase__setOORInfo,(self,) + _args, _kwargs)
return val
def SetAttrProvider(self, *_args, **_kwargs):
val = apply(gridc.wxGridTableBase_SetAttrProvider,(self,) + _args, _kwargs)
return val
def GetAttrProvider(self, *_args, **_kwargs):
val = apply(gridc.wxGridTableBase_GetAttrProvider,(self,) + _args, _kwargs)
if val: val = wxGridCellAttrProviderPtr(val)
return val
def SetView(self, *_args, **_kwargs):
val = apply(gridc.wxGridTableBase_SetView,(self,) + _args, _kwargs)
@@ -711,7 +736,6 @@ class wxGridTableBasePtr(wxObjectPtr):
return val
def GetAttr(self, *_args, **_kwargs):
val = apply(gridc.wxGridTableBase_GetAttr,(self,) + _args, _kwargs)
if val: val = wxGridCellAttrPtr(val)
return val
def SetAttr(self, *_args, **_kwargs):
val = apply(gridc.wxGridTableBase_SetAttr,(self,) + _args, _kwargs)
@@ -788,7 +812,6 @@ class wxPyGridTableBasePtr(wxGridTableBasePtr):
return val
def base_GetAttr(self, *_args, **_kwargs):
val = apply(gridc.wxPyGridTableBase_base_GetAttr,(self,) + _args, _kwargs)
if val: val = wxGridCellAttrPtr(val)
return val
def base_SetAttr(self, *_args, **_kwargs):
val = apply(gridc.wxPyGridTableBase_base_SetAttr,(self,) + _args, _kwargs)
@@ -806,6 +829,7 @@ class wxPyGridTableBase(wxPyGridTableBasePtr):
self.this = apply(gridc.new_wxPyGridTableBase,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyGridTableBase)
self._setOORInfo(self)
@@ -820,6 +844,7 @@ class wxGridStringTable(wxGridStringTablePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gridc.new_wxGridStringTable,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
@@ -1320,11 +1345,9 @@ class wxGridPtr(wxScrolledWindowPtr):
return val
def GetDefaultRenderer(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetDefaultRenderer,(self,) + _args, _kwargs)
if val: val = wxGridCellRendererPtr(val)
return val
def GetCellRenderer(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetCellRenderer,(self,) + _args, _kwargs)
if val: val = wxGridCellRendererPtr(val)
return val
def SetDefaultEditor(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_SetDefaultEditor,(self,) + _args, _kwargs)
@@ -1334,11 +1357,9 @@ class wxGridPtr(wxScrolledWindowPtr):
return val
def GetDefaultEditor(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetDefaultEditor,(self,) + _args, _kwargs)
if val: val = wxGridCellEditorPtr(val)
return val
def GetCellEditor(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetCellEditor,(self,) + _args, _kwargs)
if val: val = wxGridCellEditorPtr(val)
return val
def GetCellValue(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetCellValue,(self,) + _args, _kwargs)
@@ -1396,19 +1417,15 @@ class wxGridPtr(wxScrolledWindowPtr):
return val
def GetDefaultEditorForCell(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetDefaultEditorForCell,(self,) + _args, _kwargs)
if val: val = wxGridCellEditorPtr(val)
return val
def GetDefaultRendererForCell(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetDefaultRendererForCell,(self,) + _args, _kwargs)
if val: val = wxGridCellRendererPtr(val)
return val
def GetDefaultEditorForType(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetDefaultEditorForType,(self,) + _args, _kwargs)
if val: val = wxGridCellEditorPtr(val)
return val
def GetDefaultRendererForType(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetDefaultRendererForType,(self,) + _args, _kwargs)
if val: val = wxGridCellRendererPtr(val)
return val
def SetMargins(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_SetMargins,(self,) + _args, _kwargs)
@@ -1604,6 +1621,8 @@ wxGRID_VALUE_FLOAT = gridc.wxGRID_VALUE_FLOAT
wxGRID_VALUE_CHOICE = gridc.wxGRID_VALUE_CHOICE
wxGRID_VALUE_TEXT = gridc.wxGRID_VALUE_TEXT
wxGRID_VALUE_LONG = gridc.wxGRID_VALUE_LONG
wxGRID_VALUE_CHOICEINT = gridc.wxGRID_VALUE_CHOICEINT
wxGRID_VALUE_DATETIME = gridc.wxGRID_VALUE_DATETIME
cvar = gridc.cvar
wxGridNoCellCoords = wxGridCellCoordsPtr(gridc.cvar.wxGridNoCellCoords)
wxGridNoCellRect = wxRectPtr(gridc.cvar.wxGridNoCellRect)