mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-09 21:40:34 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
384 lines
9.3 KiB
C++
384 lines
9.3 KiB
C++
/*
|
|
* Interface wrapper code.
|
|
*
|
|
* Generated by SIP 4.12-snapshot-93040d2c716c
|
|
*
|
|
* Copyright: (c) 2010 by Total Control Software
|
|
* License: wxWindows License
|
|
*/
|
|
|
|
#include "sipAPI_core.h"
|
|
|
|
#line 747 "sip/gen/event.sip"
|
|
#include <wx/event.h>
|
|
#line 15 "sip_corewxMenuEvent.cpp"
|
|
|
|
#line 40 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 19 "sip_corewxMenuEvent.cpp"
|
|
#line 129 "sip/gen/event.sip"
|
|
#include <wx/event.h>
|
|
#line 22 "sip_corewxMenuEvent.cpp"
|
|
#line 17 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 25 "sip_corewxMenuEvent.cpp"
|
|
#line 84 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 28 "sip_corewxMenuEvent.cpp"
|
|
|
|
|
|
class sipwxMenuEvent : public wxMenuEvent
|
|
{
|
|
public:
|
|
sipwxMenuEvent(wxEventType,int,wxMenu *);
|
|
sipwxMenuEvent(const wxMenuEvent&);
|
|
virtual ~sipwxMenuEvent();
|
|
|
|
/*
|
|
* There is a protected method for every virtual method visible from
|
|
* this class.
|
|
*/
|
|
protected:
|
|
wxEvent * Clone();
|
|
wxEventCategory GetEventCategory();
|
|
wxClassInfo * GetClassInfo();
|
|
|
|
public:
|
|
sipSimpleWrapper *sipPySelf;
|
|
|
|
private:
|
|
sipwxMenuEvent(const sipwxMenuEvent &);
|
|
sipwxMenuEvent &operator = (const sipwxMenuEvent &);
|
|
|
|
char sipPyMethods[3];
|
|
};
|
|
|
|
sipwxMenuEvent::sipwxMenuEvent(wxEventType type,int id,wxMenu *menu): wxMenuEvent(type,id,menu), sipPySelf(0)
|
|
{
|
|
memset(sipPyMethods, 0, sizeof (sipPyMethods));
|
|
}
|
|
|
|
sipwxMenuEvent::sipwxMenuEvent(const wxMenuEvent& a0): wxMenuEvent(a0), sipPySelf(0)
|
|
{
|
|
memset(sipPyMethods, 0, sizeof (sipPyMethods));
|
|
}
|
|
|
|
sipwxMenuEvent::~sipwxMenuEvent()
|
|
{
|
|
sipCommonDtor(sipPySelf);
|
|
}
|
|
|
|
wxEvent * sipwxMenuEvent::Clone()
|
|
{
|
|
sip_gilstate_t sipGILState;
|
|
PyObject *sipMeth;
|
|
|
|
sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,NULL,sipName_Clone);
|
|
|
|
if (!sipMeth)
|
|
return wxEvent::Clone();
|
|
|
|
extern wxEvent * sipVH__core_1(sip_gilstate_t,PyObject *);
|
|
|
|
return sipVH__core_1(sipGILState,sipMeth);
|
|
}
|
|
|
|
wxEventCategory sipwxMenuEvent::GetEventCategory()
|
|
{
|
|
sip_gilstate_t sipGILState;
|
|
PyObject *sipMeth;
|
|
|
|
sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,NULL,sipName_GetEventCategory);
|
|
|
|
if (!sipMeth)
|
|
return wxEvent::GetEventCategory();
|
|
|
|
extern wxEventCategory sipVH__core_0(sip_gilstate_t,PyObject *);
|
|
|
|
return sipVH__core_0(sipGILState,sipMeth);
|
|
}
|
|
|
|
wxClassInfo * sipwxMenuEvent::GetClassInfo()
|
|
{
|
|
sip_gilstate_t sipGILState;
|
|
PyObject *sipMeth;
|
|
|
|
sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,NULL,sipName_GetClassInfo);
|
|
|
|
if (!sipMeth)
|
|
return wxObject::GetClassInfo();
|
|
|
|
extern wxClassInfo * sipVH__core_6(sip_gilstate_t,PyObject *);
|
|
|
|
return sipVH__core_6(sipGILState,sipMeth);
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxMenuEvent_GetMenu, "MenuEvent.GetMenu() -> Menu");
|
|
|
|
extern "C" {static PyObject *meth_wxMenuEvent_GetMenu(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxMenuEvent_GetMenu(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxMenuEvent *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMenuEvent, &sipCpp))
|
|
{
|
|
wxMenu *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->GetMenu();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromType(sipRes,sipType_wxMenu,NULL);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_MenuEvent, sipName_GetMenu, doc_wxMenuEvent_GetMenu);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxMenuEvent_GetMenuId, "MenuEvent.GetMenuId() -> int");
|
|
|
|
extern "C" {static PyObject *meth_wxMenuEvent_GetMenuId(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxMenuEvent_GetMenuId(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxMenuEvent *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMenuEvent, &sipCpp))
|
|
{
|
|
int sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->GetMenuId();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return SIPLong_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_MenuEvent, sipName_GetMenuId, doc_wxMenuEvent_GetMenuId);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxMenuEvent_IsPopup, "MenuEvent.IsPopup() -> bool");
|
|
|
|
extern "C" {static PyObject *meth_wxMenuEvent_IsPopup(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxMenuEvent_IsPopup(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxMenuEvent *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxMenuEvent, &sipCpp))
|
|
{
|
|
bool sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->IsPopup();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return PyBool_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_MenuEvent, sipName_IsPopup, doc_wxMenuEvent_IsPopup);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
|
|
extern "C" {static void *cast_wxMenuEvent(void *, const sipTypeDef *);}
|
|
static void *cast_wxMenuEvent(void *ptr, const sipTypeDef *targetType)
|
|
{
|
|
void *res;
|
|
|
|
if (targetType == sipType_wxMenuEvent)
|
|
return ptr;
|
|
|
|
if ((res = ((const sipClassTypeDef *)sipType_wxEvent)->ctd_cast((wxEvent *)(wxMenuEvent *)ptr,targetType)) != NULL)
|
|
return res;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Call the instance's destructor. */
|
|
extern "C" {static void release_wxMenuEvent(void *, int);}
|
|
static void release_wxMenuEvent(void *sipCppV,int sipState)
|
|
{
|
|
if (sipState & SIP_DERIVED_CLASS)
|
|
delete reinterpret_cast<sipwxMenuEvent *>(sipCppV);
|
|
else
|
|
delete reinterpret_cast<wxMenuEvent *>(sipCppV);
|
|
}
|
|
|
|
|
|
extern "C" {static void dealloc_wxMenuEvent(sipSimpleWrapper *);}
|
|
static void dealloc_wxMenuEvent(sipSimpleWrapper *sipSelf)
|
|
{
|
|
if (sipIsDerived(sipSelf))
|
|
reinterpret_cast<sipwxMenuEvent *>(sipGetAddress(sipSelf))->sipPySelf = NULL;
|
|
|
|
if (sipIsPyOwned(sipSelf))
|
|
{
|
|
release_wxMenuEvent(sipGetAddress(sipSelf),sipSelf->flags);
|
|
}
|
|
}
|
|
|
|
|
|
extern "C" {static void *init_wxMenuEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
|
|
static void *init_wxMenuEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
|
|
{
|
|
sipwxMenuEvent *sipCpp = 0;
|
|
|
|
{
|
|
wxEventType type = wxEVT_NULL;
|
|
int id = 0;
|
|
wxMenu * menu = 0;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_type,
|
|
sipName_id,
|
|
sipName_menu,
|
|
};
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|iiJ8", &type, &id, sipType_wxMenu, &menu))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new sipwxMenuEvent(type,id,menu);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxMenuEvent * a0;
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxMenuEvent, &a0))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new sipwxMenuEvent(*a0);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Define this type's super-types. */
|
|
static sipEncodedTypeDef supers_wxMenuEvent[] = {{19, 255, 1}};
|
|
|
|
|
|
static PyMethodDef methods_wxMenuEvent[] = {
|
|
{SIP_MLNAME_CAST(sipName_GetMenu), meth_wxMenuEvent_GetMenu, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMenuEvent_GetMenu)},
|
|
{SIP_MLNAME_CAST(sipName_GetMenuId), meth_wxMenuEvent_GetMenuId, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMenuEvent_GetMenuId)},
|
|
{SIP_MLNAME_CAST(sipName_IsPopup), meth_wxMenuEvent_IsPopup, METH_VARARGS, SIP_MLDOC_CAST(doc_wxMenuEvent_IsPopup)}
|
|
};
|
|
|
|
sipVariableDef variables_wxMenuEvent[] = {
|
|
{PropertyVariable, sipName_MenuId, &methods_wxMenuEvent[1], NULL, NULL, NULL},
|
|
{PropertyVariable, sipName_Menu, &methods_wxMenuEvent[0], NULL, NULL, NULL},
|
|
};
|
|
|
|
PyDoc_STRVAR(doc_wxMenuEvent, "\1MenuEvent(int type=wxEVT_NULL, int id=0, Menu menu=None)\n"
|
|
"MenuEvent(MenuEvent)");
|
|
|
|
|
|
sipClassTypeDef sipTypeDef__core_wxMenuEvent = {
|
|
{
|
|
-1,
|
|
0,
|
|
0,
|
|
SIP_TYPE_CLASS,
|
|
sipNameNr_wxMenuEvent,
|
|
{0}
|
|
},
|
|
{
|
|
sipNameNr_MenuEvent,
|
|
{0, 0, 1},
|
|
3, methods_wxMenuEvent,
|
|
0, 0,
|
|
2, variables_wxMenuEvent,
|
|
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
},
|
|
doc_wxMenuEvent,
|
|
-1,
|
|
-1,
|
|
supers_wxMenuEvent,
|
|
0,
|
|
init_wxMenuEvent,
|
|
0,
|
|
0,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0,
|
|
0,
|
|
#else
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
#endif
|
|
dealloc_wxMenuEvent,
|
|
0,
|
|
0,
|
|
0,
|
|
release_wxMenuEvent,
|
|
cast_wxMenuEvent,
|
|
0,
|
|
0,
|
|
0
|
|
};
|