mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-10 22:07:08 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
361 lines
9.7 KiB
C++
361 lines
9.7 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 381 "sip/gen/event.sip"
|
|
#include <wx/event.h>
|
|
#line 15 "sip_corewxContextMenuEvent.cpp"
|
|
|
|
#line 23 "sip/gen/gdicmn.sip"
|
|
#include <wx/gdicmn.h>
|
|
#line 19 "sip_corewxContextMenuEvent.cpp"
|
|
#line 40 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 22 "sip_corewxContextMenuEvent.cpp"
|
|
#line 129 "sip/gen/event.sip"
|
|
#include <wx/event.h>
|
|
#line 25 "sip_corewxContextMenuEvent.cpp"
|
|
#line 17 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 28 "sip_corewxContextMenuEvent.cpp"
|
|
#line 84 "sip/gen/object.sip"
|
|
#include <wx/object.h>
|
|
#line 31 "sip_corewxContextMenuEvent.cpp"
|
|
|
|
|
|
class sipwxContextMenuEvent : public wxContextMenuEvent
|
|
{
|
|
public:
|
|
sipwxContextMenuEvent(wxEventType,int,const wxPoint&);
|
|
sipwxContextMenuEvent(const wxContextMenuEvent&);
|
|
virtual ~sipwxContextMenuEvent();
|
|
|
|
/*
|
|
* There is a protected method for every virtual method visible from
|
|
* this class.
|
|
*/
|
|
protected:
|
|
wxEvent * Clone();
|
|
wxEventCategory GetEventCategory();
|
|
wxClassInfo * GetClassInfo();
|
|
|
|
public:
|
|
sipSimpleWrapper *sipPySelf;
|
|
|
|
private:
|
|
sipwxContextMenuEvent(const sipwxContextMenuEvent &);
|
|
sipwxContextMenuEvent &operator = (const sipwxContextMenuEvent &);
|
|
|
|
char sipPyMethods[3];
|
|
};
|
|
|
|
sipwxContextMenuEvent::sipwxContextMenuEvent(wxEventType type,int id,const wxPoint& pos): wxContextMenuEvent(type,id,pos), sipPySelf(0)
|
|
{
|
|
memset(sipPyMethods, 0, sizeof (sipPyMethods));
|
|
}
|
|
|
|
sipwxContextMenuEvent::sipwxContextMenuEvent(const wxContextMenuEvent& a0): wxContextMenuEvent(a0), sipPySelf(0)
|
|
{
|
|
memset(sipPyMethods, 0, sizeof (sipPyMethods));
|
|
}
|
|
|
|
sipwxContextMenuEvent::~sipwxContextMenuEvent()
|
|
{
|
|
sipCommonDtor(sipPySelf);
|
|
}
|
|
|
|
wxEvent * sipwxContextMenuEvent::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 sipwxContextMenuEvent::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 * sipwxContextMenuEvent::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_wxContextMenuEvent_GetPosition, "ContextMenuEvent.GetPosition() -> Point");
|
|
|
|
extern "C" {static PyObject *meth_wxContextMenuEvent_GetPosition(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxContextMenuEvent_GetPosition(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxContextMenuEvent *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxContextMenuEvent, &sipCpp))
|
|
{
|
|
wxPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxPoint(sipCpp->GetPosition());
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxPoint,NULL);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_ContextMenuEvent, sipName_GetPosition, doc_wxContextMenuEvent_GetPosition);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxContextMenuEvent_SetPosition, "ContextMenuEvent.SetPosition(Point)");
|
|
|
|
extern "C" {static PyObject *meth_wxContextMenuEvent_SetPosition(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxContextMenuEvent_SetPosition(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxPoint * point;
|
|
int pointState = 0;
|
|
wxContextMenuEvent *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_point,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ1", &sipSelf, sipType_wxContextMenuEvent, &sipCpp, sipType_wxPoint, &point, &pointState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->SetPosition(*point);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxPoint *>(point),sipType_wxPoint,pointState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxPoint *>(point),sipType_wxPoint,pointState);
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_ContextMenuEvent, sipName_SetPosition, doc_wxContextMenuEvent_SetPosition);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
|
|
extern "C" {static void *cast_wxContextMenuEvent(void *, const sipTypeDef *);}
|
|
static void *cast_wxContextMenuEvent(void *ptr, const sipTypeDef *targetType)
|
|
{
|
|
void *res;
|
|
|
|
if (targetType == sipType_wxContextMenuEvent)
|
|
return ptr;
|
|
|
|
if ((res = ((const sipClassTypeDef *)sipType_wxCommandEvent)->ctd_cast((wxCommandEvent *)(wxContextMenuEvent *)ptr,targetType)) != NULL)
|
|
return res;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Call the instance's destructor. */
|
|
extern "C" {static void release_wxContextMenuEvent(void *, int);}
|
|
static void release_wxContextMenuEvent(void *sipCppV,int sipState)
|
|
{
|
|
if (sipState & SIP_DERIVED_CLASS)
|
|
delete reinterpret_cast<sipwxContextMenuEvent *>(sipCppV);
|
|
else
|
|
delete reinterpret_cast<wxContextMenuEvent *>(sipCppV);
|
|
}
|
|
|
|
|
|
extern "C" {static void dealloc_wxContextMenuEvent(sipSimpleWrapper *);}
|
|
static void dealloc_wxContextMenuEvent(sipSimpleWrapper *sipSelf)
|
|
{
|
|
if (sipIsDerived(sipSelf))
|
|
reinterpret_cast<sipwxContextMenuEvent *>(sipGetAddress(sipSelf))->sipPySelf = NULL;
|
|
|
|
if (sipIsPyOwned(sipSelf))
|
|
{
|
|
release_wxContextMenuEvent(sipGetAddress(sipSelf),sipSelf->flags);
|
|
}
|
|
}
|
|
|
|
|
|
extern "C" {static void *init_wxContextMenuEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
|
|
static void *init_wxContextMenuEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
|
|
{
|
|
sipwxContextMenuEvent *sipCpp = 0;
|
|
|
|
{
|
|
wxEventType type = wxEVT_NULL;
|
|
int id = 0;
|
|
const wxPoint& posdef = wxDefaultPosition;
|
|
const wxPoint * pos = &posdef;
|
|
int posState = 0;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_type,
|
|
sipName_id,
|
|
sipName_pos,
|
|
};
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|iiJ1", &type, &id, sipType_wxPoint, &pos, &posState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new sipwxContextMenuEvent(type,id,*pos);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxPoint *>(pos),sipType_wxPoint,posState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxPoint *>(pos),sipType_wxPoint,posState);
|
|
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxContextMenuEvent * a0;
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxContextMenuEvent, &a0))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new sipwxContextMenuEvent(*a0);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Define this type's super-types. */
|
|
static sipEncodedTypeDef supers_wxContextMenuEvent[] = {{9, 255, 1}};
|
|
|
|
|
|
static PyMethodDef methods_wxContextMenuEvent[] = {
|
|
{SIP_MLNAME_CAST(sipName_GetPosition), meth_wxContextMenuEvent_GetPosition, METH_VARARGS, SIP_MLDOC_CAST(doc_wxContextMenuEvent_GetPosition)},
|
|
{SIP_MLNAME_CAST(sipName_SetPosition), (PyCFunction)meth_wxContextMenuEvent_SetPosition, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxContextMenuEvent_SetPosition)}
|
|
};
|
|
|
|
sipVariableDef variables_wxContextMenuEvent[] = {
|
|
{PropertyVariable, sipName_Position, &methods_wxContextMenuEvent[0], &methods_wxContextMenuEvent[1], NULL, NULL},
|
|
};
|
|
|
|
PyDoc_STRVAR(doc_wxContextMenuEvent, "\1ContextMenuEvent(int type=wxEVT_NULL, int id=0, Point pos=wxDefaultPosition)\n"
|
|
"ContextMenuEvent(ContextMenuEvent)");
|
|
|
|
|
|
sipClassTypeDef sipTypeDef__core_wxContextMenuEvent = {
|
|
{
|
|
-1,
|
|
0,
|
|
0,
|
|
SIP_TYPE_CLASS,
|
|
sipNameNr_wxContextMenuEvent,
|
|
{0}
|
|
},
|
|
{
|
|
sipNameNr_ContextMenuEvent,
|
|
{0, 0, 1},
|
|
2, methods_wxContextMenuEvent,
|
|
0, 0,
|
|
1, variables_wxContextMenuEvent,
|
|
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
},
|
|
doc_wxContextMenuEvent,
|
|
-1,
|
|
-1,
|
|
supers_wxContextMenuEvent,
|
|
0,
|
|
init_wxContextMenuEvent,
|
|
0,
|
|
0,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0,
|
|
0,
|
|
#else
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
#endif
|
|
dealloc_wxContextMenuEvent,
|
|
0,
|
|
0,
|
|
0,
|
|
release_wxContextMenuEvent,
|
|
cast_wxContextMenuEvent,
|
|
0,
|
|
0,
|
|
0
|
|
};
|