/*
 * 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/bmpbndl.h>
        #include <wx/icon.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


PyDoc_STRVAR(doc_wxDataViewCheckIconText_SetCheckedState, "SetCheckedState(state) -> None\n"
"\n"
"Sets the checked state.");

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

    {
        ::wxCheckBoxState state;
        ::wxDataViewCheckIconText *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE", &sipSelf, sipType_wxDataViewCheckIconText, &sipCpp, sipType_wxCheckBoxState, &state))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetCheckedState(state);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewCheckIconText, sipName_SetCheckedState, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewCheckIconText_GetCheckedState, "GetCheckedState() -> wx.CheckBoxState\n"
"\n"
"Gets the checked state.");

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

    {
        const ::wxDataViewCheckIconText *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDataViewCheckIconText, &sipCpp))
        {
            ::wxCheckBoxState sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetCheckedState();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_wxCheckBoxState);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewCheckIconText, sipName_GetCheckedState, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxDataViewCheckIconText)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

    delete reinterpret_cast< ::wxDataViewCheckIconText *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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


extern "C" {static void assign_wxDataViewCheckIconText(void *, Py_ssize_t, void *);}
static void assign_wxDataViewCheckIconText(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxDataViewCheckIconText *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxDataViewCheckIconText *>(sipSrc);
}


extern "C" {static void *copy_wxDataViewCheckIconText(const void *, Py_ssize_t);}
static void *copy_wxDataViewCheckIconText(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::wxDataViewCheckIconText(reinterpret_cast<const ::wxDataViewCheckIconText *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_wxDataViewCheckIconText(sipSimpleWrapper *);}
static void dealloc_wxDataViewCheckIconText(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_wxDataViewCheckIconText(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_wxDataViewCheckIconText(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_wxDataViewCheckIconText(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::wxDataViewCheckIconText *sipCpp = SIP_NULLPTR;

    {
        const ::wxString& textdef = wxEmptyString;
        const ::wxString* text = &textdef;
        int textState = 0;
        const ::wxBitmapBundle& icondef = wxBitmapBundle();
        const ::wxBitmapBundle* icon = &icondef;
        int iconState = 0;
        ::wxCheckBoxState checkedState = wxCHK_UNDETERMINED;

        static const char *sipKwdList[] = {
            sipName_text,
            sipName_icon,
            sipName_checkedState,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1J1E", sipType_wxString, &text, &textState, sipType_wxBitmapBundle, &icon, &iconState, sipType_wxCheckBoxState, &checkedState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxDataViewCheckIconText(*text, *icon, checkedState);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(text), sipType_wxString, textState);
            sipReleaseType(const_cast< ::wxBitmapBundle *>(icon), sipType_wxBitmapBundle, iconState);

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

            return sipCpp;
        }
    }

    {
        const ::wxDataViewCheckIconText* other;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9", sipType_wxDataViewCheckIconText, &other))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxDataViewCheckIconText(*other);
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxDataViewCheckIconText[] = {
    {sipName_GetCheckedState, meth_wxDataViewCheckIconText_GetCheckedState, METH_VARARGS, doc_wxDataViewCheckIconText_GetCheckedState},
    {sipName_SetCheckedState, SIP_MLMETH_CAST(meth_wxDataViewCheckIconText_SetCheckedState), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewCheckIconText_SetCheckedState}
};

sipVariableDef variables_wxDataViewCheckIconText[] = {
    {PropertyVariable, sipName_CheckedState, &methods_wxDataViewCheckIconText[0], &methods_wxDataViewCheckIconText[1], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxDataViewCheckIconText, "DataViewCheckIconText(text='', icon=wx.BitmapBundle(), checkedState=wx.CHK_UNDETERMINED) -> None\n"
"DataViewCheckIconText(other) -> None\n"
"\n"
"wxDataViewCheckIconText is used by wxDataViewCheckIconTextRenderer for\n"
"data transfer.");


sipClassTypeDef sipTypeDef__dataview_wxDataViewCheckIconText = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxDataViewCheckIconText,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_DataViewCheckIconText,
        {0, 0, 1},
        2, methods_wxDataViewCheckIconText,
        0, SIP_NULLPTR,
        1, variables_wxDataViewCheckIconText,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxDataViewCheckIconText,
    -1,
    -1,
    supers_wxDataViewCheckIconText,
    SIP_NULLPTR,
    init_type_wxDataViewCheckIconText,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxDataViewCheckIconText,
    assign_wxDataViewCheckIconText,
    array_wxDataViewCheckIconText,
    copy_wxDataViewCheckIconText,
    release_wxDataViewCheckIconText,
    cast_wxDataViewCheckIconText,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxDataViewCheckIconText,
    sizeof (::wxDataViewCheckIconText),
};
