virtual void HandleReturn(wxKeyEvent& event);
virtual void Destroy();
- virtual wxString GetValue();
};
DEC_PYCALLBACK__(StartingClick);
DEC_PYCALLBACK__(Destroy);
DEC_PYCALLBACK__STRING(SetParameters);
- DEC_PYCALLBACK_STRING__const(GetValue);
+ DEC_PYCALLBACK_STRING__constpure(GetValue);
PYPRIVATE;
};
IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, HandleReturn, wxKeyEvent);
IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, StartingClick);
IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, Destroy);
-IMP_PYCALLBACK_STRING__const(wxPyGridCellEditor, wxGridCellEditor, GetValue);
+IMP_PYCALLBACK_STRING__constpure(wxPyGridCellEditor, wxGridCellEditor, GetValue);
%}
void base_HandleReturn(wxKeyEvent& event);
void base_Destroy();
void base_SetParameters(const wxString& params);
- wxString base_GetValue();
};
//---------------------------------------------------------------------------
public:
wxGridCellTextEditor();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+ virtual wxString GetValue();
};
public:
wxGridCellNumberEditor(int min = -1, int max = -1);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+ virtual wxString GetValue();
};
public:
wxGridCellFloatEditor();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+ virtual wxString GetValue();
};
public:
wxGridCellBoolEditor();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+ virtual wxString GetValue();
};
class wxGridCellChoiceEditor : public wxGridCellEditor
const wxString* choices = NULL,
bool allowOthers = FALSE);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+ virtual wxString GetValue();
};
public:
wxGridCellEnumEditor( const wxString& choices = wxPyEmptyString );
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+ virtual wxString GetValue();
};
public:
wxGridCellAutoWrapStringEditor();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+ virtual wxString GetValue();
};
//---------------------------------------------------------------------------
+#define DEC_PYCALLBACK_STRING__constpure(CBNAME) \
+ wxString CBNAME() const;
+
+#define IMP_PYCALLBACK_STRING__constpure(CLASS, PCLASS, CBNAME) \
+ wxString CLASS::CBNAME() const { \
+ wxString rval; \
+ wxPyBeginBlockThreads(); \
+ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
+ PyObject* ro; \
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); \
+ if (ro) { \
+ rval = Py2wxString(ro); \
+ Py_DECREF(ro); \
+ } \
+ } \
+ wxPyEndBlockThreads(); \
+ return rval; \
+ }
+
+//---------------------------------------------------------------------------
+
#define DEC_PYCALLBACK_BOOL_TAG_pure(CBNAME) \
bool CBNAME(const wxHtmlTag& a); \