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


class sipwxPropertyGridPageState : public ::wxPropertyGridPageState
{
public:
    sipwxPropertyGridPageState();
    sipwxPropertyGridPageState(const ::wxPropertyGridPageState&);
    virtual ~sipwxPropertyGridPageState();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void DoSetSplitterPosition(int, int, int) SIP_OVERRIDE;
    ::wxPGProperty* DoInsert(::wxPGProperty*, int, ::wxPGProperty*) SIP_OVERRIDE;
    void DoDelete(::wxPGProperty*, bool) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[3];
};

sipwxPropertyGridPageState::sipwxPropertyGridPageState(): ::wxPropertyGridPageState(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxPropertyGridPageState::sipwxPropertyGridPageState(const ::wxPropertyGridPageState& a0): ::wxPropertyGridPageState(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

void sipwxPropertyGridPageState::DoSetSplitterPosition(int pos, int splitterColumn, int flags)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_DoSetSplitterPosition);

    if (!sipMeth)
    {
        ::wxPropertyGridPageState::DoSetSplitterPosition(pos, splitterColumn, flags);
        return;
    }

    extern void sipVH__propgrid_53(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int, int, int);

    sipVH__propgrid_53(sipGILState, 0, sipPySelf, sipMeth, pos, splitterColumn, flags);
}

::wxPGProperty* sipwxPropertyGridPageState::DoInsert(::wxPGProperty*parent, int index, ::wxPGProperty*property)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_DoInsert);

    if (!sipMeth)
        return ::wxPropertyGridPageState::DoInsert(parent, index, property);

    extern ::wxPGProperty* sipVH__propgrid_52(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxPGProperty*, int, ::wxPGProperty*);

    return sipVH__propgrid_52(sipGILState, 0, sipPySelf, sipMeth, parent, index, property);
}

void sipwxPropertyGridPageState::DoDelete(::wxPGProperty*item, bool doDelete)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_DoDelete);

    if (!sipMeth)
    {
        ::wxPropertyGridPageState::DoDelete(item, doDelete);
        return;
    }

    extern void sipVH__propgrid_51(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxPGProperty*, bool);

    sipVH__propgrid_51(sipGILState, 0, sipPySelf, sipMeth, item, doDelete);
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_CheckColumnWidths, "CheckColumnWidths(widthChange=0) -> None\n"
"\n"
"Makes sure all columns have minimum width.");

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

    {
        int widthChange = 0;
        ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, &widthChange))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->CheckColumnWidths(widthChange);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_CheckColumnWidths, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_DoDelete, "DoDelete(item, doDelete=True) -> None\n"
