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

#include "sipAPI_dataview.h"

        #include <wx/dataview.h>

        #include <wx/dataview.h>
        #include <wx/window.h>
        #include <wx/dataview.h>
        #include <wx/gdicmn.h>
        #include <wx/dataview.h>
        #include <wx/dataview.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxDataViewCheckIconTextRenderer : public  ::wxDataViewCheckIconTextRenderer
{
public:
    sipwxDataViewCheckIconTextRenderer( ::wxDataViewCellMode,int);
    virtual ~sipwxDataViewCheckIconTextRenderer();

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

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    int GetAlignment() const SIP_OVERRIDE;
     ::wxDataViewCellMode GetMode() const SIP_OVERRIDE;
    bool GetValue( ::wxVariant&) const SIP_OVERRIDE;
    void SetAlignment(int) SIP_OVERRIDE;
    bool SetValue(const  ::wxVariant&) SIP_OVERRIDE;
    bool Validate( ::wxDVCVariant&) SIP_OVERRIDE;
    bool HasEditorCtrl() const SIP_OVERRIDE;
     ::wxWindow* CreateEditorCtrl( ::wxWindow*, ::wxRect,const  ::wxVariant&) SIP_OVERRIDE;
    bool GetValueFromEditorCtrl( ::wxWindow*, ::wxVariant&) SIP_OVERRIDE;
    bool StartEditing(const  ::wxDataViewItem&, ::wxRect) SIP_OVERRIDE;
    void CancelEditing() SIP_OVERRIDE;
    bool FinishEditing() SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[12];
};

sipwxDataViewCheckIconTextRenderer::sipwxDataViewCheckIconTextRenderer( ::wxDataViewCellMode mode,int align):  ::wxDataViewCheckIconTextRenderer(mode,align), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

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

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

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

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

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

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

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

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

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

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

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

    if (!sipMeth)
        return 0;

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

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

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

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

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

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

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

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

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,sipName_DataViewCheckIconTextRenderer,sipName_SetValue);

    if (!sipMeth)
        return 0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if (!sipMeth)
        return  ::wxDataViewCheckIconTextRenderer::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 sipwxDataViewCheckIconTextRenderer::GetValueFromEditorCtrl( ::wxWindow*editor, ::wxVariant& value)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

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

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

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

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

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

    if (!sipMeth)
        return  ::wxDataViewCheckIconTextRenderer::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);
}

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

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

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

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

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

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

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

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

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

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

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


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

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

    {
        const sipwxDataViewCheckIconTextRenderer *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDataViewCheckIconTextRenderer, &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_DataViewCheckIconTextRenderer, sipName_GetView, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewCheckIconTextRenderer_GetDefaultType, "GetDefaultType() -> String");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
             ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxString( ::wxDataViewCheckIconTextRenderer::GetDefaultType());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_DataViewCheckIconTextRenderer, sipName_GetDefaultType, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewCheckIconTextRenderer_Allow3rdStateForUser, "Allow3rdStateForUser(allow=True)\n"
"\n"
"Allow the user to interactively select the 3rd state for the items\n"
"rendered by this object.");

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

    {
        bool allow = 1;
         ::wxDataViewCheckIconTextRenderer *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|b", &sipSelf, sipType_wxDataViewCheckIconTextRenderer, &sipCpp, &allow))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Allow3rdStateForUser(allow);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewCheckIconTextRenderer, sipName_Allow3rdStateForUser, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxDataViewRenderer)
        return static_cast< ::wxDataViewRenderer *>(sipCpp);

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

    return sipCppV;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxDataViewCheckIconTextRenderer *>(sipCppV);
    else
        delete reinterpret_cast< ::wxDataViewCheckIconTextRenderer *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

    {
         ::wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE;
        int align = wxDVR_DEFAULT_ALIGNMENT;

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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxDataViewCheckIconTextRenderer(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_wxDataViewCheckIconTextRenderer[] = {{24, 255, 1}};


static PyMethodDef methods_wxDataViewCheckIconTextRenderer[] = {
    {SIP_MLNAME_CAST(sipName_Allow3rdStateForUser), SIP_MLMETH_CAST(meth_wxDataViewCheckIconTextRenderer_Allow3rdStateForUser), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDataViewCheckIconTextRenderer_Allow3rdStateForUser)},
    {SIP_MLNAME_CAST(sipName_GetDefaultType), meth_wxDataViewCheckIconTextRenderer_GetDefaultType, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDataViewCheckIconTextRenderer_GetDefaultType)},
    {SIP_MLNAME_CAST(sipName_GetView), meth_wxDataViewCheckIconTextRenderer_GetView, METH_VARARGS, SIP_NULLPTR}
};

PyDoc_STRVAR(doc_wxDataViewCheckIconTextRenderer, "DataViewCheckIconTextRenderer(mode=DATAVIEW_CELL_ACTIVATABLE, align=DVR_DEFAULT_ALIGNMENT)\n"
"\n"
"This renderer class shows a checkbox in addition to the icon and text\n"
"shown by the base class and also allows the user to toggle this\n"
"checkbox.");


sipClassTypeDef sipTypeDef__dataview_wxDataViewCheckIconTextRenderer = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxDataViewCheckIconTextRenderer,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_DataViewCheckIconTextRenderer,
        {0, 0, 1},
        3, methods_wxDataViewCheckIconTextRenderer,
        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_wxDataViewCheckIconTextRenderer,
    -1,
    -1,
    supers_wxDataViewCheckIconTextRenderer,
    SIP_NULLPTR,
    init_type_wxDataViewCheckIconTextRenderer,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxDataViewCheckIconTextRenderer,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxDataViewCheckIconTextRenderer,
    cast_wxDataViewCheckIconTextRenderer,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
