* This table is used by the pointer type-checker
*/
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
+ { "_wxEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxEvent},
{ "_wxEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxEvent},
{ "_signed_long","_long",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_EBool",0},
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
+ { "_class_wxEvtHandler","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxEvtHandler},
+ { "_class_wxEvtHandler","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxEvtHandler},
{ "_byte","_unsigned_char",0},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
+ { "_class_wxObject","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxObject},
+ { "_class_wxObject","_wxStyledTextEvent",SwigwxStyledTextEventTowxObject},
+ { "_class_wxObject","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxObject},
+ { "_class_wxObject","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxObject},
{ "_size_t","_wxCoord",0},
{ "_size_t","_wxPrintQuality",0},
{ "_size_t","_time_t",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
+ { "_class_wxEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxEvent},
+ { "_class_wxEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxEvent},
+ { "_wxCommandEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
{ "_wxCommandEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
{ "_char","_wxChar",0},
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_unsigned_short","_wxDateTime_t",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
+ { "_class_wxWindow","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxWindow},
+ { "_class_wxWindow","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxWindow},
+ { "_wxObject","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxObject},
{ "_wxObject","_wxStyledTextEvent",SwigwxStyledTextEventTowxObject},
+ { "_wxObject","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxObject},
{ "_wxObject","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxObject},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
+ { "_wxControl","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl},
{ "_wxControl","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl},
{ "_unsigned_int","_wxCoord",0},
{ "_unsigned_int","_wxPrintQuality",0},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
+ { "_class_wxControl","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl},
+ { "_class_wxControl","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl},
{ "_wxCoord","_int",0},
{ "_wxCoord","_signed_int",0},
{ "_wxCoord","_unsigned_int",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
+ { "_class_wxCommandEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
+ { "_class_wxCommandEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
+ { "_wxEvtHandler","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxEvtHandler},
{ "_wxEvtHandler","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxEvtHandler},
+ { "_wxWindow","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxWindow},
{ "_wxWindow","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxWindow},
{0,0,0}};
else: # hopefully I can remove this hacky code soon, see bug #216861
panel = wxPanel(self.nb, -1, style=wxCLIP_CHILDREN)
self.ovr = wxHtmlWindow(panel, -1, size=(400, 400))
+ self.ovr.SetFonts("", "", [7, 8, 10, 12, 16, 22, 30])
self.nb.AddPage(panel, "Overview")
def OnOvrSize(evt, ovr=self.ovr):
# Set up a TextCtrl on the Demo Code Notebook page
self.txt = wxTextCtrl(self.nb, -1,
style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
- self.txt.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false))
self.nb.AddPage(self.txt, "Demo Code")
#---------------------------------------------------------------------------
class TestComboBox(wxPanel):
+ def OnSetFocus(self, evt):
+ print "OnSetFocus"
+ evt.Skip()
+ def OnKillFocus(self, evt):
+ print "OnKillFocus"
+ evt.Skip()
+
def __init__(self, parent, log):
self.log = log
wxPanel.__init__(self, parent, -1)
wxPoint(8, 10))
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18))
- wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, -1),
- sampleList, wxCB_DROPDOWN)
+ cb = wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, -1),
+ sampleList, wxCB_DROPDOWN)
EVT_COMBOBOX(self, 500, self.EvtComboBox)
EVT_TEXT(self, 500, self.EvtText)
+ EVT_SET_FOCUS(cb, self.OnSetFocus)
+ EVT_KILL_FOCUS(cb, self.OnKillFocus)
+
+
+ wxComboBox(self, 501, "default value", wxPoint(80, 80), wxSize(95, -1),
+ sampleList, wxCB_SIMPLE)
+ EVT_COMBOBOX(self, 501, self.EvtComboBox)
+ EVT_TEXT(self, 501, self.EvtText)
def EvtComboBox(self, event):
void SetDefault();
void SetBackgroundColour(const wxColour& colour);
void SetForegroundColour(const wxColour& colour);
-
+#ifdef __WXMSW__
void SetImageLabel(const wxBitmap& bitmap);
void SetImageMargins(wxCoord x, wxCoord y);
-
+#endif
static wxSize GetDefaultSize();
};
// C++ version.
bool rval = FALSE;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (m_myInst.findCallback("GetDataHere")) {
PyObject* ro;
ro = m_myInst.callCallbackObj(Py_BuildValue("()"));
Py_DECREF(ro);
}
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
// For this one we simply need to make a string from buf and len
// and send it to the Python method.
bool rval = FALSE;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (m_myInst.findCallback("SetData")) {
PyObject* data = PyString_FromStringAndSize((char*)buf, len);
rval = m_myInst.callCallback(Py_BuildValue("(O)", data));
Py_DECREF(data);
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
// Create a new class for wxPython to use
wxBitmap wxPyBitmapDataObject::GetBitmap() {
wxBitmap* rval = &wxNullBitmap;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (m_myInst.findCallback("GetBitmap")) {
PyObject* ro;
wxBitmap* ptr;
Py_DECREF(ro);
}
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return *rval;
}
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (m_myInst.findCallback("SetBitmap")) {
m_myInst.callCallback(Py_BuildValue("(O)",
wxPyConstructObject((void*)&bitmap, "wxBitmap")));
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
// See below in the init function...
bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString& filenames) {
bool rval = FALSE;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyObject* list = PyList_New(0);
for (size_t i=0; i<filenames.GetCount(); i++) {
PyObject* str = PyString_FromString(filenames[i].c_str());
if (m_myInst.findCallback("OnDropFiles"))
rval = m_myInst.callCallback(Py_BuildValue("(iiO)",x,y,list));
Py_DECREF(list);
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_wxDropTarget","_class_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxDropTarget},
{ "_wxDropTarget","_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxDropTarget},
{ "_wxDropTarget","_class_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxDropTarget},
{ "_class_wxPyDropTarget","_class_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget},
{ "_class_wxPyDropTarget","_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
return _resultobj;
}
-#define wxButton_SetImageLabel(_swigobj,_swigarg0) (_swigobj->SetImageLabel(_swigarg0))
-static PyObject *_wrap_wxButton_SetImageLabel(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxButton * _arg0;
- wxBitmap * _arg1;
- PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
- char *_kwnames[] = { "self","bitmap", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetImageLabel",_kwnames,&_argo0,&_argo1))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxButton_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxButton_SetImageLabel. Expected _wxButton_p.");
- return NULL;
- }
- }
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetImageLabel. Expected _wxBitmap_p.");
- return NULL;
- }
- }
-{
- wxPy_BEGIN_ALLOW_THREADS;
- wxButton_SetImageLabel(_arg0,*_arg1);
-
- wxPy_END_ALLOW_THREADS;
- if (PyErr_Occurred()) return NULL;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
- return _resultobj;
-}
-
-#define wxButton_SetImageMargins(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetImageMargins(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxButton_SetImageMargins(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxButton * _arg0;
- wxCoord _arg1;
- wxCoord _arg2;
- PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","x","y", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxButton_SetImageMargins",_kwnames,&_argo0,&_arg1,&_arg2))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxButton_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxButton_SetImageMargins. Expected _wxButton_p.");
- return NULL;
- }
- }
-{
- wxPy_BEGIN_ALLOW_THREADS;
- wxButton_SetImageMargins(_arg0,_arg1,_arg2);
-
- wxPy_END_ALLOW_THREADS;
- if (PyErr_Occurred()) return NULL;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
- return _resultobj;
-}
-
static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSize * _result;
{ "new_wxPreBitmapButton", (PyCFunction) _wrap_new_wxPreBitmapButton, METH_VARARGS | METH_KEYWORDS },
{ "new_wxBitmapButton", (PyCFunction) _wrap_new_wxBitmapButton, METH_VARARGS | METH_KEYWORDS },
{ "wxButton_GetDefaultSize", (PyCFunction) _wrap_wxButton_GetDefaultSize, METH_VARARGS | METH_KEYWORDS },
- { "wxButton_SetImageMargins", (PyCFunction) _wrap_wxButton_SetImageMargins, METH_VARARGS | METH_KEYWORDS },
- { "wxButton_SetImageLabel", (PyCFunction) _wrap_wxButton_SetImageLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxButton_SetForegroundColour", (PyCFunction) _wrap_wxButton_SetForegroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxButton_SetBackgroundColour", (PyCFunction) _wrap_wxButton_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxButton_SetDefault", (PyCFunction) _wrap_wxButton_SetDefault, METH_VARARGS | METH_KEYWORDS },
{ "_char","_wxChar",0},
{ "_wxSpinButton","_class_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton},
{ "_wxSpinButton","_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_class_wxSpinButton","_class_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton},
{ "_class_wxSpinButton","_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton},
{ "_signed_int","_wxCoord",0},
def SetForegroundColour(self, *_args, **_kwargs):
val = apply(controlsc.wxButton_SetForegroundColour,(self,) + _args, _kwargs)
return val
- def SetImageLabel(self, *_args, **_kwargs):
- val = apply(controlsc.wxButton_SetImageLabel,(self,) + _args, _kwargs)
- return val
- def SetImageMargins(self, *_args, **_kwargs):
- val = apply(controlsc.wxButton_SetImageMargins,(self,) + _args, _kwargs)
- return val
def __repr__(self):
return "<C wxButton instance at %s>" % (self.this,)
class wxButton(wxButtonPtr):
IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText);
IMP_PYCALLBACK_INT_LONG(wxPyListCtrl, wxListCtrl, OnGetItemImage);
IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr);
-
+ // Python aware sorting function for wxPyListCtrl
int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) {
int retval = 0;
PyObject* func = (PyObject*)funcPtr;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyObject* args = Py_BuildValue("(ii)", item1, item2);
PyObject* result = PyEval_CallObject(func, args);
Py_DECREF(result);
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return retval;
}
}
~wxPyTreeItemData() {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
Py_DECREF(m_obj);
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
PyObject* GetData() {
}
void SetData(PyObject* obj) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
Py_DECREF(m_obj);
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
m_obj = obj;
Py_INCREF(obj);
}
int OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2) {
int rval = 0;
- bool doSave = wxPyRestoreThread();
- if (m_myInst.findCallback("OnCompareItems"))
+ bool found;
+ wxPyTState* state = wxPyBeginBlockThreads();
+ if ((found = m_myInst.findCallback("OnCompareItems")))
rval = m_myInst.callCallback(Py_BuildValue(
"(OO)",
wxPyConstructObject((void*)&item1, "wxTreeItemId"),
wxPyConstructObject((void*)&item2, "wxTreeItemId")));
- else
+ wxPyEndBlockThreads(state);
+ if (! found)
rval = wxTreeCtrl::OnCompareItems(item1, item2);
- wxPySaveThread(doSave);
return rval;
}
PYPRIVATE;
return (void *) dest;
}
+#define new_wxListEvent(_swigarg0,_swigarg1) (new wxListEvent(_swigarg0,_swigarg1))
+static PyObject *_wrap_new_wxListEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxListEvent * _result;
+ wxEventType _arg0 = (wxEventType ) wxEVT_NULL;
+ int _arg1 = (int ) 0;
+ char *_kwnames[] = { "commandType","id", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxListEvent",_kwnames,&_arg0,&_arg1))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxListEvent *)new_wxListEvent(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxListEvent_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
#define wxListEvent_m_code_set(_swigobj,_swigval) (_swigobj->m_code = _swigval,_swigval)
static PyObject *_wrap_wxListEvent_m_code_set(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
+#define wxListEvent_GetCacheFrom(_swigobj) (_swigobj->GetCacheFrom())
+static PyObject *_wrap_wxListEvent_GetCacheFrom(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ long _result;
+ wxListEvent * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetCacheFrom",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetCacheFrom. Expected _wxListEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (long )wxListEvent_GetCacheFrom(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("l",_result);
+ return _resultobj;
+}
+
+#define wxListEvent_GetCacheTo(_swigobj) (_swigobj->GetCacheTo())
+static PyObject *_wrap_wxListEvent_GetCacheTo(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ long _result;
+ wxListEvent * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetCacheTo",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetCacheTo. Expected _wxListEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (long )wxListEvent_GetCacheTo(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("l",_result);
+ return _resultobj;
+}
+
static void *SwigwxPyListCtrlTowxControl(void *ptr) {
wxPyListCtrl *src;
wxControl *dest;
return _resultobj;
}
+static void *SwigwxListViewTowxPyListCtrl(void *ptr) {
+ wxListView *src;
+ wxPyListCtrl *dest;
+ src = (wxListView *) ptr;
+ dest = (wxPyListCtrl *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxListViewTowxControl(void *ptr) {
+ wxListView *src;
+ wxControl *dest;
+ src = (wxListView *) ptr;
+ dest = (wxControl *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxListViewTowxWindow(void *ptr) {
+ wxListView *src;
+ wxWindow *dest;
+ src = (wxListView *) ptr;
+ dest = (wxWindow *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxListViewTowxEvtHandler(void *ptr) {
+ wxListView *src;
+ wxEvtHandler *dest;
+ src = (wxListView *) ptr;
+ dest = (wxEvtHandler *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxListViewTowxObject(void *ptr) {
+ wxListView *src;
+ wxObject *dest;
+ src = (wxListView *) ptr;
+ dest = (wxObject *) src;
+ return (void *) dest;
+}
+
+#define new_wxListView(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxListView(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
+static PyObject *_wrap_new_wxListView(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxListView * _result;
+ wxWindow * _arg0;
+ wxWindowID _arg1 = (wxWindowID ) -1;
+ wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
+ wxSize * _arg3 = (wxSize *) &wxDefaultSize;
+ long _arg4 = (long ) (wxLC_REPORT);
+ wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator;
+ wxString * _arg6 = (wxString *) &"listctrl";
+ PyObject * _argo0 = 0;
+ wxPoint temp;
+ PyObject * _obj2 = 0;
+ wxSize temp0;
+ PyObject * _obj3 = 0;
+ PyObject * _argo5 = 0;
+ PyObject * _obj6 = 0;
+ char *_kwnames[] = { "parent","id","pos","size","style","validator","name", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlOO:new_wxListView",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_argo5,&_obj6))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxListView. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+ if (_obj2)
+{
+ _arg2 = &temp;
+ if (! wxPoint_helper(_obj2, &_arg2))
+ return NULL;
+}
+ if (_obj3)
+{
+ _arg3 = &temp0;
+ if (! wxSize_helper(_obj3, &_arg3))
+ return NULL;
+}
+ if (_argo5) {
+ if (_argo5 == Py_None) { _arg5 = NULL; }
+ else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxListView. Expected _wxValidator_p.");
+ return NULL;
+ }
+ }
+ if (_obj6)
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg6 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj6)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6));
+#endif
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxListView *)new_wxListView(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,*_arg6);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxListView_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+{
+ if (_obj6)
+ delete _arg6;
+}
+ return _resultobj;
+}
+
+#define new_wxPreListView() (new wxListView())
+static PyObject *_wrap_new_wxPreListView(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxListView * _result;
+ char *_kwnames[] = { NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreListView",_kwnames))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxListView *)new_wxPreListView();
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxListView_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxListView_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
+static PyObject *_wrap_wxListView_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxListView * _arg0;
+ wxWindow * _arg1;
+ wxWindowID _arg2 = (wxWindowID ) -1;
+ wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
+ wxSize * _arg4 = (wxSize *) &wxDefaultSize;
+ long _arg5 = (long ) (wxLC_REPORT);
+ wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator;
+ wxString * _arg7 = (wxString *) &"listctrl";
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ wxPoint temp;
+ PyObject * _obj3 = 0;
+ wxSize temp0;
+ PyObject * _obj4 = 0;
+ PyObject * _argo6 = 0;
+ PyObject * _obj7 = 0;
+ char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlOO:wxListView_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_Create. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListView_Create. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+ if (_obj3)
+{
+ _arg3 = &temp;
+ if (! wxPoint_helper(_obj3, &_arg3))
+ return NULL;
+}
+ if (_obj4)
+{
+ _arg4 = &temp0;
+ if (! wxSize_helper(_obj4, &_arg4))
+ return NULL;
+}
+ if (_argo6) {
+ if (_argo6 == Py_None) { _arg6 = NULL; }
+ else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxListView_Create. Expected _wxValidator_p.");
+ return NULL;
+ }
+ }
+ if (_obj7)
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg7 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj7)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7));
+#endif
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxListView_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj7)
+ delete _arg7;
+}
+ return _resultobj;
+}
+
+#define wxListView_Select(_swigobj,_swigarg0,_swigarg1) (_swigobj->Select(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxListView_Select(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxListView * _arg0;
+ long _arg1;
+ bool _arg2 = (bool ) TRUE;
+ PyObject * _argo0 = 0;
+ int tempbool2 = (int) TRUE;
+ char *_kwnames[] = { "self","n","on", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|i:wxListView_Select",_kwnames,&_argo0,&_arg1,&tempbool2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_Select. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+ _arg2 = (bool ) tempbool2;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxListView_Select(_arg0,_arg1,_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxListView_Focus(_swigobj,_swigarg0) (_swigobj->Focus(_swigarg0))
+static PyObject *_wrap_wxListView_Focus(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxListView * _arg0;
+ long _arg1;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","index", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListView_Focus",_kwnames,&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_Focus. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxListView_Focus(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxListView_GetFocusedItem(_swigobj) (_swigobj->GetFocusedItem())
+static PyObject *_wrap_wxListView_GetFocusedItem(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ long _result;
+ wxListView * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListView_GetFocusedItem",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_GetFocusedItem. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (long )wxListView_GetFocusedItem(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("l",_result);
+ return _resultobj;
+}
+
+#define wxListView_GetNextSelected(_swigobj,_swigarg0) (_swigobj->GetNextSelected(_swigarg0))
+static PyObject *_wrap_wxListView_GetNextSelected(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ long _result;
+ wxListView * _arg0;
+ long _arg1;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","item", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListView_GetNextSelected",_kwnames,&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_GetNextSelected. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (long )wxListView_GetNextSelected(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("l",_result);
+ return _resultobj;
+}
+
+#define wxListView_GetFirstSelected(_swigobj) (_swigobj->GetFirstSelected())
+static PyObject *_wrap_wxListView_GetFirstSelected(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ long _result;
+ wxListView * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListView_GetFirstSelected",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_GetFirstSelected. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (long )wxListView_GetFirstSelected(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("l",_result);
+ return _resultobj;
+}
+
+#define wxListView_IsSelected(_swigobj,_swigarg0) (_swigobj->IsSelected(_swigarg0))
+static PyObject *_wrap_wxListView_IsSelected(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxListView * _arg0;
+ long _arg1;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","index", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListView_IsSelected",_kwnames,&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_IsSelected. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxListView_IsSelected(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxListView_SetColumnImage(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColumnImage(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxListView_SetColumnImage(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxListView * _arg0;
+ int _arg1;
+ int _arg2;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","col","image", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxListView_SetColumnImage",_kwnames,&_argo0,&_arg1,&_arg2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_SetColumnImage. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxListView_SetColumnImage(_arg0,_arg1,_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxListView_ClearColumnImage(_swigobj,_swigarg0) (_swigobj->ClearColumnImage(_swigarg0))
+static PyObject *_wrap_wxListView_ClearColumnImage(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxListView * _arg0;
+ int _arg1;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","col", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListView_ClearColumnImage",_kwnames,&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListView_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListView_ClearColumnImage. Expected _wxListView_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxListView_ClearColumnImage(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define new_wxTreeItemAttr(_swigarg0,_swigarg1,_swigarg2) (new wxTreeItemAttr(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_new_wxTreeItemAttr(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
}
static PyObject * wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyObject* rval = PyList_New(0);
wxArrayTreeItemIds array;
size_t num, x;
PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE);
PyList_Append(rval, item);
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, PyObject *kwargs) {
{ "wxTreeItemAttr_SetBackgroundColour", (PyCFunction) _wrap_wxTreeItemAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeItemAttr_SetTextColour", (PyCFunction) _wrap_wxTreeItemAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS },
{ "new_wxTreeItemAttr", (PyCFunction) _wrap_new_wxTreeItemAttr, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_ClearColumnImage", (PyCFunction) _wrap_wxListView_ClearColumnImage, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_SetColumnImage", (PyCFunction) _wrap_wxListView_SetColumnImage, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_IsSelected", (PyCFunction) _wrap_wxListView_IsSelected, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_GetFirstSelected", (PyCFunction) _wrap_wxListView_GetFirstSelected, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_GetNextSelected", (PyCFunction) _wrap_wxListView_GetNextSelected, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_GetFocusedItem", (PyCFunction) _wrap_wxListView_GetFocusedItem, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_Focus", (PyCFunction) _wrap_wxListView_Focus, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_Select", (PyCFunction) _wrap_wxListView_Select, METH_VARARGS | METH_KEYWORDS },
+ { "wxListView_Create", (PyCFunction) _wrap_wxListView_Create, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxPreListView", (PyCFunction) _wrap_new_wxPreListView, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxListView", (PyCFunction) _wrap_new_wxListView, METH_VARARGS | METH_KEYWORDS },
{ "wxListCtrl_SortItems", (PyCFunction) _wrap_wxListCtrl_SortItems, METH_VARARGS | METH_KEYWORDS },
{ "wxListCtrl_ScrollList", (PyCFunction) _wrap_wxListCtrl_ScrollList, METH_VARARGS | METH_KEYWORDS },
{ "wxListCtrl_SetItemCount", (PyCFunction) _wrap_wxListCtrl_SetItemCount, METH_VARARGS | METH_KEYWORDS },
{ "wxListCtrl_Create", (PyCFunction) _wrap_wxListCtrl_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreListCtrl", (PyCFunction) _wrap_new_wxPreListCtrl, METH_VARARGS | METH_KEYWORDS },
{ "new_wxListCtrl", (PyCFunction) _wrap_new_wxListCtrl, METH_VARARGS | METH_KEYWORDS },
+ { "wxListEvent_GetCacheTo", (PyCFunction) _wrap_wxListEvent_GetCacheTo, METH_VARARGS | METH_KEYWORDS },
+ { "wxListEvent_GetCacheFrom", (PyCFunction) _wrap_wxListEvent_GetCacheFrom, METH_VARARGS | METH_KEYWORDS },
{ "wxListEvent_GetItem", (PyCFunction) _wrap_wxListEvent_GetItem, METH_VARARGS | METH_KEYWORDS },
{ "wxListEvent_GetMask", (PyCFunction) _wrap_wxListEvent_GetMask, METH_VARARGS | METH_KEYWORDS },
{ "wxListEvent_GetData", (PyCFunction) _wrap_wxListEvent_GetData, METH_VARARGS | METH_KEYWORDS },
{ "wxListEvent_m_itemIndex_set", (PyCFunction) _wrap_wxListEvent_m_itemIndex_set, METH_VARARGS | METH_KEYWORDS },
{ "wxListEvent_m_code_get", (PyCFunction) _wrap_wxListEvent_m_code_get, METH_VARARGS | METH_KEYWORDS },
{ "wxListEvent_m_code_set", (PyCFunction) _wrap_wxListEvent_m_code_set, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxListEvent", (PyCFunction) _wrap_new_wxListEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxListItem_m_width_get", (PyCFunction) _wrap_wxListItem_m_width_get, METH_VARARGS | METH_KEYWORDS },
{ "wxListItem_m_width_set", (PyCFunction) _wrap_wxListItem_m_width_set, METH_VARARGS | METH_KEYWORDS },
{ "wxListItem_m_format_get", (PyCFunction) _wrap_wxListItem_m_format_get, METH_VARARGS | METH_KEYWORDS },
{ "_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent},
{ "_wxEvent","_wxListEvent",SwigwxListEventTowxEvent},
{ "_signed_long","_long",0},
+ { "_class_wxPyListCtrl","_class_wxListView",SwigwxListViewTowxPyListCtrl},
+ { "_class_wxPyListCtrl","_wxListView",SwigwxListViewTowxPyListCtrl},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_wxPrintQuality","_signed_int",0},
{ "_wxPrintQuality","_time_t",0},
{ "_class_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
{ "_class_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
+ { "_class_wxEvtHandler","_class_wxListView",SwigwxListViewTowxEvtHandler},
+ { "_class_wxEvtHandler","_wxListView",SwigwxListViewTowxEvtHandler},
{ "_class_wxEvtHandler","_class_wxPyListCtrl",SwigwxPyListCtrlTowxEvtHandler},
{ "_class_wxEvtHandler","_wxPyListCtrl",SwigwxPyListCtrlTowxEvtHandler},
{ "_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
{ "_class_wxObject","_wxTreeEvent",SwigwxTreeEventTowxObject},
{ "_class_wxObject","_class_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject},
{ "_class_wxObject","_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject},
+ { "_class_wxObject","_class_wxListView",SwigwxListViewTowxObject},
+ { "_class_wxObject","_wxListView",SwigwxListViewTowxObject},
{ "_class_wxObject","_class_wxPyListCtrl",SwigwxPyListCtrlTowxObject},
{ "_class_wxObject","_wxPyListCtrl",SwigwxPyListCtrlTowxObject},
{ "_class_wxObject","_class_wxListEvent",SwigwxListEventTowxObject},
{ "_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
{ "_class_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent},
{ "_class_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_unsigned_short","_short",0},
{ "_class_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
{ "_class_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
+ { "_class_wxWindow","_class_wxListView",SwigwxListViewTowxWindow},
+ { "_class_wxWindow","_wxListView",SwigwxListViewTowxWindow},
{ "_class_wxWindow","_class_wxPyListCtrl",SwigwxPyListCtrlTowxWindow},
{ "_class_wxWindow","_wxPyListCtrl",SwigwxPyListCtrlTowxWindow},
{ "_wxObject","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject},
{ "_wxObject","_wxTreeEvent",SwigwxTreeEventTowxObject},
{ "_wxObject","_class_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject},
{ "_wxObject","_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject},
+ { "_wxObject","_class_wxListView",SwigwxListViewTowxObject},
+ { "_wxObject","_wxListView",SwigwxListViewTowxObject},
{ "_wxObject","_class_wxPyListCtrl",SwigwxPyListCtrlTowxObject},
{ "_wxObject","_wxPyListCtrl",SwigwxPyListCtrlTowxObject},
{ "_wxObject","_class_wxListEvent",SwigwxListEventTowxObject},
{ "_unsigned_char","_byte",0},
{ "_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
{ "_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
+ { "_wxControl","_class_wxListView",SwigwxListViewTowxControl},
+ { "_wxControl","_wxListView",SwigwxListViewTowxControl},
{ "_wxControl","_class_wxPyListCtrl",SwigwxPyListCtrlTowxControl},
{ "_wxControl","_wxPyListCtrl",SwigwxPyListCtrlTowxControl},
{ "_unsigned_int","_wxCoord",0},
{ "_time_t","_size_t",0},
{ "_class_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
{ "_class_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
+ { "_class_wxControl","_class_wxListView",SwigwxListViewTowxControl},
+ { "_class_wxControl","_wxListView",SwigwxListViewTowxControl},
{ "_class_wxControl","_class_wxPyListCtrl",SwigwxPyListCtrlTowxControl},
{ "_class_wxControl","_wxPyListCtrl",SwigwxPyListCtrlTowxControl},
{ "_wxCoord","_int",0},
{ "_class_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent},
+ { "_wxPyListCtrl","_class_wxListView",SwigwxListViewTowxPyListCtrl},
+ { "_wxPyListCtrl","_wxListView",SwigwxListViewTowxPyListCtrl},
{ "_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
{ "_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
+ { "_wxEvtHandler","_class_wxListView",SwigwxListViewTowxEvtHandler},
+ { "_wxEvtHandler","_wxListView",SwigwxListViewTowxEvtHandler},
{ "_wxEvtHandler","_class_wxPyListCtrl",SwigwxPyListCtrlTowxEvtHandler},
{ "_wxEvtHandler","_wxPyListCtrl",SwigwxPyListCtrlTowxEvtHandler},
{ "_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
{ "_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
+ { "_wxWindow","_class_wxListView",SwigwxListViewTowxWindow},
+ { "_wxWindow","_wxListView",SwigwxListViewTowxWindow},
{ "_wxWindow","_class_wxPyListCtrl",SwigwxPyListCtrlTowxWindow},
{ "_wxWindow","_wxPyListCtrl",SwigwxPyListCtrlTowxWindow},
{0,0,0}};
PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK));
PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_ACTIVATED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_ACTIVATED));
PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_CACHE_HINT", PyInt_FromLong((long) wxEVT_COMMAND_LIST_CACHE_HINT));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_RIGHT_CLICK));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_BEGIN_DRAG));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_DRAGGING", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_DRAGGING));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_END_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_END_DRAG));
PyDict_SetItemString(d,"wxLC_VRULES", PyInt_FromLong((long) wxLC_VRULES));
PyDict_SetItemString(d,"wxLC_HRULES", PyInt_FromLong((long) wxLC_HRULES));
PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON));
PyDict_SetItemString(d,"wxLC_MASK_TYPE", PyInt_FromLong((long) wxLC_MASK_TYPE));
PyDict_SetItemString(d,"wxLC_MASK_ALIGN", PyInt_FromLong((long) wxLC_MASK_ALIGN));
PyDict_SetItemString(d,"wxLC_MASK_SORT", PyInt_FromLong((long) wxLC_MASK_SORT));
+ PyDict_SetItemString(d,"wxLC_USER_TEXT", PyInt_FromLong((long) wxLC_USER_TEXT));
PyDict_SetItemString(d,"wxLIST_MASK_STATE", PyInt_FromLong((long) wxLIST_MASK_STATE));
PyDict_SetItemString(d,"wxLIST_MASK_TEXT", PyInt_FromLong((long) wxLIST_MASK_TEXT));
PyDict_SetItemString(d,"wxLIST_MASK_IMAGE", PyInt_FromLong((long) wxLIST_MASK_IMAGE));
PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK));
PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_END_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_END_DRAG));
+ // Map renamed classes back to their common name for OOR
wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData");
wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl");
+ wxPyPtrTypeMap_Add("wxListCtrl", "wxPyListCtrl");
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
def EVT_LIST_COL_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
+def EVT_LIST_COL_RIGHT_CLICK(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, func)
+
+def EVT_LIST_COL_BEGIN_DRAG(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, func)
+
+def EVT_LIST_COL_DRAGGING(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_DRAGGING, func)
+
+def EVT_LIST_COL_END_DRAG(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_END_DRAG, func)
+
def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, func)
def GetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListEvent_GetItem,(self,) + _args, _kwargs)
return val
+ def GetCacheFrom(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListEvent_GetCacheFrom,(self,) + _args, _kwargs)
+ return val
+ def GetCacheTo(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListEvent_GetCacheTo,(self,) + _args, _kwargs)
+ return val
def __setattr__(self,name,value):
if name == "m_code" :
controls2c.wxListEvent_m_code_set(self,value)
def __repr__(self):
return "<C wxListEvent instance at %s>" % (self.this,)
class wxListEvent(wxListEventPtr):
- def __init__(self,this):
- self.this = this
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(controls2c.new_wxListEvent,_args,_kwargs)
+ self.thisown = 1
val.thisown = 1
return val
+
+ # Some helpers...
+
+ def Select(self, idx, on=1):
+ '''[de]select an item'''
+ if on: state = wxLIST_STATE_SELECTED
+ else: state = 0
+ self.SetItemState(idx, state, wxLIST_STATE_SELECTED)
+
+ def Focus(self, idx):
+ '''Focus and show the given item'''
+ self.SetItemState(idx, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED)
+ self.EnsureVisible(idx)
+
+ def GetFocusedItem(self):
+ '''get the currently focused item or -1 if none'''
+ return self.GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED)
+
+ def IsSelected(self, idx):
+ '''return TRUE if the item is selected'''
+ return self.GetItemState(idx, wxLIST_STATE_SELECTED) != 0
+
+ def SetColumnImage(self, col, image):
+ item = wxListItem()
+ item.SetMask(wxLIST_MASK_IMAGE)
+ item.SetImage(image)
+ self.SetColumn(col, item)
+
+ def ClearColumnImage(self, col):
+ self.SetColumnImage(col, -1)
+
class wxListCtrl(wxListCtrlPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)
return val
+class wxListViewPtr(wxListCtrlPtr):
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def Create(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_Create,(self,) + _args, _kwargs)
+ return val
+ def Select(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_Select,(self,) + _args, _kwargs)
+ return val
+ def Focus(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_Focus,(self,) + _args, _kwargs)
+ return val
+ def GetFocusedItem(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_GetFocusedItem,(self,) + _args, _kwargs)
+ return val
+ def GetNextSelected(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_GetNextSelected,(self,) + _args, _kwargs)
+ return val
+ def GetFirstSelected(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_GetFirstSelected,(self,) + _args, _kwargs)
+ return val
+ def IsSelected(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_IsSelected,(self,) + _args, _kwargs)
+ return val
+ def SetColumnImage(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_SetColumnImage,(self,) + _args, _kwargs)
+ return val
+ def ClearColumnImage(self, *_args, **_kwargs):
+ val = apply(controls2c.wxListView_ClearColumnImage,(self,) + _args, _kwargs)
+ return val
+ def __repr__(self):
+ return "<C wxListView instance at %s>" % (self.this,)
+class wxListView(wxListViewPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(controls2c.new_wxListView,_args,_kwargs)
+ self.thisown = 1
+
+
+
+def wxPreListView(*_args,**_kwargs):
+ val = wxListViewPtr(apply(controls2c.new_wxPreListView,_args,_kwargs))
+ val.thisown = 1
+ return val
+
+
class wxTreeItemAttrPtr :
def __init__(self,this):
self.this = this
wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK
wxEVT_COMMAND_LIST_ITEM_ACTIVATED = controls2c.wxEVT_COMMAND_LIST_ITEM_ACTIVATED
wxEVT_COMMAND_LIST_CACHE_HINT = controls2c.wxEVT_COMMAND_LIST_CACHE_HINT
+wxEVT_COMMAND_LIST_COL_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_RIGHT_CLICK
+wxEVT_COMMAND_LIST_COL_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_COL_BEGIN_DRAG
+wxEVT_COMMAND_LIST_COL_DRAGGING = controls2c.wxEVT_COMMAND_LIST_COL_DRAGGING
+wxEVT_COMMAND_LIST_COL_END_DRAG = controls2c.wxEVT_COMMAND_LIST_COL_END_DRAG
wxLC_VRULES = controls2c.wxLC_VRULES
wxLC_HRULES = controls2c.wxLC_HRULES
wxLC_ICON = controls2c.wxLC_ICON
wxLC_MASK_TYPE = controls2c.wxLC_MASK_TYPE
wxLC_MASK_ALIGN = controls2c.wxLC_MASK_ALIGN
wxLC_MASK_SORT = controls2c.wxLC_MASK_SORT
+wxLC_USER_TEXT = controls2c.wxLC_USER_TEXT
wxLIST_MASK_STATE = controls2c.wxLIST_MASK_STATE
wxLIST_MASK_TEXT = controls2c.wxLIST_MASK_TEXT
wxLIST_MASK_IMAGE = controls2c.wxLIST_MASK_IMAGE
#ifndef __WXMSW__
#include <wx/dcps.h>
#endif
+#include <wx/fontmap.h>
+#include <wx/fontenc.h>
+#include <wx/fontmap.h>
+#include <wx/fontutil.h>
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
wxCursor* wxPyStockCursor(int id) {
return new wxCursor(id);
}
-
- wxFontEncoding wxFont_GetDefaultEncoding() {
- return wxFont::GetDefaultEncoding();
- }
-
- void wxFont_SetDefaultEncoding(wxFontEncoding encoding) {
- wxFont::SetDefaultEncoding(encoding);
- }
// Alternate 'constructor'
wxColour* wxNamedColour(const wxString& colorName) {
return new wxColour(colorName);
return _resultobj;
}
-static PyObject *_wrap_wxFont_GetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxFontEncoding _result;
- char *_kwnames[] = { NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFont_GetDefaultEncoding",_kwnames))
- return NULL;
-{
- wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxFontEncoding )wxFont_GetDefaultEncoding();
-
- wxPy_END_ALLOW_THREADS;
- if (PyErr_Occurred()) return NULL;
-} _resultobj = Py_BuildValue("i",_result);
- return _resultobj;
-}
-
-static PyObject *_wrap_wxFont_SetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxFontEncoding _arg0;
- char *_kwnames[] = { "encoding", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFont_SetDefaultEncoding",_kwnames,&_arg0))
- return NULL;
-{
- wxPy_BEGIN_ALLOW_THREADS;
- wxFont_SetDefaultEncoding(_arg0);
-
- wxPy_END_ALLOW_THREADS;
- if (PyErr_Occurred()) return NULL;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
- return _resultobj;
-}
-
static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxColour * _result;
return _resultobj;
}
-static void *SwigwxFontTowxGDIObject(void *ptr) {
- wxFont *src;
- wxGDIObject *dest;
- src = (wxFont *) ptr;
- dest = (wxGDIObject *) src;
- return (void *) dest;
-}
-
-static void *SwigwxFontTowxObject(void *ptr) {
- wxFont *src;
- wxObject *dest;
- src = (wxFont *) ptr;
- dest = (wxObject *) src;
- return (void *) dest;
-}
-
-#define new_wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
-static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxNativeFontInfo_FromString(_swigobj,_swigarg0) (_swigobj->FromString(_swigarg0))
+static PyObject *_wrap_wxNativeFontInfo_FromString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- wxFont * _result;
- int _arg0;
- int _arg1;
- int _arg2;
- int _arg3;
- int _arg4 = (int ) FALSE;
- char * _arg5 = (char *) "";
- wxFontEncoding _arg6 = (wxFontEncoding ) (wxFONTENCODING_DEFAULT);
- char *_kwnames[] = { "pointSize","family","style","weight","underline","faceName","encoding", NULL };
- char _ptemp[128];
+ bool _result;
+ wxNativeFontInfo * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","s", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiii|isi:new_wxFont",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNativeFontInfo_FromString",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_FromString. Expected _wxNativeFontInfo_p.");
+ return NULL;
+ }
+ }
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
+ }
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
+}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+ _result = (bool )wxNativeFontInfo_FromString(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-} if (_result) {
- SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p");
- _resultobj = Py_BuildValue("s",_ptemp);
- } else {
- Py_INCREF(Py_None);
- _resultobj = Py_None;
- }
+} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj1)
+ delete _arg1;
+}
return _resultobj;
}
-#define delete_wxFont(_swigobj) (delete _swigobj)
-static PyObject *_wrap_delete_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxNativeFontInfo_ToString(_swigobj) (_swigobj->ToString())
+static PyObject *_wrap_wxNativeFontInfo_ToString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- wxFont * _arg0;
+ wxString * _result;
+ wxNativeFontInfo * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFont",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_ToString",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFont. Expected _wxFont_p.");
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_ToString. Expected _wxNativeFontInfo_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- delete_wxFont(_arg0);
+ _result = new wxString (wxNativeFontInfo_ToString(_arg0));
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+ delete _result;
+}
return _resultobj;
}
-#define wxFont_Ok(_swigobj) (_swigobj->Ok())
-static PyObject *_wrap_wxFont_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
+static wxString wxNativeFontInfo___str__(wxNativeFontInfo *self) {
+ return self->ToString();
+ }
+static PyObject *_wrap_wxNativeFontInfo___str__(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- bool _result;
- wxFont * _arg0;
+ wxString * _result;
+ wxNativeFontInfo * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_Ok",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo___str__",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_Ok. Expected _wxFont_p.");
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo___str__. Expected _wxNativeFontInfo_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (bool )wxFont_Ok(_arg0);
+ _result = new wxString (wxNativeFontInfo___str__(_arg0));
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-} _resultobj = Py_BuildValue("i",_result);
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+ delete _result;
+}
return _resultobj;
}
-#define wxFont_GetFaceName(_swigobj) (_swigobj->GetFaceName())
-static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define new_wxFontMapper() (new wxFontMapper())
+static PyObject *_wrap_new_wxFontMapper(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- wxString * _result;
- wxFont * _arg0;
+ wxFontMapper * _result;
+ char *_kwnames[] = { NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFontMapper",_kwnames))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxFontMapper *)new_wxFontMapper();
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxFontMapper_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define delete_wxFontMapper(_swigobj) (delete _swigobj)
+static PyObject *_wrap_delete_wxFontMapper(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFontMapper * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetFaceName",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFontMapper",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFaceName. Expected _wxFont_p.");
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFontMapper. Expected _wxFontMapper_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = new wxString (wxFont_GetFaceName(_arg0));
+ delete_wxFontMapper(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-}{
- _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
-}
-{
- delete _result;
-}
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
return _resultobj;
}
-#define wxFont_GetFamily(_swigobj) (_swigobj->GetFamily())
-static PyObject *_wrap_wxFont_GetFamily(PyObject *self, PyObject *args, PyObject *kwargs) {
+static PyObject * wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncoding encoding,const wxString & facename,bool interactive) {
+ wxFontEncoding alt_enc;
+ if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive))
+ return PyInt_FromLong(alt_enc);
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ }
+static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- int _result;
- wxFont * _arg0;
+ PyObject * _result;
+ wxFontMapper * _arg0;
+ wxFontEncoding _arg1;
+ wxString * _arg2 = (wxString *) &wxEmptyString;
+ bool _arg3 = (bool ) TRUE;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self", NULL };
+ PyObject * _obj2 = 0;
+ int tempbool3 = (int) TRUE;
+ char *_kwnames[] = { "self","encoding","facename","interactive", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetFamily",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|Oi:wxFontMapper_GetAltForEncoding",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFamily. Expected _wxFont_p.");
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_GetAltForEncoding. Expected _wxFontMapper_p.");
return NULL;
}
}
+ if (_obj2)
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg2 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
+}
+ _arg3 = (bool ) tempbool3;
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (int )wxFont_GetFamily(_arg0);
+ _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-} _resultobj = Py_BuildValue("i",_result);
+}{
+ _resultobj = _result;
+}
+{
+ if (_obj2)
+ delete _arg2;
+}
return _resultobj;
}
-#define wxFont_GetPointSize(_swigobj) (_swigobj->GetPointSize())
-static PyObject *_wrap_wxFont_GetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFontMapper_IsEncodingAvailable(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEncodingAvailable(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- int _result;
- wxFont * _arg0;
+ bool _result;
+ wxFontMapper * _arg0;
+ wxFontEncoding _arg1;
+ wxString * _arg2 = (wxString *) &wxEmptyString;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self", NULL };
+ PyObject * _obj2 = 0;
+ char *_kwnames[] = { "self","encoding","facename", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetPointSize",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxFontMapper_IsEncodingAvailable",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetPointSize. Expected _wxFont_p.");
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_IsEncodingAvailable. Expected _wxFontMapper_p.");
return NULL;
}
}
+ if (_obj2)
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg2 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
+}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (int )wxFont_GetPointSize(_arg0);
+ _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj2)
+ delete _arg2;
+}
return _resultobj;
}
-#define wxFont_GetStyle(_swigobj) (_swigobj->GetStyle())
-static PyObject *_wrap_wxFont_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFontMapper_CharsetToEncoding(_swigobj,_swigarg0,_swigarg1) (_swigobj->CharsetToEncoding(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxFontMapper_CharsetToEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- int _result;
- wxFont * _arg0;
+ wxFontEncoding _result;
+ wxFontMapper * _arg0;
+ wxString * _arg1;
+ bool _arg2 = (bool ) TRUE;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self", NULL };
+ PyObject * _obj1 = 0;
+ int tempbool2 = (int) TRUE;
+ char *_kwnames[] = { "self","charset","interactive", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetStyle",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFontMapper_CharsetToEncoding",_kwnames,&_argo0,&_obj1,&tempbool2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetStyle. Expected _wxFont_p.");
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_CharsetToEncoding. Expected _wxFontMapper_p.");
return NULL;
}
}
{
- wxPy_BEGIN_ALLOW_THREADS;
- _result = (int )wxFont_GetStyle(_arg0);
-
- wxPy_END_ALLOW_THREADS;
- if (PyErr_Occurred()) return NULL;
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
+}
+ _arg2 = (bool ) tempbool2;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+static PyObject *_wrap_wxFontMapper_GetEncodingName(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxString * _result;
+ wxFontEncoding _arg0;
+ char *_kwnames[] = { "encoding", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFontMapper_GetEncodingName",_kwnames,&_arg0))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxString (wxFontMapper::GetEncodingName(_arg0));
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+ delete _result;
+}
+ return _resultobj;
+}
+
+static PyObject *_wrap_wxFontMapper_GetEncodingDescription(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxString * _result;
+ wxFontEncoding _arg0;
+ char *_kwnames[] = { "encoding", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFontMapper_GetEncodingDescription",_kwnames,&_arg0))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxString (wxFontMapper::GetEncodingDescription(_arg0));
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+ delete _result;
+}
+ return _resultobj;
+}
+
+#define wxFontMapper_SetDialogParent(_swigobj,_swigarg0) (_swigobj->SetDialogParent(_swigarg0))
+static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFontMapper * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","parent", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogParent",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogParent. Expected _wxFontMapper_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetDialogParent. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxFontMapper_SetDialogParent(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxFontMapper_SetDialogTitle(_swigobj,_swigarg0) (_swigobj->SetDialogTitle(_swigarg0))
+static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFontMapper * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","title", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogTitle",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogTitle. Expected _wxFontMapper_p.");
+ return NULL;
+ }
+ }
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxFontMapper_SetDialogTitle(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxFontMapper_SetConfig(_swigobj,_swigarg0) (_swigobj->SetConfig(_swigarg0))
+static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFontMapper * _arg0;
+ wxConfigBase * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","config", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfig",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfig. Expected _wxFontMapper_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetConfig. Expected _wxConfigBase_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxFontMapper_SetConfig(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxFontMapper_SetConfigPath(_swigobj,_swigarg0) (_swigobj->SetConfigPath(_swigarg0))
+static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFontMapper * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","prefix", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfigPath",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfigPath. Expected _wxFontMapper_p.");
+ return NULL;
+ }
+ }
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxFontMapper_SetConfigPath(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxChar * _result;
+ char *_kwnames[] = { NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFontMapper_GetDefaultConfigPath",_kwnames))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxChar *)wxFontMapper::GetDefaultConfigPath();
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("s", _result);
+ return _resultobj;
+}
+
+static void *SwigwxFontTowxGDIObject(void *ptr) {
+ wxFont *src;
+ wxGDIObject *dest;
+ src = (wxFont *) ptr;
+ dest = (wxGDIObject *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxFontTowxObject(void *ptr) {
+ wxFont *src;
+ wxObject *dest;
+ src = (wxFont *) ptr;
+ dest = (wxObject *) src;
+ return (void *) dest;
+}
+
+#define new_wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
+static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFont * _result;
+ int _arg0;
+ int _arg1;
+ int _arg2;
+ int _arg3;
+ int _arg4 = (int ) FALSE;
+ char * _arg5 = (char *) "";
+ wxFontEncoding _arg6 = (wxFontEncoding ) (wxFONTENCODING_DEFAULT);
+ char *_kwnames[] = { "pointSize","family","style","weight","underline","faceName","encoding", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiii|isi:new_wxFont",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define new_wxFontFromNativeInfo(_swigarg0) (new wxFont(_swigarg0))
+static PyObject *_wrap_new_wxFontFromNativeInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFont * _result;
+ wxNativeFontInfo * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "info", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxFontFromNativeInfo",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFontFromNativeInfo. Expected _wxNativeFontInfo_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxFont *)new_wxFontFromNativeInfo(*_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define delete_wxFont(_swigobj) (delete _swigobj)
+static PyObject *_wrap_delete_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFont * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFont",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFont. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ delete_wxFont(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxFont_Ok(_swigobj) (_swigobj->Ok())
+static PyObject *_wrap_wxFont_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxFont * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_Ok",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_Ok. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxFont_Ok(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxFont_GetPointSize(_swigobj) (_swigobj->GetPointSize())
+static PyObject *_wrap_wxFont_GetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxFont * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetPointSize",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetPointSize. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxFont_GetPointSize(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxFont_GetFamily(_swigobj) (_swigobj->GetFamily())
+static PyObject *_wrap_wxFont_GetFamily(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxFont * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetFamily",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFamily. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxFont_GetFamily(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxFont_GetStyle(_swigobj) (_swigobj->GetStyle())
+static PyObject *_wrap_wxFont_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxFont * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetStyle",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetStyle. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxFont_GetStyle(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxFont_GetWeight(_swigobj) (_swigobj->GetWeight())
+static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxFont * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetWeight",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetWeight. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxFont_GetWeight(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxFont_GetUnderlined(_swigobj) (_swigobj->GetUnderlined())
+static PyObject *_wrap_wxFont_GetUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxFont * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetUnderlined",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetUnderlined. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxFont_GetUnderlined(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
-#define wxFont_GetUnderlined(_swigobj) (_swigobj->GetUnderlined())
-static PyObject *_wrap_wxFont_GetUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_GetFaceName(_swigobj) (_swigobj->GetFaceName())
+static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxString * _result;
+ wxFont * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetFaceName",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFaceName. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxString (wxFont_GetFaceName(_arg0));
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+ delete _result;
+}
+ return _resultobj;
+}
+
+#define wxFont_GetEncoding(_swigobj) (_swigobj->GetEncoding())
+static PyObject *_wrap_wxFont_GetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- bool _result;
+ wxFontEncoding _result;
wxFont * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetUnderlined",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetEncoding",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetUnderlined. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetEncoding. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (bool )wxFont_GetUnderlined(_arg0);
+ _result = (wxFontEncoding )wxFont_GetEncoding(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
-#define wxFont_GetWeight(_swigobj) (_swigobj->GetWeight())
-static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_GetNativeFontInfo(_swigobj) (_swigobj->GetNativeFontInfo())
+static PyObject *_wrap_wxFont_GetNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- int _result;
+ wxNativeFontInfo * _result;
wxFont * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
+ char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetWeight",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetNativeFontInfo",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetWeight. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetNativeFontInfo. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (int )wxFont_GetWeight(_arg0);
+ _result = (wxNativeFontInfo *)wxFont_GetNativeFontInfo(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-} _resultobj = Py_BuildValue("i",_result);
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxNativeFontInfo_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
return _resultobj;
}
-#define wxFont_GetEncoding(_swigobj) (_swigobj->GetEncoding())
-static PyObject *_wrap_wxFont_GetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0))
+static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- wxFontEncoding _result;
wxFont * _arg0;
+ int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self", NULL };
+ char *_kwnames[] = { "self","pointSize", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetEncoding",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetPointSize",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetEncoding. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetPointSize. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxFontEncoding )wxFont_GetEncoding(_arg0);
+ wxFont_SetPointSize(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-} _resultobj = Py_BuildValue("i",_result);
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
return _resultobj;
}
-#define wxFont_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0))
-static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0))
+static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFont * _arg0;
- wxString * _arg1;
+ int _arg1;
PyObject * _argo0 = 0;
- PyObject * _obj1 = 0;
- char *_kwnames[] = { "self","faceName", NULL };
+ char *_kwnames[] = { "self","family", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFont_SetFaceName",_kwnames,&_argo0,&_obj1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetFamily",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFaceName. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFamily. Expected _wxFont_p.");
return NULL;
}
}
-{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
- return NULL;
- _arg1 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
-#endif
-}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxFont_SetFaceName(_arg0,*_arg1);
+ wxFont_SetFamily(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
-{
- if (_obj1)
- delete _arg1;
-}
return _resultobj;
}
-#define wxFont_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0))
-static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0))
+static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFont * _arg0;
int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","family", NULL };
+ char *_kwnames[] = { "self","style", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetFamily",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetStyle",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFamily. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetStyle. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxFont_SetFamily(_arg0,_arg1);
+ wxFont_SetStyle(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
-#define wxFont_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0))
-static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0))
+static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFont * _arg0;
int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","pointSize", NULL };
+ char *_kwnames[] = { "self","weight", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetPointSize",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetWeight",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetPointSize. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetWeight. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxFont_SetPointSize(_arg0,_arg1);
+ wxFont_SetWeight(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
-#define wxFont_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0))
-static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0))
+static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFont * _arg0;
- int _arg1;
+ wxString * _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","style", NULL };
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","faceName", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetStyle",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFont_SetFaceName",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetStyle. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFaceName. Expected _wxFont_p.");
return NULL;
}
}
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
+}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxFont_SetStyle(_arg0,_arg1);
+ wxFont_SetFaceName(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
return _resultobj;
}
return _resultobj;
}
-#define wxFont_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0))
-static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_SetEncoding(_swigobj,_swigarg0) (_swigobj->SetEncoding(_swigarg0))
+static PyObject *_wrap_wxFont_SetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFont * _arg0;
- int _arg1;
+ wxFontEncoding _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","weight", NULL };
+ char *_kwnames[] = { "self","encoding", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetWeight",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetEncoding",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetWeight. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetEncoding. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxFont_SetWeight(_arg0,_arg1);
+ wxFont_SetEncoding(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
-#define wxFont_SetEncoding(_swigobj,_swigarg0) (_swigobj->SetEncoding(_swigarg0))
-static PyObject *_wrap_wxFont_SetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxFont_SetNativeFontInfo(_swigobj,_swigarg0) (_swigobj->SetNativeFontInfo(_swigarg0))
+static PyObject *_wrap_wxFont_SetNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFont * _arg0;
- wxFontEncoding _arg1;
+ wxNativeFontInfo * _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","encoding", NULL };
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","info", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetEncoding",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFont_SetNativeFontInfo",_kwnames,&_argo0,&_argo1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetEncoding. Expected _wxFont_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetNativeFontInfo. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxNativeFontInfo_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFont_SetNativeFontInfo. Expected _wxNativeFontInfo_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxFont_SetEncoding(_arg0,_arg1);
+ wxFont_SetNativeFontInfo(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
+static PyObject *_wrap_wxFont_GetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFontEncoding _result;
+ char *_kwnames[] = { NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFont_GetDefaultEncoding",_kwnames))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxFontEncoding )wxFont::GetDefaultEncoding();
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+static PyObject *_wrap_wxFont_SetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxFontEncoding _arg0;
+ char *_kwnames[] = { "encoding", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFont_SetDefaultEncoding",_kwnames,&_arg0))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxFont::SetDefaultEncoding(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static void *SwigwxFontListTowxObject(void *ptr) {
wxFontList *src;
wxObject *dest;
return _resultobj;
}
+#define wxDC_SetClippingRegionAsRegion(_swigobj,_swigarg0) (_swigobj->SetClippingRegion(_swigarg0))
+static PyObject *_wrap_wxDC_SetClippingRegionAsRegion(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxDC * _arg0;
+ wxRegion * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","region", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetClippingRegionAsRegion",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetClippingRegionAsRegion. Expected _wxDC_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetClippingRegionAsRegion. Expected _wxRegion_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxDC_SetClippingRegionAsRegion(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define wxDC_SetPalette(_swigobj,_swigarg0) (_swigobj->SetPalette(_swigarg0))
static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxDC_SetFont", (PyCFunction) _wrap_wxDC_SetFont, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_SetBrush", (PyCFunction) _wrap_wxDC_SetBrush, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_SetPalette", (PyCFunction) _wrap_wxDC_SetPalette, METH_VARARGS | METH_KEYWORDS },
+ { "wxDC_SetClippingRegionAsRegion", (PyCFunction) _wrap_wxDC_SetClippingRegionAsRegion, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_SetClippingRegion", (PyCFunction) _wrap_wxDC_SetClippingRegion, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_SetBackgroundMode", (PyCFunction) _wrap_wxDC_SetBackgroundMode, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_SetBackground", (PyCFunction) _wrap_wxDC_SetBackground, METH_VARARGS | METH_KEYWORDS },
{ "wxFontList_RemoveFont", (PyCFunction) _wrap_wxFontList_RemoveFont, METH_VARARGS | METH_KEYWORDS },
{ "wxFontList_FindOrCreateFont", (PyCFunction) _wrap_wxFontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS },
{ "wxFontList_AddFont", (PyCFunction) _wrap_wxFontList_AddFont, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_SetDefaultEncoding", (PyCFunction) _wrap_wxFont_SetDefaultEncoding, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_GetDefaultEncoding", (PyCFunction) _wrap_wxFont_GetDefaultEncoding, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetWeightString", (PyCFunction) _wrap_wxFont_GetWeightString, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetStyleString", (PyCFunction) _wrap_wxFont_GetStyleString, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetFamilyString", (PyCFunction) _wrap_wxFont_GetFamilyString, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_SetNativeFontInfo", (PyCFunction) _wrap_wxFont_SetNativeFontInfo, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetEncoding", (PyCFunction) _wrap_wxFont_SetEncoding, METH_VARARGS | METH_KEYWORDS },
- { "wxFont_SetWeight", (PyCFunction) _wrap_wxFont_SetWeight, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetUnderlined", (PyCFunction) _wrap_wxFont_SetUnderlined, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_SetFaceName", (PyCFunction) _wrap_wxFont_SetFaceName, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_SetWeight", (PyCFunction) _wrap_wxFont_SetWeight, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetStyle", (PyCFunction) _wrap_wxFont_SetStyle, METH_VARARGS | METH_KEYWORDS },
- { "wxFont_SetPointSize", (PyCFunction) _wrap_wxFont_SetPointSize, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetFamily", (PyCFunction) _wrap_wxFont_SetFamily, METH_VARARGS | METH_KEYWORDS },
- { "wxFont_SetFaceName", (PyCFunction) _wrap_wxFont_SetFaceName, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_SetPointSize", (PyCFunction) _wrap_wxFont_SetPointSize, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_GetNativeFontInfo", (PyCFunction) _wrap_wxFont_GetNativeFontInfo, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetEncoding", (PyCFunction) _wrap_wxFont_GetEncoding, METH_VARARGS | METH_KEYWORDS },
- { "wxFont_GetWeight", (PyCFunction) _wrap_wxFont_GetWeight, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_GetFaceName", (PyCFunction) _wrap_wxFont_GetFaceName, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetUnderlined", (PyCFunction) _wrap_wxFont_GetUnderlined, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_GetWeight", (PyCFunction) _wrap_wxFont_GetWeight, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetStyle", (PyCFunction) _wrap_wxFont_GetStyle, METH_VARARGS | METH_KEYWORDS },
- { "wxFont_GetPointSize", (PyCFunction) _wrap_wxFont_GetPointSize, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetFamily", (PyCFunction) _wrap_wxFont_GetFamily, METH_VARARGS | METH_KEYWORDS },
- { "wxFont_GetFaceName", (PyCFunction) _wrap_wxFont_GetFaceName, METH_VARARGS | METH_KEYWORDS },
+ { "wxFont_GetPointSize", (PyCFunction) _wrap_wxFont_GetPointSize, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_Ok", (PyCFunction) _wrap_wxFont_Ok, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxFont", (PyCFunction) _wrap_delete_wxFont, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxFontFromNativeInfo", (PyCFunction) _wrap_new_wxFontFromNativeInfo, METH_VARARGS | METH_KEYWORDS },
{ "new_wxFont", (PyCFunction) _wrap_new_wxFont, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_GetDefaultConfigPath", (PyCFunction) _wrap_wxFontMapper_GetDefaultConfigPath, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_SetConfigPath", (PyCFunction) _wrap_wxFontMapper_SetConfigPath, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_SetConfig", (PyCFunction) _wrap_wxFontMapper_SetConfig, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_SetDialogTitle", (PyCFunction) _wrap_wxFontMapper_SetDialogTitle, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_SetDialogParent", (PyCFunction) _wrap_wxFontMapper_SetDialogParent, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_GetEncodingDescription", (PyCFunction) _wrap_wxFontMapper_GetEncodingDescription, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_GetEncodingName", (PyCFunction) _wrap_wxFontMapper_GetEncodingName, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_CharsetToEncoding", (PyCFunction) _wrap_wxFontMapper_CharsetToEncoding, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_IsEncodingAvailable", (PyCFunction) _wrap_wxFontMapper_IsEncodingAvailable, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontMapper_GetAltForEncoding", (PyCFunction) _wrap_wxFontMapper_GetAltForEncoding, METH_VARARGS | METH_KEYWORDS },
+ { "delete_wxFontMapper", (PyCFunction) _wrap_delete_wxFontMapper, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxFontMapper", (PyCFunction) _wrap_new_wxFontMapper, METH_VARARGS | METH_KEYWORDS },
+ { "wxNativeFontInfo___str__", (PyCFunction) _wrap_wxNativeFontInfo___str__, METH_VARARGS | METH_KEYWORDS },
+ { "wxNativeFontInfo_ToString", (PyCFunction) _wrap_wxNativeFontInfo_ToString, METH_VARARGS | METH_KEYWORDS },
+ { "wxNativeFontInfo_FromString", (PyCFunction) _wrap_wxNativeFontInfo_FromString, METH_VARARGS | METH_KEYWORDS },
{ "wxCursor_Ok", (PyCFunction) _wrap_wxCursor_Ok, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxCursor", (PyCFunction) _wrap_delete_wxCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxIcon_CopyFromBitmap", (PyCFunction) _wrap_wxIcon_CopyFromBitmap, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGDIObject", (PyCFunction) _wrap_new_wxGDIObject, METH_VARARGS | METH_KEYWORDS },
{ "wxMemoryDCFromDC", (PyCFunction) _wrap_wxMemoryDCFromDC, METH_VARARGS | METH_KEYWORDS },
{ "wxNamedColour", (PyCFunction) _wrap_wxNamedColour, METH_VARARGS | METH_KEYWORDS },
- { "wxFont_SetDefaultEncoding", (PyCFunction) _wrap_wxFont_SetDefaultEncoding, METH_VARARGS | METH_KEYWORDS },
- { "wxFont_GetDefaultEncoding", (PyCFunction) _wrap_wxFont_GetDefaultEncoding, METH_VARARGS | METH_KEYWORDS },
{ "wxStockCursor", (PyCFunction) _wrap_wxStockCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxIconFromXPMData", (PyCFunction) _wrap_wxIconFromXPMData, METH_VARARGS | METH_KEYWORDS },
{ "wxEmptyIcon", (PyCFunction) _wrap_wxEmptyIcon, METH_VARARGS | METH_KEYWORDS },
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_class_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC},
{ "_class_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC},
{ "_class_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("gdic", gdicMethods);
d = PyModule_GetDict(m);
+ PyDict_SetItemString(d,"wxFONTFAMILY_DEFAULT", PyInt_FromLong((long) wxFONTFAMILY_DEFAULT));
+ PyDict_SetItemString(d,"wxFONTFAMILY_DECORATIVE", PyInt_FromLong((long) wxFONTFAMILY_DECORATIVE));
+ PyDict_SetItemString(d,"wxFONTFAMILY_ROMAN", PyInt_FromLong((long) wxFONTFAMILY_ROMAN));
+ PyDict_SetItemString(d,"wxFONTFAMILY_SCRIPT", PyInt_FromLong((long) wxFONTFAMILY_SCRIPT));
+ PyDict_SetItemString(d,"wxFONTFAMILY_SWISS", PyInt_FromLong((long) wxFONTFAMILY_SWISS));
+ PyDict_SetItemString(d,"wxFONTFAMILY_MODERN", PyInt_FromLong((long) wxFONTFAMILY_MODERN));
+ PyDict_SetItemString(d,"wxFONTFAMILY_TELETYPE", PyInt_FromLong((long) wxFONTFAMILY_TELETYPE));
+ PyDict_SetItemString(d,"wxFONTFAMILY_MAX", PyInt_FromLong((long) wxFONTFAMILY_MAX));
+ PyDict_SetItemString(d,"wxFONTSTYLE_NORMAL", PyInt_FromLong((long) wxFONTSTYLE_NORMAL));
+ PyDict_SetItemString(d,"wxFONTSTYLE_ITALIC", PyInt_FromLong((long) wxFONTSTYLE_ITALIC));
+ PyDict_SetItemString(d,"wxFONTSTYLE_SLANT", PyInt_FromLong((long) wxFONTSTYLE_SLANT));
+ PyDict_SetItemString(d,"wxFONTSTYLE_MAX", PyInt_FromLong((long) wxFONTSTYLE_MAX));
+ PyDict_SetItemString(d,"wxFONTWEIGHT_NORMAL", PyInt_FromLong((long) wxFONTWEIGHT_NORMAL));
+ PyDict_SetItemString(d,"wxFONTWEIGHT_LIGHT", PyInt_FromLong((long) wxFONTWEIGHT_LIGHT));
+ PyDict_SetItemString(d,"wxFONTWEIGHT_BOLD", PyInt_FromLong((long) wxFONTWEIGHT_BOLD));
+ PyDict_SetItemString(d,"wxFONTWEIGHT_MAX", PyInt_FromLong((long) wxFONTWEIGHT_MAX));
PyDict_SetItemString(d,"wxFONTENCODING_SYSTEM", PyInt_FromLong((long) wxFONTENCODING_SYSTEM));
PyDict_SetItemString(d,"wxFONTENCODING_DEFAULT", PyInt_FromLong((long) wxFONTENCODING_DEFAULT));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_1", PyInt_FromLong((long) wxFONTENCODING_ISO8859_1));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_13", PyInt_FromLong((long) wxFONTENCODING_ISO8859_13));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_14", PyInt_FromLong((long) wxFONTENCODING_ISO8859_14));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_15", PyInt_FromLong((long) wxFONTENCODING_ISO8859_15));
+ PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_MAX", PyInt_FromLong((long) wxFONTENCODING_ISO8859_MAX));
PyDict_SetItemString(d,"wxFONTENCODING_KOI8", PyInt_FromLong((long) wxFONTENCODING_KOI8));
PyDict_SetItemString(d,"wxFONTENCODING_ALTERNATIVE", PyInt_FromLong((long) wxFONTENCODING_ALTERNATIVE));
PyDict_SetItemString(d,"wxFONTENCODING_BULGARIAN", PyInt_FromLong((long) wxFONTENCODING_BULGARIAN));
PyDict_SetItemString(d,"wxFONTENCODING_CP852", PyInt_FromLong((long) wxFONTENCODING_CP852));
PyDict_SetItemString(d,"wxFONTENCODING_CP855", PyInt_FromLong((long) wxFONTENCODING_CP855));
PyDict_SetItemString(d,"wxFONTENCODING_CP866", PyInt_FromLong((long) wxFONTENCODING_CP866));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP874", PyInt_FromLong((long) wxFONTENCODING_CP874));
PyDict_SetItemString(d,"wxFONTENCODING_CP1250", PyInt_FromLong((long) wxFONTENCODING_CP1250));
PyDict_SetItemString(d,"wxFONTENCODING_CP1251", PyInt_FromLong((long) wxFONTENCODING_CP1251));
PyDict_SetItemString(d,"wxFONTENCODING_CP1252", PyInt_FromLong((long) wxFONTENCODING_CP1252));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP1253", PyInt_FromLong((long) wxFONTENCODING_CP1253));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP1254", PyInt_FromLong((long) wxFONTENCODING_CP1254));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP1255", PyInt_FromLong((long) wxFONTENCODING_CP1255));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP1256", PyInt_FromLong((long) wxFONTENCODING_CP1256));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP1257", PyInt_FromLong((long) wxFONTENCODING_CP1257));
+ PyDict_SetItemString(d,"wxFONTENCODING_CP12_MAX", PyInt_FromLong((long) wxFONTENCODING_CP12_MAX));
+ PyDict_SetItemString(d,"wxFONTENCODING_UTF7", PyInt_FromLong((long) wxFONTENCODING_UTF7));
+ PyDict_SetItemString(d,"wxFONTENCODING_UTF8", PyInt_FromLong((long) wxFONTENCODING_UTF8));
+ PyDict_SetItemString(d,"wxFONTENCODING_UNICODE", PyInt_FromLong((long) wxFONTENCODING_UNICODE));
PyDict_SetItemString(d,"wxFONTENCODING_MAX", PyInt_FromLong((long) wxFONTENCODING_MAX));
PyDict_SetItemString(d,"cvar", SWIG_globals);
SWIG_addvarlink(SWIG_globals,"wxNORMAL_FONT",_wrap_wxNORMAL_FONT_get, _wrap_wxNORMAL_FONT_set);
+class wxNativeFontInfoPtr :
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def FromString(self, *_args, **_kwargs):
+ val = apply(gdic.wxNativeFontInfo_FromString,(self,) + _args, _kwargs)
+ return val
+ def ToString(self, *_args, **_kwargs):
+ val = apply(gdic.wxNativeFontInfo_ToString,(self,) + _args, _kwargs)
+ return val
+ def __str__(self, *_args, **_kwargs):
+ val = apply(gdic.wxNativeFontInfo___str__,(self,) + _args, _kwargs)
+ return val
+ def __repr__(self):
+ return "<C wxNativeFontInfo instance at %s>" % (self.this,)
+class wxNativeFontInfo(wxNativeFontInfoPtr):
+ def __init__(self,this):
+ self.this = this
+
+
+
+
+class wxFontMapperPtr :
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __del__(self,gdic=gdic):
+ if self.thisown == 1 :
+ gdic.delete_wxFontMapper(self)
+ def GetAltForEncoding(self, *_args, **_kwargs):
+ val = apply(gdic.wxFontMapper_GetAltForEncoding,(self,) + _args, _kwargs)
+ return val
+ def IsEncodingAvailable(self, *_args, **_kwargs):
+ val = apply(gdic.wxFontMapper_IsEncodingAvailable,(self,) + _args, _kwargs)
+ return val
+ def CharsetToEncoding(self, *_args, **_kwargs):
+ val = apply(gdic.wxFontMapper_CharsetToEncoding,(self,) + _args, _kwargs)
+ return val
+ def SetDialogParent(self, *_args, **_kwargs):
+ val = apply(gdic.wxFontMapper_SetDialogParent,(self,) + _args, _kwargs)
+ return val
+ def SetDialogTitle(self, *_args, **_kwargs):
+ val = apply(gdic.wxFontMapper_SetDialogTitle,(self,) + _args, _kwargs)
+ return val
+ def SetConfig(self, *_args, **_kwargs):
+ val = apply(gdic.wxFontMapper_SetConfig,(self,) + _args, _kwargs)
+ return val
+ def SetConfigPath(self, *_args, **_kwargs):
+ val = apply(gdic.wxFontMapper_SetConfigPath,(self,) + _args, _kwargs)
+ return val
+ def __repr__(self):
+ return "<C wxFontMapper instance at %s>" % (self.this,)
+class wxFontMapper(wxFontMapperPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(gdic.new_wxFontMapper,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
class wxFontPtr(wxGDIObjectPtr):
def __init__(self,this):
self.this = this
def Ok(self, *_args, **_kwargs):
val = apply(gdic.wxFont_Ok,(self,) + _args, _kwargs)
return val
- def GetFaceName(self, *_args, **_kwargs):
- val = apply(gdic.wxFont_GetFaceName,(self,) + _args, _kwargs)
+ def GetPointSize(self, *_args, **_kwargs):
+ val = apply(gdic.wxFont_GetPointSize,(self,) + _args, _kwargs)
return val
def GetFamily(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetFamily,(self,) + _args, _kwargs)
return val
- def GetPointSize(self, *_args, **_kwargs):
- val = apply(gdic.wxFont_GetPointSize,(self,) + _args, _kwargs)
- return val
def GetStyle(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetStyle,(self,) + _args, _kwargs)
return val
+ def GetWeight(self, *_args, **_kwargs):
+ val = apply(gdic.wxFont_GetWeight,(self,) + _args, _kwargs)
+ return val
def GetUnderlined(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetUnderlined,(self,) + _args, _kwargs)
return val
- def GetWeight(self, *_args, **_kwargs):
- val = apply(gdic.wxFont_GetWeight,(self,) + _args, _kwargs)
+ def GetFaceName(self, *_args, **_kwargs):
+ val = apply(gdic.wxFont_GetFaceName,(self,) + _args, _kwargs)
return val
def GetEncoding(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetEncoding,(self,) + _args, _kwargs)
return val
- def SetFaceName(self, *_args, **_kwargs):
- val = apply(gdic.wxFont_SetFaceName,(self,) + _args, _kwargs)
- return val
- def SetFamily(self, *_args, **_kwargs):
- val = apply(gdic.wxFont_SetFamily,(self,) + _args, _kwargs)
+ def GetNativeFontInfo(self, *_args, **_kwargs):
+ val = apply(gdic.wxFont_GetNativeFontInfo,(self,) + _args, _kwargs)
+ if val: val = wxNativeFontInfoPtr(val)
return val
def SetPointSize(self, *_args, **_kwargs):
val = apply(gdic.wxFont_SetPointSize,(self,) + _args, _kwargs)
return val
+ def SetFamily(self, *_args, **_kwargs):
+ val = apply(gdic.wxFont_SetFamily,(self,) + _args, _kwargs)
+ return val
def SetStyle(self, *_args, **_kwargs):
val = apply(gdic.wxFont_SetStyle,(self,) + _args, _kwargs)
return val
- def SetUnderlined(self, *_args, **_kwargs):
- val = apply(gdic.wxFont_SetUnderlined,(self,) + _args, _kwargs)
- return val
def SetWeight(self, *_args, **_kwargs):
val = apply(gdic.wxFont_SetWeight,(self,) + _args, _kwargs)
return val
+ def SetFaceName(self, *_args, **_kwargs):
+ val = apply(gdic.wxFont_SetFaceName,(self,) + _args, _kwargs)
+ return val
+ def SetUnderlined(self, *_args, **_kwargs):
+ val = apply(gdic.wxFont_SetUnderlined,(self,) + _args, _kwargs)
+ return val
def SetEncoding(self, *_args, **_kwargs):
val = apply(gdic.wxFont_SetEncoding,(self,) + _args, _kwargs)
return val
+ def SetNativeFontInfo(self, *_args, **_kwargs):
+ val = apply(gdic.wxFont_SetNativeFontInfo,(self,) + _args, _kwargs)
+ return val
def GetFamilyString(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetFamilyString,(self,) + _args, _kwargs)
return val
+def wxFontFromNativeInfo(*_args,**_kwargs):
+ val = wxFontPtr(apply(gdic.new_wxFontFromNativeInfo,_args,_kwargs))
+ val.thisown = 1
+ return val
+
class wxFontListPtr(wxObjectPtr):
def __init__(self,this):
def SetClippingRegion(self, *_args, **_kwargs):
val = apply(gdic.wxDC_SetClippingRegion,(self,) + _args, _kwargs)
return val
+ def SetClippingRegionAsRegion(self, *_args, **_kwargs):
+ val = apply(gdic.wxDC_SetClippingRegionAsRegion,(self,) + _args, _kwargs)
+ return val
def SetPalette(self, *_args, **_kwargs):
val = apply(gdic.wxDC_SetPalette,(self,) + _args, _kwargs)
return val
if val: val = wxCursorPtr(val); val.thisown = 1
return val
-wxFont_GetDefaultEncoding = gdic.wxFont_GetDefaultEncoding
-
-wxFont_SetDefaultEncoding = gdic.wxFont_SetDefaultEncoding
-
def wxNamedColour(*_args, **_kwargs):
val = apply(gdic.wxNamedColour,_args,_kwargs)
if val: val = wxColourPtr(val); val.thisown = 1
if val: val = wxMemoryDCPtr(val); val.thisown = 1
return val
+wxFontMapper_GetEncodingName = gdic.wxFontMapper_GetEncodingName
+
+wxFontMapper_GetEncodingDescription = gdic.wxFontMapper_GetEncodingDescription
+
+wxFontMapper_GetDefaultConfigPath = gdic.wxFontMapper_GetDefaultConfigPath
+
+wxFont_GetDefaultEncoding = gdic.wxFont_GetDefaultEncoding
+
+wxFont_SetDefaultEncoding = gdic.wxFont_SetDefaultEncoding
+
#-------------- VARIABLE WRAPPERS ------------------
+wxFONTFAMILY_DEFAULT = gdic.wxFONTFAMILY_DEFAULT
+wxFONTFAMILY_DECORATIVE = gdic.wxFONTFAMILY_DECORATIVE
+wxFONTFAMILY_ROMAN = gdic.wxFONTFAMILY_ROMAN
+wxFONTFAMILY_SCRIPT = gdic.wxFONTFAMILY_SCRIPT
+wxFONTFAMILY_SWISS = gdic.wxFONTFAMILY_SWISS
+wxFONTFAMILY_MODERN = gdic.wxFONTFAMILY_MODERN
+wxFONTFAMILY_TELETYPE = gdic.wxFONTFAMILY_TELETYPE
+wxFONTFAMILY_MAX = gdic.wxFONTFAMILY_MAX
+wxFONTSTYLE_NORMAL = gdic.wxFONTSTYLE_NORMAL
+wxFONTSTYLE_ITALIC = gdic.wxFONTSTYLE_ITALIC
+wxFONTSTYLE_SLANT = gdic.wxFONTSTYLE_SLANT
+wxFONTSTYLE_MAX = gdic.wxFONTSTYLE_MAX
+wxFONTWEIGHT_NORMAL = gdic.wxFONTWEIGHT_NORMAL
+wxFONTWEIGHT_LIGHT = gdic.wxFONTWEIGHT_LIGHT
+wxFONTWEIGHT_BOLD = gdic.wxFONTWEIGHT_BOLD
+wxFONTWEIGHT_MAX = gdic.wxFONTWEIGHT_MAX
wxFONTENCODING_SYSTEM = gdic.wxFONTENCODING_SYSTEM
wxFONTENCODING_DEFAULT = gdic.wxFONTENCODING_DEFAULT
wxFONTENCODING_ISO8859_1 = gdic.wxFONTENCODING_ISO8859_1
wxFONTENCODING_ISO8859_13 = gdic.wxFONTENCODING_ISO8859_13
wxFONTENCODING_ISO8859_14 = gdic.wxFONTENCODING_ISO8859_14
wxFONTENCODING_ISO8859_15 = gdic.wxFONTENCODING_ISO8859_15
+wxFONTENCODING_ISO8859_MAX = gdic.wxFONTENCODING_ISO8859_MAX
wxFONTENCODING_KOI8 = gdic.wxFONTENCODING_KOI8
wxFONTENCODING_ALTERNATIVE = gdic.wxFONTENCODING_ALTERNATIVE
wxFONTENCODING_BULGARIAN = gdic.wxFONTENCODING_BULGARIAN
wxFONTENCODING_CP852 = gdic.wxFONTENCODING_CP852
wxFONTENCODING_CP855 = gdic.wxFONTENCODING_CP855
wxFONTENCODING_CP866 = gdic.wxFONTENCODING_CP866
+wxFONTENCODING_CP874 = gdic.wxFONTENCODING_CP874
wxFONTENCODING_CP1250 = gdic.wxFONTENCODING_CP1250
wxFONTENCODING_CP1251 = gdic.wxFONTENCODING_CP1251
wxFONTENCODING_CP1252 = gdic.wxFONTENCODING_CP1252
+wxFONTENCODING_CP1253 = gdic.wxFONTENCODING_CP1253
+wxFONTENCODING_CP1254 = gdic.wxFONTENCODING_CP1254
+wxFONTENCODING_CP1255 = gdic.wxFONTENCODING_CP1255
+wxFONTENCODING_CP1256 = gdic.wxFONTENCODING_CP1256
+wxFONTENCODING_CP1257 = gdic.wxFONTENCODING_CP1257
+wxFONTENCODING_CP12_MAX = gdic.wxFONTENCODING_CP12_MAX
+wxFONTENCODING_UTF7 = gdic.wxFONTENCODING_UTF7
+wxFONTENCODING_UTF8 = gdic.wxFONTENCODING_UTF8
+wxFONTENCODING_UNICODE = gdic.wxFONTENCODING_UNICODE
wxFONTENCODING_MAX = gdic.wxFONTENCODING_MAX
cvar = gdic.cvar
wxNORMAL_FONT = wxFontPtr(gdic.cvar.wxNORMAL_FONT)
#include "export.h"
#include <wx/grid.h>
+#include <wx/generic/gridctrl.h>
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
#define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \
wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \
wxGridCellAttr* rval = NULL; \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* ro; \
wxGridCellAttr* ptr; \
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iii)", a, b, c)); \
Py_DECREF(ro); \
} \
} \
- else \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
rval = PCLASS::CBNAME(a, b, c); \
- wxPySaveThread(doSave); \
return rval; \
} \
wxGridCellAttr *base_##CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \
-#define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \
- void CBNAME(wxGridCellAttr *attr, int a, int b) { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
+#define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \
+ void CBNAME(wxGridCellAttr *attr, int a, int b) { \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ bool found; \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \
- Py_DECREF(obj); \
- } \
- else \
- PCLASS::CBNAME(attr, a, b); \
- wxPySaveThread(doSave); \
- } \
- void base_##CBNAME(wxGridCellAttr *attr, int a, int b) { \
- PCLASS::CBNAME(attr, a, b); \
+ Py_DECREF(obj); \
+ } \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ PCLASS::CBNAME(attr, a, b); \
+ } \
+ void base_##CBNAME(wxGridCellAttr *attr, int a, int b) { \
+ PCLASS::CBNAME(attr, a, b); \
}
-#define PYCALLBACK__GCAINT(PCLASS, CBNAME) \
- void CBNAME(wxGridCellAttr *attr, int val) { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
+#define PYCALLBACK__GCAINT(PCLASS, CBNAME) \
+ void CBNAME(wxGridCellAttr *attr, int val) { \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ bool found; \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \
- Py_DECREF(obj); \
- } \
- else \
- PCLASS::CBNAME(attr, val); \
- wxPySaveThread(doSave); \
- } \
- void base_##CBNAME(wxGridCellAttr *attr, int val) { \
- PCLASS::CBNAME(attr, val); \
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \
+ Py_DECREF(obj); \
+ } \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ PCLASS::CBNAME(attr, val); \
+ } \
+ void base_##CBNAME(wxGridCellAttr *attr, int val) { \
+ PCLASS::CBNAME(attr, val); \
}
-#define PYCALLBACK_INT__pure(CBNAME) \
- int CBNAME() { \
- bool doSave = wxPyRestoreThread(); \
- int rval = 0; \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \
- wxPySaveThread(doSave); \
- return rval; \
+#define PYCALLBACK_INT__pure(CBNAME) \
+ int CBNAME() { \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ int rval = 0; \
+ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \
+ wxPyEndBlockThreads(state); \
+ return rval; \
}
-#define PYCALLBACK_BOOL_INTINT_pure(CBNAME) \
- bool CBNAME(int a, int b) { \
- bool doSave = wxPyRestoreThread(); \
- bool rval = 0; \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \
- wxPySaveThread(doSave); \
- return rval; \
- }
-
-
-
-#define PYCALLBACK_STRING_INTINT_pure(CBNAME) \
- wxString CBNAME(int a, int b) { \
- bool doSave = wxPyRestoreThread(); \
- wxString rval; \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
- PyObject* ro; \
- ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \
- if (ro) { \
- PyObject* str = PyObject_Str(ro); \
- rval = PyString_AsString(str); \
- Py_DECREF(ro); Py_DECREF(str); \
- } \
- } \
- wxPySaveThread(doSave); \
- return rval; \
- }
-
-
-
-#define PYCALLBACK__INTINTSTRING_pure(CBNAME) \
- void CBNAME(int a, int b, const wxString& c) { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str())); \
- wxPySaveThread(doSave); \
+#define PYCALLBACK_BOOL_INTINT_pure(CBNAME) \
+ bool CBNAME(int a, int b) { \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ bool rval = 0; \
+ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \
+ wxPyEndBlockThreads(state); \
+ return rval; \
}
-
-
-#define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \
- wxString CBNAME(int a, int b) { \
- bool doSave = wxPyRestoreThread(); \
- wxString rval; \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
- PyObject* ro; \
- ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \
- if (ro) { \
- PyObject* str = PyObject_Str(ro); \
- rval = PyString_AsString(str); \
- Py_DECREF(ro); Py_DECREF(str); \
- } \
- } else \
- rval = PCLASS::CBNAME(a, b); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- wxString base_##CBNAME(int a, int b) { \
- return PCLASS::CBNAME(a, b); \
- }
-
-
-
-#define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \
- bool CBNAME(int a, int b, const wxString& c) { \
- bool rval; \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)", a,b,c.c_str())); \
- else \
- rval = PCLASS::CBNAME(a,b,c); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- bool base_##CBNAME(int a, int b, const wxString& c) { \
- return PCLASS::CBNAME(a,b,c); \
- }
-
-
-
-
-#define PYCALLBACK_LONG_INTINT(PCLASS, CBNAME) \
- long CBNAME(int a, int b) { \
- long rval; \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \
- else \
- rval = PCLASS::CBNAME(a,b); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- long base_##CBNAME(int a, int b) { \
- return PCLASS::CBNAME(a,b); \
- }
-
-
-
-#define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \
- bool CBNAME(int a, int b) { \
- bool rval; \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \
- else \
- rval = PCLASS::CBNAME(a,b); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- bool base_##CBNAME(int a, int b) { \
- return PCLASS::CBNAME(a,b); \
- }
-
-
-
-#define PYCALLBACK_DOUBLE_INTINT(PCLASS, CBNAME) \
- double CBNAME(int a, int b) { \
- bool doSave = wxPyRestoreThread(); \
- double rval; \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
- PyObject* ro; \
- ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \
- if (ro) { \
- PyObject* str = PyObject_Str(ro); \
- rval = PyFloat_AsDouble(str); \
- Py_DECREF(ro); Py_DECREF(str); \
- } \
- } else \
- rval = PCLASS::CBNAME(a, b); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- double base_##CBNAME(int a, int b) { \
- return PCLASS::CBNAME(a, b); \
- }
-
-
-
-#define PYCALLBACK__(PCLASS, CBNAME) \
- void CBNAME() { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \
- else \
- PCLASS::CBNAME(); \
- wxPySaveThread(doSave); \
- } \
- void base_##CBNAME() { \
- PCLASS::CBNAME(); \
- }
-
-
-
-
-#define PYCALLBACK_BOOL_SIZETSIZET(PCLASS, CBNAME) \
- bool CBNAME(size_t a, size_t b) { \
- bool rval; \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \
- else \
- rval = PCLASS::CBNAME(a,b); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- bool base_##CBNAME(size_t a, size_t b) { \
- return PCLASS::CBNAME(a,b); \
- }
-
-
-
-#define PYCALLBACK_BOOL_SIZET(PCLASS, CBNAME) \
- bool CBNAME(size_t a) { \
- bool rval; \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \
- else \
- rval = PCLASS::CBNAME(a); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- bool base_##CBNAME(size_t a) { \
- return PCLASS::CBNAME(a); \
- }
-
-
-
-#define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \
- wxString CBNAME(int a) { \
- bool doSave = wxPyRestoreThread(); \
- wxString rval; \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
- PyObject* ro; \
- ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)",a)); \
- if (ro) { \
- PyObject* str = PyObject_Str(ro); \
- rval = PyString_AsString(str); \
- Py_DECREF(ro); Py_DECREF(str); \
- } \
- } else \
- rval = PCLASS::CBNAME(a); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- wxString base_##CBNAME(int a) { \
- return PCLASS::CBNAME(a); \
+
+
+
+#define PYCALLBACK_STRING_INTINT_pure(CBNAME) \
+ wxString CBNAME(int a, int b) { \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ wxString rval; \
+ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
+ PyObject* ro; \
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \
+ if (ro) { \
+ PyObject* str = PyObject_Str(ro); \
+ rval = PyString_AsString(str); \
+ Py_DECREF(ro); Py_DECREF(str); \
+ } \
+ } \
+ wxPyEndBlockThreads(state); \
+ return rval; \
}
-#define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \
- void CBNAME(int a, const wxString& c) { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("(is)", a,c.c_str())); \
- else \
- PCLASS::CBNAME(a,c); \
- wxPySaveThread(doSave); \
- } \
- void base_##CBNAME(int a, const wxString& c) { \
- PCLASS::CBNAME(a,c); \
+#define PYCALLBACK__INTINTSTRING_pure(CBNAME) \
+ void CBNAME(int a, int b, const wxString& c) { \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str()));\
+ wxPyEndBlockThreads(state); \
}
+#define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \
+ wxString CBNAME(int a, int b) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ wxString rval; \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
+ PyObject* ro; \
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \
+ if (ro) { \
+ PyObject* str = PyObject_Str(ro); \
+ rval = PyString_AsString(str); \
+ Py_DECREF(ro); Py_DECREF(str); \
+ } \
+ } \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a, b); \
+ return rval; \
+ } \
+ wxString base_##CBNAME(int a, int b) { \
+ return PCLASS::CBNAME(a, b); \
+ }
+
-#define PYCALLBACK_BOOL_(PCLASS, CBNAME) \
- bool CBNAME() { \
- bool rval; \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \
- else \
- rval = PCLASS::CBNAME(); \
- wxPySaveThread(doSave); \
- return rval; \
- } \
- bool base_##CBNAME() { \
- return PCLASS::CBNAME(); \
+#define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \
+ bool CBNAME(int a, int b, const wxString& c) { \
+ bool rval; \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)", a,b,c.c_str()));\
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a,b,c); \
+ return rval; \
+ } \
+ bool base_##CBNAME(int a, int b, const wxString& c) { \
+ return PCLASS::CBNAME(a,b,c); \
}
-#define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \
- void CBNAME(size_t a, int b) { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \
- else \
- PCLASS::CBNAME(a,b); \
- wxPySaveThread(doSave); \
- } \
- void base_##CBNAME(size_t a, int b) { \
- PCLASS::CBNAME(a,b); \
+
+#define PYCALLBACK_LONG_INTINT(PCLASS, CBNAME) \
+ long CBNAME(int a, int b) { \
+ long rval; \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a,b); \
+ return rval; \
+ } \
+ long base_##CBNAME(int a, int b) { \
+ return PCLASS::CBNAME(a,b); \
}
+#define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \
+ bool CBNAME(int a, int b) { \
+ bool rval; \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a,b); \
+ return rval; \
+ } \
+ bool base_##CBNAME(int a, int b) { \
+ return PCLASS::CBNAME(a,b); \
+ }
+
-#define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \
- void CBNAME(int a, int b, long c) { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \
- else \
- PCLASS::CBNAME(a,b,c); \
- wxPySaveThread(doSave); \
- } \
- void base_##CBNAME(int a, int b, long c) { \
- PCLASS::CBNAME(a,b,c); \
+
+#define PYCALLBACK_DOUBLE_INTINT(PCLASS, CBNAME) \
+ double CBNAME(int a, int b) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ double rval; \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
+ PyObject* ro; \
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \
+ if (ro) { \
+ PyObject* str = PyObject_Str(ro); \
+ rval = PyFloat_AsDouble(str); \
+ Py_DECREF(ro); Py_DECREF(str); \
+ } \
+ } \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a, b); \
+ return rval; \
+ } \
+ double base_##CBNAME(int a, int b) { \
+ return PCLASS::CBNAME(a, b); \
+ }
+
+
+
+#define PYCALLBACK__(PCLASS, CBNAME) \
+ void CBNAME() { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ PCLASS::CBNAME(); \
+ } \
+ void base_##CBNAME() { \
+ PCLASS::CBNAME(); \
+ }
+
+
+
+
+#define PYCALLBACK_BOOL_SIZETSIZET(PCLASS, CBNAME) \
+ bool CBNAME(size_t a, size_t b) { \
+ bool rval; \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a,b); \
+ return rval; \
+ } \
+ bool base_##CBNAME(size_t a, size_t b) { \
+ return PCLASS::CBNAME(a,b); \
+ }
+
+
+
+#define PYCALLBACK_BOOL_SIZET(PCLASS, CBNAME) \
+ bool CBNAME(size_t a) { \
+ bool rval; \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a); \
+ return rval; \
+ } \
+ bool base_##CBNAME(size_t a) { \
+ return PCLASS::CBNAME(a); \
}
+#define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \
+ wxString CBNAME(int a) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ wxString rval; \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
+ PyObject* ro; \
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)",a)); \
+ if (ro) { \
+ PyObject* str = PyObject_Str(ro); \
+ rval = PyString_AsString(str); \
+ Py_DECREF(ro); Py_DECREF(str); \
+ } \
+ } \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a); \
+ return rval; \
+ } \
+ wxString base_##CBNAME(int a) { \
+ return PCLASS::CBNAME(a); \
+ }
+
+
-#define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \
- void CBNAME(int a, int b, double c) { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iif)", a,b,c)); \
- else \
- PCLASS::CBNAME(a,b,c); \
- wxPySaveThread(doSave); \
- } \
- void base_##CBNAME(int a, int b, double c) { \
- PCLASS::CBNAME(a,b,c); \
+#define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \
+ void CBNAME(int a, const wxString& c) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(is)", a,c.c_str())); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ PCLASS::CBNAME(a,c); \
+ } \
+ void base_##CBNAME(int a, const wxString& c) { \
+ PCLASS::CBNAME(a,c); \
}
-#define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \
- void CBNAME(int a, int b, bool c) { \
- bool doSave = wxPyRestoreThread(); \
- if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
- wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \
- else \
- PCLASS::CBNAME(a,b,c); \
- wxPySaveThread(doSave); \
- } \
- void base_##CBNAME(int a, int b, bool c) { \
- PCLASS::CBNAME(a,b,c); \
+
+#define PYCALLBACK_BOOL_(PCLASS, CBNAME) \
+ bool CBNAME() { \
+ bool rval; \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(); \
+ return rval; \
+ } \
+ bool base_##CBNAME() { \
+ return PCLASS::CBNAME(); \
+ }
+
+
+
+#define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \
+ void CBNAME(size_t a, int b) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ PCLASS::CBNAME(a,b); \
+ } \
+ void base_##CBNAME(size_t a, int b) { \
+ PCLASS::CBNAME(a,b); \
+ }
+
+
+
+
+#define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \
+ void CBNAME(int a, int b, long c) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ PCLASS::CBNAME(a,b,c); \
+ } \
+ void base_##CBNAME(int a, int b, long c) { \
+ PCLASS::CBNAME(a,b,c); \
+ }
+
+
+
+
+#define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \
+ void CBNAME(int a, int b, double c) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iif)", a,b,c)); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ PCLASS::CBNAME(a,b,c); \
+ } \
+ void base_##CBNAME(int a, int b, double c) { \
+ PCLASS::CBNAME(a,b,c); \
+ }
+
+
+
+#define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \
+ void CBNAME(int a, int b, bool c) { \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
+ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ PCLASS::CBNAME(a,b,c); \
+ } \
+ void base_##CBNAME(int a, int b, bool c) { \
+ PCLASS::CBNAME(a,b,c); \
}
void Draw(wxGrid& grid, wxGridCellAttr& attr,
wxDC& dc, const wxRect& rect,
int row, int col, bool isSelected) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "Draw")) {
wxPyCBH_callCallback(m_myInst,
Py_BuildValue("(OOOOiii)",
wxPyConstructObject((void*)&rect, "wxRect", 0),
row, col, isSelected));
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc,
int row, int col) {
wxSize rval;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) {
PyObject* ro;
wxSize* ptr;
Py_DECREF(ro);
}
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
wxGridCellRenderer *Clone() const {
wxGridCellRenderer* rval = NULL;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "Clone")) {
PyObject* ro;
wxGridCellRenderer* ptr;
Py_DECREF(ro);
}
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
wxPyGridCellEditor() : wxGridCellEditor() {}
void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "Create")) {
wxPyCBH_callCallback(m_myInst,
Py_BuildValue("(OiO)",
id,
wxPyConstructObject((void*)evtHandler, "wxEvtHandler", 0)));
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
void BeginEdit(int row, int col, wxGrid* grid) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) {
wxPyCBH_callCallback(m_myInst,
Py_BuildValue("(iiO)", row, col,
wxPyConstructObject((void*)grid, "wxGrid", 0)));
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
bool EndEdit(int row, int col, wxGrid* grid) {
bool rv = FALSE;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
rv = wxPyCBH_callCallback(m_myInst,
Py_BuildValue("(iiO)", row, col,
wxPyConstructObject((void*)grid, "wxGrid", 0)));
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rv;
}
wxGridCellEditor*Clone() const {
wxGridCellEditor* rval = NULL;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "Clone")) {
PyObject* ro;
wxGridCellEditor* ptr;
Py_DECREF(ro);
}
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
void Show(bool show, wxGridCellAttr *attr) {
- bool doSave = wxPyRestoreThread();
- if (wxPyCBH_findCallback(m_myInst, "Show"))
+ bool found;
+ wxPyTState* state = wxPyBeginBlockThreads();
+ if ((found = wxPyCBH_findCallback(m_myInst, "Show")))
wxPyCBH_callCallback(m_myInst,
Py_BuildValue("(iO)", show,
wxPyConstructObject((void*)attr, "wxGridCellAttr", 0)));
- else
+ wxPyEndBlockThreads(state);
+ if (! found)
wxGridCellEditor::Show(show, attr);
- wxPySaveThread(doSave);
}
void base_Show(bool show, wxGridCellAttr *attr) {
wxGridCellEditor::Show(show, attr);
void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) {
- bool doSave = wxPyRestoreThread();
- if (wxPyCBH_findCallback(m_myInst, "PaintBackground"))
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads();
+ if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)")))
wxPyCBH_callCallback(m_myInst,
Py_BuildValue("(OO)",
wxPyConstructObject((void*)&rectCell, "wxRect", 0),
wxPyConstructObject((void*)attr, "wxGridCellAttr", 0)));
- else
+ wxPyEndBlockThreads(state);
+ if (! found)
wxGridCellEditor::PaintBackground(rectCell, attr);
- wxPySaveThread(doSave);
}
void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) {
wxGridCellEditor::PaintBackground(rectCell, attr);
wxString GetValue(int row, int col) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
wxString rval;
if (wxPyCBH_findCallback(m_myInst, "GetValue")) {
PyObject* ro;
Py_DECREF(str);
}
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
void SetValue(int row, int col, const wxString& val) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "SetValue"))
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str()));
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
// the GetValue and SetValue python methods.
long GetValueAsLong( int row, int col ) {
long rval = 0;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "GetValue")) {
PyObject* ro;
PyObject* num;
Py_DECREF(ro);
}
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
double GetValueAsDouble( int row, int col ) {
double rval = 0.0;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "GetValue")) {
PyObject* ro;
PyObject* num;
Py_DECREF(ro);
}
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return rval;
}
}
void SetValueAsLong( int row, int col, long value ) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "SetValue")) {
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", row, col, value));
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
void SetValueAsDouble( int row, int col, double value ) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "SetValue")) {
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iid)", row, col, value));
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
void SetValueAsBool( int row, int col, bool value ) {
return _resultobj;
}
+static void *SwigwxGridCellDateTimeRendererTowxGridCellStringRenderer(void *ptr) {
+ wxGridCellDateTimeRenderer *src;
+ wxGridCellStringRenderer *dest;
+ src = (wxGridCellDateTimeRenderer *) ptr;
+ dest = (wxGridCellStringRenderer *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxGridCellDateTimeRendererTowxGridCellRenderer(void *ptr) {
+ wxGridCellDateTimeRenderer *src;
+ wxGridCellRenderer *dest;
+ src = (wxGridCellDateTimeRenderer *) ptr;
+ dest = (wxGridCellRenderer *) src;
+ return (void *) dest;
+}
+
+#define new_wxGridCellDateTimeRenderer(_swigarg0,_swigarg1) (new wxGridCellDateTimeRenderer(_swigarg0,_swigarg1))
+static PyObject *_wrap_new_wxGridCellDateTimeRenderer(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGridCellDateTimeRenderer * _result;
+ wxString * _arg0 = (wxString *) &"%c";
+ wxString * _arg1 = (wxString *) &"%c";
+ PyObject * _obj0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "outformat","informat", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OO:new_wxGridCellDateTimeRenderer",_kwnames,&_obj0,&_obj1))
+ return NULL;
+ if (_obj0)
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg0 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
+#endif
+}
+ if (_obj1)
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGridCellDateTimeRenderer *)new_wxGridCellDateTimeRenderer(*_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellDateTimeRenderer_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+{
+ if (_obj0)
+ delete _arg0;
+}
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+static void *SwigwxGridCellEnumRendererTowxGridCellStringRenderer(void *ptr) {
+ wxGridCellEnumRenderer *src;
+ wxGridCellStringRenderer *dest;
+ src = (wxGridCellEnumRenderer *) ptr;
+ dest = (wxGridCellStringRenderer *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxGridCellEnumRendererTowxGridCellRenderer(void *ptr) {
+ wxGridCellEnumRenderer *src;
+ wxGridCellRenderer *dest;
+ src = (wxGridCellEnumRenderer *) ptr;
+ dest = (wxGridCellRenderer *) src;
+ return (void *) dest;
+}
+
+#define new_wxGridCellEnumRenderer(_swigarg0) (new wxGridCellEnumRenderer(_swigarg0))
+static PyObject *_wrap_new_wxGridCellEnumRenderer(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGridCellEnumRenderer * _result;
+ wxString * _arg0 = (wxString *) &"";
+ PyObject * _obj0 = 0;
+ char *_kwnames[] = { "choices", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxGridCellEnumRenderer",_kwnames,&_obj0))
+ return NULL;
+ if (_obj0)
+{
+ _arg0 = wxString_LIST_helper(_obj0);
+ if (_arg0 == NULL) {
+ return NULL;
+ }
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGridCellEnumRenderer *)new_wxGridCellEnumRenderer(*_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEnumRenderer_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+{
+ delete [] _arg0;
+}
+ return _resultobj;
+}
+
+static void *SwigwxGridCellAutoWrapStringRendererTowxGridCellStringRenderer(void *ptr) {
+ wxGridCellAutoWrapStringRenderer *src;
+ wxGridCellStringRenderer *dest;
+ src = (wxGridCellAutoWrapStringRenderer *) ptr;
+ dest = (wxGridCellStringRenderer *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxGridCellAutoWrapStringRendererTowxGridCellRenderer(void *ptr) {
+ wxGridCellAutoWrapStringRenderer *src;
+ wxGridCellRenderer *dest;
+ src = (wxGridCellAutoWrapStringRenderer *) ptr;
+ dest = (wxGridCellRenderer *) src;
+ return (void *) dest;
+}
+
+#define new_wxGridCellAutoWrapStringRenderer() (new wxGridCellAutoWrapStringRenderer())
+static PyObject *_wrap_new_wxGridCellAutoWrapStringRenderer(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGridCellAutoWrapStringRenderer * _result;
+ char *_kwnames[] = { NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellAutoWrapStringRenderer",_kwnames))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGridCellAutoWrapStringRenderer *)new_wxGridCellAutoWrapStringRenderer();
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAutoWrapStringRenderer_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
#define wxGridCellEditor_IsCreated(_swigobj) (_swigobj->IsCreated())
static PyObject *_wrap_wxGridCellEditor_IsCreated(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
+static void *SwigwxGridCellEnumEditorTowxGridCellChoiceEditor(void *ptr) {
+ wxGridCellEnumEditor *src;
+ wxGridCellChoiceEditor *dest;
+ src = (wxGridCellEnumEditor *) ptr;
+ dest = (wxGridCellChoiceEditor *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxGridCellEnumEditorTowxGridCellEditor(void *ptr) {
+ wxGridCellEnumEditor *src;
+ wxGridCellEditor *dest;
+ src = (wxGridCellEnumEditor *) ptr;
+ dest = (wxGridCellEditor *) src;
+ return (void *) dest;
+}
+
+#define new_wxGridCellEnumEditor(_swigarg0) (new wxGridCellEnumEditor(_swigarg0))
+static PyObject *_wrap_new_wxGridCellEnumEditor(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGridCellEnumEditor * _result;
+ wxString * _arg0 = (wxString *) &"";
+ PyObject * _obj0 = 0;
+ char *_kwnames[] = { "choices", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxGridCellEnumEditor",_kwnames,&_obj0))
+ return NULL;
+ if (_obj0)
+{
+ _arg0 = wxString_LIST_helper(_obj0);
+ if (_arg0 == NULL) {
+ return NULL;
+ }
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGridCellEnumEditor *)new_wxGridCellEnumEditor(*_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEnumEditor_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+{
+ delete [] _arg0;
+}
+ return _resultobj;
+}
+
+static void *SwigwxGridCellAutoWrapStringEditorTowxGridCellTextEditor(void *ptr) {
+ wxGridCellAutoWrapStringEditor *src;
+ wxGridCellTextEditor *dest;
+ src = (wxGridCellAutoWrapStringEditor *) ptr;
+ dest = (wxGridCellTextEditor *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxGridCellAutoWrapStringEditorTowxGridCellEditor(void *ptr) {
+ wxGridCellAutoWrapStringEditor *src;
+ wxGridCellEditor *dest;
+ src = (wxGridCellAutoWrapStringEditor *) ptr;
+ dest = (wxGridCellEditor *) src;
+ return (void *) dest;
+}
+
+#define new_wxGridCellAutoWrapStringEditor() (new wxGridCellAutoWrapStringEditor())
+static PyObject *_wrap_new_wxGridCellAutoWrapStringEditor(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGridCellAutoWrapStringEditor * _result;
+ char *_kwnames[] = { NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellAutoWrapStringEditor",_kwnames))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGridCellAutoWrapStringEditor *)new_wxGridCellAutoWrapStringEditor();
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAutoWrapStringEditor_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
#define new_wxGridCellAttr() (new wxGridCellAttr())
static PyObject *_wrap_new_wxGridCellAttr(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxGridCellAttr_MergeWith", (PyCFunction) _wrap_wxGridCellAttr_MergeWith, METH_VARARGS | METH_KEYWORDS },
{ "wxGridCellAttr_Clone", (PyCFunction) _wrap_wxGridCellAttr_Clone, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGridCellAttr", (PyCFunction) _wrap_new_wxGridCellAttr, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxGridCellAutoWrapStringEditor", (PyCFunction) _wrap_new_wxGridCellAutoWrapStringEditor, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxGridCellEnumEditor", (PyCFunction) _wrap_new_wxGridCellEnumEditor, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGridCellChoiceEditor", (PyCFunction) _wrap_new_wxGridCellChoiceEditor, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGridCellBoolEditor", (PyCFunction) _wrap_new_wxGridCellBoolEditor, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGridCellFloatEditor", (PyCFunction) _wrap_new_wxGridCellFloatEditor, 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 },
+ { "new_wxGridCellAutoWrapStringRenderer", (PyCFunction) _wrap_new_wxGridCellAutoWrapStringRenderer, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxGridCellEnumRenderer", (PyCFunction) _wrap_new_wxGridCellEnumRenderer, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxGridCellDateTimeRenderer", (PyCFunction) _wrap_new_wxGridCellDateTimeRenderer, 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_GetPrecision", (PyCFunction) _wrap_wxGridCellFloatRenderer_GetPrecision, METH_VARARGS | METH_KEYWORDS },
{ "_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent},
{ "_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent},
{ "_signed_long","_long",0},
+ { "_class_wxGridCellRenderer","_class_wxGridCellAutoWrapStringRenderer",SwigwxGridCellAutoWrapStringRendererTowxGridCellRenderer},
+ { "_class_wxGridCellRenderer","_wxGridCellAutoWrapStringRenderer",SwigwxGridCellAutoWrapStringRendererTowxGridCellRenderer},
+ { "_class_wxGridCellRenderer","_class_wxGridCellEnumRenderer",SwigwxGridCellEnumRendererTowxGridCellRenderer},
+ { "_class_wxGridCellRenderer","_wxGridCellEnumRenderer",SwigwxGridCellEnumRendererTowxGridCellRenderer},
+ { "_class_wxGridCellRenderer","_class_wxGridCellDateTimeRenderer",SwigwxGridCellDateTimeRendererTowxGridCellRenderer},
+ { "_class_wxGridCellRenderer","_wxGridCellDateTimeRenderer",SwigwxGridCellDateTimeRendererTowxGridCellRenderer},
{ "_class_wxGridCellRenderer","_class_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer},
{ "_class_wxGridCellRenderer","_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer},
{ "_class_wxGridCellRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer},
{ "_class_wxGridCellRenderer","_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer},
{ "_class_wxGridCellRenderer","_class_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer},
{ "_class_wxGridCellRenderer","_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer},
+ { "_wxGridCellChoiceEditor","_class_wxGridCellEnumEditor",SwigwxGridCellEnumEditorTowxGridCellChoiceEditor},
+ { "_wxGridCellChoiceEditor","_wxGridCellEnumEditor",SwigwxGridCellEnumEditorTowxGridCellChoiceEditor},
{ "_wxPrintQuality","_WXGRIDSELECTIONMODES",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_class_wxEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent},
{ "_class_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent},
{ "_class_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent},
+ { "_class_wxGridCellChoiceEditor","_class_wxGridCellEnumEditor",SwigwxGridCellEnumEditorTowxGridCellChoiceEditor},
+ { "_class_wxGridCellChoiceEditor","_wxGridCellEnumEditor",SwigwxGridCellEnumEditorTowxGridCellChoiceEditor},
{ "_wxCommandEvent","_class_wxGridEditorCreatedEvent",SwigwxGridEditorCreatedEventTowxCommandEvent},
{ "_wxCommandEvent","_wxGridEditorCreatedEvent",SwigwxGridEditorCreatedEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxGridEvent",SwigwxGridEventTowxCommandEvent},
{ "_wxCommandEvent","_wxGridEvent",SwigwxGridEventTowxCommandEvent},
{ "_char","_wxChar",0},
+ { "_wxGridCellStringRenderer","_class_wxGridCellAutoWrapStringRenderer",SwigwxGridCellAutoWrapStringRendererTowxGridCellStringRenderer},
+ { "_wxGridCellStringRenderer","_wxGridCellAutoWrapStringRenderer",SwigwxGridCellAutoWrapStringRendererTowxGridCellStringRenderer},
+ { "_wxGridCellStringRenderer","_class_wxGridCellEnumRenderer",SwigwxGridCellEnumRendererTowxGridCellStringRenderer},
+ { "_wxGridCellStringRenderer","_wxGridCellEnumRenderer",SwigwxGridCellEnumRendererTowxGridCellStringRenderer},
+ { "_wxGridCellStringRenderer","_class_wxGridCellDateTimeRenderer",SwigwxGridCellDateTimeRendererTowxGridCellStringRenderer},
+ { "_wxGridCellStringRenderer","_wxGridCellDateTimeRenderer",SwigwxGridCellDateTimeRendererTowxGridCellStringRenderer},
{ "_wxGridCellStringRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer},
{ "_wxGridCellStringRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer},
{ "_wxGridCellStringRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer},
{ "_class_wxNotifyEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent},
{ "_class_wxNotifyEvent","_class_wxGridEvent",SwigwxGridEventTowxNotifyEvent},
{ "_class_wxNotifyEvent","_wxGridEvent",SwigwxGridEventTowxNotifyEvent},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_wxGridTableBase","_class_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase},
{ "_wxGridTableBase","_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase},
{ "_wxGridTableBase","_class_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
+ { "_class_wxGridCellTextEditor","_class_wxGridCellAutoWrapStringEditor",SwigwxGridCellAutoWrapStringEditorTowxGridCellTextEditor},
+ { "_class_wxGridCellTextEditor","_wxGridCellAutoWrapStringEditor",SwigwxGridCellAutoWrapStringEditorTowxGridCellTextEditor},
{ "_class_wxGridCellTextEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor},
{ "_class_wxGridCellTextEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor},
{ "_class_wxGridCellTextEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor},
{ "_WXGRIDSELECTIONMODES","_time_t",0},
{ "_WXGRIDSELECTIONMODES","_wxPrintQuality",0},
{ "_WXGRIDSELECTIONMODES","_wxCoord",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
+ { "_class_wxGridCellStringRenderer","_class_wxGridCellAutoWrapStringRenderer",SwigwxGridCellAutoWrapStringRendererTowxGridCellStringRenderer},
+ { "_class_wxGridCellStringRenderer","_wxGridCellAutoWrapStringRenderer",SwigwxGridCellAutoWrapStringRendererTowxGridCellStringRenderer},
+ { "_class_wxGridCellStringRenderer","_class_wxGridCellEnumRenderer",SwigwxGridCellEnumRendererTowxGridCellStringRenderer},
+ { "_class_wxGridCellStringRenderer","_wxGridCellEnumRenderer",SwigwxGridCellEnumRendererTowxGridCellStringRenderer},
+ { "_class_wxGridCellStringRenderer","_class_wxGridCellDateTimeRenderer",SwigwxGridCellDateTimeRendererTowxGridCellStringRenderer},
+ { "_class_wxGridCellStringRenderer","_wxGridCellDateTimeRenderer",SwigwxGridCellDateTimeRendererTowxGridCellStringRenderer},
{ "_class_wxGridCellStringRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer},
{ "_class_wxGridCellStringRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer},
{ "_class_wxGridCellStringRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer},
{ "_signed_int","_EBool",0},
{ "_signed_int","_wxWindowID",0},
{ "_signed_int","_int",0},
+ { "_wxGridCellEditor","_class_wxGridCellAutoWrapStringEditor",SwigwxGridCellAutoWrapStringEditorTowxGridCellEditor},
+ { "_wxGridCellEditor","_wxGridCellAutoWrapStringEditor",SwigwxGridCellAutoWrapStringEditorTowxGridCellEditor},
+ { "_wxGridCellEditor","_class_wxGridCellEnumEditor",SwigwxGridCellEnumEditorTowxGridCellEditor},
+ { "_wxGridCellEditor","_wxGridCellEnumEditor",SwigwxGridCellEnumEditorTowxGridCellEditor},
{ "_wxGridCellEditor","_class_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor},
{ "_wxGridCellEditor","_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor},
{ "_wxGridCellEditor","_class_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
+ { "_class_wxGridCellEditor","_class_wxGridCellAutoWrapStringEditor",SwigwxGridCellAutoWrapStringEditorTowxGridCellEditor},
+ { "_class_wxGridCellEditor","_wxGridCellAutoWrapStringEditor",SwigwxGridCellAutoWrapStringEditorTowxGridCellEditor},
+ { "_class_wxGridCellEditor","_class_wxGridCellEnumEditor",SwigwxGridCellEnumEditorTowxGridCellEditor},
+ { "_class_wxGridCellEditor","_wxGridCellEnumEditor",SwigwxGridCellEnumEditorTowxGridCellEditor},
{ "_class_wxGridCellEditor","_class_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor},
{ "_class_wxGridCellEditor","_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor},
{ "_class_wxGridCellEditor","_class_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
+ { "_wxGridCellRenderer","_class_wxGridCellAutoWrapStringRenderer",SwigwxGridCellAutoWrapStringRendererTowxGridCellRenderer},
+ { "_wxGridCellRenderer","_wxGridCellAutoWrapStringRenderer",SwigwxGridCellAutoWrapStringRendererTowxGridCellRenderer},
+ { "_wxGridCellRenderer","_class_wxGridCellEnumRenderer",SwigwxGridCellEnumRendererTowxGridCellRenderer},
+ { "_wxGridCellRenderer","_wxGridCellEnumRenderer",SwigwxGridCellEnumRendererTowxGridCellRenderer},
+ { "_wxGridCellRenderer","_class_wxGridCellDateTimeRenderer",SwigwxGridCellDateTimeRendererTowxGridCellRenderer},
+ { "_wxGridCellRenderer","_wxGridCellDateTimeRenderer",SwigwxGridCellDateTimeRendererTowxGridCellRenderer},
{ "_wxGridCellRenderer","_class_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer},
{ "_wxGridCellRenderer","_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer},
{ "_wxGridCellRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer},
{ "_wxGridCellRenderer","_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer},
{ "_wxGridCellRenderer","_class_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer},
{ "_wxGridCellRenderer","_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer},
+ { "_wxGridCellTextEditor","_class_wxGridCellAutoWrapStringEditor",SwigwxGridCellAutoWrapStringEditorTowxGridCellTextEditor},
+ { "_wxGridCellTextEditor","_wxGridCellAutoWrapStringEditor",SwigwxGridCellAutoWrapStringEditorTowxGridCellTextEditor},
{ "_wxGridCellTextEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor},
{ "_wxGridCellTextEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor},
{ "_wxGridCellTextEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor},
+class wxGridCellDateTimeRendererPtr(wxGridCellStringRendererPtr):
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __repr__(self):
+ return "<C wxGridCellDateTimeRenderer instance at %s>" % (self.this,)
+class wxGridCellDateTimeRenderer(wxGridCellDateTimeRendererPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(gridc.new_wxGridCellDateTimeRenderer,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
+class wxGridCellEnumRendererPtr(wxGridCellStringRendererPtr):
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __repr__(self):
+ return "<C wxGridCellEnumRenderer instance at %s>" % (self.this,)
+class wxGridCellEnumRenderer(wxGridCellEnumRendererPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(gridc.new_wxGridCellEnumRenderer,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
+class wxGridCellAutoWrapStringRendererPtr(wxGridCellStringRendererPtr):
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __repr__(self):
+ return "<C wxGridCellAutoWrapStringRenderer instance at %s>" % (self.this,)
+class wxGridCellAutoWrapStringRenderer(wxGridCellAutoWrapStringRendererPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(gridc.new_wxGridCellAutoWrapStringRenderer,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
class wxGridCellEditorPtr :
def __init__(self,this):
self.this = this
+class wxGridCellEnumEditorPtr(wxGridCellChoiceEditorPtr):
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __repr__(self):
+ return "<C wxGridCellEnumEditor instance at %s>" % (self.this,)
+class wxGridCellEnumEditor(wxGridCellEnumEditorPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(gridc.new_wxGridCellEnumEditor,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
+class wxGridCellAutoWrapStringEditorPtr(wxGridCellTextEditorPtr):
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __repr__(self):
+ return "<C wxGridCellAutoWrapStringEditor instance at %s>" % (self.this,)
+class wxGridCellAutoWrapStringEditor(wxGridCellAutoWrapStringEditorPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(gridc.new_wxGridCellAutoWrapStringEditor,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
class wxGridCellAttrPtr :
Any = gridc.wxGridCellAttr_Any
Default = gridc.wxGridCellAttr_Default
}
void OnExit() {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
Py_DECREF(m_tagHandlerClass);
m_tagHandlerClass = NULL;
for (size_t x=0; x < m_objArray.GetCount(); x++) {
PyObject* obj = (PyObject*)m_objArray.Item(x);
Py_DECREF(obj);
}
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
};
void FillHandlersTable(wxHtmlWinParser *parser) {
// Wave our magic wand... (if it works it's a miracle! ;-)
// First, make a new instance of the tag handler
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyObject* arg = Py_BuildValue("()");
PyObject* obj = PyInstance_New(m_tagHandlerClass, arg, NULL);
Py_DECREF(arg);
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
// now figure out where it's C++ object is...
wxPyHtmlWinTagHandler* thPtr;
}
class wxPyHtmlWindow : public wxHtmlWindow {
+ DECLARE_ABSTRACT_CLASS(wxPyHtmlWindow);
public:
wxPyHtmlWindow(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
PYPRIVATE;
};
-
+IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow );
IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle);
void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
- bool doSave = wxPyRestoreThread();
- if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) {
+ bool found;
+ wxPyTState* state = wxPyBeginBlockThreads();
+ if ((found = wxPyCBH_findCallback(m_myInst, "OnLinkClicked)"))) {
PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
Py_DECREF(obj);
}
- else
+ wxPyEndBlockThreads(state);
+ if (! found)
wxHtmlWindow::OnLinkClicked(link);
- wxPySaveThread(doSave);
}
void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) {
wxHtmlWindow::OnLinkClicked(link);
{ "_wxHtmlCell","_class_wxHtmlWordCell",SwigwxHtmlWordCellTowxHtmlCell},
{ "_wxHtmlCell","_wxHtmlWordCell",SwigwxHtmlWordCellTowxHtmlCell},
{ "_char","_wxChar",0},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler},
{ "_wxPyHtmlTagHandler","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler},
{ "_EBool","_wxCoord",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_class_wxPanel","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel},
{ "_class_wxPanel","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel},
{ "_signed_int","_wxCoord",0},
wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr
wx.wxHtmlWindowPtr = wxHtmlWindowPtr
wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr
+
dest = reg1.GetBox();
if (dest != wxRect(0,0,0,0)) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
wxRect* newRect = new wxRect(dest);
obj = wxPyConstructObject((void*)newRect, "wxRect");
PyObject* one = PyInt_FromLong(1);
PyObject_SetAttrString(obj, "thisown", one);
Py_DECREF(one);
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return obj;
}
Py_INCREF(Py_None);
#include <wx/generic/dragimgg.h>
-
-
-wxGenericDragImage* wxDragIcon(const wxIcon& image,
- const wxCursor& cursor) {
- return new wxGenericDragImage(image, cursor);
-}
-
-wxGenericDragImage* wxDragString(const wxString& str,
- const wxCursor& cursor) {
- return new wxGenericDragImage(str, cursor);
-}
-
-wxGenericDragImage* wxDragTreeItem(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) {
- return new wxGenericDragImage(treeCtrl, id);
-}
-
-wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id) {
- return new wxGenericDragImage(listCtrl, id);
-}
-
// C++ version of wxProcess derived class
class wxPyProcess : public wxProcess {
IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate);
+
#if !wxUSE_JOYSTICK && !defined(__WXMSW__)
// A C++ stub class for wxJoystick for platforms that don't have it.
class wxJoystick : public wxObject {
{
public:
wxWave(const wxString& fileName, bool isResource = FALSE) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
wxWave(int size, const wxByte* data) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
~wxWave() {}
return _resultobj;
}
-static PyObject *_wrap_wxDragIcon(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxGenericDragImage * _result;
- wxIcon * _arg0;
- wxCursor * _arg1 = (wxCursor *) &wxNullCursor;
- PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
- char *_kwnames[] = { "image","cursor", NULL };
- char _ptemp[128];
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDragIcon",_kwnames,&_argo0,&_argo1))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragIcon. Expected _wxIcon_p.");
- return NULL;
- }
- }
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragIcon. Expected _wxCursor_p.");
- return NULL;
- }
- }
-{
- wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxGenericDragImage *)wxDragIcon(*_arg0,*_arg1);
-
- wxPy_END_ALLOW_THREADS;
-} if (_result) {
- SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p");
- _resultobj = Py_BuildValue("s",_ptemp);
- } else {
- Py_INCREF(Py_None);
- _resultobj = Py_None;
- }
- return _resultobj;
-}
-
-static PyObject *_wrap_wxDragString(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxGenericDragImage * _result;
- wxString * _arg0;
- wxCursor * _arg1 = (wxCursor *) &wxNullCursor;
- PyObject * _obj0 = 0;
- PyObject * _argo1 = 0;
- char *_kwnames[] = { "str","cursor", NULL };
- char _ptemp[128];
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDragString",_kwnames,&_obj0,&_argo1))
- return NULL;
-{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
- return NULL;
- _arg0 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj0)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
-#endif
-}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragString. Expected _wxCursor_p.");
- return NULL;
- }
- }
-{
- wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxGenericDragImage *)wxDragString(*_arg0,*_arg1);
-
- wxPy_END_ALLOW_THREADS;
-} if (_result) {
- SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p");
- _resultobj = Py_BuildValue("s",_ptemp);
- } else {
- Py_INCREF(Py_None);
- _resultobj = Py_None;
- }
-{
- if (_obj0)
- delete _arg0;
-}
- return _resultobj;
-}
-
-static PyObject *_wrap_wxDragTreeItem(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxGenericDragImage * _result;
- wxTreeCtrl * _arg0;
- wxTreeItemId * _arg1;
- PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
- char *_kwnames[] = { "treeCtrl","id", NULL };
- char _ptemp[128];
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDragTreeItem",_kwnames,&_argo0,&_argo1))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragTreeItem. Expected _wxTreeCtrl_p.");
- return NULL;
- }
- }
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragTreeItem. Expected _wxTreeItemId_p.");
- return NULL;
- }
- }
-{
- wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxGenericDragImage *)wxDragTreeItem(*_arg0,*_arg1);
-
- wxPy_END_ALLOW_THREADS;
-} if (_result) {
- SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p");
- _resultobj = Py_BuildValue("s",_ptemp);
- } else {
- Py_INCREF(Py_None);
- _resultobj = Py_None;
- }
- return _resultobj;
-}
-
-static PyObject *_wrap_wxDragListItem(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxGenericDragImage * _result;
- wxListCtrl * _arg0;
- long _arg1;
- PyObject * _argo0 = 0;
- char *_kwnames[] = { "listCtrl","id", NULL };
- char _ptemp[128];
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDragListItem",_kwnames,&_argo0,&_arg1))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragListItem. Expected _wxListCtrl_p.");
- return NULL;
- }
- }
-{
- wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxGenericDragImage *)wxDragListItem(*_arg0,_arg1);
-
- wxPy_END_ALLOW_THREADS;
-} if (_result) {
- SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p");
- _resultobj = Py_BuildValue("s",_ptemp);
- } else {
- Py_INCREF(Py_None);
- _resultobj = Py_None;
- }
- return _resultobj;
-}
-
static PyObject *_wrap_wxSysErrorCode(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
unsigned long _result;
return _resultobj;
}
+#define new_wxDragIcon(_swigarg0,_swigarg1) (new wxGenericDragImage(_swigarg0,_swigarg1))
+static PyObject *_wrap_new_wxDragIcon(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGenericDragImage * _result;
+ wxIcon * _arg0;
+ wxCursor * _arg1 = (wxCursor *) &wxNullCursor;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "image","cursor", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxDragIcon",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragIcon. Expected _wxIcon_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragIcon. Expected _wxCursor_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGenericDragImage *)new_wxDragIcon(*_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define new_wxDragString(_swigarg0,_swigarg1) (new wxGenericDragImage(_swigarg0,_swigarg1))
+static PyObject *_wrap_new_wxDragString(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGenericDragImage * _result;
+ wxString * _arg0;
+ wxCursor * _arg1 = (wxCursor *) &wxNullCursor;
+ PyObject * _obj0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "str","cursor", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxDragString",_kwnames,&_obj0,&_argo1))
+ return NULL;
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg0 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
+#endif
+}
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragString. Expected _wxCursor_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGenericDragImage *)new_wxDragString(*_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+{
+ if (_obj0)
+ delete _arg0;
+}
+ return _resultobj;
+}
+
+#define new_wxDragTreeItem(_swigarg0,_swigarg1) (new wxGenericDragImage(_swigarg0,_swigarg1))
+static PyObject *_wrap_new_wxDragTreeItem(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGenericDragImage * _result;
+ wxTreeCtrl * _arg0;
+ wxTreeItemId * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "treeCtrl","id", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxDragTreeItem",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragTreeItem. Expected _wxTreeCtrl_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragTreeItem. Expected _wxTreeItemId_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGenericDragImage *)new_wxDragTreeItem(*_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define new_wxDragListItem(_swigarg0,_swigarg1) (new wxGenericDragImage(_swigarg0,_swigarg1))
+static PyObject *_wrap_new_wxDragListItem(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGenericDragImage * _result;
+ wxListCtrl * _arg0;
+ long _arg1;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "listCtrl","id", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:new_wxDragListItem",_kwnames,&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragListItem. Expected _wxListCtrl_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxGenericDragImage *)new_wxDragListItem(*_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
#define delete_wxGenericDragImage(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxDragImage(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxDragImage_BeginDrag", (PyCFunction) _wrap_wxDragImage_BeginDrag, METH_VARARGS | METH_KEYWORDS },
{ "wxDragImage_SetBackingBitmap", (PyCFunction) _wrap_wxDragImage_SetBackingBitmap, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxDragImage", (PyCFunction) _wrap_delete_wxDragImage, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxDragListItem", (PyCFunction) _wrap_new_wxDragListItem, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxDragTreeItem", (PyCFunction) _wrap_new_wxDragTreeItem, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxDragString", (PyCFunction) _wrap_new_wxDragString, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxDragIcon", (PyCFunction) _wrap_new_wxDragIcon, METH_VARARGS | METH_KEYWORDS },
{ "new_wxDragImage", (PyCFunction) _wrap_new_wxDragImage, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyTipProvider", (PyCFunction) _wrap_new_wxPyTipProvider, METH_VARARGS | METH_KEYWORDS },
{ "wxTipProvider_GetCurrentTip", (PyCFunction) _wrap_wxTipProvider_GetCurrentTip, METH_VARARGS | METH_KEYWORDS },
{ "wxLogFatalError", (PyCFunction) _wrap_wxLogFatalError, METH_VARARGS | METH_KEYWORDS },
{ "wxSysErrorMsg", (PyCFunction) _wrap_wxSysErrorMsg, METH_VARARGS | METH_KEYWORDS },
{ "wxSysErrorCode", (PyCFunction) _wrap_wxSysErrorCode, METH_VARARGS | METH_KEYWORDS },
- { "wxDragListItem", (PyCFunction) _wrap_wxDragListItem, METH_VARARGS | METH_KEYWORDS },
- { "wxDragTreeItem", (PyCFunction) _wrap_wxDragTreeItem, METH_VARARGS | METH_KEYWORDS },
- { "wxDragString", (PyCFunction) _wrap_wxDragString, METH_VARARGS | METH_KEYWORDS },
- { "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS },
{ "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS },
{ "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS },
{ "wxThread_IsMain", (PyCFunction) _wrap_wxThread_IsMain, METH_VARARGS | METH_KEYWORDS },
{ "_class_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent},
{ "_class_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent},
{ "_char","_wxChar",0},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
+def wxDragIcon(*_args,**_kwargs):
+ val = wxDragImagePtr(apply(misc2c.new_wxDragIcon,_args,_kwargs))
+ val.thisown = 1
+ return val
+
+def wxDragString(*_args,**_kwargs):
+ val = wxDragImagePtr(apply(misc2c.new_wxDragString,_args,_kwargs))
+ val.thisown = 1
+ return val
+
+def wxDragTreeItem(*_args,**_kwargs):
+ val = wxDragImagePtr(apply(misc2c.new_wxDragTreeItem,_args,_kwargs))
+ val.thisown = 1
+ return val
+
+def wxDragListItem(*_args,**_kwargs):
+ val = wxDragImagePtr(apply(misc2c.new_wxDragListItem,_args,_kwargs))
+ val.thisown = 1
+ return val
+
class wxPyTimerPtr(wxObjectPtr):
def __init__(self,this):
if val: val = wxTipProviderPtr(val); val.thisown = 1
return val
-def wxDragIcon(*_args, **_kwargs):
- val = apply(misc2c.wxDragIcon,_args,_kwargs)
- if val: val = wxDragImagePtr(val); val.thisown = 1
- return val
-
-def wxDragString(*_args, **_kwargs):
- val = apply(misc2c.wxDragString,_args,_kwargs)
- if val: val = wxDragImagePtr(val); val.thisown = 1
- return val
-
-def wxDragTreeItem(*_args, **_kwargs):
- val = apply(misc2c.wxDragTreeItem,_args,_kwargs)
- if val: val = wxDragImagePtr(val); val.thisown = 1
- return val
-
-def wxDragListItem(*_args, **_kwargs):
- val = apply(misc2c.wxDragListItem,_args,_kwargs)
- if val: val = wxDragImagePtr(val); val.thisown = 1
- return val
-
wxSysErrorCode = misc2c.wxSysErrorCode
wxSysErrorMsg = misc2c.wxSysErrorMsg
// Since this one would be tough and ugly to do with the Macros...
void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
bool hadErr = FALSE;
+ bool found;
- bool doSave = wxPyRestoreThread();
- if (m_myInst.findCallback("GetPageInfo")) {
+ wxPyTState* state = wxPyBeginBlockThreads();
+ if ((found = m_myInst.findCallback("GetPageInfo"))) {
PyObject* result = m_myInst.callCallbackObj(Py_BuildValue("()"));
if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
PyObject* val;
}
Py_DECREF(result);
}
- else
+ wxPyEndBlockThreads(state);
+ if (! found)
wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
-
- wxPySaveThread(doSave);
}
void wxPyPrintout::base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_class_wxPanel","_class_wxPrintDialog",SwigwxPrintDialogTowxPanel},
{ "_class_wxPanel","_wxPrintDialog",SwigwxPrintDialogTowxPanel},
{ "_class_wxPanel","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel},
if (bufsize == 0)
return 0;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyObject* arglist = Py_BuildValue("(i)", bufsize);
PyObject* result = PyEval_CallObject(read, arglist);
Py_DECREF(arglist);
}
else
m_lasterror = wxSTREAM_READ_ERROR;
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
m_lastcount = o;
return o;
}
}
virtual off_t OnSysSeek(off_t off, wxSeekMode mode){
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyObject*arglist = Py_BuildValue("(ii)", off, mode);
PyObject*result = PyEval_CallObject(seek, arglist);
Py_DECREF(arglist);
Py_XDECREF(result);
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return OnSysTell();
}
virtual off_t OnSysTell() const{
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyObject* arglist = Py_BuildValue("()");
PyObject* result = PyEval_CallObject(tell, arglist);
Py_DECREF(arglist);
o = PyInt_AsLong(result);
Py_DECREF(result);
};
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
return o;
}
public:
~wxPyCBInputStream() {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
Py_XDECREF(py);
Py_XDECREF(read);
Py_XDECREF(seek);
Py_XDECREF(tell);
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
virtual size_t GetSize() {
~wxPyValidator() {
}
- wxObject* wxPyValidator::Clone() const {
+ wxObject* Clone() const {
wxPyValidator* ptr = NULL;
wxPyValidator* self = (wxPyValidator*)this;
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
if (self->m_myInst.findCallback("Clone")) {
PyObject* ro;
ro = self->m_myInst.callCallbackObj(Py_BuildValue("()"));
Py_DECREF(ro);
}
}
+ wxPyEndBlockThreads(state);
+
// This is very dangerous!!! But is the only way I could find
// to squash a memory leak. Currently it is okay, but if the
// validator architecture in wxWindows ever changes, problems
// could arise.
delete self;
-
- wxPySaveThread(doSave);
return ptr;
}
{ "_char","_wxChar",0},
{ "_class_wxValidator","_class_wxPyValidator",SwigwxPyValidatorTowxValidator},
{ "_class_wxValidator","_wxPyValidator",SwigwxPyValidatorTowxValidator},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_class_wxPanel","_class_wxScrolledWindow",SwigwxScrolledWindowTowxPanel},
{ "_class_wxPanel","_wxScrolledWindow",SwigwxScrolledWindowTowxPanel},
{ "_class_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel},
return _resultobj;
}
+#define wxNotebook_AssignImageList(_swigobj,_swigarg0) (_swigobj->AssignImageList(_swigarg0))
+static PyObject *_wrap_wxNotebook_AssignImageList(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxNotebook * _arg0;
+ wxImageList * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","imageList", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_AssignImageList",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AssignImageList. Expected _wxNotebook_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImageList_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_AssignImageList. Expected _wxImageList_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxNotebook_AssignImageList(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define wxNotebook_GetImageList(_swigobj) (_swigobj->GetImageList())
static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxNotebook_SetPageImage", (PyCFunction) _wrap_wxNotebook_SetPageImage, METH_VARARGS | METH_KEYWORDS },
{ "wxNotebook_GetPageImage", (PyCFunction) _wrap_wxNotebook_GetPageImage, METH_VARARGS | METH_KEYWORDS },
{ "wxNotebook_GetImageList", (PyCFunction) _wrap_wxNotebook_GetImageList, METH_VARARGS | METH_KEYWORDS },
+ { "wxNotebook_AssignImageList", (PyCFunction) _wrap_wxNotebook_AssignImageList, METH_VARARGS | METH_KEYWORDS },
{ "wxNotebook_SetImageList", (PyCFunction) _wrap_wxNotebook_SetImageList, METH_VARARGS | METH_KEYWORDS },
{ "wxNotebook_GetPageText", (PyCFunction) _wrap_wxNotebook_GetPageText, METH_VARARGS | METH_KEYWORDS },
{ "wxNotebook_SetPageText", (PyCFunction) _wrap_wxNotebook_SetPageText, METH_VARARGS | METH_KEYWORDS },
{ "_char","_wxChar",0},
{ "_class_wxNotifyEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent},
{ "_class_wxNotifyEvent","_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
def SetImageList(self, *_args, **_kwargs):
val = apply(windows2c.wxNotebook_SetImageList,(self,) + _args, _kwargs)
return val
+ def AssignImageList(self, *_args, **_kwargs):
+ val = apply(windows2c.wxNotebook_AssignImageList,(self,) + _args, _kwargs)
+ _args[0].thisown = 0
+ return val
def GetImageList(self, *_args, **_kwargs):
val = apply(windows2c.wxNotebook_GetImageList,(self,) + _args, _kwargs)
return val
SWIG_addvarlink,
SWIG_newvarlink,
- wxPySaveThread,
- wxPyRestoreThread,
+ wxPyBeginBlockThreads,
+ wxPyEndBlockThreads,
+
wxPyConstructObject,
wxPy_ConvertList,
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
PyDict_SetItemString(d,"wxFRAME_FLOAT_ON_PARENT", PyInt_FromLong((long) wxFRAME_FLOAT_ON_PARENT));
PyDict_SetItemString(d,"wxFRAME_NO_WINDOW_MENU", PyInt_FromLong((long) wxFRAME_NO_WINDOW_MENU));
PyDict_SetItemString(d,"wxFRAME_NO_TASKBAR", PyInt_FromLong((long) wxFRAME_NO_TASKBAR));
- PyDict_SetItemString(d,"wxFRAME_EX_CONTEXTHELP", PyInt_FromLong((long) wxFRAME_EX_CONTEXTHELP));
PyDict_SetItemString(d,"wxED_CLIENT_MARGIN", PyInt_FromLong((long) wxED_CLIENT_MARGIN));
PyDict_SetItemString(d,"wxED_BUTTONS_BOTTOM", PyInt_FromLong((long) wxED_BUTTONS_BOTTOM));
PyDict_SetItemString(d,"wxED_BUTTONS_RIGHT", PyInt_FromLong((long) wxED_BUTTONS_RIGHT));
PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE));
PyDict_SetItemString(d,"wxTE_AUTO_SCROLL", PyInt_FromLong((long) wxTE_AUTO_SCROLL));
PyDict_SetItemString(d,"wxTE_NO_VSCROLL", PyInt_FromLong((long) wxTE_NO_VSCROLL));
+ PyDict_SetItemString(d,"wxTE_AUTO_URL", PyInt_FromLong((long) wxTE_AUTO_URL));
PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE));
PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN));
PyDict_SetItemString(d,"wxCB_SORT", PyInt_FromLong((long) wxCB_SORT));
PyDict_SetItemString(d,"wxST_NO_AUTORESIZE", PyInt_FromLong((long) wxST_NO_AUTORESIZE));
PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW));
PyDict_SetItemString(d,"wxBU_NOAUTODRAW", PyInt_FromLong((long) wxBU_NOAUTODRAW));
- PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS));
- PyDict_SetItemString(d,"wxTR_EDIT_LABELS", PyInt_FromLong((long) wxTR_EDIT_LABELS));
- PyDict_SetItemString(d,"wxTR_LINES_AT_ROOT", PyInt_FromLong((long) wxTR_LINES_AT_ROOT));
- PyDict_SetItemString(d,"wxTR_MULTIPLE", PyInt_FromLong((long) wxTR_MULTIPLE));
- PyDict_SetItemString(d,"wxTR_SINGLE", PyInt_FromLong((long) wxTR_SINGLE));
- PyDict_SetItemString(d,"wxTR_HAS_VARIABLE_ROW_HEIGHT", PyInt_FromLong((long) wxTR_HAS_VARIABLE_ROW_HEIGHT));
PyDict_SetItemString(d,"wxSP_VERTICAL", PyInt_FromLong((long) wxSP_VERTICAL));
PyDict_SetItemString(d,"wxSP_HORIZONTAL", PyInt_FromLong((long) wxSP_HORIZONTAL));
PyDict_SetItemString(d,"wxSP_ARROW_KEYS", PyInt_FromLong((long) wxSP_ARROW_KEYS));
PyDict_SetItemString(d,"wxEVT_COMMAND_SPINCTRL_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_SPINCTRL_UPDATED));
PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_UPDATED));
PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_ENTER));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_URL", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_URL));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_MAXLEN", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_MAXLEN));
PyDict_SetItemString(d,"wxEVT_COMMAND_MENU_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_MENU_SELECTED));
PyDict_SetItemString(d,"wxEVT_COMMAND_SLIDER_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_SLIDER_UPDATED));
PyDict_SetItemString(d,"wxEVT_COMMAND_RADIOBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_RADIOBOX_SELECTED));
PyDict_SetItemString(d,"wxEVT_MENU_INIT", PyInt_FromLong((long) wxEVT_MENU_INIT));
PyDict_SetItemString(d,"wxEVT_MENU_HIGHLIGHT", PyInt_FromLong((long) wxEVT_MENU_HIGHLIGHT));
PyDict_SetItemString(d,"wxEVT_POPUP_MENU_INIT", PyInt_FromLong((long) wxEVT_POPUP_MENU_INIT));
- PyDict_SetItemString(d,"wxEVT_CONTEXT_MENU", PyInt_FromLong((long) wxEVT_CONTEXT_MENU));
PyDict_SetItemString(d,"wxEVT_SYS_COLOUR_CHANGED", PyInt_FromLong((long) wxEVT_SYS_COLOUR_CHANGED));
PyDict_SetItemString(d,"wxEVT_SETTING_CHANGED", PyInt_FromLong((long) wxEVT_SETTING_CHANGED));
PyDict_SetItemString(d,"wxEVT_QUERY_NEW_PALETTE", PyInt_FromLong((long) wxEVT_QUERY_NEW_PALETTE));
PyDict_SetItemString(d,"wxEVT_MEASURE_ITEM", PyInt_FromLong((long) wxEVT_MEASURE_ITEM));
PyDict_SetItemString(d,"wxEVT_COMPARE_ITEM", PyInt_FromLong((long) wxEVT_COMPARE_ITEM));
PyDict_SetItemString(d,"wxEVT_INIT_DIALOG", PyInt_FromLong((long) wxEVT_INIT_DIALOG));
- PyDict_SetItemString(d,"wxEVT_HELP", PyInt_FromLong((long) wxEVT_HELP));
- PyDict_SetItemString(d,"wxEVT_DETAILED_HELP", PyInt_FromLong((long) wxEVT_DETAILED_HELP));
PyDict_SetItemString(d,"wxEVT_IDLE", PyInt_FromLong((long) wxEVT_IDLE));
PyDict_SetItemString(d,"wxEVT_UPDATE_UI", PyInt_FromLong((long) wxEVT_UPDATE_UI));
PyDict_SetItemString(d,"wxEVT_COMMAND_LEFT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LEFT_CLICK));
initstreamsc();
initfilesysc();
+
+ PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
+ PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
+ PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER ));
+ PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER ));
+ PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING));
+
+
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
wxFRAME_FLOAT_ON_PARENT = wxc.wxFRAME_FLOAT_ON_PARENT
wxFRAME_NO_WINDOW_MENU = wxc.wxFRAME_NO_WINDOW_MENU
wxFRAME_NO_TASKBAR = wxc.wxFRAME_NO_TASKBAR
-wxFRAME_EX_CONTEXTHELP = wxc.wxFRAME_EX_CONTEXTHELP
wxED_CLIENT_MARGIN = wxc.wxED_CLIENT_MARGIN
wxED_BUTTONS_BOTTOM = wxc.wxED_BUTTONS_BOTTOM
wxED_BUTTONS_RIGHT = wxc.wxED_BUTTONS_RIGHT
wxTE_MULTILINE = wxc.wxTE_MULTILINE
wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL
wxTE_NO_VSCROLL = wxc.wxTE_NO_VSCROLL
+wxTE_AUTO_URL = wxc.wxTE_AUTO_URL
wxCB_SIMPLE = wxc.wxCB_SIMPLE
wxCB_DROPDOWN = wxc.wxCB_DROPDOWN
wxCB_SORT = wxc.wxCB_SORT
wxST_NO_AUTORESIZE = wxc.wxST_NO_AUTORESIZE
wxBU_AUTODRAW = wxc.wxBU_AUTODRAW
wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW
-wxTR_HAS_BUTTONS = wxc.wxTR_HAS_BUTTONS
-wxTR_EDIT_LABELS = wxc.wxTR_EDIT_LABELS
-wxTR_LINES_AT_ROOT = wxc.wxTR_LINES_AT_ROOT
-wxTR_MULTIPLE = wxc.wxTR_MULTIPLE
-wxTR_SINGLE = wxc.wxTR_SINGLE
-wxTR_HAS_VARIABLE_ROW_HEIGHT = wxc.wxTR_HAS_VARIABLE_ROW_HEIGHT
wxSP_VERTICAL = wxc.wxSP_VERTICAL
wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL
wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS
wxEVT_COMMAND_SPINCTRL_UPDATED = wxc.wxEVT_COMMAND_SPINCTRL_UPDATED
wxEVT_COMMAND_TEXT_UPDATED = wxc.wxEVT_COMMAND_TEXT_UPDATED
wxEVT_COMMAND_TEXT_ENTER = wxc.wxEVT_COMMAND_TEXT_ENTER
+wxEVT_COMMAND_TEXT_URL = wxc.wxEVT_COMMAND_TEXT_URL
+wxEVT_COMMAND_TEXT_MAXLEN = wxc.wxEVT_COMMAND_TEXT_MAXLEN
wxEVT_COMMAND_MENU_SELECTED = wxc.wxEVT_COMMAND_MENU_SELECTED
wxEVT_COMMAND_SLIDER_UPDATED = wxc.wxEVT_COMMAND_SLIDER_UPDATED
wxEVT_COMMAND_RADIOBOX_SELECTED = wxc.wxEVT_COMMAND_RADIOBOX_SELECTED
wxEVT_MENU_INIT = wxc.wxEVT_MENU_INIT
wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT
wxEVT_POPUP_MENU_INIT = wxc.wxEVT_POPUP_MENU_INIT
-wxEVT_CONTEXT_MENU = wxc.wxEVT_CONTEXT_MENU
wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED
wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED
wxEVT_QUERY_NEW_PALETTE = wxc.wxEVT_QUERY_NEW_PALETTE
wxEVT_MEASURE_ITEM = wxc.wxEVT_MEASURE_ITEM
wxEVT_COMPARE_ITEM = wxc.wxEVT_COMPARE_ITEM
wxEVT_INIT_DIALOG = wxc.wxEVT_INIT_DIALOG
-wxEVT_HELP = wxc.wxEVT_HELP
-wxEVT_DETAILED_HELP = wxc.wxEVT_DETAILED_HELP
wxEVT_IDLE = wxc.wxEVT_IDLE
wxEVT_UPDATE_UI = wxc.wxEVT_UPDATE_UI
wxEVT_COMMAND_LEFT_CLICK = wxc.wxEVT_COMMAND_LEFT_CLICK
def EVT_TEXT_ENTER(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func)
+def EVT_TEXT_URL(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TEXT_URL, func)
+
+def EVT_TEXT_MAXLEN(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TEXT_MAXLEN, func)
+
def EVT_MENU(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func)
win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func)
-# wxTreeCtrl events
-def EVT_TREE_BEGIN_DRAG(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_DRAG, func)
-
-def EVT_TREE_BEGIN_RDRAG(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func)
-
-def EVT_TREE_END_DRAG(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func)
-
-def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func)
-
-def EVT_TREE_END_LABEL_EDIT(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_END_LABEL_EDIT, func)
-
-def EVT_TREE_GET_INFO(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_GET_INFO, func)
-
-def EVT_TREE_SET_INFO(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_SET_INFO, func)
-
-def EVT_TREE_ITEM_EXPANDED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDED, func)
-
-def EVT_TREE_ITEM_EXPANDING(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDING, func)
-
-def EVT_TREE_ITEM_COLLAPSED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func)
-
-def EVT_TREE_ITEM_COLLAPSING(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func)
-
-def EVT_TREE_SEL_CHANGED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGED, func)
-
-def EVT_TREE_SEL_CHANGING(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGING, func)
-
-def EVT_TREE_KEY_DOWN(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_KEY_DOWN, func)
-
-def EVT_TREE_DELETE_ITEM(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func)
-
-def EVT_TREE_ITEM_ACTIVATED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, func)
-
-def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, func)
-
-def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func)
-
-
# wxSpinButton
def EVT_SPIN_UP(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
-
-
# wxTaskBarIcon
def EVT_TASKBAR_MOVE(win, func):
win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func)
win.Connect(-1, -1, wxEVT_EVT_CALCULATE_LAYOUT, func)
-# wxListCtrl
-def EVT_LIST_BEGIN_DRAG(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_DRAG, func)
-
-def EVT_LIST_BEGIN_RDRAG(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_RDRAG, func)
-
-def EVT_LIST_BEGIN_LABEL_EDIT(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, func)
-
-def EVT_LIST_END_LABEL_EDIT(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_END_LABEL_EDIT, func)
-
-def EVT_LIST_DELETE_ITEM(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ITEM, func)
-
-def EVT_LIST_DELETE_ALL_ITEMS(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, func)
-
-def EVT_LIST_GET_INFO(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_GET_INFO, func)
-
-def EVT_LIST_SET_INFO(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_SET_INFO, func)
-
-def EVT_LIST_ITEM_SELECTED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func)
-
-def EVT_LIST_ITEM_DESELECTED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func)
-
-def EVT_LIST_KEY_DOWN(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_KEY_DOWN, func)
-
-def EVT_LIST_INSERT_ITEM(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_INSERT_ITEM, func)
-
-def EVT_LIST_COL_CLICK(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
-
-def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, func)
-
-def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func)
-
-def EVT_LIST_ITEM_ACTIVATED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func)
-
-
-
-
#wxSplitterWindow
def EVT_SPLITTER_SASH_POS_CHANGING(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, func)
win.Connect(id, -1, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, func)
+
+# Help events
+def EVT_HELP(win, id, func):
+ win.Connect(id, -1, wxEVT_HELP, func)
+
+def EVT_HELP_RANGE(win, id, id2, func):
+ win.Connect(id, id2, wxEVT_HELP, func)
+
+def EVT_DETAILED_HELP(win, id, func):
+ win.Connect(id, -1, wxEVT_DETAILED_HELP, func)
+
+def EVT_DETAILED_HELP_RANGE(win, id, id2, func):
+ win.Connect(id, id2, wxEVT_DETAILED_HELP, func)
+
+def EVT_CONTEXT_MENU(win, func):
+ win.Connect(-1, -1, wxEVT_CONTEXT_MENU, func)
+
+
#----------------------------------------------------------------------
class wxTimer(wxPyTimer):
wxPyDefaultPosition = wxDefaultPosition
wxPyDefaultSize = wxDefaultSize
+
+#----------------------------------------------------------------------
+# wxGTK sets the locale when initialized. Doing this at the Python
+# level should set it up to match what GTK is doing at the C level.
+try:
+ import locale
+ locale.setlocale(locale.LC_ALL, "")
+except:
+ pass
+
+
+
+#----------------------------------------------------------------------
+# wxWindows version numbers. wxPython version is in __version__.
+
+wxMAJOR_VERSION = wxc.wxMAJOR_VERSION
+wxMINOR_VERSION = wxc.wxMINOR_VERSION
+wxRELEASE_NUMBER = wxc.wxRELEASE_NUMBER
+wxVERSION_STRING = wxc.wxVERSION_STRING
+wxVERSION_NUMBER = wxc.wxVERSION_NUMBER
+
+wxVERSION = (wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
+
+
#----------------------------------------------------------------------
# This helper function will take a wxPython object and convert it to
# another wxPython object type. This will not be able to create objects
#define IMP_PYCALLBACK_BOOL_INTINT(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a, int b) { \
- bool rval, found; \
+ bool rval=FALSE, found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \
#define IMP_PYCALLBACK_BOOL_INT(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a) { \
- bool rval, found; \
+ bool rval=FALSE, found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
- rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \
+ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\
wxPyEndBlockThreads(state); \
if (! found) \
rval = PCLASS::CBNAME(a); \
#define IMP_PYCALLBACK_BOOL_INT_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a) { \
- bool rval; \
+ bool rval=FALSE; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \
bool CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
- bool rval; \
+ bool rval=FALSE; \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* obj = wxPyMake_wxObject(&a); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f));\
#define IMP_PYCALLBACK_BOOL_STRING(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a) { \
- bool rval; \
+ bool rval=FALSE; \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
\
#define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a) { \
- bool rval; \
+ bool rval=FALSE; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(s)", a.c_str())); \
#define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a, const wxString& b) { \
- bool rval; \
+ bool rval=FALSE; \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
#define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxHtmlTag& a) { \
- bool rval = FALSE; \
+ bool rval=FALSE; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* obj = wxPyConstructObject((void*)&a, "wxHtmlTag", 0); \
#define IMP_PYCALLBACK_BOOL_WXWIN(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxWindow* a) { \
- bool rval; \
+ bool rval=FALSE; \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
#define IMP_PYCALLBACK_BOOL_(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME() { \
- bool rval; \
+ bool rval=FALSE; \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
#define IMP_PYCALLBACK_DR_2WXCDR(CLASS, PCLASS, CBNAME) \
wxDragResult CLASS::CBNAME(wxCoord a, wxCoord b, wxDragResult c) { \
+ int rval=0; \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
- int rval; \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c));\
wxPyEndBlockThreads(state); \
#define IMP_PYCALLBACK_BOOL_DR(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxDragResult a) { \
+ bool rval=FALSE; \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
- bool rval; \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a));\
wxPyEndBlockThreads(state); \
#define IMP_PYCALLBACK_DR_2WXCDR_pure(CLASS, PCLASS, CBNAME) \
wxDragResult CLASS::CBNAME(wxCoord a, wxCoord b, wxDragResult c) { \
wxPyTState* state = wxPyBeginBlockThreads(); \
- int rval; \
+ int rval=0; \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c));\
wxPyEndBlockThreads(state); \
#define IMP_PYCALLBACK_BOOL_INTINTSTR_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a, int b, const wxString& c) { \
- bool rval; \
+ bool rval=FALSE; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str()));\
#define IMP_PYCALLBACK_SIZET_(CLASS, PCLASS, CBNAME) \
size_t CLASS::CBNAME() { \
- size_t rval; \
+ size_t rval=0; \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
#define IMP_PYCALLBACK_DATAFMT_SIZET(CLASS, PCLASS, CBNAME) \
wxDataFormat CLASS::CBNAME(size_t a) { \
- wxDataFormat rval; \
+ wxDataFormat rval=0; \
bool found; \
wxPyTState* state = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
{
public:
wxWave(const wxString& fileName, bool isResource = FALSE) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
wxWave(int size, const wxByte* data) {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
}
~wxWave() {}