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

#include "sipAPI_dataview.h"
        #include <wx/dataview.h>
        #include <wx/gdicmn.h>
        #include <wx/dc.h>
        #include <wx/gdicmn.h>
        #include <wx/gdicmn.h>
        #include <wx/dataview.h>
        #include <wx/dataview.h>
        #include <wx/window.h>
        #include <wx/dataview.h>
        #include <wx/event.h>
        #include <wx/dataview.h>
        #include <wx/dataview.h>
        #include <wx/dataview.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxDataViewSpinRenderer : public ::wxDataViewSpinRenderer
{
public:
    sipwxDataViewSpinRenderer(int, int, ::wxDataViewCellMode, int);
    virtual ~sipwxDataViewSpinRenderer();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    ::wxDataViewCtrl* sipProtect_GetView() const;
    ::wxSize sipProtect_GetTextExtent(const ::wxString&) const;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool FinishEditing() SIP_OVERRIDE;
    void CancelEditing() SIP_OVERRIDE;
    bool StartEditing(const ::wxDataViewItem&, ::wxRect) SIP_OVERRIDE;
    bool GetValueFromEditorCtrl(::wxWindow*, ::wxVariant&) SIP_OVERRIDE;
    ::wxWindow* CreateEditorCtrl(::wxWindow*, ::wxRect, const ::wxVariant&) SIP_OVERRIDE;
    bool HasEditorCtrl() const SIP_OVERRIDE;
    bool Validate(::wxDVCVariant&) SIP_OVERRIDE;
    bool SetValue(const ::wxVariant&) SIP_OVERRIDE;
    void SetAlignment(int) SIP_OVERRIDE;
    bool IsCompatibleVariantType(const ::wxString&) const SIP_OVERRIDE;
    bool GetValue(::wxVariant&) const SIP_OVERRIDE;
    ::wxDataViewCellMode GetMode() const SIP_OVERRIDE;
    int GetAlignment() const SIP_OVERRIDE;
    bool ActivateCell(const ::wxRect&, ::wxDataViewModel*, const ::wxDataViewItem&, uint, const ::wxMouseEvent*) SIP_OVERRIDE;
    ::wxSize GetSize() const SIP_OVERRIDE;
    bool LeftClick(::wxPoint, ::wxRect, ::wxDataViewModel*, const ::wxDataViewItem&, uint) SIP_OVERRIDE;
    bool Activate(::wxRect, ::wxDataViewModel*, const ::wxDataViewItem&, uint) SIP_OVERRIDE;
    bool Render(::wxRect, ::wxDC*, int) SIP_OVERRIDE;
    bool StartDrag(const ::wxPoint&, const ::wxRect&, ::wxDataViewModel*, const ::wxDataViewItem&, uint) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[19];
};

sipwxDataViewSpinRenderer::sipwxDataViewSpinRenderer(int min, int max, ::wxDataViewCellMode mode, int align): ::wxDataViewSpinRenderer(min, max, mode, align), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

bool sipwxDataViewSpinRenderer::FinishEditing()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::FinishEditing();

    extern bool sipVH__dataview_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

void sipwxDataViewSpinRenderer::CancelEditing()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::wxDataViewSpinRenderer::CancelEditing();
        return;
    }

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

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

bool sipwxDataViewSpinRenderer::StartEditing(const ::wxDataViewItem& item, ::wxRect labelRect)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_StartEditing);

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::StartEditing(item, labelRect);

    extern bool sipVH__dataview_29(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDataViewItem&, ::wxRect);

    return sipVH__dataview_29(sipGILState, 0, sipPySelf, sipMeth, item, labelRect);
}

bool sipwxDataViewSpinRenderer::GetValueFromEditorCtrl(::wxWindow*editor, ::wxVariant& value)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::GetValueFromEditorCtrl(editor, value);

    extern bool sipVH__dataview_30(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxWindow*, ::wxVariant&);

    return sipVH__dataview_30(sipGILState, 0, sipPySelf, sipMeth, editor, value);
}

::wxWindow* sipwxDataViewSpinRenderer::CreateEditorCtrl(::wxWindow*parent, ::wxRect labelRect, const ::wxVariant& value)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::CreateEditorCtrl(parent, labelRect, value);

    extern ::wxWindow* sipVH__dataview_27(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxWindow*, ::wxRect, const ::wxVariant&);

    return sipVH__dataview_27(sipGILState, 0, sipPySelf, sipMeth, parent, labelRect, value);
}

bool sipwxDataViewSpinRenderer::HasEditorCtrl() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::HasEditorCtrl();

    extern bool sipVH__dataview_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipwxDataViewSpinRenderer::Validate(::wxDVCVariant& value)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::Validate(value);

    extern bool sipVH__dataview_26(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxDVCVariant&);

    return sipVH__dataview_26(sipGILState, 0, sipPySelf, sipMeth, value);
}

bool sipwxDataViewSpinRenderer::SetValue(const ::wxVariant& value)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::SetValue(value);

    extern bool sipVH__dataview_25(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxVariant&);

    return sipVH__dataview_25(sipGILState, 0, sipPySelf, sipMeth, value);
}

