Changes to match recent CVS updates, added demo for wxGenericDirCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1811af8709
commit
ce914f7319
@ -8,6 +8,7 @@ Added wxSplashScreen.
|
||||
|
||||
Added wxGenericDirCtrl.
|
||||
|
||||
Added wxMultiChoiceDialog.
|
||||
|
||||
|
||||
|
||||
|
4
wxPython/contrib/xrc/_xrcextras.py
Normal file
4
wxPython/contrib/xrc/_xrcextras.py
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
# The global was removed in favor of static accessor functions. This is for
|
||||
# backwards compatibility:
|
||||
wxTheXmlResource = wxXmlResource_Get()
|
@ -93,21 +93,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static int _wrap_wxTheXmlResource_set(PyObject *val) {
|
||||
|
||||
PyErr_SetString(PyExc_TypeError,"Variable wxTheXmlResource is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxTheXmlResource_get() {
|
||||
PyObject * pyobj;
|
||||
char ptemp[128];
|
||||
|
||||
SWIG_MakePtr(ptemp, (char *) wxTheXmlResource,"_wxXmlResource_p");
|
||||
pyobj = PyString_FromString(ptemp);
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
static void *SwigwxXmlResourceTowxObject(void *ptr) {
|
||||
wxXmlResource *src;
|
||||
wxObject *dest;
|
||||
@ -1140,7 +1125,68 @@ static PyObject *_wrap_wxXmlResource_CompareVersion(PyObject *self, PyObject *ar
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxXmlResource_Get(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxXmlResource * _result;
|
||||
char *_kwnames[] = { NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxXmlResource_Get",_kwnames))
|
||||
return NULL;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxXmlResource *)wxXmlResource::Get();
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlResource_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxXmlResource_Set(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxXmlResource * _result;
|
||||
wxXmlResource * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "res", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_Set",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_Set. Expected _wxXmlResource_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxXmlResource *)wxXmlResource::Set(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlResource_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyMethodDef xrccMethods[] = {
|
||||
{ "wxXmlResource_Set", (PyCFunction) _wrap_wxXmlResource_Set, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "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 },
|
||||
@ -1285,8 +1331,6 @@ SWIGEXPORT(void) initxrcc() {
|
||||
d = PyModule_GetDict(m);
|
||||
PyDict_SetItemString(d,"wxXRC_USE_LOCALE", PyInt_FromLong((long) wxXRC_USE_LOCALE));
|
||||
PyDict_SetItemString(d,"wxXRC_NO_SUBCLASSING", PyInt_FromLong((long) wxXRC_NO_SUBCLASSING));
|
||||
PyDict_SetItemString(d,"cvar", SWIG_globals);
|
||||
SWIG_addvarlink(SWIG_globals,"wxTheXmlResource",_wrap_wxTheXmlResource_get, _wrap_wxTheXmlResource_set);
|
||||
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
@ -1294,7 +1338,7 @@ SWIGEXPORT(void) initxrcc() {
|
||||
|
||||
wxXmlInitXmlModule();
|
||||
wxXmlInitResourceModule();
|
||||
wxTheXmlResource->InitAllHandlers();
|
||||
wxXmlResource::Get()->InitAllHandlers();
|
||||
|
||||
{
|
||||
int i;
|
||||
|
@ -131,17 +131,16 @@ public:
|
||||
// is less than the argument, +1 if greater and 0 if they equal.
|
||||
int CompareVersion(int major, int minor, int release, int revision) const;
|
||||
|
||||
|
||||
// Gets global resources object or create one if none exists
|
||||
static wxXmlResource *Get();
|
||||
// Sets global resources object and returns pointer to previous one (may be NULL).
|
||||
static wxXmlResource *Set(wxXmlResource *res);
|
||||
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%readonly
|
||||
// Global instance of resource class. For your convenience.
|
||||
wxXmlResource *wxTheXmlResource;
|
||||
%readwrite
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%pragma(python) code = "
|
||||
def XMLID(str_id):
|
||||
return wxXmlResource_GetXMLID(str_id)
|
||||
@ -153,7 +152,7 @@ def XMLCTRL(window, str_id, *args):
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// TODO: Add wxXmlResourceHandler and etc.
|
||||
// TODO: Add wxXmlResourceHandler and allow it to be derived from.
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@ -164,8 +163,14 @@ def XMLCTRL(window, str_id, *args):
|
||||
|
||||
wxXmlInitXmlModule();
|
||||
wxXmlInitResourceModule();
|
||||
wxTheXmlResource->InitAllHandlers();
|
||||
wxXmlResource::Get()->InitAllHandlers();
|
||||
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
// This file gets appended to the shadow class file.
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%pragma(python) include="_xrcextras.py";
|
||||
|
||||
|
||||
|
@ -131,11 +131,27 @@ def wxXmlResource(*_args,**_kwargs):
|
||||
|
||||
wxXmlResource_GetXMLID = xrcc.wxXmlResource_GetXMLID
|
||||
|
||||
def wxXmlResource_Get(*_args, **_kwargs):
|
||||
val = apply(xrcc.wxXmlResource_Get,_args,_kwargs)
|
||||
if val: val = wxXmlResourcePtr(val)
|
||||
return val
|
||||
|
||||
def wxXmlResource_Set(*_args, **_kwargs):
|
||||
val = apply(xrcc.wxXmlResource_Set,_args,_kwargs)
|
||||
if val: val = wxXmlResourcePtr(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
wxXRC_USE_LOCALE = xrcc.wxXRC_USE_LOCALE
|
||||
wxXRC_NO_SUBCLASSING = xrcc.wxXRC_NO_SUBCLASSING
|
||||
cvar = xrcc.cvar
|
||||
wxTheXmlResource = wxXmlResourcePtr(xrcc.cvar.wxTheXmlResource)
|
||||
|
||||
|
||||
#-------------- USER INCLUDE -----------------------
|
||||
|
||||
|
||||
# The global was removed in favor of static accessor functions. This is for
|
||||
# backwards compatibility:
|
||||
wxTheXmlResource = wxXmlResource_Get()
|
||||
|
59
wxPython/demo/wxGenericDirCtrl.py
Normal file
59
wxPython/demo/wxGenericDirCtrl.py
Normal file
@ -0,0 +1,59 @@
|
||||
from wxPython.wx import *
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class TestPanel(wxPanel):
|
||||
def __init__(self, parent, log):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.log = log
|
||||
|
||||
txt1 = wxStaticText(self, -1, "style=0")
|
||||
dir1 = wxGenericDirCtrl(self, -1, size=(200,250), style=0)
|
||||
|
||||
txt2 = wxStaticText(self, -1, "wxDIRCTRL_DIR_ONLY")
|
||||
dir2 = wxGenericDirCtrl(self, -1, size=(200,250), style=wxDIRCTRL_DIR_ONLY)
|
||||
|
||||
txt3 = wxStaticText(self, -1, "wxDIRCTRL_SHOW_FILTERS")
|
||||
dir3 = wxGenericDirCtrl(self, -1, size=(200,250), style=wxDIRCTRL_SHOW_FILTERS,
|
||||
filter="All files (*.*)|*.*|Python files (*.py)|*.py")
|
||||
|
||||
sz = wxFlexGridSizer(cols=3, hgap=5, vgap=5)
|
||||
sz.Add(35, 35) # some space above
|
||||
sz.Add(35, 35)
|
||||
sz.Add(35, 35)
|
||||
|
||||
sz.Add(txt1)
|
||||
sz.Add(txt2)
|
||||
sz.Add(txt3)
|
||||
|
||||
sz.Add(dir1, 0, wxEXPAND)
|
||||
sz.Add(dir2, 0, wxEXPAND)
|
||||
sz.Add(dir3, 0, wxEXPAND)
|
||||
|
||||
sz.Add(35,35) # some space below
|
||||
|
||||
sz.AddGrowableRow(2)
|
||||
sz.AddGrowableCol(0)
|
||||
sz.AddGrowableCol(1)
|
||||
sz.AddGrowableCol(2)
|
||||
self.SetSizer(sz)
|
||||
self.SetAutoLayout(true)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
overview = """\
|
||||
This control can be used to place a directory listing (with optional files)
|
||||
on an arbitrary window.
|
||||
"""
|
@ -13,7 +13,7 @@ from my_distutils import run_swig, contrib_copy_tree
|
||||
# flags and values that affect this script
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
VERSION = "2.3.3"
|
||||
VERSION = "2.3.3rc"
|
||||
DESCRIPTION = "Cross platform GUI toolkit for Python"
|
||||
AUTHOR = "Robin Dunn"
|
||||
AUTHOR_EMAIL = "Robin Dunn <robin@alldunn.com>"
|
||||
|
@ -1 +1 @@
|
||||
ver = '2.3.3'
|
||||
ver = '2.3.3rc'
|
||||
|
@ -718,6 +718,7 @@ enum wxBitmapType
|
||||
wxBITMAP_TYPE_ICON,
|
||||
wxBITMAP_TYPE_ICON_RESOURCE,
|
||||
wxBITMAP_TYPE_ANI,
|
||||
wxBITMAP_TYPE_IFF,
|
||||
wxBITMAP_TYPE_MACCURSOR,
|
||||
wxBITMAP_TYPE_MACCURSOR_RESOURCE,
|
||||
wxBITMAP_TYPE_ANY = 50
|
||||
|
@ -168,6 +168,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// append several items at once to the control
|
||||
%name(AppendItems)void Append(const wxArrayString& strings);
|
||||
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1314,7 +1314,7 @@ public:
|
||||
long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER,
|
||||
const wxString& filter = wxEmptyString,
|
||||
int defaultFilter = 0,
|
||||
const wxString& name = "dirCtrl" );
|
||||
const char* name = "dirCtrl" );
|
||||
%name(wxPreGenericDirCtrl)wxGenericDirCtrl();
|
||||
|
||||
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
|
||||
@ -1327,7 +1327,7 @@ public:
|
||||
long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER,
|
||||
const wxString& filter = wxEmptyString,
|
||||
int defaultFilter = 0,
|
||||
const wxString& name = "treeCtrl" );
|
||||
const char* name = "dirCtrl" );
|
||||
|
||||
|
||||
// Try to expand as much of the given path as possible.
|
||||
|
@ -302,7 +302,8 @@ enum wxFontFamily
|
||||
wxFONTFAMILY_SWISS = wxSWISS,
|
||||
wxFONTFAMILY_MODERN = wxMODERN,
|
||||
wxFONTFAMILY_TELETYPE = wxTELETYPE,
|
||||
wxFONTFAMILY_MAX
|
||||
wxFONTFAMILY_MAX,
|
||||
wxFONTFAMILY_UNKNOWN
|
||||
};
|
||||
|
||||
// font styles
|
||||
@ -400,8 +401,14 @@ struct wxNativeFontInfo
|
||||
// init the elements from an XLFD, return TRUE if ok
|
||||
bool FromXFontName(const wxString& xFontName);
|
||||
|
||||
// return false if we were never initialized with a valid XLFD
|
||||
bool IsDefault() const;
|
||||
|
||||
// generate an XLFD using the fontElements
|
||||
wxString GetXFontName() const;
|
||||
|
||||
// set the XFLD
|
||||
void SetXFontName(const wxString& xFontName);
|
||||
#endif
|
||||
|
||||
wxNativeFontInfo() { Init(); }
|
||||
|
@ -127,6 +127,9 @@ public:
|
||||
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; }
|
||||
|
||||
// void AddText(const char* txt) = 0;
|
||||
// void AddTag(const wxHtmlTag& tag);
|
||||
@ -137,7 +140,7 @@ public:
|
||||
|
||||
class wxHtmlWinParser : public wxHtmlParser {
|
||||
public:
|
||||
wxHtmlWinParser(wxWindow *wnd);
|
||||
wxHtmlWinParser(wxHtmlWindow *wnd = NULL);
|
||||
|
||||
void SetDC(wxDC *dc);
|
||||
wxDC* GetDC();
|
||||
@ -427,6 +430,7 @@ public:
|
||||
DEC_PYCALLBACK__STRING(OnSetTitle);
|
||||
DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover);
|
||||
DEC_PYCALLBACK__CELLINTINTME(OnCellClicked);
|
||||
DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL);
|
||||
PYPRIVATE;
|
||||
};
|
||||
|
||||
@ -434,6 +438,7 @@ IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow );
|
||||
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);
|
||||
|
||||
|
||||
void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
|
||||
|
@ -886,6 +886,55 @@ static PyObject *_wrap_wxControlWithItems_SetClientData(PyObject *self, PyObject
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxControlWithItems_AppendItems(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0))
|
||||
static PyObject *_wrap_wxControlWithItems_AppendItems(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxControlWithItems * _arg0;
|
||||
wxArrayString * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","strings", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxControlWithItems_AppendItems",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxControlWithItems_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControlWithItems_AppendItems. Expected _wxControlWithItems_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (! PySequence_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Sequence of strings expected.");
|
||||
return NULL;
|
||||
}
|
||||
_arg1 = new wxArrayString;
|
||||
int i, len=PySequence_Length(_obj1);
|
||||
for (i=0; i<len; i++) {
|
||||
PyObject* item = PySequence_GetItem(_obj1, i);
|
||||
PyObject* str = PyObject_Str(item);
|
||||
_arg1->Add(PyString_AsString(str));
|
||||
Py_DECREF(item);
|
||||
Py_DECREF(str);
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxControlWithItems_AppendItems(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxButtonTowxControl(void *ptr) {
|
||||
wxButton *src;
|
||||
wxControl *dest;
|
||||
@ -11440,6 +11489,7 @@ static PyMethodDef controlscMethods[] = {
|
||||
{ "wxButton_Create", (PyCFunction) _wrap_wxButton_Create, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxPreButton", (PyCFunction) _wrap_new_wxPreButton, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxButton", (PyCFunction) _wrap_new_wxButton, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxControlWithItems_AppendItems", (PyCFunction) _wrap_wxControlWithItems_AppendItems, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxControlWithItems_SetClientData", (PyCFunction) _wrap_wxControlWithItems_SetClientData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxControlWithItems_GetClientData", (PyCFunction) _wrap_wxControlWithItems_GetClientData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxControlWithItems_Append", (PyCFunction) _wrap_wxControlWithItems_Append, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@ -81,6 +81,9 @@ class wxControlWithItemsPtr(wxControlPtr):
|
||||
def SetClientData(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxControlWithItems_SetClientData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AppendItems(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxControlWithItems_AppendItems,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxControlWithItems instance at %s>" % (self.this,)
|
||||
Number = GetCount
|
||||
|
@ -10031,7 +10031,7 @@ static PyObject *_wrap_new_wxGenericDirCtrl(PyObject *self, PyObject *args, PyOb
|
||||
long _arg5 = (long ) (wxDIRCTRL_3D_INTERNAL)|wxSUNKEN_BORDER;
|
||||
wxString * _arg6 = (wxString *) &wxEmptyString;
|
||||
int _arg7 = (int ) 0;
|
||||
wxString * _arg8 = (wxString *) &"dirCtrl";
|
||||
char * _arg8 = (char *) "dirCtrl";
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
wxPoint temp;
|
||||
@ -10039,12 +10039,11 @@ static PyObject *_wrap_new_wxGenericDirCtrl(PyObject *self, PyObject *args, PyOb
|
||||
wxSize temp0;
|
||||
PyObject * _obj4 = 0;
|
||||
PyObject * _obj6 = 0;
|
||||
PyObject * _obj8 = 0;
|
||||
char *_kwnames[] = { "parent","id","dir","pos","size","style","filter","defaultFilter","name", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOlOiO:new_wxGenericDirCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_obj6,&_arg7,&_obj8))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOlOis:new_wxGenericDirCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_obj6,&_arg7,&_arg8))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@ -10102,29 +10101,10 @@ static PyObject *_wrap_new_wxGenericDirCtrl(PyObject *self, PyObject *args, PyOb
|
||||
}
|
||||
_arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6));
|
||||
#endif
|
||||
}
|
||||
if (_obj8)
|
||||
{
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj8) && !PyUnicode_Check(_obj8)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj8, &tmpPtr, &tmpSize) == -1)
|
||||
return NULL;
|
||||
_arg8 = new wxString(tmpPtr, tmpSize);
|
||||
#else
|
||||
if (!PyString_Check(_obj8)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg8 = new wxString(PyString_AS_STRING(_obj8), PyString_GET_SIZE(_obj8));
|
||||
#endif
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxGenericDirCtrl *)new_wxGenericDirCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7,*_arg8);
|
||||
_result = (wxGenericDirCtrl *)new_wxGenericDirCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7,_arg8);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@ -10142,10 +10122,6 @@ static PyObject *_wrap_new_wxGenericDirCtrl(PyObject *self, PyObject *args, PyOb
|
||||
{
|
||||
if (_obj6)
|
||||
delete _arg6;
|
||||
}
|
||||
{
|
||||
if (_obj8)
|
||||
delete _arg8;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
@ -10189,7 +10165,7 @@ static PyObject *_wrap_wxGenericDirCtrl_Create(PyObject *self, PyObject *args, P
|
||||
long _arg6 = (long ) (wxDIRCTRL_3D_INTERNAL)|wxSUNKEN_BORDER;
|
||||
wxString * _arg7 = (wxString *) &wxEmptyString;
|
||||
int _arg8 = (int ) 0;
|
||||
wxString * _arg9 = (wxString *) &"treeCtrl";
|
||||
char * _arg9 = (char *) "dirCtrl";
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj3 = 0;
|
||||
@ -10198,11 +10174,10 @@ static PyObject *_wrap_wxGenericDirCtrl_Create(PyObject *self, PyObject *args, P
|
||||
wxSize temp0;
|
||||
PyObject * _obj5 = 0;
|
||||
PyObject * _obj7 = 0;
|
||||
PyObject * _obj9 = 0;
|
||||
char *_kwnames[] = { "self","parent","id","dir","pos","size","style","filter","defaultFilter","name", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOOlOiO:wxGenericDirCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_obj7,&_arg8,&_obj9))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOOlOis:wxGenericDirCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_obj7,&_arg8,&_arg9))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@ -10267,29 +10242,10 @@ static PyObject *_wrap_wxGenericDirCtrl_Create(PyObject *self, PyObject *args, P
|
||||
}
|
||||
_arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7));
|
||||
#endif
|
||||
}
|
||||
if (_obj9)
|
||||
{
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj9) && !PyUnicode_Check(_obj9)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj9, &tmpPtr, &tmpSize) == -1)
|
||||
return NULL;
|
||||
_arg9 = new wxString(tmpPtr, tmpSize);
|
||||
#else
|
||||
if (!PyString_Check(_obj9)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg9 = new wxString(PyString_AS_STRING(_obj9), PyString_GET_SIZE(_obj9));
|
||||
#endif
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxGenericDirCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8,*_arg9);
|
||||
_result = (bool )wxGenericDirCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8,_arg9);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@ -10301,10 +10257,6 @@ static PyObject *_wrap_wxGenericDirCtrl_Create(PyObject *self, PyObject *args, P
|
||||
{
|
||||
if (_obj7)
|
||||
delete _arg7;
|
||||
}
|
||||
{
|
||||
if (_obj9)
|
||||
delete _arg9;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
@ -13428,6 +13428,7 @@ SWIGEXPORT(void) initgdic() {
|
||||
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,"wxFONTFAMILY_UNKNOWN", PyInt_FromLong((long) wxFONTFAMILY_UNKNOWN));
|
||||
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));
|
||||
|
@ -1428,6 +1428,7 @@ wxFONTFAMILY_SWISS = gdic.wxFONTFAMILY_SWISS
|
||||
wxFONTFAMILY_MODERN = gdic.wxFONTFAMILY_MODERN
|
||||
wxFONTFAMILY_TELETYPE = gdic.wxFONTFAMILY_TELETYPE
|
||||
wxFONTFAMILY_MAX = gdic.wxFONTFAMILY_MAX
|
||||
wxFONTFAMILY_UNKNOWN = gdic.wxFONTFAMILY_UNKNOWN
|
||||
wxFONTSTYLE_NORMAL = gdic.wxFONTSTYLE_NORMAL
|
||||
wxFONTSTYLE_ITALIC = gdic.wxFONTSTYLE_ITALIC
|
||||
wxFONTSTYLE_SLANT = gdic.wxFONTSTYLE_SLANT
|
||||
|
@ -209,6 +209,7 @@ public:
|
||||
DEC_PYCALLBACK__STRING(OnSetTitle);
|
||||
DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover);
|
||||
DEC_PYCALLBACK__CELLINTINTME(OnCellClicked);
|
||||
DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL);
|
||||
PYPRIVATE;
|
||||
};
|
||||
|
||||
@ -216,6 +217,7 @@ IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow );
|
||||
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);
|
||||
|
||||
|
||||
void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
|
||||
@ -1266,6 +1268,58 @@ static PyObject *_wrap_wxHtmlParser_PopTagHandler(PyObject *self, PyObject *args
|
||||
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;
|
||||
@ -1286,18 +1340,18 @@ static void *SwigwxHtmlWinParserTowxObject(void *ptr) {
|
||||
static PyObject *_wrap_new_wxHtmlWinParser(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxHtmlWinParser * _result;
|
||||
wxWindow * _arg0;
|
||||
wxHtmlWindow * _arg0 = (wxHtmlWindow *) NULL;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "wnd", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxHtmlWinParser",_kwnames,&_argo0))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxHtmlWinParser",_kwnames,&_argo0))
|
||||
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_wxHtmlWinParser. Expected _wxWindow_p.");
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlWinParser. Expected _wxHtmlWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@ -6579,6 +6633,7 @@ static PyMethodDef htmlcMethods[] = {
|
||||
{ "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 },
|
||||
|
@ -145,6 +145,9 @@ class wxHtmlParserPtr(wxObjectPtr):
|
||||
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):
|
||||
|
@ -2432,20 +2432,27 @@ static void *SwigwxTipWindowTowxObject(void *ptr) {
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define new_wxTipWindow(_swigarg0,_swigarg1,_swigarg2) (new wxTipWindow(_swigarg0,_swigarg1,_swigarg2))
|
||||
static wxTipWindow *new_wxTipWindow(wxWindow *parent,const wxString *text,wxCoord maxLength,wxRect *rectBound) {
|
||||
wxString tmp = *text;
|
||||
return new wxTipWindow(parent, tmp, maxLength, NULL, rectBound);
|
||||
}
|
||||
|
||||
static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxTipWindow * _result;
|
||||
wxWindow * _arg0;
|
||||
wxString * _arg1;
|
||||
wxCoord _arg2 = (wxCoord ) 100;
|
||||
wxRect * _arg3 = (wxRect *) NULL;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "parent","text","maxLength", NULL };
|
||||
wxRect temp;
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "parent","text","maxLength","rectBound", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:new_wxTipWindow",_kwnames,&_argo0,&_obj1,&_arg2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iO:new_wxTipWindow",_kwnames,&_argo0,&_obj1,&_arg2,&_obj3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@ -2471,10 +2478,16 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject
|
||||
}
|
||||
_arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
|
||||
#endif
|
||||
}
|
||||
if (_obj3)
|
||||
{
|
||||
_arg3 = &temp;
|
||||
if (! wxRect_helper(_obj3, &_arg3))
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxTipWindow *)new_wxTipWindow(_arg0,*_arg1,_arg2);
|
||||
_result = (wxTipWindow *)new_wxTipWindow(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@ -2492,7 +2505,73 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTipWindow_SetBoundingRect(_swigobj,_swigarg0) (_swigobj->SetBoundingRect(_swigarg0))
|
||||
static PyObject *_wrap_wxTipWindow_SetBoundingRect(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxTipWindow * _arg0;
|
||||
wxRect * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
wxRect temp;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","rectBound", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTipWindow_SetBoundingRect",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTipWindow_SetBoundingRect. Expected _wxTipWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = &temp;
|
||||
if (! wxRect_helper(_obj1, &_arg1))
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxTipWindow_SetBoundingRect(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTipWindow_Close(_swigobj) (_swigobj->Close())
|
||||
static PyObject *_wrap_wxTipWindow_Close(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxTipWindow * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTipWindow_Close",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTipWindow_Close. Expected _wxTipWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxTipWindow_Close(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyMethodDef windows3cMethods[] = {
|
||||
{ "wxTipWindow_Close", (PyCFunction) _wrap_wxTipWindow_Close, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTipWindow_SetBoundingRect", (PyCFunction) _wrap_wxTipWindow_SetBoundingRect, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxTipWindow", (PyCFunction) _wrap_new_wxTipWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPopupTransientWindow_Dismiss", (PyCFunction) _wrap_wxPopupTransientWindow_Dismiss, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPopupTransientWindow_Popup", (PyCFunction) _wrap_wxPopupTransientWindow_Popup, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@ -328,6 +328,12 @@ class wxTipWindowPtr(wxPopupTransientWindowPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def SetBoundingRect(self, *_args, **_kwargs):
|
||||
val = apply(windows3c.wxTipWindow_SetBoundingRect,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Close(self, *_args, **_kwargs):
|
||||
val = apply(windows3c.wxTipWindow_Close,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxTipWindow instance at %s>" % (self.this,)
|
||||
class wxTipWindow(wxTipWindowPtr):
|
||||
|
@ -2410,6 +2410,7 @@ SWIGEXPORT(void) initwxc() {
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_ICON", PyInt_FromLong((long) wxBITMAP_TYPE_ICON));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_ICON_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_ICON_RESOURCE));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_ANI", PyInt_FromLong((long) wxBITMAP_TYPE_ANI));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_IFF", PyInt_FromLong((long) wxBITMAP_TYPE_IFF));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_MACCURSOR", PyInt_FromLong((long) wxBITMAP_TYPE_MACCURSOR));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_MACCURSOR_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_MACCURSOR_RESOURCE));
|
||||
PyDict_SetItemString(d,"wxBITMAP_TYPE_ANY", PyInt_FromLong((long) wxBITMAP_TYPE_ANY));
|
||||
|
@ -643,6 +643,7 @@ wxBITMAP_TYPE_PICT_RESOURCE = wxc.wxBITMAP_TYPE_PICT_RESOURCE
|
||||
wxBITMAP_TYPE_ICON = wxc.wxBITMAP_TYPE_ICON
|
||||
wxBITMAP_TYPE_ICON_RESOURCE = wxc.wxBITMAP_TYPE_ICON_RESOURCE
|
||||
wxBITMAP_TYPE_ANI = wxc.wxBITMAP_TYPE_ANI
|
||||
wxBITMAP_TYPE_IFF = wxc.wxBITMAP_TYPE_IFF
|
||||
wxBITMAP_TYPE_MACCURSOR = wxc.wxBITMAP_TYPE_MACCURSOR
|
||||
wxBITMAP_TYPE_MACCURSOR_RESOURCE = wxc.wxBITMAP_TYPE_MACCURSOR_RESOURCE
|
||||
wxBITMAP_TYPE_ANY = wxc.wxBITMAP_TYPE_ANY
|
||||
|
@ -272,11 +272,25 @@ public:
|
||||
class wxTipWindow : public wxPyPopupTransientWindow
|
||||
{
|
||||
public:
|
||||
wxTipWindow(wxWindow *parent,
|
||||
const wxString& text,
|
||||
wxCoord maxLength = 100);
|
||||
%addmethods {
|
||||
wxTipWindow(wxWindow *parent,
|
||||
const wxString* text,
|
||||
wxCoord maxLength = 100,
|
||||
wxRect* rectBound = NULL) {
|
||||
wxString tmp = *text;
|
||||
return new wxTipWindow(parent, tmp, maxLength, NULL, rectBound);
|
||||
}
|
||||
}
|
||||
|
||||
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
|
||||
|
||||
// If rectBound is not NULL, the window will disappear automatically when
|
||||
// the mouse leave the specified rect: note that rectBound should be in the
|
||||
// screen coordinates!
|
||||
void SetBoundingRect(const wxRect& rectBound);
|
||||
|
||||
// Hide and destroy the window
|
||||
void Close();
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user