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

#include "sipAPI_propgrid.h"
        #include <wx/propgrid/property.h>
        #include <wx/font.h>
        #include <wx/colour.h>
        #include <wx/bmpbndl.h>


class sipwxPGCellData : public ::wxPGCellData
{
public:
    sipwxPGCellData();
    ~sipwxPGCellData();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipwxPGCellData(const sipwxPGCellData &);
    sipwxPGCellData &operator = (const sipwxPGCellData &);
};

sipwxPGCellData::sipwxPGCellData(): ::wxPGCellData(), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_wxPGCellData_SetText, "SetText(text) -> None");

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

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

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxPGCellData, &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;
        }
    }

    sipNoMethod(sipParseErr, sipName_PGCellData, sipName_SetText, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGCellData_SetBitmap, "SetBitmap(bitmap) -> None");

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

    {
        const ::wxBitmapBundle* bitmap;
        int bitmapState = 0;
        ::wxPGCellData *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxPGCellData, &sipCpp, sipType_wxBitmapBundle, &bitmap, &bitmapState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetBitmap(*bitmap);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxBitmapBundle *>(bitmap), sipType_wxBitmapBundle, bitmapState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PGCellData, sipName_SetBitmap, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGCellData_SetFgCol, "SetFgCol(col) -> None");

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

    {
        const ::wxColour* col;
        int colState = 0;
        ::wxPGCellData *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxPGCellData, &sipCpp, sipType_wxColour, &col, &colState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetFgCol(*col);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxColour *>(col), sipType_wxColour, colState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PGCellData, sipName_SetFgCol, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGCellData_SetBgCol, "SetBgCol(col) -> None");

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

    {
        const ::wxColour* col;
        int colState = 0;
        ::wxPGCellData *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxPGCellData, &sipCpp, sipType_wxColour, &col, &colState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetBgCol(*col);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxColour *>(col), sipType_wxColour, colState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PGCellData, sipName_SetBgCol, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGCellData_SetFont, "SetFont(font) -> None");

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

    {
        const ::wxFont* font;
        ::wxPGCellData *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxPGCellData, &sipCpp, sipType_wxFont, &font))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetFont(*font);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PGCellData, sipName_SetFont, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxPGCellData)
        return sipCppV;

    if (targetType == sipType_wxRefCounter)
        return static_cast< ::wxRefCounter *>(sipCpp);

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxPGCellData *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxPGCellData();
            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_wxPGCellData[] = {{24, 0, 1}};


static PyMethodDef methods_wxPGCellData[] = {
    {sipName_SetBgCol, SIP_MLMETH_CAST(meth_wxPGCellData_SetBgCol), METH_VARARGS|METH_KEYWORDS, doc_wxPGCellData_SetBgCol},
    {sipName_SetBitmap, SIP_MLMETH_CAST(meth_wxPGCellData_SetBitmap), METH_VARARGS|METH_KEYWORDS, doc_wxPGCellData_SetBitmap},
    {sipName_SetFgCol, SIP_MLMETH_CAST(meth_wxPGCellData_SetFgCol), METH_VARARGS|METH_KEYWORDS, doc_wxPGCellData_SetFgCol},
    {sipName_SetFont, SIP_MLMETH_CAST(meth_wxPGCellData_SetFont), METH_VARARGS|METH_KEYWORDS, doc_wxPGCellData_SetFont},
    {sipName_SetText, SIP_MLMETH_CAST(meth_wxPGCellData_SetText), METH_VARARGS|METH_KEYWORDS, doc_wxPGCellData_SetText}
};

PyDoc_STRVAR(doc_wxPGCellData, "PGCellData() -> None");


sipClassTypeDef sipTypeDef__propgrid_wxPGCellData = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxPGCellData,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_PGCellData,
        {0, 0, 1},
        5, methods_wxPGCellData,
        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_wxPGCellData,
    -1,
    -1,
    supers_wxPGCellData,
    SIP_NULLPTR,
    init_type_wxPGCellData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxPGCellData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxPGCellData,
    cast_wxPGCellData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxPGCellData),
};
