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

#include "sipAPI_dataview.h"

        #include <wx/dataview.h>

        #include <wx/icon.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


PyDoc_STRVAR(doc_wxDataViewIconText_GetIcon, "GetIcon() -> wx.Icon\n"
"\n"
"Gets the icon.");

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

    {
        const  ::wxDataViewIconText *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxIcon(sipCpp->GetIcon());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_DataViewIconText, sipName_GetIcon, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewIconText_GetText, "GetText() -> String\n"
"\n"
"Gets the text.");

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

    {
        const  ::wxDataViewIconText *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxString(sipCpp->GetText());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_DataViewIconText, sipName_GetText, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewIconText_SetIcon, "SetIcon(icon)\n"
"\n"
"Set the icon.");

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

    {
        const  ::wxIcon* icon;
         ::wxDataViewIconText *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxDataViewIconText, &sipCpp, sipType_wxIcon, &icon))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetIcon(*icon);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_DataViewIconText, sipName_SetIcon, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewIconText_SetText, "SetText(text)\n"
"\n"
"Set the text.");

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

    {
        const  ::wxString* text;
        int textState = 0;
         ::wxDataViewIconText *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxDataViewIconText, &sipCpp, sipType_wxString,&text, &textState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetText(*text);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(text),sipType_wxString,textState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_DataViewIconText, sipName_SetText, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

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

    return sipCppV;
}


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

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

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_wxDataViewIconText(void *, SIP_SSIZE_T, void *);}
static void assign_wxDataViewIconText(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxDataViewIconText *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxDataViewIconText *>(sipSrc);
}


extern "C" {static void *array_wxDataViewIconText(SIP_SSIZE_T);}
static void *array_wxDataViewIconText(SIP_SSIZE_T sipNrElem)
{
    return new  ::wxDataViewIconText[sipNrElem];
}


extern "C" {static void *copy_wxDataViewIconText(const void *, SIP_SSIZE_T);}
static void *copy_wxDataViewIconText(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::wxDataViewIconText(reinterpret_cast<const  ::wxDataViewIconText *>(sipSrc)[sipSrcIdx]);
}


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


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

    {
        const  ::wxString& textdef = wxEmptyString;
        const  ::wxString* text = &textdef;
        int textState = 0;
        const  ::wxIcon& icondef = wxNullIcon;
        const  ::wxIcon* icon = &icondef;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1J9", sipType_wxString,&text, &textState, sipType_wxIcon, &icon))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxDataViewIconText(*text,*icon);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(text),sipType_wxString,textState);

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

            return sipCpp;
        }
    }

    {
        const  ::wxDataViewIconText* other;

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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxDataViewIconText(*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_wxDataViewIconText[] = {{24, 0, 1}};


static PyMethodDef methods_wxDataViewIconText[] = {
    {SIP_MLNAME_CAST(sipName_GetIcon), meth_wxDataViewIconText_GetIcon, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDataViewIconText_GetIcon)},
    {SIP_MLNAME_CAST(sipName_GetText), meth_wxDataViewIconText_GetText, METH_VARARGS, SIP_MLDOC_CAST(doc_wxDataViewIconText_GetText)},
    {SIP_MLNAME_CAST(sipName_SetIcon), SIP_MLMETH_CAST(meth_wxDataViewIconText_SetIcon), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDataViewIconText_SetIcon)},
    {SIP_MLNAME_CAST(sipName_SetText), SIP_MLMETH_CAST(meth_wxDataViewIconText_SetText), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxDataViewIconText_SetText)}
};

sipVariableDef variables_wxDataViewIconText[] = {
    {PropertyVariable, sipName_Text, &methods_wxDataViewIconText[1], &methods_wxDataViewIconText[3], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Icon, &methods_wxDataViewIconText[0], &methods_wxDataViewIconText[2], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxDataViewIconText, "DataViewIconText(text=wx.EmptyString, icon=wx.NullIcon)\n"
"DataViewIconText(other)\n"
"\n"
"wxDataViewIconText is used by wxDataViewIconTextRenderer for data\n"
"transfer.");


sipClassTypeDef sipTypeDef__dataview_wxDataViewIconText = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxDataViewIconText,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_DataViewIconText,
        {0, 0, 1},
        4, methods_wxDataViewIconText,
        0, SIP_NULLPTR,
        2, variables_wxDataViewIconText,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxDataViewIconText,
    -1,
    -1,
    supers_wxDataViewIconText,
    SIP_NULLPTR,
    init_type_wxDataViewIconText,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxDataViewIconText,
    assign_wxDataViewIconText,
    array_wxDataViewIconText,
    copy_wxDataViewIconText,
    release_wxDataViewIconText,
    cast_wxDataViewIconText,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
