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

#include "sipAPI_grid.h"
        #include <wx/grid.h>
        #include <wx/grid.h>
        #include <wx/window.h>
        #include <wx/event.h>
        #include <wx/grid.h>
        #include <wx/validate.h>
        #include <wx/grid.h>
        #include <wx/grid.h>
        #include <wx/control.h>
        #include <wx/event.h>
        #include <wx/grid.h>
        #include <wx/gdicmn.h>
        #include <wx/dc.h>
    PyObject* _wxGridCellNumberEditor_EndEdit(wxGridCellNumberEditor* self, int row, int col, const wxGrid* grid, const wxString* oldval)
    {
        bool rv;
        wxString newval;
        rv = self->EndEdit(row, col, grid, *oldval, &newval);
        if (rv) {
            return wx2PyString(newval);
        }
        else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }


class sipwxGridCellNumberEditor : public ::wxGridCellNumberEditor
{
public:
    sipwxGridCellNumberEditor(int, int);
    virtual ~sipwxGridCellNumberEditor();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void DoActivate(int, int, ::wxGrid*) SIP_OVERRIDE;
    ::wxGridActivationResult TryActivate(int, int, ::wxGrid*, const ::wxGridActivationSource&) SIP_OVERRIDE;
    ::wxString GetValue() const SIP_OVERRIDE;
    bool IsAcceptedKey(::wxKeyEvent&) SIP_OVERRIDE;
    void StartingKey(::wxKeyEvent&) SIP_OVERRIDE;
    void StartingClick() SIP_OVERRIDE;
    void Show(bool, ::wxGridCellAttr*) SIP_OVERRIDE;
    void SetSize(const ::wxRect&) SIP_OVERRIDE;
    void Reset() SIP_OVERRIDE;
    void PaintBackground(::wxDC&, const ::wxRect&, const ::wxGridCellAttr&) SIP_OVERRIDE;
    void HandleReturn(::wxKeyEvent&) SIP_OVERRIDE;
    void ApplyEdit(int, int, ::wxGrid*) SIP_OVERRIDE;
    bool EndEdit(int, int, const ::wxGrid*, const ::wxString&, ::wxString*) SIP_OVERRIDE;
    void Destroy() SIP_OVERRIDE;
    void Create(::wxWindow*, ::wxWindowID, ::wxEvtHandler*) SIP_OVERRIDE;
    ::wxGridCellEditor* Clone() const SIP_OVERRIDE;
    void BeginEdit(int, int, ::wxGrid*) SIP_OVERRIDE;
    void SetParameters(const ::wxString&) SIP_OVERRIDE;
    void SetValidator(const ::wxValidator&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[19];
};

sipwxGridCellNumberEditor::sipwxGridCellNumberEditor(int min, int max): ::wxGridCellNumberEditor(min, max), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

void sipwxGridCellNumberEditor::DoActivate(int row, int col, ::wxGrid*grid)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_DoActivate);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::DoActivate(row, col, grid);
        return;
    }

    extern void sipVH__grid_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, int, ::wxGrid*);

    sipVH__grid_6(sipGILState, 0, sipPySelf, sipMeth, row, col, grid);
}

::wxGridActivationResult sipwxGridCellNumberEditor::TryActivate(int row, int col, ::wxGrid*grid, const ::wxGridActivationSource& actSource)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_TryActivate);

    if (!sipMeth)
        return ::wxGridCellNumberEditor::TryActivate(row, col, grid, actSource);

    extern ::wxGridActivationResult sipVH__grid_17(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, int, ::wxGrid*, const ::wxGridActivationSource&);

    return sipVH__grid_17(sipGILState, 0, sipPySelf, sipMeth, row, col, grid, actSource);
}

::wxString sipwxGridCellNumberEditor::GetValue() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxGridCellNumberEditor::GetValue();

    extern ::wxString sipVH__grid_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipwxGridCellNumberEditor::IsAcceptedKey(::wxKeyEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_IsAcceptedKey);

    if (!sipMeth)
        return ::wxGridCellNumberEditor::IsAcceptedKey(event);

    extern bool sipVH__grid_15(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxKeyEvent&);

    return sipVH__grid_15(sipGILState, 0, sipPySelf, sipMeth, event);
}

void sipwxGridCellNumberEditor::StartingKey(::wxKeyEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_StartingKey);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::StartingKey(event);
        return;
    }

    extern void sipVH__grid_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxKeyEvent&);

    sipVH__grid_11(sipGILState, 0, sipPySelf, sipMeth, event);
}

