/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.1
 *
 *     Copyright: (c) 2020 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/window.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]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_GetEventCategory);

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

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

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

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

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

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

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

    return sipVH__grid_69(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;

    {
        const ::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 PyLong_FromLong(sipRes);
        }
    }

    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);
        }
    }

    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;

    {
        const ::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 PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_GetRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_GetWindow, "GetWindow() -> wx.Window\n"
"\n"
"Returns the edit window.");

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

    {
        const ::wxGridEditorCreatedEvent *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetWindow();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_GetWindow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_SetCol, "SetCol(col) -> None\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;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_SetCol, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_SetControl, "SetControl(ctrl) -> None\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;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_SetControl, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_SetRow, "SetRow(row) -> None\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;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_SetRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridEditorCreatedEvent_SetWindow, "SetWindow(window) -> None\n"
"\n"
"Sets the edit window.");

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

    {
        ::wxWindow* window;
        ::wxGridEditorCreatedEvent *sipCpp;

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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetWindow(window);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridEditorCreatedEvent, sipName_SetWindow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

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);
        }
    }

    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_wxGridEditorCreatedEvent)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_wxCommandEvent)->ctd_cast(static_cast< ::wxCommandEvent *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


/* 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[] = {{5, 0, 1}};


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

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

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


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},
        9, methods_wxGridEditorCreatedEvent,
        0, SIP_NULLPTR,
        4, 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,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxGridEditorCreatedEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxGridEditorCreatedEvent,
    cast_wxGridEditorCreatedEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxGridEditorCreatedEvent),
};
