Add SetBestSize, GetDefaultAttributes and fixed ShouldInheritColours

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-05-14 21:37:26 +00:00
parent d474ed7b17
commit 1a10485f79
3 changed files with 68 additions and 16 deletions

View File

@@ -2448,4 +2448,35 @@ extern wxPyApp *wxPythonApp;
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK_VIZATTR_(CBNAME) \
wxVisualAttributes CBNAME() const; \
wxVisualAttributes base_##CBNAME()
#define IMP_PYCALLBACK_VIZATTR_(CLASS, PCLASS, CBNAME) \
wxVisualAttributes CLASS::CBNAME() const { \
wxVisualAttributes rval; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* ro; \
wxVisualAttributes* ptr; \
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); \
if (ro) { \
if (wxPyConvertSwigPtr(ro, (void **)&ptr, wxT("wxVisualAttributes"))) \
rval = *ptr; \
Py_DECREF(ro); \
} \
} \
wxPyEndBlockThreads(blocked); \
if (! found) \
rval = PCLASS::CBNAME(); \
return rval; \
} \
wxVisualAttributes CLASS::base_##CBNAME() { \
return PCLASS::CBNAME(); \
}
//---------------------------------------------------------------------------
#endif