/*
 * 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/dataview.h>
        #include <wx/dataview.h>
        #include <wx/dataview.h>


class sipwxDataViewListModel : public ::wxDataViewListModel
{
public:
    sipwxDataViewListModel();
    virtual ~sipwxDataViewListModel();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void GetValue(::wxDVCVariant&, const ::wxDataViewItem&, uint) const SIP_OVERRIDE;
    bool SetValueByRow(const ::wxDVCVariant&, uint, uint) SIP_OVERRIDE;
    void GetValueByRow(::wxVariant&, uint, uint) const SIP_OVERRIDE;
    uint GetRow(const ::wxDataViewItem&) const SIP_OVERRIDE;
    uint GetCount() const SIP_OVERRIDE;
    bool IsEnabledByRow(uint, uint) const SIP_OVERRIDE;
    bool GetAttrByRow(uint, uint, ::wxDataViewItemAttr&) const SIP_OVERRIDE;
    int Compare(const ::wxDataViewItem&, const ::wxDataViewItem&, uint, bool) const SIP_OVERRIDE;
    bool GetAttr(const ::wxDataViewItem&, uint, ::wxDataViewItemAttr&) const SIP_OVERRIDE;
    bool IsEnabled(const ::wxDataViewItem&, uint) const SIP_OVERRIDE;
    uint GetChildren(const ::wxDataViewItem&, ::wxDataViewItemArray&) const SIP_OVERRIDE;
    ::wxDataViewItem GetParent(const ::wxDataViewItem&) const SIP_OVERRIDE;
    bool HasContainerColumns(const ::wxDataViewItem&) const SIP_OVERRIDE;
    bool HasDefaultCompare() const SIP_OVERRIDE;
    bool HasValue(const ::wxDataViewItem&, uint) const SIP_OVERRIDE;
    bool IsContainer(const ::wxDataViewItem&) const SIP_OVERRIDE;
    void Resort() SIP_OVERRIDE;
    bool SetValue(const ::wxDVCVariant&, const ::wxDataViewItem&, uint) SIP_OVERRIDE;
    bool IsListModel() const SIP_OVERRIDE;
    bool IsVirtualListModel() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[20];
};

sipwxDataViewListModel::sipwxDataViewListModel(): ::wxDataViewListModel(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

void sipwxDataViewListModel::GetValue(::wxDVCVariant& variant, const ::wxDataViewItem& item, uint col) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::wxDataViewListModel::GetValue(variant, item, col);
        return;
    }

    extern void sipVH__dataview_19(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxDVCVariant&, const ::wxDataViewItem&, uint);

    sipVH__dataview_19(sipGILState, 0, sipPySelf, sipMeth, variant, item, col);
}

bool sipwxDataViewListModel::SetValueByRow(const ::wxDVCVariant& variant, uint row, uint col)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, sipName_DataViewListModel, sipName_SetValueByRow);

    if (!sipMeth)
        return 0;

    extern bool sipVH__dataview_18(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDVCVariant&, uint, uint);

    return sipVH__dataview_18(sipGILState, 0, sipPySelf, sipMeth, variant, row, col);
}

void sipwxDataViewListModel::GetValueByRow(::wxVariant& variant, uint row, uint col) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[2]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_DataViewListModel, sipName_GetValueByRow);

    if (!sipMeth)
        return;

    extern void sipVH__dataview_17(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxVariant&, uint, uint);

    sipVH__dataview_17(sipGILState, 0, sipPySelf, sipMeth, variant, row, col);
}

uint sipwxDataViewListModel::GetRow(const ::wxDataViewItem& item) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[3]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_DataViewListModel, sipName_GetRow);

    if (!sipMeth)
        return 0;

    extern uint sipVH__dataview_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDataViewItem&);

    return sipVH__dataview_16(sipGILState, 0, sipPySelf, sipMeth, item);
}

uint sipwxDataViewListModel::GetCount() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[4]), const_cast<sipSimpleWrapper **>(&sipPySelf), sipName_DataViewListModel, sipName_GetCount);

    if (!sipMeth)
        return 0;

    extern uint sipVH__dataview_15(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipwxDataViewListModel::IsEnabledByRow(uint row, uint col) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::IsEnabledByRow(row, col);

    extern bool sipVH__dataview_14(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, uint, uint);

    return sipVH__dataview_14(sipGILState, 0, sipPySelf, sipMeth, row, col);
}

bool sipwxDataViewListModel::GetAttrByRow(uint row, uint col, ::wxDataViewItemAttr& attr) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::GetAttrByRow(row, col, attr);

    extern bool sipVH__dataview_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, uint, uint, ::wxDataViewItemAttr&);

    return sipVH__dataview_13(sipGILState, 0, sipPySelf, sipMeth, row, col, attr);
}

int sipwxDataViewListModel::Compare(const ::wxDataViewItem& item1, const ::wxDataViewItem& item2, uint column, bool ascending) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::Compare(item1, item2, column, ascending);

    extern int sipVH__dataview_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDataViewItem&, const ::wxDataViewItem&, uint, bool);

    return sipVH__dataview_7(sipGILState, 0, sipPySelf, sipMeth, item1, item2, column, ascending);
}

bool sipwxDataViewListModel::GetAttr(const ::wxDataViewItem& item, uint col, ::wxDataViewItemAttr& attr) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::GetAttr(item, col, attr);

    extern bool sipVH__dataview_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDataViewItem&, uint, ::wxDataViewItemAttr&);

    return sipVH__dataview_8(sipGILState, 0, sipPySelf, sipMeth, item, col, attr);
}

bool sipwxDataViewListModel::IsEnabled(const ::wxDataViewItem& item, uint col) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::IsEnabled(item, col);

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

    return sipVH__dataview_6(sipGILState, 0, sipPySelf, sipMeth, item, col);
}

uint sipwxDataViewListModel::GetChildren(const ::wxDataViewItem& item, ::wxDataViewItemArray& children) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return 0;

    extern uint sipVH__dataview_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDataViewItem&, ::wxDataViewItemArray&);

    return sipVH__dataview_9(sipGILState, 0, sipPySelf, sipMeth, item, children);
}

::wxDataViewItem sipwxDataViewListModel::GetParent(const ::wxDataViewItem& item) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::GetParent(item);

    extern ::wxDataViewItem sipVH__dataview_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDataViewItem&);

    return sipVH__dataview_10(sipGILState, 0, sipPySelf, sipMeth, item);
}

bool sipwxDataViewListModel::HasContainerColumns(const ::wxDataViewItem& item) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::HasContainerColumns(item);

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

    return sipVH__dataview_2(sipGILState, 0, sipPySelf, sipMeth, item);
}

bool sipwxDataViewListModel::HasDefaultCompare() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::HasDefaultCompare();

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

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

bool sipwxDataViewListModel::HasValue(const ::wxDataViewItem& item, uint col) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::HasValue(item, col);

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

    return sipVH__dataview_6(sipGILState, 0, sipPySelf, sipMeth, item, col);
}

bool sipwxDataViewListModel::IsContainer(const ::wxDataViewItem& item) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::IsContainer(item);

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

    return sipVH__dataview_2(sipGILState, 0, sipPySelf, sipMeth, item);
}

void sipwxDataViewListModel::Resort()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::wxDataViewListModel::Resort();
        return;
    }

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

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

bool sipwxDataViewListModel::SetValue(const ::wxDVCVariant& variant, const ::wxDataViewItem& item, uint col)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::SetValue(variant, item, col);

    extern bool sipVH__dataview_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxDVCVariant&, const ::wxDataViewItem&, uint);

    return sipVH__dataview_12(sipGILState, 0, sipPySelf, sipMeth, variant, item, col);
}

bool sipwxDataViewListModel::IsListModel() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::IsListModel();

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

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

bool sipwxDataViewListModel::IsVirtualListModel() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxDataViewListModel::IsVirtualListModel();

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

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


PyDoc_STRVAR(doc_wxDataViewListModel_Compare, "Compare(item1, item2, column, ascending) -> int\n"
"\n"
"Compare method that sorts the items by their index.");

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

    {
        const ::wxDataViewItem* item1;
        const ::wxDataViewItem* item2;
        uint column;
        bool ascending;
        const ::wxDataViewListModel *sipCpp;

        static const char *sipKwdList[] = {
            sipName_item1,
            sipName_item2,
            sipName_column,
            sipName_ascending,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9J9ub", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDataViewItem, &item1, sipType_wxDataViewItem, &item2, &column, &ascending))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewListModel::Compare(*item1, *item2, column, ascending) : sipCpp->Compare(*item1, *item2, column, ascending));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_Compare, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_GetAttrByRow, "GetAttrByRow(row, col, attr) -> bool\n"
"\n"
"Override this to indicate that the row has special font attributes.");

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

    {
        uint row;
        uint col;
        ::wxDataViewItemAttr* attr;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BuuJ9", &sipSelf, sipType_wxDataViewListModel, &sipCpp, &row, &col, sipType_wxDataViewItemAttr, &attr))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewListModel::GetAttrByRow(row, col, *attr) : sipCpp->GetAttrByRow(row, col, *attr));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_GetAttrByRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_IsEnabledByRow, "IsEnabledByRow(row, col) -> bool\n"
"\n"
"Override this if you want to disable specific items.");

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

    {
        uint row;
        uint col;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Buu", &sipSelf, sipType_wxDataViewListModel, &sipCpp, &row, &col))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewListModel::IsEnabledByRow(row, col) : sipCpp->IsEnabledByRow(row, col));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_IsEnabledByRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_GetCount, "GetCount() -> int\n"
"\n"
"Returns the number of items (or rows) in the list.");

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

    {
        const ::wxDataViewListModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDataViewListModel, &sipCpp))
        {
            uint sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_DataViewListModel, sipName_GetCount);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetCount();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_GetCount, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_GetRow, "GetRow(item) -> int\n"
"\n"
"Returns the position of given item.");

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

    {
        const ::wxDataViewItem* item;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDataViewItem, &item))
        {
            uint sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_DataViewListModel, sipName_GetRow);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetRow(*item);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_GetRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_GetValueByRow, "GetValueByRow(row, col) -> DVCVariant\n"
"\n"
"Override this to allow getting values from the model.");

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

    {
        ::wxDVCVariant* variant;
        uint row;
        uint col;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Buu", &sipSelf, sipType_wxDataViewListModel, &sipCpp, &row, &col))
        {
            variant = new ::wxDVCVariant();

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_DataViewListModel, sipName_GetValueByRow);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->GetValueByRow(*variant, row, col);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_GetValueByRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_SetValueByRow, "SetValueByRow(variant, row, col) -> bool\n"
"\n"
"Called in order to set a value in the model.");

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

    {
        const ::wxDVCVariant* variant;
        int variantState = 0;
        uint row;
        uint col;
        ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1uu", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDVCVariant, &variant, &variantState, &row, &col))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_DataViewListModel, sipName_SetValueByRow);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->SetValueByRow(*variant, row, col);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxDVCVariant *>(variant), sipType_wxDVCVariant, variantState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_SetValueByRow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_GetParent, "GetParent(self, item: DataViewItem) -> DataViewItem");

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

    {
        const ::wxDataViewItem* item;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDataViewItem, &item))
        {
            ::wxDataViewItem*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxDataViewItem((sipSelfWasArg ? sipCpp->::wxDataViewListModel::GetParent(*item) : sipCpp->GetParent(*item)));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_GetParent, doc_wxDataViewListModel_GetParent);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_IsContainer, "IsContainer(self, item: DataViewItem) -> bool");

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

    {
        const ::wxDataViewItem* item;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDataViewItem, &item))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewListModel::IsContainer(*item) : sipCpp->IsContainer(*item));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_IsContainer, doc_wxDataViewListModel_IsContainer);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_GetValue, "GetValue(self, item: DataViewItem, col: int) -> Any");

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

    {
        ::wxDVCVariant* variant;
        const ::wxDataViewItem* item;
        uint col;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9u", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDataViewItem, &item, &col))
        {
            variant = new ::wxDVCVariant();

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxDataViewListModel::GetValue(*variant, *item, col) : sipCpp->GetValue(*variant, *item, col));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_GetValue, doc_wxDataViewListModel_GetValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_SetValue, "SetValue(self, variant: Any, item: DataViewItem, col: int) -> bool");

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

    {
        const ::wxDVCVariant* variant;
        int variantState = 0;
        const ::wxDataViewItem* item;
        uint col;
        ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J9u", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDVCVariant, &variant, &variantState, sipType_wxDataViewItem, &item, &col))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewListModel::SetValue(*variant, *item, col) : sipCpp->SetValue(*variant, *item, col));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxDVCVariant *>(variant), sipType_wxDVCVariant, variantState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_SetValue, doc_wxDataViewListModel_SetValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_GetAttr, "GetAttr(self, item: DataViewItem, col: int, attr: DataViewItemAttr) -> bool");

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

    {
        const ::wxDataViewItem* item;
        uint col;
        ::wxDataViewItemAttr* attr;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9uJ9", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDataViewItem, &item, &col, sipType_wxDataViewItemAttr, &attr))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewListModel::GetAttr(*item, col, *attr) : sipCpp->GetAttr(*item, col, *attr));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_GetAttr, doc_wxDataViewListModel_GetAttr);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_IsEnabled, "IsEnabled(self, item: DataViewItem, col: int) -> bool");

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

    {
        const ::wxDataViewItem* item;
        uint col;
        const ::wxDataViewListModel *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9u", &sipSelf, sipType_wxDataViewListModel, &sipCpp, sipType_wxDataViewItem, &item, &col))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewListModel::IsEnabled(*item, col) : sipCpp->IsEnabled(*item, col));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_IsEnabled, doc_wxDataViewListModel_IsEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewListModel_IsListModel, "IsListModel(self) -> bool");

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

    {
        const ::wxDataViewListModel *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDataViewListModel, &sipCpp))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxDataViewListModel::IsListModel() : sipCpp->IsListModel());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewListModel, sipName_IsListModel, doc_wxDataViewListModel_IsListModel);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxDataViewListModel)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxDataViewListModel *>(sipCppV);
    else
        delete reinterpret_cast< ::wxDataViewListModel *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxDataViewListModel();
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxDataViewListModel[] = {
    {sipName_Compare, SIP_MLMETH_CAST(meth_wxDataViewListModel_Compare), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_Compare},
    {sipName_GetAttr, SIP_MLMETH_CAST(meth_wxDataViewListModel_GetAttr), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_GetAttr},
    {sipName_GetAttrByRow, SIP_MLMETH_CAST(meth_wxDataViewListModel_GetAttrByRow), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_GetAttrByRow},
    {sipName_GetCount, meth_wxDataViewListModel_GetCount, METH_VARARGS, doc_wxDataViewListModel_GetCount},
    {sipName_GetParent, SIP_MLMETH_CAST(meth_wxDataViewListModel_GetParent), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_GetParent},
    {sipName_GetRow, SIP_MLMETH_CAST(meth_wxDataViewListModel_GetRow), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_GetRow},
    {sipName_GetValue, SIP_MLMETH_CAST(meth_wxDataViewListModel_GetValue), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_GetValue},
    {sipName_GetValueByRow, SIP_MLMETH_CAST(meth_wxDataViewListModel_GetValueByRow), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_GetValueByRow},
    {sipName_IsContainer, SIP_MLMETH_CAST(meth_wxDataViewListModel_IsContainer), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_IsContainer},
    {sipName_IsEnabled, SIP_MLMETH_CAST(meth_wxDataViewListModel_IsEnabled), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_IsEnabled},
    {sipName_IsEnabledByRow, SIP_MLMETH_CAST(meth_wxDataViewListModel_IsEnabledByRow), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_IsEnabledByRow},
    {sipName_IsListModel, meth_wxDataViewListModel_IsListModel, METH_VARARGS, doc_wxDataViewListModel_IsListModel},
    {sipName_SetValue, SIP_MLMETH_CAST(meth_wxDataViewListModel_SetValue), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_SetValue},
    {sipName_SetValueByRow, SIP_MLMETH_CAST(meth_wxDataViewListModel_SetValueByRow), METH_VARARGS|METH_KEYWORDS, doc_wxDataViewListModel_SetValueByRow}
};

sipVariableDef variables_wxDataViewListModel[] = {
    {PropertyVariable, sipName_Count, &methods_wxDataViewListModel[3], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxDataViewListModel, "Base class with abstract API for wxDataViewIndexListModel and\n"
"wxDataViewVirtualListModel.");


sipClassTypeDef sipTypeDef__dataview_wxDataViewListModel = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_wxDataViewListModel,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_DataViewListModel,
        {0, 0, 1},
        14, methods_wxDataViewListModel,
        0, SIP_NULLPTR,
        1, variables_wxDataViewListModel,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxDataViewListModel,
    -1,
    -1,
    supers_wxDataViewListModel,
    SIP_NULLPTR,
    init_type_wxDataViewListModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxDataViewListModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxDataViewListModel,
    cast_wxDataViewListModel,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxDataViewListModel),
};
