]> git.saurik.com Git - wxWidgets.git/commitdiff
Add wxPyTabArt
authorRobin Dunn <robin@alldunn.com>
Sun, 29 Oct 2006 03:00:47 +0000 (03:00 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 29 Oct 2006 03:00:47 +0000 (03:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/include/wx/wxPython/wxPython_int.h

index 3cfbdbbf74db1b7ef77e8ca0da3ea148e31841f8..063201d6534aaa53d8a5beaa83da776cdb73a843 100644 (file)
@@ -1521,6 +1521,25 @@ extern wxPyApp *wxPythonApp;
 
 //---------------------------------------------------------------------------
 
+#define DEC_PYCALLBACK__FONT(CBNAME)                                            \
+    void CBNAME(const wxFont& a);
+
+#define IMP_PYCALLBACK__FONT(CLASS, PCLASS, CBNAME)                             \
+    void CLASS::CBNAME(const wxFont& a) {                                       \
+        bool found;                                                             \
+        wxPyBlock_t blocked = wxPyBeginBlockThreads();                          \
+        if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) {                \
+            PyObject* obj = wxPyConstructObject((void*)&a, wxT("wxFont"), 0);   \
+            wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(O)", obj));       \
+            Py_DECREF(obj);                                                     \
+        }                                                                       \
+        wxPyEndBlockThreads(blocked);                                           \
+        if (! found)                                                            \
+            PCLASS::CBNAME(a);                                                  \
+    }                                                                           \
+
+//---------------------------------------------------------------------------
+
 #define DEC_PYCALLBACK_BOOL_CELLINTINTME(CBNAME)                                    \
     bool CBNAME(wxHtmlCell *cell, wxCoord x, wxCoord y, const wxMouseEvent& e)