/*
 * 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/propgridpagestate.h>
        #include <wx/propgrid/property.h>
        #include <wx/propgrid/propgridpagestate.h>


PyDoc_STRVAR(doc_wxPropertyGridIteratorBase_Assign, "Assign(it) -> None");

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

    {
        const ::wxPropertyGridIteratorBase* it;
        ::wxPropertyGridIteratorBase *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxPropertyGridIteratorBase, &sipCpp, sipType_wxPropertyGridIteratorBase, &it))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Assign(*it);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridIteratorBase, sipName_Assign, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridIteratorBase_AtEnd, "AtEnd() -> bool");

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

    {
        const ::wxPropertyGridIteratorBase *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->AtEnd();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridIteratorBase, sipName_AtEnd, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridIteratorBase_GetProperty, "GetProperty() -> PGProperty\n"
"\n"
"Get current property.");

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

    {
        const ::wxPropertyGridIteratorBase *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetProperty();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes, sipType_wxPGProperty, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridIteratorBase, sipName_GetProperty, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridIteratorBase_Init, "Init(state, flags, property, dir=1) -> None\n"
"Init(state, flags, startPos=wx.TOP, dir=0) -> None\n"
"");

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

    {
        ::wxPropertyGridPageState* state;
        int flags;
        ::wxPGProperty* property;
        int dir = 1;
        ::wxPropertyGridIteratorBase *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8iJ8|i", &sipSelf, sipType_wxPropertyGridIteratorBase, &sipCpp, sipType_wxPropertyGridPageState, &state, &flags, sipType_wxPGProperty, &property, &dir))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Init(state, flags, property, dir);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        ::wxPropertyGridPageState* state;
        int flags;
        int startPos = wxTOP;
        int dir = 0;
        ::wxPropertyGridIteratorBase *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8i|ii", &sipSelf, sipType_wxPropertyGridIteratorBase, &sipCpp, sipType_wxPropertyGridPageState, &state, &flags, &startPos, &dir))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Init(state, flags, startPos, dir);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridIteratorBase, sipName_Init, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridIteratorBase_Next, "Next(iterateChildren=True) -> None\n"
"\n"
"Iterate to the next property.");

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

    {
        bool iterateChildren = 1;
        ::wxPropertyGridIteratorBase *sipCpp;

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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Next(iterateChildren);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridIteratorBase, sipName_Next, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridIteratorBase_Prev, "Prev() -> None\n"
"\n"
"Iterate to the previous property.");

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

    {
        ::wxPropertyGridIteratorBase *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPropertyGridIteratorBase, &sipCpp))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Prev();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridIteratorBase, sipName_Prev, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridIteratorBase_SetBaseParent, "SetBaseParent(baseParent) -> None\n"
"\n"
"Set base parent, i.e.");

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

    {
        ::wxPGProperty* baseParent;
        ::wxPropertyGridIteratorBase *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxPropertyGridIteratorBase, &sipCpp, sipType_wxPGProperty, &baseParent))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetBaseParent(baseParent);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridIteratorBase, sipName_SetBaseParent, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxPropertyGridIteratorBase();
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        const ::wxPropertyGridIteratorBase* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxPropertyGridIteratorBase, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxPropertyGridIteratorBase(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxPropertyGridIteratorBase[] = {
    {sipName_Assign, SIP_MLMETH_CAST(meth_wxPropertyGridIteratorBase_Assign), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridIteratorBase_Assign},
    {sipName_AtEnd, meth_wxPropertyGridIteratorBase_AtEnd, METH_VARARGS, doc_wxPropertyGridIteratorBase_AtEnd},
    {sipName_GetProperty, meth_wxPropertyGridIteratorBase_GetProperty, METH_VARARGS, doc_wxPropertyGridIteratorBase_GetProperty},
    {sipName_Init, SIP_MLMETH_CAST(meth_wxPropertyGridIteratorBase_Init), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridIteratorBase_Init},
    {sipName_Next, SIP_MLMETH_CAST(meth_wxPropertyGridIteratorBase_Next), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridIteratorBase_Next},
    {sipName_Prev, meth_wxPropertyGridIteratorBase_Prev, METH_VARARGS, doc_wxPropertyGridIteratorBase_Prev},
    {sipName_SetBaseParent, SIP_MLMETH_CAST(meth_wxPropertyGridIteratorBase_SetBaseParent), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridIteratorBase_SetBaseParent}
};

sipVariableDef variables_wxPropertyGridIteratorBase[] = {
    {PropertyVariable, sipName_Property, &methods_wxPropertyGridIteratorBase[2], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxPropertyGridIteratorBase, "PropertyGridIteratorBase() -> None\n"
"\n"
"Base for wxPropertyGridIterator classes.");


sipClassTypeDef sipTypeDef__propgrid_wxPropertyGridIteratorBase = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxPropertyGridIteratorBase,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_PropertyGridIteratorBase,
        {0, 0, 1},
        7, methods_wxPropertyGridIteratorBase,
        0, SIP_NULLPTR,
        1, variables_wxPropertyGridIteratorBase,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxPropertyGridIteratorBase,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxPropertyGridIteratorBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxPropertyGridIteratorBase,
    assign_wxPropertyGridIteratorBase,
    array_wxPropertyGridIteratorBase,
    copy_wxPropertyGridIteratorBase,
    release_wxPropertyGridIteratorBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxPropertyGridIteratorBase,
    sizeof (::wxPropertyGridIteratorBase),
};
