git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-06-09 17:30:31 +00:00
parent d25d9ed08e
commit 7a0b95b008
2 changed files with 31 additions and 22 deletions

View File

@ -6928,23 +6928,25 @@ class Window(EvtHandler):
def PopupMenuXY(*args, **kwargs):
"""
PopupMenuXY(self, Menu menu, int x, int y) -> bool
PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
Pops up the given menu at the specified coordinates, relative to this
window, and returns control when the user has dismissed the menu. If a
menu item is selected, the corresponding menu event is generated and
will be processed as usual.
Pops up the given menu at the specified coordinates, relative to this window,
and returns control when the user has dismissed the menu. If a menu item is
selected, the corresponding menu event is generated and will be processed as
usual. If the default position is given then the current position of the
mouse cursor will be used.
"""
return _core_.Window_PopupMenuXY(*args, **kwargs)
def PopupMenu(*args, **kwargs):
"""
PopupMenu(self, Menu menu, Point pos) -> bool
PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
Pops up the given menu at the specified coordinates, relative to this
window, and returns control when the user has dismissed the menu. If a
menu item is selected, the corresponding menu event is generated and
will be processed as usual.
Pops up the given menu at the specified coordinates, relative to this window,
and returns control when the user has dismissed the menu. If a menu item is
selected, the corresponding menu event is generated and will be processed as
usual. If the default position is given then the current position of the
mouse cursor will be used.
"""
return _core_.Window_PopupMenu(*args, **kwargs)

View File

@ -26841,8 +26841,8 @@ static PyObject *_wrap_Window_PopupMenuXY(PyObject *self, PyObject *args, PyObje
PyObject *resultobj;
wxWindow *arg1 = (wxWindow *) 0 ;
wxMenu *arg2 = (wxMenu *) 0 ;
int arg3 ;
int arg4 ;
int arg3 = (int) -1 ;
int arg4 = (int) -1 ;
bool result;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
@ -26852,15 +26852,19 @@ static PyObject *_wrap_Window_PopupMenuXY(PyObject *self, PyObject *args, PyObje
(char *) "self",(char *) "menu",(char *) "x",(char *) "y", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Window_PopupMenuXY",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:Window_PopupMenuXY",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxMenu,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
arg3 = (int) SWIG_AsInt(obj2);
if (PyErr_Occurred()) SWIG_fail;
arg4 = (int) SWIG_AsInt(obj3);
if (PyErr_Occurred()) SWIG_fail;
if (obj2) {
arg3 = (int) SWIG_AsInt(obj2);
if (PyErr_Occurred()) SWIG_fail;
}
if (obj3) {
arg4 = (int) SWIG_AsInt(obj3);
if (PyErr_Occurred()) SWIG_fail;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->PopupMenu(arg2,arg3,arg4);
@ -26881,7 +26885,8 @@ static PyObject *_wrap_Window_PopupMenu(PyObject *self, PyObject *args, PyObject
PyObject *resultobj;
wxWindow *arg1 = (wxWindow *) 0 ;
wxMenu *arg2 = (wxMenu *) 0 ;
wxPoint *arg3 = 0 ;
wxPoint const &arg3_defvalue = wxDefaultPosition ;
wxPoint *arg3 = (wxPoint *) &arg3_defvalue ;
bool result;
wxPoint temp3 ;
PyObject * obj0 = 0 ;
@ -26891,14 +26896,16 @@ static PyObject *_wrap_Window_PopupMenu(PyObject *self, PyObject *args, PyObject
(char *) "self",(char *) "menu",(char *) "pos", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Window_PopupMenu",kwnames,&obj0,&obj1,&obj2)) goto fail;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Window_PopupMenu",kwnames,&obj0,&obj1,&obj2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxMenu,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
arg3 = &temp3;
if ( ! wxPoint_helper(obj2, &arg3)) SWIG_fail;
if (obj2) {
{
arg3 = &temp3;
if ( ! wxPoint_helper(obj2, &arg3)) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();