void sipwxGridCellNumberEditor::StartingClick()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_StartingClick);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::StartingClick();
        return;
    }

    extern void sipVH__grid_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH__grid_9(sipGILState, 0, sipPySelf, sipMeth);
}

void sipwxGridCellNumberEditor::Show(bool show, ::wxGridCellAttr*attr)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_Show);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::Show(show, attr);
        return;
    }

    extern void sipVH__grid_14(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, bool, ::wxGridCellAttr*);

    sipVH__grid_14(sipGILState, 0, sipPySelf, sipMeth, show, attr);
}

void sipwxGridCellNumberEditor::SetSize(const ::wxRect& rect)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[7], &sipPySelf, SIP_NULLPTR, sipName_SetSize);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::SetSize(rect);
        return;
    }

    extern void sipVH__grid_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxRect&);

    sipVH__grid_13(sipGILState, 0, sipPySelf, sipMeth, rect);
}

void sipwxGridCellNumberEditor::Reset()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[8], &sipPySelf, SIP_NULLPTR, sipName_Reset);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::Reset();
        return;
    }

    extern void sipVH__grid_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH__grid_9(sipGILState, 0, sipPySelf, sipMeth);
}

void sipwxGridCellNumberEditor::PaintBackground(::wxDC& dc, const ::wxRect& rectCell, const ::wxGridCellAttr& attr)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[9], &sipPySelf, SIP_NULLPTR, sipName_PaintBackground);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::PaintBackground(dc, rectCell, attr);
        return;
    }

    extern void sipVH__grid_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxDC&, const ::wxRect&, const ::wxGridCellAttr&);

    sipVH__grid_12(sipGILState, 0, sipPySelf, sipMeth, dc, rectCell, attr);
}

void sipwxGridCellNumberEditor::HandleReturn(::wxKeyEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[10], &sipPySelf, SIP_NULLPTR, sipName_HandleReturn);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::HandleReturn(event);
        return;
    }

    extern void sipVH__grid_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxKeyEvent&);

    sipVH__grid_11(sipGILState, 0, sipPySelf, sipMeth, event);
}

void sipwxGridCellNumberEditor::ApplyEdit(int row, int col, ::wxGrid*grid)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[11], &sipPySelf, SIP_NULLPTR, sipName_ApplyEdit);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::ApplyEdit(row, col, grid);
        return;
    }

    extern void sipVH__grid_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, int, ::wxGrid*);

    sipVH__grid_6(sipGILState, 0, sipPySelf, sipMeth, row, col, grid);
}

bool sipwxGridCellNumberEditor::EndEdit(int row, int col, const ::wxGrid*grid, const ::wxString& oldval, ::wxString*newval)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[12], &sipPySelf, SIP_NULLPTR, sipName_EndEdit);

    if (!sipMeth)
        return ::wxGridCellNumberEditor::EndEdit(row, col, grid, oldval, newval);

    extern bool sipVH__grid_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, int, const ::wxGrid*, const ::wxString&, ::wxString*);

    return sipVH__grid_10(sipGILState, 0, sipPySelf, sipMeth, row, col, grid, oldval, newval);
}

void sipwxGridCellNumberEditor::Destroy()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[13], &sipPySelf, SIP_NULLPTR, sipName_Destroy);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::Destroy();
        return;
    }

    extern void sipVH__grid_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH__grid_9(sipGILState, 0, sipPySelf, sipMeth);
}

void sipwxGridCellNumberEditor::Create(::wxWindow*parent, ::wxWindowID id, ::wxEvtHandler*evtHandler)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[14], &sipPySelf, SIP_NULLPTR, sipName_Create);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::Create(parent, id, evtHandler);
        return;
    }

    extern void sipVH__grid_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxWindow*, ::wxWindowID, ::wxEvtHandler*);

    sipVH__grid_8(sipGILState, 0, sipPySelf, sipMeth, parent, id, evtHandler);
}

::wxGridCellEditor* sipwxGridCellNumberEditor::Clone() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

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

    extern ::wxGridCellEditor* sipVH__grid_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

void sipwxGridCellNumberEditor::BeginEdit(int row, int col, ::wxGrid*grid)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[16], &sipPySelf, SIP_NULLPTR, sipName_BeginEdit);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::BeginEdit(row, col, grid);
        return;
    }

    extern void sipVH__grid_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, int, ::wxGrid*);

    sipVH__grid_6(sipGILState, 0, sipPySelf, sipMeth, row, col, grid);
}