"\n"
"Override this member function to add custom behaviour on property\n"
"deletion.");

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

    {
        ::wxPGProperty* item;
        bool doDelete = 1;
        ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8|b", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, sipType_wxPGProperty, &item, &doDelete))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxPropertyGridPageState::DoDelete(item, doDelete) : sipCpp->DoDelete(item, doDelete));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_DoDelete, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_DoInsert, "DoInsert(parent, index, property) -> PGProperty\n"
"\n"
"Override this member function to add custom behaviour on property\n"
"insertion.");

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

    {
        ::wxPGProperty* parent;
        int index;
        ::wxPGProperty* property;
        ::wxPropertyGridPageState *sipCpp;

        static const char *sipKwdList[] = {
            sipName_parent,
            sipName_index,
            sipName_property,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8iJ8", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, sipType_wxPGProperty, &parent, &index, sipType_wxPGProperty, &property))
        {
            ::wxPGProperty*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxPropertyGridPageState::DoInsert(parent, index, property) : sipCpp->DoInsert(parent, index, property));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_DoInsert, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_DoSetSplitterPosition, "DoSetSplitterPosition(pos, splitterColumn=0, flags=0) -> None\n"
"\n"
"This needs to be overridden in grid used the manager so that splitter\n"
"changes can be propagated to other pages.");

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

    {
        int pos;
        int splitterColumn = 0;
        int flags = 0;
        ::wxPropertyGridPageState *sipCpp;

        static const char *sipKwdList[] = {
            sipName_pos,
            sipName_splitterColumn,
            sipName_flags,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi|ii", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, &pos, &splitterColumn, &flags))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxPropertyGridPageState::DoSetSplitterPosition(pos, splitterColumn, flags) : sipCpp->DoSetSplitterPosition(pos, splitterColumn, flags));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_DoSetSplitterPosition, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_EnableCategories, "EnableCategories(enable) -> bool");

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

    {
        bool enable;
        ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bb", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, &enable))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->EnableCategories(enable);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_EnableCategories, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_EnsureVirtualHeight, "EnsureVirtualHeight() -> None\n"
"\n"
"Make sure virtual height is up-to-date.");

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

    {
        ::wxPropertyGridPageState *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp->EnsureVirtualHeight();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_EnsureVirtualHeight, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetVirtualHeight, "GetVirtualHeight() -> int\n"
"\n"
"Returns (precalculated) height of contained visible properties.");

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

    {
        ::wxPropertyGridPageState *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetVirtualHeight();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetVirtualHeight, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetActualVirtualHeight, "GetActualVirtualHeight() -> int\n"
"\n"
"Returns actual height of contained visible properties.");

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

    {
        const ::wxPropertyGridPageState *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetActualVirtualHeight();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetActualVirtualHeight, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetColumnCount, "GetColumnCount() -> int");

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

    {
        const ::wxPropertyGridPageState *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetColumnCount();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetColumnCount, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetColumnMinWidth, "GetColumnMinWidth(column) -> int");

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

    {
        int column;
        const ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, &column))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetColumnMinWidth(column);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetColumnMinWidth, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetColumnWidth, "GetColumnWidth(column) -> int");

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

    {
        uint column;
        const ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bu", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, &column))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetColumnWidth(column);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetColumnWidth, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetGrid, "GetGrid() -> PropertyGrid");

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

    {
        const ::wxPropertyGridPageState *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetGrid();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetGrid, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetLastItem, "GetLastItem(flags=PG_ITERATE_DEFAULT) -> PGProperty\n"
"\n"
"Returns last item which could be iterated using given flags.");

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

    {
        int flags = wxPG_ITERATE_DEFAULT;
        ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, &flags))
        {
            ::wxPGProperty*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetLastItem(flags);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetLastItem, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetSelection, "GetSelection() -> PGProperty\n"
"\n"
"Returns currently selected property.");

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

    {
        const ::wxPropertyGridPageState *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetSelection();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetSelection, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetPropertyCategory, "GetPropertyCategory(p) -> PropertyCategory");

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

    {
        const ::wxPGProperty* p;
        const ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, sipType_wxPGProperty, &p))
        {
            ::wxPropertyCategory*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetPropertyCategory(p);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetPropertyCategory, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetVirtualWidth, "GetVirtualWidth() -> int\n"
"\n"
"Returns combined width of margin and all the columns.");

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

    {
        const ::wxPropertyGridPageState *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetVirtualWidth();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetVirtualWidth, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_GetColumnFullWidth, "GetColumnFullWidth(p, col) -> int");

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

    {
        ::wxPGProperty* p;
        uint col;
        const ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8u", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, sipType_wxPGProperty, &p, &col))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetColumnFullWidth(p, col);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_GetColumnFullWidth, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_HitTest, "HitTest(pt) -> PropertyGridHitTestResult\n"
"\n"
"Returns information about arbitrary position in the grid.");

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

    {
        const ::wxPoint* pt;
        int ptState = 0;
        const ::wxPropertyGridPageState *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxPropertyGridPageState, &sipCpp, sipType_wxPoint, &pt, &ptState))
        {
            ::wxPropertyGridHitTestResult*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxPropertyGridHitTestResult(sipCpp->HitTest(*pt));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxPoint *>(pt), sipType_wxPoint, ptState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_HitTest, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_IsDisplayed, "IsDisplayed() -> bool\n"
"\n"
"Returns true if page is visibly displayed.");

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

    {
        const ::wxPropertyGridPageState *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->IsDisplayed();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_IsDisplayed, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_IsInNonCatMode, "IsInNonCatMode() -> bool");

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

    {
        const ::wxPropertyGridPageState *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->IsInNonCatMode();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_IsInNonCatMode, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPageState_VirtualHeightChanged, "VirtualHeightChanged() -> None\n"
"\n"
"Called after virtual height needs to be recalculated.");

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

    {
        ::wxPropertyGridPageState *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp->VirtualHeightChanged();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPageState, sipName_VirtualHeightChanged, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxPropertyGridPageState *>(sipCppV);
    else
        delete reinterpret_cast< ::wxPropertyGridPageState *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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


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


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


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

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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxPropertyGridPageState();
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::wxPropertyGridPageState* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxPropertyGridPageState[] = {
    {sipName_CheckColumnWidths, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_CheckColumnWidths), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_CheckColumnWidths},
    {sipName_DoDelete, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_DoDelete), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_DoDelete},
    {sipName_DoInsert, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_DoInsert), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_DoInsert},
    {sipName_DoSetSplitterPosition, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_DoSetSplitterPosition), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_DoSetSplitterPosition},
    {sipName_EnableCategories, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_EnableCategories), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_EnableCategories},
    {sipName_EnsureVirtualHeight, meth_wxPropertyGridPageState_EnsureVirtualHeight, METH_VARARGS, doc_wxPropertyGridPageState_EnsureVirtualHeight},
    {sipName_GetActualVirtualHeight, meth_wxPropertyGridPageState_GetActualVirtualHeight, METH_VARARGS, doc_wxPropertyGridPageState_GetActualVirtualHeight},
    {sipName_GetColumnCount, meth_wxPropertyGridPageState_GetColumnCount, METH_VARARGS, doc_wxPropertyGridPageState_GetColumnCount},
    {sipName_GetColumnFullWidth, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_GetColumnFullWidth), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_GetColumnFullWidth},
    {sipName_GetColumnMinWidth, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_GetColumnMinWidth), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_GetColumnMinWidth},
    {sipName_GetColumnWidth, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_GetColumnWidth), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_GetColumnWidth},
    {sipName_GetGrid, meth_wxPropertyGridPageState_GetGrid, METH_VARARGS, doc_wxPropertyGridPageState_GetGrid},
    {sipName_GetLastItem, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_GetLastItem), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_GetLastItem},
    {sipName_GetPropertyCategory, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_GetPropertyCategory), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_GetPropertyCategory},
    {sipName_GetSelection, meth_wxPropertyGridPageState_GetSelection, METH_VARARGS, doc_wxPropertyGridPageState_GetSelection},
    {sipName_GetVirtualHeight, meth_wxPropertyGridPageState_GetVirtualHeight, METH_VARARGS, doc_wxPropertyGridPageState_GetVirtualHeight},
    {sipName_GetVirtualWidth, meth_wxPropertyGridPageState_GetVirtualWidth, METH_VARARGS, doc_wxPropertyGridPageState_GetVirtualWidth},
    {sipName_HitTest, SIP_MLMETH_CAST(meth_wxPropertyGridPageState_HitTest), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPageState_HitTest},
    {sipName_IsDisplayed, meth_wxPropertyGridPageState_IsDisplayed, METH_VARARGS, doc_wxPropertyGridPageState_IsDisplayed},
    {sipName_IsInNonCatMode, meth_wxPropertyGridPageState_IsInNonCatMode, METH_VARARGS, doc_wxPropertyGridPageState_IsInNonCatMode},
    {sipName_VirtualHeightChanged, meth_wxPropertyGridPageState_VirtualHeightChanged, METH_VARARGS, doc_wxPropertyGridPageState_VirtualHeightChanged}
};

