wxUSE_DEBUG_NEW_ALWAYS 0
wxUSE_CMDLINE_PARSER 0
wxUSE_DIALUP_MANAGER 0
+ wxUSE_DYNAMIC_LOADER 0
wxUSE_TREELAYOUT 0
wxUSE_POSTSCRIPT 1
return _resultobj;
}
-static PyObject *_wrap_wxXmlResource_GetXMLID(PyObject *self, PyObject *args, PyObject *kwargs) {
+static PyObject *_wrap_wxXmlResource_GetXRCID(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
char * _arg0;
char *_kwnames[] = { "str_id", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXMLID",_kwnames,&_arg0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXRCID",_kwnames,&_arg0))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (int )wxXmlResource::GetXMLID(_arg0);
+ _result = (int )wxXmlResource::GetXRCID(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
{ "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_CompareVersion", (PyCFunction) _wrap_wxXmlResource_CompareVersion, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_GetVersion", (PyCFunction) _wrap_wxXmlResource_GetVersion, METH_VARARGS | METH_KEYWORDS },
- { "wxXmlResource_GetXMLID", (PyCFunction) _wrap_wxXmlResource_GetXMLID, METH_VARARGS | METH_KEYWORDS },
+ { "wxXmlResource_GetXRCID", (PyCFunction) _wrap_wxXmlResource_GetXRCID, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_AttachUnknownControl", (PyCFunction) _wrap_wxXmlResource_AttachUnknownControl, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadIcon", (PyCFunction) _wrap_wxXmlResource_LoadIcon, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadBitmap", (PyCFunction) _wrap_wxXmlResource_LoadBitmap, METH_VARARGS | METH_KEYWORDS },
// Returns numeric ID that is equivalent to string id used in XML
// resource. To be used in event tables
// Macro XMLID is provided for convenience
- static int GetXMLID(const char *str_id);
+ static int GetXRCID(const char *str_id);
// Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
long GetVersion() const;
//----------------------------------------------------------------------
%pragma(python) code = "
-def XMLID(str_id):
- return wxXmlResource_GetXMLID(str_id)
+def XRCID(str_id):
+ return wxXmlResource_GetXRCID(str_id)
-def XMLCTRL(window, str_id, *args):
- return window.FindWindowById(XMLID(str_id))
+def XRCCTRL(window, str_id, *ignoreargs):
+ return window.FindWindowById(XRCID(str_id))
+XMLID = XRCID
+XMLCTRL = XRCCTRL
"
//----------------------------------------------------------------------
from filesys import *
-def XMLID(str_id):
- return wxXmlResource_GetXMLID(str_id)
+def XRCID(str_id):
+ return wxXmlResource_GetXRCID(str_id)
-def XMLCTRL(window, str_id, *args):
- return window.FindWindowById(XMLID(str_id))
+def XRCCTRL(window, str_id, *ignoreargs):
+ return window.FindWindowById(XRCID(str_id))
+XMLID = XRCID
+XMLCTRL = XRCCTRL
class wxXmlResourcePtr(wxObjectPtr):
def __init__(self,this):
#-------------- FUNCTION WRAPPERS ------------------
-wxXmlResource_GetXMLID = xrcc.wxXmlResource_GetXMLID
+wxXmlResource_GetXRCID = xrcc.wxXmlResource_GetXRCID
def wxXmlResource_Get(*_args, **_kwargs):
val = apply(xrcc.wxXmlResource_Get,_args,_kwargs)
list.sort()
- wxStaticText(self, -1, "Face names:", wxPoint(15, 50), wxSize(65, 18))
- self.lb1 = wxListBox(self, 60, wxPoint(80, 50), wxSize(200, 250),
+ wxStaticText(self, -1, "Face names:", (15, 50), (65, 18))
+ self.lb1 = wxListBox(self, -1, (80, 50), (200, 250),
list, wxLB_SINGLE)
+ EVT_LISTBOX(self, self.lb1.GetId(), self.OnSelect)
+
+ self.txt = wxStaticText(self, -1, "Sample text...", (285, 50))
+
self.lb1.SetSelection(0)
+ def OnSelect(self, evt):
+ face = self.lb1.GetStringSelection()
+ font = wxFont(28, wxDEFAULT, wxNORMAL, wxNORMAL, false, face)
+ self.txt.SetFont(font)
+ self.txt.SetSize(self.txt.GetBestSize())
+
+
#----------------------------------------------------------------------
self.log = log
txt1 = wxStaticText(self, -1, "style=0")
- dir1 = wxGenericDirCtrl(self, -1, size=(200,250), style=0)
+ dir1 = wxGenericDirCtrl(self, -1, size=(200,225), style=0)
txt2 = wxStaticText(self, -1, "wxDIRCTRL_DIR_ONLY")
- dir2 = wxGenericDirCtrl(self, -1, size=(200,250), style=wxDIRCTRL_DIR_ONLY)
+ dir2 = wxGenericDirCtrl(self, -1, size=(200,225), style=wxDIRCTRL_DIR_ONLY)
txt3 = wxStaticText(self, -1, "wxDIRCTRL_SHOW_FILTERS")
- dir3 = wxGenericDirCtrl(self, -1, size=(200,250), style=wxDIRCTRL_SHOW_FILTERS,
+ dir3 = wxGenericDirCtrl(self, -1, size=(200,225), style=wxDIRCTRL_SHOW_FILTERS,
filter="All files (*.*)|*.*|Python files (*.py)|*.py")
sz = wxFlexGridSizer(cols=3, hgap=5, vgap=5)
wxLI_HORIZONTAL,
wxLI_VERTICAL,
- wxHW_SCROLLBAR_NEVER,
- wxHW_SCROLLBAR_AUTO,
-
wxJOYSTICK1,
wxJOYSTICK2,
wxJOY_BUTTON1,
};
+enum {
+ wxHW_SCROLLBAR_NEVER,
+ wxHW_SCROLLBAR_AUTO,
+};
+
+
+// enums for wxHtmlWindow::OnOpeningURL
+enum wxHtmlOpeningStatus
+{
+ wxHTML_OPEN,
+ wxHTML_BLOCK,
+ wxHTML_REDIRECT
+};
+
+enum wxHtmlURLType
+{
+ wxHTML_URL_PAGE,
+ wxHTML_URL_IMAGE,
+ wxHTML_URL_OTHER
+};
+
//---------------------------------------------------------------------------
class wxHtmlLinkInfo : public wxObject {
void PushTagHandler(wxHtmlTagHandler* handler, wxString tags);
void PopTagHandler();
- // Returns TRUE if the parser is allowed to open given URL (may be forbidden
- // for security reasons)
- virtual bool CanOpenURL(const wxString& url) const { return TRUE; }
+ // virtual wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const;
// void AddText(const char* txt) = 0;
// void AddTag(const wxHtmlTag& tag);
void OnLinkClicked(const wxHtmlLinkInfo& link);
void base_OnLinkClicked(const wxHtmlLinkInfo& link);
+ wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,
+ const wxString& url,
+ wxString *redirect) const;
+
DEC_PYCALLBACK__STRING(OnSetTitle);
DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover);
DEC_PYCALLBACK__CELLINTINTME(OnCellClicked);
- DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL);
+// DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL);
PYPRIVATE;
};
IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle);
IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover);
IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked);
-IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL);
+// IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL);
void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
wxHtmlWindow::OnLinkClicked(link);
}
+
+wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type,
+ const wxString& url,
+ wxString *redirect) const {
+ bool found;
+ wxHtmlOpeningStatus rval;
+ wxPyBeginBlockThreads();
+ if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) {
+ PyObject* ro;
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(is)", type, url.c_str()));
+ if (PyString_Check(ro)
+#if PYTHON_API_VERSION >= 1009
+ || PyUnicode_Check(ro)
+#endif
+ ) {
+ PyObject* str = PyObject_Str(ro);
+ *redirect = PyString_AsString(str);
+ Py_DECREF(str);
+ rval = wxHTML_REDIRECT;
+ }
+ else {
+ PyObject* num = PyNumber_Int(ro);
+ rval = (wxHtmlOpeningStatus)PyInt_AsLong(num);
+ Py_DECREF(num);
+ }
+ Py_DECREF(ro);
+ }
+ wxPyEndBlockThreads();
+ if (! found)
+ rval = wxHtmlWindow::OnOpeningURL(type, url, redirect);
+ return rval;
+}
+
+
%}
wxString wxGetUserId();
wxString wxGetUserName();
wxString wxGetHomeDir();
-
+wxString wxGetUserHome(const char* user = "");
//----------------------------------------------------------------------
{
wxSYS_COLOUR_SCROLLBAR,
wxSYS_COLOUR_BACKGROUND,
+ wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND,
wxSYS_COLOUR_ACTIVECAPTION,
wxSYS_COLOUR_INACTIVECAPTION,
wxSYS_COLOUR_MENU,
wxSYS_COLOUR_HIGHLIGHT,
wxSYS_COLOUR_HIGHLIGHTTEXT,
wxSYS_COLOUR_BTNFACE,
+ wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
wxSYS_COLOUR_BTNSHADOW,
+ wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
wxSYS_COLOUR_GRAYTEXT,
wxSYS_COLOUR_BTNTEXT,
wxSYS_COLOUR_INACTIVECAPTIONTEXT,
wxSYS_COLOUR_BTNHIGHLIGHT,
+ wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
+ wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
+ wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
wxSYS_COLOUR_3DDKSHADOW,
wxSYS_COLOUR_3DLIGHT,
wxSYS_COLOUR_INFOTEXT,
wxSYS_COLOUR_INFOBK,
wxSYS_COLOUR_LISTBOX,
+ wxSYS_COLOUR_HOTLIGHT,
+ wxSYS_COLOUR_GRADIENTACTIVECAPTION,
+ wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
+ wxSYS_COLOUR_MENUHILIGHT,
+ wxSYS_COLOUR_MENUBAR,
- wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND,
- wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
- wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
- wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
- wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
- wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT
+ wxSYS_COLOUR_MAX
};
// possible values for wxSystemSettings::GetMetric() parameter
void OnLinkClicked(const wxHtmlLinkInfo& link);
void base_OnLinkClicked(const wxHtmlLinkInfo& link);
+ wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,
+ const wxString& url,
+ wxString *redirect) const;
+
DEC_PYCALLBACK__STRING(OnSetTitle);
DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover);
DEC_PYCALLBACK__CELLINTINTME(OnCellClicked);
- DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL);
+// DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL);
PYPRIVATE;
};
IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle);
IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover);
IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked);
-IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL);
+// IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL);
void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
}
+wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type,
+ const wxString& url,
+ wxString *redirect) const {
+ bool found;
+ wxHtmlOpeningStatus rval;
+ wxPyBeginBlockThreads();
+ if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) {
+ PyObject* ro;
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(is)", type, url.c_str()));
+ if (PyString_Check(ro)
+#if PYTHON_API_VERSION >= 1009
+ || PyUnicode_Check(ro)
+#endif
+ ) {
+ PyObject* str = PyObject_Str(ro);
+ *redirect = PyString_AsString(str);
+ Py_DECREF(str);
+ rval = wxHTML_REDIRECT;
+ }
+ else {
+ PyObject* num = PyNumber_Int(ro);
+ rval = (wxHtmlOpeningStatus)PyInt_AsLong(num);
+ Py_DECREF(num);
+ }
+ Py_DECREF(ro);
+ }
+ wxPyEndBlockThreads();
+ if (! found)
+ rval = wxHtmlWindow::OnOpeningURL(type, url, redirect);
+ return rval;
+}
+
+
+
void wxHtmlWindow_AddFilter(wxHtmlFilter *filter) {
wxHtmlWindow::AddFilter(filter);
}
return _resultobj;
}
-#define wxHtmlParser_CanOpenURL(_swigobj,_swigarg0) (_swigobj->CanOpenURL(_swigarg0))
-static PyObject *_wrap_wxHtmlParser_CanOpenURL(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- bool _result;
- wxHtmlParser * _arg0;
- wxString * _arg1;
- PyObject * _argo0 = 0;
- PyObject * _obj1 = 0;
- char *_kwnames[] = { "self","url", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlParser_CanOpenURL",_kwnames,&_argo0,&_obj1))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_CanOpenURL. Expected _wxHtmlParser_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
-}
-{
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (bool )wxHtmlParser_CanOpenURL(_arg0,*_arg1);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) return NULL;
-} _resultobj = Py_BuildValue("i",_result);
-{
- if (_obj1)
- delete _arg1;
-}
- return _resultobj;
-}
-
static void *SwigwxHtmlWinParserTowxHtmlParser(void *ptr) {
wxHtmlWinParser *src;
wxHtmlParser *dest;
int _arg1 = (int ) -1;
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
- int _arg4 = (int ) wxHW_SCROLLBAR_AUTO;
+ int _arg4 = (int ) (wxHW_SCROLLBAR_AUTO);
char * _arg5 = (char *) "htmlWindow";
PyObject * _argo0 = 0;
wxPoint temp;
int _arg2 = (int ) -1;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
- int _arg5 = (int ) wxHW_SCROLLBAR_AUTO;
+ int _arg5 = (int ) (wxHW_SCROLLBAR_AUTO);
char * _arg6 = (char *) "htmlWindow";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
{ "wxHtmlWinParser_GetDC", (PyCFunction) _wrap_wxHtmlWinParser_GetDC, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlWinParser_SetDC", (PyCFunction) _wrap_wxHtmlWinParser_SetDC, METH_VARARGS | METH_KEYWORDS },
{ "new_wxHtmlWinParser", (PyCFunction) _wrap_new_wxHtmlWinParser, METH_VARARGS | METH_KEYWORDS },
- { "wxHtmlParser_CanOpenURL", (PyCFunction) _wrap_wxHtmlParser_CanOpenURL, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlParser_PopTagHandler", (PyCFunction) _wrap_wxHtmlParser_PopTagHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlParser_PushTagHandler", (PyCFunction) _wrap_wxHtmlParser_PushTagHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlParser_GetSource", (PyCFunction) _wrap_wxHtmlParser_GetSource, METH_VARARGS | METH_KEYWORDS },
PyDict_SetItemString(d,"wxHTML_COND_ISANCHOR", PyInt_FromLong((long) wxHTML_COND_ISANCHOR));
PyDict_SetItemString(d,"wxHTML_COND_ISIMAGEMAP", PyInt_FromLong((long) wxHTML_COND_ISIMAGEMAP));
PyDict_SetItemString(d,"wxHTML_COND_USER", PyInt_FromLong((long) wxHTML_COND_USER));
+ PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER));
+ PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO));
+ PyDict_SetItemString(d,"wxHTML_OPEN", PyInt_FromLong((long) wxHTML_OPEN));
+ PyDict_SetItemString(d,"wxHTML_BLOCK", PyInt_FromLong((long) wxHTML_BLOCK));
+ PyDict_SetItemString(d,"wxHTML_REDIRECT", PyInt_FromLong((long) wxHTML_REDIRECT));
+ PyDict_SetItemString(d,"wxHTML_URL_PAGE", PyInt_FromLong((long) wxHTML_URL_PAGE));
+ PyDict_SetItemString(d,"wxHTML_URL_IMAGE", PyInt_FromLong((long) wxHTML_URL_IMAGE));
+ PyDict_SetItemString(d,"wxHTML_URL_OTHER", PyInt_FromLong((long) wxHTML_URL_OTHER));
PyDict_SetItemString(d,"wxPAGE_ODD", PyInt_FromLong((long) wxPAGE_ODD));
PyDict_SetItemString(d,"wxPAGE_EVEN", PyInt_FromLong((long) wxPAGE_EVEN));
PyDict_SetItemString(d,"wxPAGE_ALL", PyInt_FromLong((long) wxPAGE_ALL));
def PopTagHandler(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlParser_PopTagHandler,(self,) + _args, _kwargs)
return val
- def CanOpenURL(self, *_args, **_kwargs):
- val = apply(htmlc.wxHtmlParser_CanOpenURL,(self,) + _args, _kwargs)
- return val
def __repr__(self):
return "<C wxHtmlParser instance at %s>" % (self.this,)
class wxHtmlParser(wxHtmlParserPtr):
wxHTML_COND_ISANCHOR = htmlc.wxHTML_COND_ISANCHOR
wxHTML_COND_ISIMAGEMAP = htmlc.wxHTML_COND_ISIMAGEMAP
wxHTML_COND_USER = htmlc.wxHTML_COND_USER
+wxHW_SCROLLBAR_NEVER = htmlc.wxHW_SCROLLBAR_NEVER
+wxHW_SCROLLBAR_AUTO = htmlc.wxHW_SCROLLBAR_AUTO
+wxHTML_OPEN = htmlc.wxHTML_OPEN
+wxHTML_BLOCK = htmlc.wxHTML_BLOCK
+wxHTML_REDIRECT = htmlc.wxHTML_REDIRECT
+wxHTML_URL_PAGE = htmlc.wxHTML_URL_PAGE
+wxHTML_URL_IMAGE = htmlc.wxHTML_URL_IMAGE
+wxHTML_URL_OTHER = htmlc.wxHTML_URL_OTHER
wxPAGE_ODD = htmlc.wxPAGE_ODD
wxPAGE_EVEN = htmlc.wxPAGE_EVEN
wxPAGE_ALL = htmlc.wxPAGE_ALL
return _resultobj;
}
+static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxString * _result;
+ char * _arg0 = (char *) "";
+ char *_kwnames[] = { "user", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:wxGetUserHome",_kwnames,&_arg0))
+ return NULL;
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = new wxString (wxGetUserHome(_arg0));
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+ delete _result;
+}
+ return _resultobj;
+}
+
static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxAcceleratorEntry * _result;
{ "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS },
{ "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS },
{ "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS },
+ { "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS },
{ "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS },
{ "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS },
{ "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS },
wxGetHomeDir = miscc.wxGetHomeDir
+wxGetUserHome = miscc.wxGetUserHome
+
def wxGetAccelFromString(*_args, **_kwargs):
val = apply(miscc.wxGetAccelFromString,_args,_kwargs)
if val: val = wxAcceleratorEntryPtr(val)
PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT));
PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR));
PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP));
PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION));
PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION));
PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU));
PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT));
PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW));
PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT));
PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW));
PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT));
PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK));
PyDict_SetItemString(d,"wxSYS_COLOUR_LISTBOX", PyInt_FromLong((long) wxSYS_COLOUR_LISTBOX));
- PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP));
- PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE));
- PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW));
- PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT));
- PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT));
- PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_HOTLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HOTLIGHT));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_GRADIENTACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_GRADIENTACTIVECAPTION));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_GRADIENTINACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_GRADIENTINACTIVECAPTION));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_MENUHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_MENUHILIGHT));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_MENUBAR", PyInt_FromLong((long) wxSYS_COLOUR_MENUBAR));
+ PyDict_SetItemString(d,"wxSYS_COLOUR_MAX", PyInt_FromLong((long) wxSYS_COLOUR_MAX));
PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS));
PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X));
PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y));
wxSYS_DEFAULT_GUI_FONT = misc2c.wxSYS_DEFAULT_GUI_FONT
wxSYS_COLOUR_SCROLLBAR = misc2c.wxSYS_COLOUR_SCROLLBAR
wxSYS_COLOUR_BACKGROUND = misc2c.wxSYS_COLOUR_BACKGROUND
+wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP
wxSYS_COLOUR_ACTIVECAPTION = misc2c.wxSYS_COLOUR_ACTIVECAPTION
wxSYS_COLOUR_INACTIVECAPTION = misc2c.wxSYS_COLOUR_INACTIVECAPTION
wxSYS_COLOUR_MENU = misc2c.wxSYS_COLOUR_MENU
wxSYS_COLOUR_HIGHLIGHT = misc2c.wxSYS_COLOUR_HIGHLIGHT
wxSYS_COLOUR_HIGHLIGHTTEXT = misc2c.wxSYS_COLOUR_HIGHLIGHTTEXT
wxSYS_COLOUR_BTNFACE = misc2c.wxSYS_COLOUR_BTNFACE
+wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE
wxSYS_COLOUR_BTNSHADOW = misc2c.wxSYS_COLOUR_BTNSHADOW
+wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW
wxSYS_COLOUR_GRAYTEXT = misc2c.wxSYS_COLOUR_GRAYTEXT
wxSYS_COLOUR_BTNTEXT = misc2c.wxSYS_COLOUR_BTNTEXT
wxSYS_COLOUR_INACTIVECAPTIONTEXT = misc2c.wxSYS_COLOUR_INACTIVECAPTIONTEXT
wxSYS_COLOUR_BTNHIGHLIGHT = misc2c.wxSYS_COLOUR_BTNHIGHLIGHT
+wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT
+wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT
+wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT
wxSYS_COLOUR_3DDKSHADOW = misc2c.wxSYS_COLOUR_3DDKSHADOW
wxSYS_COLOUR_3DLIGHT = misc2c.wxSYS_COLOUR_3DLIGHT
wxSYS_COLOUR_INFOTEXT = misc2c.wxSYS_COLOUR_INFOTEXT
wxSYS_COLOUR_INFOBK = misc2c.wxSYS_COLOUR_INFOBK
wxSYS_COLOUR_LISTBOX = misc2c.wxSYS_COLOUR_LISTBOX
-wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP
-wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE
-wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW
-wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT
-wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT
-wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT
+wxSYS_COLOUR_HOTLIGHT = misc2c.wxSYS_COLOUR_HOTLIGHT
+wxSYS_COLOUR_GRADIENTACTIVECAPTION = misc2c.wxSYS_COLOUR_GRADIENTACTIVECAPTION
+wxSYS_COLOUR_GRADIENTINACTIVECAPTION = misc2c.wxSYS_COLOUR_GRADIENTINACTIVECAPTION
+wxSYS_COLOUR_MENUHILIGHT = misc2c.wxSYS_COLOUR_MENUHILIGHT
+wxSYS_COLOUR_MENUBAR = misc2c.wxSYS_COLOUR_MENUBAR
+wxSYS_COLOUR_MAX = misc2c.wxSYS_COLOUR_MAX
wxSYS_MOUSE_BUTTONS = misc2c.wxSYS_MOUSE_BUTTONS
wxSYS_BORDER_X = misc2c.wxSYS_BORDER_X
wxSYS_BORDER_Y = misc2c.wxSYS_BORDER_Y
return _resultobj;
}
+#define wxWindow_RemoveEventHandler(_swigobj,_swigarg0) (_swigobj->RemoveEventHandler(_swigarg0))
+static PyObject *_wrap_wxWindow_RemoveEventHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxWindow * _arg0;
+ wxEvtHandler * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","handler", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_RemoveEventHandler",_kwnames,&_argo0,&_argo1))
+ 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 wxWindow_RemoveEventHandler. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvtHandler_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_RemoveEventHandler. Expected _wxEvtHandler_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (bool )wxWindow_RemoveEventHandler(_arg0,_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
#define wxWindow_PopupMenuXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_wxWindow_PopupMenuXY(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxWindow_Raise", (PyCFunction) _wrap_wxWindow_Raise, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PopupMenu", (PyCFunction) _wrap_wxWindow_PopupMenu, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PopupMenuXY", (PyCFunction) _wrap_wxWindow_PopupMenuXY, METH_VARARGS | METH_KEYWORDS },
+ { "wxWindow_RemoveEventHandler", (PyCFunction) _wrap_wxWindow_RemoveEventHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PushEventHandler", (PyCFunction) _wrap_wxWindow_PushEventHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PopEventHandler", (PyCFunction) _wrap_wxWindow_PopEventHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Move", (PyCFunction) _wrap_wxWindow_Move, METH_VARARGS | METH_KEYWORDS },
def PushEventHandler(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_PushEventHandler,(self,) + _args, _kwargs)
return val
+ def RemoveEventHandler(self, *_args, **_kwargs):
+ val = apply(windowsc.wxWindow_RemoveEventHandler,(self,) + _args, _kwargs)
+ return val
def PopupMenuXY(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_PopupMenuXY,(self,) + _args, _kwargs)
return val
PyDict_SetItemString(d,"wxNB_MULTILINE", PyInt_FromLong((long) wxNB_MULTILINE));
PyDict_SetItemString(d,"wxLI_HORIZONTAL", PyInt_FromLong((long) wxLI_HORIZONTAL));
PyDict_SetItemString(d,"wxLI_VERTICAL", PyInt_FromLong((long) wxLI_VERTICAL));
- PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER));
- PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO));
PyDict_SetItemString(d,"wxJOYSTICK1", PyInt_FromLong((long) wxJOYSTICK1));
PyDict_SetItemString(d,"wxJOYSTICK2", PyInt_FromLong((long) wxJOYSTICK2));
PyDict_SetItemString(d,"wxJOY_BUTTON1", PyInt_FromLong((long) wxJOY_BUTTON1));
wxNB_MULTILINE = wxc.wxNB_MULTILINE
wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL
wxLI_VERTICAL = wxc.wxLI_VERTICAL
-wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER
-wxHW_SCROLLBAR_AUTO = wxc.wxHW_SCROLLBAR_AUTO
wxJOYSTICK1 = wxc.wxJOYSTICK1
wxJOYSTICK2 = wxc.wxJOYSTICK2
wxJOY_BUTTON1 = wxc.wxJOY_BUTTON1
wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE);
void PushEventHandler(wxEvtHandler* handler);
+ // find the given handler in the event handler chain and remove (but
+ // not delete) it from the event handler chain, return TRUE if it was
+ // found and FALSE otherwise (this also results in an assert failure so
+ // this function should only be called when the handler is supposed to
+ // be there)
+ bool RemoveEventHandler(wxEvtHandler *handler);
+
%name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y);
bool PopupMenu(wxMenu *menu, const wxPoint& pos);