void sipwxGridCellNumberEditor::SetParameters(const ::wxString& params)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[17], &sipPySelf, SIP_NULLPTR, sipName_SetParameters);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::SetParameters(params);
        return;
    }

    extern void sipVH__grid_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&);

    sipVH__grid_5(sipGILState, 0, sipPySelf, sipMeth, params);
}

void sipwxGridCellNumberEditor::SetValidator(const ::wxValidator& validator)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[18], &sipPySelf, SIP_NULLPTR, sipName_SetValidator);

    if (!sipMeth)
    {
        ::wxGridCellNumberEditor::SetValidator(validator);
        return;
    }

    extern void sipVH__grid_18(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxValidator&);

    sipVH__grid_18(sipGILState, 0, sipPySelf, sipMeth, validator);
}


PyDoc_STRVAR(doc_wxGridCellNumberEditor_SetParameters, "SetParameters(params) -> None\n"
"\n"
"Parameters string format is \"min,max\".");

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

    {
        const ::wxString* params;
        int paramsState = 0;
        ::wxGridCellNumberEditor *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxGridCellNumberEditor, &sipCpp, sipType_wxString, &params, &paramsState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxGridCellNumberEditor::SetParameters(*params) : sipCpp->SetParameters(*params));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<::wxString *>(params), sipType_wxString, paramsState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridCellNumberEditor, sipName_SetParameters, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridCellNumberEditor_BeginEdit, "BeginEdit(self, row: int, col: int, grid: Optional[Grid])");

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

    {
        int row;
        int col;
        ::wxGrid* grid;
        ::wxGridCellNumberEditor *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8", &sipSelf, sipType_wxGridCellNumberEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxGridCellNumberEditor::BeginEdit(row, col, grid) : sipCpp->BeginEdit(row, col, grid));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridCellNumberEditor, sipName_BeginEdit, doc_wxGridCellNumberEditor_BeginEdit);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridCellNumberEditor_Clone, "Clone(self) -> Optional[GridCellEditor]");

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

    {
        const ::wxGridCellNumberEditor *sipCpp;

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

            PyErr_Clear();

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

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_GridCellNumberEditor, sipName_Clone, doc_wxGridCellNumberEditor_Clone);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridCellNumberEditor_Create, "Create(self, parent: Optional[Window], id: int, evtHandler: Optional[EvtHandler])");

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

    {
        ::wxWindow* parent;
        ::wxWindowID id;
        ::wxEvtHandler* evtHandler;
        ::wxGridCellNumberEditor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_parent,
            sipName_id,
            sipName_evtHandler,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8iJ8", &sipSelf, sipType_wxGridCellNumberEditor, &sipCpp, sipType_wxWindow, &parent, &id, sipType_wxEvtHandler, &evtHandler))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxGridCellNumberEditor::Create(parent, id, evtHandler) : sipCpp->Create(parent, id, evtHandler));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridCellNumberEditor, sipName_Create, doc_wxGridCellNumberEditor_Create);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridCellNumberEditor_ApplyEdit, "ApplyEdit(self, row: int, col: int, grid: Optional[Grid])");

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

    {
        int row;
        int col;
        ::wxGrid* grid;
        ::wxGridCellNumberEditor *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8", &sipSelf, sipType_wxGridCellNumberEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxGridCellNumberEditor::ApplyEdit(row, col, grid) : sipCpp->ApplyEdit(row, col, grid));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridCellNumberEditor, sipName_ApplyEdit, doc_wxGridCellNumberEditor_ApplyEdit);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridCellNumberEditor_Reset, "Reset(self)");

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

    {
        ::wxGridCellNumberEditor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridCellNumberEditor, &sipCpp))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxGridCellNumberEditor::Reset() : sipCpp->Reset());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridCellNumberEditor, sipName_Reset, doc_wxGridCellNumberEditor_Reset);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridCellNumberEditor_GetValue, "GetValue(self) -> Any");

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

    {
        const ::wxGridCellNumberEditor *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString((sipSelfWasArg ? sipCpp->::wxGridCellNumberEditor::GetValue() : sipCpp->GetValue()));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_GridCellNumberEditor, sipName_GetValue, doc_wxGridCellNumberEditor_GetValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridCellNumberEditor_EndEdit, "EndEdit(row, col, grid, oldval)\n"
"\n"
"End editing the cell.\n"
"\n"
"This function must check if the current value of the editing cell\n"
"is valid and different from the original value in its string\n"
"form. If not then simply return None.  If it has changed then\n"
"this method should save the new value so that ApplyEdit can\n"
"apply it later and the string representation of the new value\n"
"should be returned.\n"
"\n"
"Notice that this method shoiuld not modify the grid as the\n"
"change could still be vetoed.");

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

    {
        int row;
        int col;
        const ::wxGrid* grid;
        const ::wxString* oldval;
        int oldvalState = 0;
        ::wxGridCellNumberEditor *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiiJ8J1", &sipSelf, sipType_wxGridCellNumberEditor, &sipCpp, &row, &col, sipType_wxGrid, &grid, sipType_wxString, &oldval, &oldvalState))
        {
            PyObject * sipRes = SIP_NULLPTR;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxGridCellNumberEditor_EndEdit(sipCpp, row, col, grid, oldval);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;
            sipReleaseType(const_cast<::wxString *>(oldval), sipType_wxString, oldvalState);

            if (sipIsErr)
                return 0;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridCellNumberEditor, sipName_EndEdit, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxGridCellNumberEditor)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxGridCellNumberEditor *>(sipCppV);
    else
        delete reinterpret_cast<::wxGridCellNumberEditor *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void *array_wxGridCellNumberEditor(Py_ssize_t);}
