Some final tweaks prior to release
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -144,6 +144,8 @@ Renderers used together.
|
|||||||
self.SetColAttr(renCol, attr)
|
self.SetColAttr(renCol, attr)
|
||||||
self.SetColAttr(edCol, attr)
|
self.SetColAttr(edCol, attr)
|
||||||
|
|
||||||
|
# There is a bug in wxGTK for this method...
|
||||||
|
if wxPlatform != '__WXGTK__':
|
||||||
self.AutoSizeColumns(true)
|
self.AutoSizeColumns(true)
|
||||||
self.AutoSizeRows(true)
|
self.AutoSizeRows(true)
|
||||||
|
|
||||||
|
@@ -596,8 +596,10 @@ class wxGridCellEditor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool IsCreated();
|
bool IsCreated();
|
||||||
|
#ifdef POST2115
|
||||||
wxControl* GetControl();
|
wxControl* GetControl();
|
||||||
void SetControl(wxControl* control);
|
void SetControl(wxControl* control);
|
||||||
|
#endif
|
||||||
|
|
||||||
void SetParameters(const wxString& params);
|
void SetParameters(const wxString& params);
|
||||||
|
|
||||||
@@ -783,15 +785,31 @@ public:
|
|||||||
wxGridCellBoolEditor();
|
wxGridCellBoolEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class wxGridCellChoiceEditor : public wxGridCellEditor
|
class wxGridCellChoiceEditor : public wxGridCellEditor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
#ifdef POST2115
|
||||||
wxGridCellChoiceEditor(int LCOUNT = 0,
|
wxGridCellChoiceEditor(int LCOUNT = 0,
|
||||||
const wxString* choices = NULL,
|
const wxString* choices = NULL,
|
||||||
bool allowOthers = FALSE);
|
bool allowOthers = FALSE);
|
||||||
};
|
#else
|
||||||
|
%addmethods {
|
||||||
|
wxGridCellChoiceEditor(PyObject* choices,
|
||||||
|
bool allowOthers = FALSE) {
|
||||||
|
|
||||||
|
const char** temp = string_LIST_helper(choices);
|
||||||
|
if (temp) {
|
||||||
|
int count = PyList_Size(choices);
|
||||||
|
wxGridCellChoiceEditor* ret;
|
||||||
|
ret = new wxGridCellChoiceEditor(count, temp, allowOthers);
|
||||||
|
delete [] temp;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -1345,7 +1363,9 @@ public:
|
|||||||
void DisableCellEditControl();
|
void DisableCellEditControl();
|
||||||
bool CanEnableCellControl() const;
|
bool CanEnableCellControl() const;
|
||||||
bool IsCellEditControlEnabled() const;
|
bool IsCellEditControlEnabled() const;
|
||||||
|
#ifdef POST2115
|
||||||
bool IsCellEditControlShown() const;
|
bool IsCellEditControlShown() const;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool IsCurrentCellReadOnly() const;
|
bool IsCurrentCellReadOnly() const;
|
||||||
|
|
||||||
|
@@ -1454,76 +1454,6 @@ static PyObject *_wrap_wxGridCellEditor_IsCreated(PyObject *self, PyObject *args
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define wxGridCellEditor_GetControl(_swigobj) (_swigobj->GetControl())
|
|
||||||
static PyObject *_wrap_wxGridCellEditor_GetControl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
wxControl * _result;
|
|
||||||
wxGridCellEditor * _arg0;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
char *_kwnames[] = { "self", NULL };
|
|
||||||
char _ptemp[128];
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_GetControl",_kwnames,&_argo0))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_GetControl. Expected _wxGridCellEditor_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
wxPy_BEGIN_ALLOW_THREADS;
|
|
||||||
_result = (wxControl *)wxGridCellEditor_GetControl(_arg0);
|
|
||||||
|
|
||||||
wxPy_END_ALLOW_THREADS;
|
|
||||||
} if (_result) {
|
|
||||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p");
|
|
||||||
_resultobj = Py_BuildValue("s",_ptemp);
|
|
||||||
} else {
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
_resultobj = Py_None;
|
|
||||||
}
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxGridCellEditor_SetControl(_swigobj,_swigarg0) (_swigobj->SetControl(_swigarg0))
|
|
||||||
static PyObject *_wrap_wxGridCellEditor_SetControl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
wxGridCellEditor * _arg0;
|
|
||||||
wxControl * _arg1;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
PyObject * _argo1 = 0;
|
|
||||||
char *_kwnames[] = { "self","control", NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_SetControl",_kwnames,&_argo0,&_argo1))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_SetControl. Expected _wxGridCellEditor_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_argo1) {
|
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxControl_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_SetControl. Expected _wxControl_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
wxPy_BEGIN_ALLOW_THREADS;
|
|
||||||
wxGridCellEditor_SetControl(_arg0,_arg1);
|
|
||||||
|
|
||||||
wxPy_END_ALLOW_THREADS;
|
|
||||||
} Py_INCREF(Py_None);
|
|
||||||
_resultobj = Py_None;
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxGridCellEditor_SetParameters(_swigobj,_swigarg0) (_swigobj->SetParameters(_swigarg0))
|
#define wxGridCellEditor_SetParameters(_swigobj,_swigarg0) (_swigobj->SetParameters(_swigarg0))
|
||||||
static PyObject *_wrap_wxGridCellEditor_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxGridCellEditor_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -2503,40 +2433,39 @@ static void *SwigwxGridCellChoiceEditorTowxGridCellEditor(void *ptr) {
|
|||||||
return (void *) dest;
|
return (void *) dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define new_wxGridCellChoiceEditor(_swigarg0,_swigarg1,_swigarg2) (new wxGridCellChoiceEditor(_swigarg0,_swigarg1,_swigarg2))
|
static wxGridCellChoiceEditor *new_wxGridCellChoiceEditor(PyObject *choices,bool allowOthers) {
|
||||||
|
|
||||||
|
const char** temp = string_LIST_helper(choices);
|
||||||
|
if (temp) {
|
||||||
|
int count = PyList_Size(choices);
|
||||||
|
wxGridCellChoiceEditor* ret;
|
||||||
|
ret = new wxGridCellChoiceEditor(count, temp, allowOthers);
|
||||||
|
delete [] temp;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *_wrap_new_wxGridCellChoiceEditor(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_new_wxGridCellChoiceEditor(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
wxGridCellChoiceEditor * _result;
|
wxGridCellChoiceEditor * _result;
|
||||||
int _arg0 = (int ) 0;
|
PyObject * _arg0;
|
||||||
wxString * _arg1 = (wxString *) NULL;
|
bool _arg1 = (bool ) FALSE;
|
||||||
bool _arg2 = (bool ) FALSE;
|
PyObject * _obj0 = 0;
|
||||||
PyObject * _obj1 = 0;
|
int tempbool1 = (int) FALSE;
|
||||||
int tempbool2 = (int) FALSE;
|
|
||||||
char *_kwnames[] = { "choices","allowOthers", NULL };
|
char *_kwnames[] = { "choices","allowOthers", NULL };
|
||||||
char _ptemp[128];
|
char _ptemp[128];
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:new_wxGridCellChoiceEditor",_kwnames,&_obj1,&tempbool2))
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxGridCellChoiceEditor",_kwnames,&_obj0,&tempbool1))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (_obj1)
|
|
||||||
{
|
{
|
||||||
_arg1 = wxString_LIST_helper(_obj1);
|
_arg0 = _obj0;
|
||||||
if (_arg1 == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_arg2 = (bool ) tempbool2;
|
|
||||||
{
|
|
||||||
if (_obj1) {
|
|
||||||
_arg0 = PyList_Size(_obj1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
_arg0 = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
_arg1 = (bool ) tempbool1;
|
||||||
{
|
{
|
||||||
wxPy_BEGIN_ALLOW_THREADS;
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
_result = (wxGridCellChoiceEditor *)new_wxGridCellChoiceEditor(_arg0,_arg1,_arg2);
|
_result = (wxGridCellChoiceEditor *)new_wxGridCellChoiceEditor(_arg0,_arg1);
|
||||||
|
|
||||||
wxPy_END_ALLOW_THREADS;
|
wxPy_END_ALLOW_THREADS;
|
||||||
} if (_result) {
|
} if (_result) {
|
||||||
@@ -2546,9 +2475,6 @@ static PyObject *_wrap_new_wxGridCellChoiceEditor(PyObject *self, PyObject *args
|
|||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_resultobj = Py_None;
|
_resultobj = Py_None;
|
||||||
}
|
}
|
||||||
{
|
|
||||||
delete [] _arg1;
|
|
||||||
}
|
|
||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7371,33 +7297,6 @@ static PyObject *_wrap_wxGrid_IsCellEditControlEnabled(PyObject *self, PyObject
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define wxGrid_IsCellEditControlShown(_swigobj) (_swigobj->IsCellEditControlShown())
|
|
||||||
static PyObject *_wrap_wxGrid_IsCellEditControlShown(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
bool _result;
|
|
||||||
wxGrid * _arg0;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
char *_kwnames[] = { "self", NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsCellEditControlShown",_kwnames,&_argo0))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsCellEditControlShown. Expected _wxGrid_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
wxPy_BEGIN_ALLOW_THREADS;
|
|
||||||
_result = (bool )wxGrid_IsCellEditControlShown(_arg0);
|
|
||||||
|
|
||||||
wxPy_END_ALLOW_THREADS;
|
|
||||||
} _resultobj = Py_BuildValue("i",_result);
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxGrid_IsCurrentCellReadOnly(_swigobj) (_swigobj->IsCurrentCellReadOnly())
|
#define wxGrid_IsCurrentCellReadOnly(_swigobj) (_swigobj->IsCurrentCellReadOnly())
|
||||||
static PyObject *_wrap_wxGrid_IsCurrentCellReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxGrid_IsCurrentCellReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -12511,7 +12410,6 @@ static PyMethodDef gridcMethods[] = {
|
|||||||
{ "wxGrid_HideCellEditControl", (PyCFunction) _wrap_wxGrid_HideCellEditControl, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGrid_HideCellEditControl", (PyCFunction) _wrap_wxGrid_HideCellEditControl, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGrid_ShowCellEditControl", (PyCFunction) _wrap_wxGrid_ShowCellEditControl, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGrid_ShowCellEditControl", (PyCFunction) _wrap_wxGrid_ShowCellEditControl, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGrid_IsCurrentCellReadOnly", (PyCFunction) _wrap_wxGrid_IsCurrentCellReadOnly, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGrid_IsCurrentCellReadOnly", (PyCFunction) _wrap_wxGrid_IsCurrentCellReadOnly, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGrid_IsCellEditControlShown", (PyCFunction) _wrap_wxGrid_IsCellEditControlShown, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxGrid_IsCellEditControlEnabled", (PyCFunction) _wrap_wxGrid_IsCellEditControlEnabled, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGrid_IsCellEditControlEnabled", (PyCFunction) _wrap_wxGrid_IsCellEditControlEnabled, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGrid_CanEnableCellControl", (PyCFunction) _wrap_wxGrid_CanEnableCellControl, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGrid_CanEnableCellControl", (PyCFunction) _wrap_wxGrid_CanEnableCellControl, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGrid_DisableCellEditControl", (PyCFunction) _wrap_wxGrid_DisableCellEditControl, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGrid_DisableCellEditControl", (PyCFunction) _wrap_wxGrid_DisableCellEditControl, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -12685,8 +12583,6 @@ static PyMethodDef gridcMethods[] = {
|
|||||||
{ "wxGridCellEditor_BeginEdit", (PyCFunction) _wrap_wxGridCellEditor_BeginEdit, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGridCellEditor_BeginEdit", (PyCFunction) _wrap_wxGridCellEditor_BeginEdit, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGridCellEditor_Create", (PyCFunction) _wrap_wxGridCellEditor_Create, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGridCellEditor_Create", (PyCFunction) _wrap_wxGridCellEditor_Create, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGridCellEditor_SetParameters", (PyCFunction) _wrap_wxGridCellEditor_SetParameters, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGridCellEditor_SetParameters", (PyCFunction) _wrap_wxGridCellEditor_SetParameters, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGridCellEditor_SetControl", (PyCFunction) _wrap_wxGridCellEditor_SetControl, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxGridCellEditor_GetControl", (PyCFunction) _wrap_wxGridCellEditor_GetControl, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxGridCellEditor_IsCreated", (PyCFunction) _wrap_wxGridCellEditor_IsCreated, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGridCellEditor_IsCreated", (PyCFunction) _wrap_wxGridCellEditor_IsCreated, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxGridCellBoolRenderer", (PyCFunction) _wrap_new_wxGridCellBoolRenderer, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxGridCellBoolRenderer", (PyCFunction) _wrap_new_wxGridCellBoolRenderer, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGridCellFloatRenderer_SetPrecision", (PyCFunction) _wrap_wxGridCellFloatRenderer_SetPrecision, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGridCellFloatRenderer_SetPrecision", (PyCFunction) _wrap_wxGridCellFloatRenderer_SetPrecision, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -183,13 +183,6 @@ class wxGridCellEditorPtr :
|
|||||||
def IsCreated(self, *_args, **_kwargs):
|
def IsCreated(self, *_args, **_kwargs):
|
||||||
val = apply(gridc.wxGridCellEditor_IsCreated,(self,) + _args, _kwargs)
|
val = apply(gridc.wxGridCellEditor_IsCreated,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def GetControl(self, *_args, **_kwargs):
|
|
||||||
val = apply(gridc.wxGridCellEditor_GetControl,(self,) + _args, _kwargs)
|
|
||||||
if val: val = wxControlPtr(val)
|
|
||||||
return val
|
|
||||||
def SetControl(self, *_args, **_kwargs):
|
|
||||||
val = apply(gridc.wxGridCellEditor_SetControl,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SetParameters(self, *_args, **_kwargs):
|
def SetParameters(self, *_args, **_kwargs):
|
||||||
val = apply(gridc.wxGridCellEditor_SetParameters,(self,) + _args, _kwargs)
|
val = apply(gridc.wxGridCellEditor_SetParameters,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -898,9 +891,6 @@ class wxGridPtr(wxScrolledWindowPtr):
|
|||||||
def IsCellEditControlEnabled(self, *_args, **_kwargs):
|
def IsCellEditControlEnabled(self, *_args, **_kwargs):
|
||||||
val = apply(gridc.wxGrid_IsCellEditControlEnabled,(self,) + _args, _kwargs)
|
val = apply(gridc.wxGrid_IsCellEditControlEnabled,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def IsCellEditControlShown(self, *_args, **_kwargs):
|
|
||||||
val = apply(gridc.wxGrid_IsCellEditControlShown,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def IsCurrentCellReadOnly(self, *_args, **_kwargs):
|
def IsCurrentCellReadOnly(self, *_args, **_kwargs):
|
||||||
val = apply(gridc.wxGrid_IsCurrentCellReadOnly,(self,) + _args, _kwargs)
|
val = apply(gridc.wxGrid_IsCurrentCellReadOnly,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
Reference in New Issue
Block a user