/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.16
 *
 *     Copyright: (c) 2018 by Total Control Software
 *     License:   wxWindows License
 */

#include "sipAPI_grid.h"

        #include <wx/grid.h>

        #include <wx/object.h>
        #include <wx/control.h>
        #include <wx/event.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxGridEditorCreatedEvent : public  ::wxGridEditorCreatedEvent
{
public:
    sipwxGridEditorCreatedEvent();
    sipwxGridEditorCreatedEvent(int, ::wxEventType, ::wxObject*,int,int, ::wxControl*);
    sipwxGridEditorCreatedEvent(const  ::wxGridEditorCreatedEvent&);
    virtual ~sipwxGridEditorCreatedEvent();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::wxEventCategory GetEventCategory() const SIP_OVERRIDE;
     ::wxEvent* Clone() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipwxGridEditorCreatedEvent(const sipwxGridEditorCreatedEvent &);
    sipwxGridEditorCreatedEvent &operator = (const sipwxGridEditorCreatedEvent &);

    char sipPyMethods[2];
};

sipwxGridEditorCreatedEvent::sipwxGridEditorCreatedEvent():  ::wxGridEditorCreatedEvent(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxGridEditorCreatedEvent::sipwxGridEditorCreatedEvent(int id, ::wxEventType type, ::wxObject*obj,int row,int col, ::wxControl*ctrl):  ::wxGridEditorCreatedEvent(id,type,obj,row,col,ctrl), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxGridEditorCreatedEvent::sipwxGridEditorCreatedEvent(const  ::wxGridEditorCreatedEvent& a0):  ::wxGridEditorCreatedEvent(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxGridEditorCreatedEvent::~sipwxGridEditorCreatedEvent()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

 ::wxEventCategory sipwxGridEditorCreatedEvent::GetEventCategory() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_GetEventCategory);

    if (!sipMeth)
        return  ::wxGridEditorCreatedEvent::GetEventCategory();

    extern  ::wxEventCategory sipVH__grid_62(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__grid_62(sipGILState, 0, sipPySelf, sipMeth);
}

 ::wxEvent* sipwxGridEditorCreatedEvent::Clone() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,SIP_NULLPTR,sipName_Clone);

    if (!sipMeth)
        return  ::wxGridEditorCreatedEvent::Clone();

    extern  ::wxEvent* sipVH__grid_63(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__grid_63(sipGILState, 0, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_GetCol, "GetCol() -> int\n"
"\n"
"Returns the column at which the event occurred.");

extern "C" {static PyObject *meth_wxGridEditorCreatedEvent_GetCol(PyObject *, PyObject *);}
static PyObject *meth_wxGridEditorCreatedEvent_GetCol(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::wxGridEditorCreatedEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridEditorCreatedEvent, &sipCpp))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetCol();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_GetCol, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_GetControl, "GetControl() -> wx.Control\n"
"\n"
"Returns the edit control.");

extern "C" {static PyObject *meth_wxGridEditorCreatedEvent_GetControl(PyObject *, PyObject *);}
static PyObject *meth_wxGridEditorCreatedEvent_GetControl(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::wxGridEditorCreatedEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridEditorCreatedEvent, &sipCpp))
        {
             ::wxControl*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetControl();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes,sipType_wxControl,SIP_NULLPTR);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_GetControl, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_GetRow, "GetRow() -> int\n"
"\n"
"Returns the row at which the event occurred.");

extern "C" {static PyObject *meth_wxGridEditorCreatedEvent_GetRow(PyObject *, PyObject *);}
static PyObject *meth_wxGridEditorCreatedEvent_GetRow(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::wxGridEditorCreatedEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridEditorCreatedEvent, &sipCpp))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetRow();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_GetRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_SetCol, "SetCol(col)\n"
"\n"
"Sets the column at which the event occurred.");

extern "C" {static PyObject *meth_wxGridEditorCreatedEvent_SetCol(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxGridEditorCreatedEvent_SetCol(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int col;
         ::wxGridEditorCreatedEvent *sipCpp;

        static const char *sipKwdList[] = {
            sipName_col,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxGridEditorCreatedEvent, &sipCpp, &col))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetCol(col);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_SetCol, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_SetControl, "SetControl(ctrl)\n"
"\n"
"Sets the edit control.");

extern "C" {static PyObject *meth_wxGridEditorCreatedEvent_SetControl(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxGridEditorCreatedEvent_SetControl(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::wxControl* ctrl;
         ::wxGridEditorCreatedEvent *sipCpp;

        static const char *sipKwdList[] = {
            sipName_ctrl,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxGridEditorCreatedEvent, &sipCpp, sipType_wxControl, &ctrl))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetControl(ctrl);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_SetControl, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_SetRow, "SetRow(row)\n"
"\n"
"Sets the row at which the event occurred.");

extern "C" {static PyObject *meth_wxGridEditorCreatedEvent_SetRow(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxGridEditorCreatedEvent_SetRow(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int row;
         ::wxGridEditorCreatedEvent *sipCpp;

        static const char *sipKwdList[] = {
            sipName_row,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxGridEditorCreatedEvent, &sipCpp, &row))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetRow(row);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_SetRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_Clone, "Clone(self) -> Event");

extern "C" {static PyObject *meth_wxGridEditorCreatedEvent_Clone(PyObject *, PyObject *);}
static PyObject *meth_wxGridEditorCreatedEvent_Clone(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::wxGridEditorCreatedEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridEditorCreatedEvent, &sipCpp))
        {
             ::wxEvent*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxGridEditorCreatedEvent::Clone() : sipCpp->Clone());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromNewType(sipRes,sipType_wxEvent,SIP_NULLPTR);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_Clone, doc_wxGridEditorCreatedEvent_Clone);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_wxGridEditorCreatedEvent(void *, const sipTypeDef *);}