static void *array_wxGridCellNumberEditor(Py_ssize_t sipNrElem)
{
    return new ::wxGridCellNumberEditor[sipNrElem];
}


extern "C" {static void array_delete_wxGridCellNumberEditor(void *);}
static void array_delete_wxGridCellNumberEditor(void *sipCpp)
{
    delete[] reinterpret_cast<::wxGridCellNumberEditor *>(sipCpp);
}


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

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


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

    {
        int min = -1;
        int max = -1;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|ii", &min, &max))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxGridCellNumberEditor(min, max);
            Py_END_ALLOW_THREADS

            *sipOwner = Py_None;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxGridCellNumberEditor[] = {{38, 255, 1}};


static PyMethodDef methods_wxGridCellNumberEditor[] = {
    {sipName_ApplyEdit, SIP_MLMETH_CAST(meth_wxGridCellNumberEditor_ApplyEdit), METH_VARARGS|METH_KEYWORDS, doc_wxGridCellNumberEditor_ApplyEdit},
    {sipName_BeginEdit, SIP_MLMETH_CAST(meth_wxGridCellNumberEditor_BeginEdit), METH_VARARGS|METH_KEYWORDS, doc_wxGridCellNumberEditor_BeginEdit},
    {sipName_Clone, meth_wxGridCellNumberEditor_Clone, METH_VARARGS, doc_wxGridCellNumberEditor_Clone},
    {sipName_Create, SIP_MLMETH_CAST(meth_wxGridCellNumberEditor_Create), METH_VARARGS|METH_KEYWORDS, doc_wxGridCellNumberEditor_Create},
    {sipName_EndEdit, SIP_MLMETH_CAST(meth_wxGridCellNumberEditor_EndEdit), METH_VARARGS|METH_KEYWORDS, doc_wxGridCellNumberEditor_EndEdit},
    {sipName_GetValue, meth_wxGridCellNumberEditor_GetValue, METH_VARARGS, doc_wxGridCellNumberEditor_GetValue},
    {sipName_Reset, meth_wxGridCellNumberEditor_Reset, METH_VARARGS, doc_wxGridCellNumberEditor_Reset},
    {sipName_SetParameters, SIP_MLMETH_CAST(meth_wxGridCellNumberEditor_SetParameters), METH_VARARGS|METH_KEYWORDS, doc_wxGridCellNumberEditor_SetParameters}
};

PyDoc_STRVAR(doc_wxGridCellNumberEditor, "GridCellNumberEditor(min=-1, max=-1) -> None\n"
"\n"
"Grid cell editor for numeric integer data.");


sipClassTypeDef sipTypeDef__grid_wxGridCellNumberEditor = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxGridCellNumberEditor,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_GridCellNumberEditor,
        {0, 0, 1},
        8, methods_wxGridCellNumberEditor,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxGridCellNumberEditor,
    -1,
    -1,
    supers_wxGridCellNumberEditor,
    SIP_NULLPTR,
    init_type_wxGridCellNumberEditor,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxGridCellNumberEditor,
    SIP_NULLPTR,
    array_wxGridCellNumberEditor,
    SIP_NULLPTR,
    release_wxGridCellNumberEditor,
    cast_wxGridCellNumberEditor,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxGridCellNumberEditor,
    sizeof (::wxGridCellNumberEditor),
};