void sipwxDataViewSpinRenderer::SetAlignment(int align)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::wxDataViewSpinRenderer::SetAlignment(align);
        return;
    }

    extern void sipVH__dataview_24(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    sipVH__dataview_24(sipGILState, 0, sipPySelf, sipMeth, align);
}

bool sipwxDataViewSpinRenderer::IsCompatibleVariantType(const ::wxString& variantType) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::IsCompatibleVariantType(variantType);

    extern bool sipVH__dataview_23(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&);

    return sipVH__dataview_23(sipGILState, 0, sipPySelf, sipMeth, variantType);
}

bool sipwxDataViewSpinRenderer::GetValue(::wxVariant& value) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::GetValue(value);

    extern bool sipVH__dataview_22(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxVariant&);

    return sipVH__dataview_22(sipGILState, 0, sipPySelf, sipMeth, value);
}

::wxDataViewCellMode sipwxDataViewSpinRenderer::GetMode() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::GetMode();

    extern ::wxDataViewCellMode sipVH__dataview_21(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

int sipwxDataViewSpinRenderer::GetAlignment() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::GetAlignment();

    extern int sipVH__dataview_20(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipwxDataViewSpinRenderer::ActivateCell(const ::wxRect& cell, ::wxDataViewModel*model, const ::wxDataViewItem& item, uint col, const ::wxMouseEvent*mouseEvent)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::ActivateCell(cell, model, item, col, mouseEvent);

    extern bool sipVH__dataview_31(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxRect&, ::wxDataViewModel*, const ::wxDataViewItem&, uint, const ::wxMouseEvent*);

    return sipVH__dataview_31(sipGILState, 0, sipPySelf, sipMeth, cell, model, item, col, mouseEvent);
}

::wxSize sipwxDataViewSpinRenderer::GetSize() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::GetSize();

    extern ::wxSize sipVH__dataview_32(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipwxDataViewSpinRenderer::LeftClick(::wxPoint cursor, ::wxRect cell, ::wxDataViewModel*model, const ::wxDataViewItem& item, uint col)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[15], &sipPySelf, SIP_NULLPTR, sipName_LeftClick);

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::LeftClick(cursor, cell, model, item, col);

    extern bool sipVH__dataview_33(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxPoint, ::wxRect, ::wxDataViewModel*, const ::wxDataViewItem&, uint);

    return sipVH__dataview_33(sipGILState, 0, sipPySelf, sipMeth, cursor, cell, model, item, col);
}

bool sipwxDataViewSpinRenderer::Activate(::wxRect cell, ::wxDataViewModel*model, const ::wxDataViewItem& item, uint col)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::Activate(cell, model, item, col);

    extern bool sipVH__dataview_34(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxRect, ::wxDataViewModel*, const ::wxDataViewItem&, uint);

    return sipVH__dataview_34(sipGILState, 0, sipPySelf, sipMeth, cell, model, item, col);
}

bool sipwxDataViewSpinRenderer::Render(::wxRect cell, ::wxDC*dc, int state)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::Render(cell, dc, state);

    extern bool sipVH__dataview_35(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxRect, ::wxDC*, int);

    return sipVH__dataview_35(sipGILState, 0, sipPySelf, sipMeth, cell, dc, state);
}

bool sipwxDataViewSpinRenderer::StartDrag(const ::wxPoint& cursor, const ::wxRect& cell, ::wxDataViewModel*model, const ::wxDataViewItem& item, uint col)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewSpinRenderer::StartDrag(cursor, cell, model, item, col);

    extern bool sipVH__dataview_36(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxPoint&, const ::wxRect&, ::wxDataViewModel*, const ::wxDataViewItem&, uint);

    return sipVH__dataview_36(sipGILState, 0, sipPySelf, sipMeth, cursor, cell, model, item, col);
}

::wxDataViewCtrl* sipwxDataViewSpinRenderer::sipProtect_GetView() const
{
    return ::wxDataViewRenderer::GetView();
}

::wxSize sipwxDataViewSpinRenderer::sipProtect_GetTextExtent(const ::wxString& str) const
{
    return ::wxDataViewCustomRenderer::GetTextExtent(str);
}