static void *cast_wxGridEditorCreatedEvent(void *sipCppV, const sipTypeDef *targetType)
{
     ::wxGridEditorCreatedEvent *sipCpp = reinterpret_cast< ::wxGridEditorCreatedEvent *>(sipCppV);

    if (targetType == sipType_wxCommandEvent)
        return static_cast< ::wxCommandEvent *>(sipCpp);

    if (targetType == sipType_wxEvent)
        return static_cast< ::wxEvent *>(sipCpp);

    if (targetType == sipType_wxObject)
        return static_cast< ::wxObject *>(sipCpp);

    return sipCppV;
}


/* Call the instance's destructor. */
extern "C" {static void release_wxGridEditorCreatedEvent(void *, int);}
static void release_wxGridEditorCreatedEvent(void *sipCppV, int sipState)
{
    Py_BEGIN_ALLOW_THREADS

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxGridEditorCreatedEvent *>(sipCppV);
    else
        delete reinterpret_cast< ::wxGridEditorCreatedEvent *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_wxGridEditorCreatedEvent(sipSimpleWrapper *);}
static void dealloc_wxGridEditorCreatedEvent(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipwxGridEditorCreatedEvent *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_wxGridEditorCreatedEvent(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_wxGridEditorCreatedEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_wxGridEditorCreatedEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipwxGridEditorCreatedEvent *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxGridEditorCreatedEvent();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        int id;
         ::wxEventType type;
         ::wxObject* obj;
        int row;
        int col;
         ::wxControl* ctrl;

        static const char *sipKwdList[] = {
            sipName_id,
            sipName_type,
            sipName_obj,
            sipName_row,
            sipName_col,
            sipName_ctrl,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "iiJ8iiJ8", &id, &type, sipType_wxObject, &obj, &row, &col, sipType_wxControl, &ctrl))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxGridEditorCreatedEvent(id,type,obj,row,col,ctrl);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxGridEditorCreatedEvent* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxGridEditorCreatedEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxGridEditorCreatedEvent(*a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxGridEditorCreatedEvent[] = {{6, 0, 1}};


static PyMethodDef methods_wxGridEditorCreatedEvent[] = {
    {SIP_MLNAME_CAST(sipName_Clone), meth_wxGridEditorCreatedEvent_Clone, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridEditorCreatedEvent_Clone)},
    {SIP_MLNAME_CAST(sipName_GetCol), meth_wxGridEditorCreatedEvent_GetCol, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridEditorCreatedEvent_GetCol)},
    {SIP_MLNAME_CAST(sipName_GetControl), meth_wxGridEditorCreatedEvent_GetControl, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridEditorCreatedEvent_GetControl)},
    {SIP_MLNAME_CAST(sipName_GetRow), meth_wxGridEditorCreatedEvent_GetRow, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridEditorCreatedEvent_GetRow)},
    {SIP_MLNAME_CAST(sipName_SetCol), SIP_MLMETH_CAST(meth_wxGridEditorCreatedEvent_SetCol), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridEditorCreatedEvent_SetCol)},
    {SIP_MLNAME_CAST(sipName_SetControl), SIP_MLMETH_CAST(meth_wxGridEditorCreatedEvent_SetControl), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridEditorCreatedEvent_SetControl)},
    {SIP_MLNAME_CAST(sipName_SetRow), SIP_MLMETH_CAST(meth_wxGridEditorCreatedEvent_SetRow), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridEditorCreatedEvent_SetRow)}
};

sipVariableDef variables_wxGridEditorCreatedEvent[] = {
    {PropertyVariable, sipName_Row, &methods_wxGridEditorCreatedEvent[3], &methods_wxGridEditorCreatedEvent[6], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Control, &methods_wxGridEditorCreatedEvent[2], &methods_wxGridEditorCreatedEvent[5], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Col, &methods_wxGridEditorCreatedEvent[1], &methods_wxGridEditorCreatedEvent[4], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxGridEditorCreatedEvent, "GridEditorCreatedEvent()\n"
"GridEditorCreatedEvent(id, type, obj, row, col, ctrl)");


sipClassTypeDef sipTypeDef__grid_wxGridEditorCreatedEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxGridEditorCreatedEvent,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_GridEditorCreatedEvent,
        {0, 0, 1},
        7, methods_wxGridEditorCreatedEvent,
        0, SIP_NULLPTR,
        3, variables_wxGridEditorCreatedEvent,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxGridEditorCreatedEvent,
    -1,
    -1,
    supers_wxGridEditorCreatedEvent,
    SIP_NULLPTR,
    init_type_wxGridEditorCreatedEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxGridEditorCreatedEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxGridEditorCreatedEvent,
    cast_wxGridEditorCreatedEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