sipVariableDef variables_wxPropertyGridPageState[] = {
    {PropertyVariable, sipName_VirtualWidth, &methods_wxPropertyGridPageState[16], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_VirtualHeight, &methods_wxPropertyGridPageState[15], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Selection, &methods_wxPropertyGridPageState[14], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_LastItem, &methods_wxPropertyGridPageState[12], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Grid, &methods_wxPropertyGridPageState[11], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_ColumnCount, &methods_wxPropertyGridPageState[7], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_ActualVirtualHeight, &methods_wxPropertyGridPageState[6], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxPropertyGridPageState, "PropertyGridPageState() -> None\n"
"\n"
"Contains low-level property page information (properties, column\n"
"widths, etc.) of a single wxPropertyGrid or single wxPropertyGridPage.");


sipClassTypeDef sipTypeDef__propgrid_wxPropertyGridPageState = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxPropertyGridPageState,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_PropertyGridPageState,
        {0, 0, 1},
        21, methods_wxPropertyGridPageState,
        0, SIP_NULLPTR,
        7, variables_wxPropertyGridPageState,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxPropertyGridPageState,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxPropertyGridPageState,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxPropertyGridPageState,
    assign_wxPropertyGridPageState,
    array_wxPropertyGridPageState,
    copy_wxPropertyGridPageState,
    release_wxPropertyGridPageState,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxPropertyGridPageState,
    sizeof (::wxPropertyGridPageState),
};