PyDoc_STRVAR(doc_wxDataViewSpinRenderer_GetView, "GetView() -> DataViewCtrl");

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

    {
        const sipwxDataViewSpinRenderer *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtect_GetView();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_DataViewSpinRenderer, sipName_GetView, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewSpinRenderer_GetTextExtent, "GetTextExtent(str) -> wx.Size\n"
"\n"
"Helper for GetSize() implementations, respects attributes.");

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

    {
        const ::wxString* str;
        int strState = 0;
        const sipwxDataViewSpinRenderer *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxDataViewSpinRenderer, &sipCpp, sipType_wxString, &str, &strState))
        {
            ::wxSize*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxSize(sipCpp->sipProtect_GetTextExtent(*str));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(str), sipType_wxString, strState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_DataViewSpinRenderer, sipName_GetTextExtent, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewSpinRenderer_SetValue, "SetValue(self, value: Any) -> bool");

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

    {
        const ::wxDVCVariant* value;
        int valueState = 0;
        ::wxDataViewSpinRenderer *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxDataViewSpinRenderer, &sipCpp, sipType_wxDVCVariant, &value, &valueState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewSpinRenderer::SetValue(*value) : sipCpp->SetValue(*value));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxDVCVariant *>(value), sipType_wxDVCVariant, valueState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewSpinRenderer, sipName_SetValue, doc_wxDataViewSpinRenderer_SetValue);

    return SIP_NULLPTR;
}


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

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

    {
        ::wxDVCVariant* value;
        const ::wxDataViewSpinRenderer *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "B", &sipSelf, sipType_wxDataViewSpinRenderer, &sipCpp))
        {
            value = new ::wxDVCVariant();

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxDataViewSpinRenderer::GetValue(*value) : sipCpp->GetValue(*value));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromNewType(value, sipType_wxDVCVariant, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewSpinRenderer, sipName_GetValue, doc_wxDataViewSpinRenderer_GetValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewSpinRenderer_GetSize, "GetSize(self) -> Size");

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

    {
        const ::wxDataViewSpinRenderer *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxSize((sipSelfWasArg ? sipCpp->::wxDataViewSpinRenderer::GetSize() : sipCpp->GetSize()));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_DataViewSpinRenderer, sipName_GetSize, doc_wxDataViewSpinRenderer_GetSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewSpinRenderer_Render, "Render(self, cell: Rect, dc: DC|None, state: int) -> bool");

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

    {
        ::wxRect* cell;
        int cellState = 0;
        ::wxDC* dc;
        int state;
        ::wxDataViewSpinRenderer *sipCpp;

        static const char *sipKwdList[] = {
            sipName_cell,
            sipName_dc,
            sipName_state,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J8i", &sipSelf, sipType_wxDataViewSpinRenderer, &sipCpp, sipType_wxRect, &cell, &cellState, sipType_wxDC, &dc, &state))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewSpinRenderer::Render(*cell, dc, state) : sipCpp->Render(*cell, dc, state));
            Py_END_ALLOW_THREADS
            sipReleaseType(cell, sipType_wxRect, cellState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewSpinRenderer, sipName_Render, doc_wxDataViewSpinRenderer_Render);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxDataViewSpinRenderer)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxDataViewSpinRenderer *>(sipCppV);
    else
        delete reinterpret_cast< ::wxDataViewSpinRenderer *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

    {
        int min;
        int max;
        ::wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE;
        int align = wxDVR_DEFAULT_ALIGNMENT;

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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxDataViewSpinRenderer(min, max, mode, align);
            Py_END_ALLOW_THREADS

            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_wxDataViewSpinRenderer[] = {{10, 255, 1}};


static PyMethodDef methods_wxDataViewSpinRenderer[] = {
    {sipName_GetSize, meth_wxDataViewSpinRenderer_GetSize, METH_VARARGS, doc_wxDataViewSpinRenderer_GetSize},
    {sipName_GetTextExtent, SIP_MLMETH_CAST(meth_wxDataViewSpinRenderer_GetTextExtent), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR},
    {sipName_GetValue, SIP_MLMETH_CAST(meth_wxDataViewSpinRenderer_GetValue), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewSpinRenderer_GetValue},
    {sipName_GetView, meth_wxDataViewSpinRenderer_GetView, METH_VARARGS, SIP_NULLPTR},
    {sipName_Render, SIP_MLMETH_CAST(meth_wxDataViewSpinRenderer_Render), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewSpinRenderer_Render},
    {sipName_SetValue, SIP_MLMETH_CAST(meth_wxDataViewSpinRenderer_SetValue), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewSpinRenderer_SetValue}
};

sipVariableDef variables_wxDataViewSpinRenderer[] = {
    {PropertyVariable, sipName_Value, &methods_wxDataViewSpinRenderer[2], &methods_wxDataViewSpinRenderer[5], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxDataViewSpinRenderer, "DataViewSpinRenderer(min, max, mode=DATAVIEW_CELL_EDITABLE, align=DVR_DEFAULT_ALIGNMENT) -> None\n"
"\n"
"This is a specialized renderer for rendering integer values.");


sipClassTypeDef sipTypeDef__dataview_wxDataViewSpinRenderer = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxDataViewSpinRenderer,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_DataViewSpinRenderer,
        {0, 0, 1},
        6, methods_wxDataViewSpinRenderer,
        0, SIP_NULLPTR,
        1, variables_wxDataViewSpinRenderer,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxDataViewSpinRenderer,
    -1,
    -1,
    supers_wxDataViewSpinRenderer,
    SIP_NULLPTR,
    init_type_wxDataViewSpinRenderer,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxDataViewSpinRenderer,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxDataViewSpinRenderer,
    cast_wxDataViewSpinRenderer,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxDataViewSpinRenderer),
};
