/*
 * 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/manager.h>
        #include <wx/propgrid/property.h>
        #include <wx/propgrid/propgridpagestate.h>
        #include <wx/gdicmn.h>
        #include <wx/event.h>
        #include <wx/eventfilter.h>
        #include <wx/event.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/propgrid/editors.h>
        #include <wx/propgrid/propgridiface.h>
        #include <wx/datetime.h>
        #include <wx/validate.h>
        #include <wx/colour.h>
        #include <wx/bmpbndl.h>
        #include <wx/propgrid/propgridpagestate.h>
        #include <wx/bitmap.h>
        #include <wx/propgrid/property.h>
        #include <wx/propgrid/property.h>
        #include <wx/propgrid/propgridpagestate.h>
        #include <wx/propgrid/propgridpagestate.h>
        #include <wx/gdicmn.h>
        #include <wx/propgrid/propgrid.h>


class sipwxPropertyGridPage : public ::wxPropertyGridPage
{
public:
    sipwxPropertyGridPage();
    virtual ~sipwxPropertyGridPage();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    bool sipProtectVirt_TryBefore(bool, ::wxEvent&);
    bool sipProtectVirt_TryAfter(bool, ::wxEvent&);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void OnShow() SIP_OVERRIDE;
    bool IsHandlingAllEvents() const SIP_OVERRIDE;
    void Init() SIP_OVERRIDE;
    void DoDelete(::wxPGProperty*, bool) SIP_OVERRIDE;
    ::wxPGProperty* DoInsert(::wxPGProperty*, int, ::wxPGProperty*) SIP_OVERRIDE;
    void DoSetSplitterPosition(int, int, int) SIP_OVERRIDE;
    void Clear() SIP_OVERRIDE;
    ::wxPGVIterator GetVIterator(int) const SIP_OVERRIDE;
    void RefreshGrid(::wxPropertyGridPageState*) SIP_OVERRIDE;
    void RefreshProperty(::wxPGProperty*) SIP_OVERRIDE;
    bool ProcessEvent(::wxEvent&) SIP_OVERRIDE;
    bool TryBefore(::wxEvent&) SIP_OVERRIDE;
    bool TryAfter(::wxEvent&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[13];
};

sipwxPropertyGridPage::sipwxPropertyGridPage(): ::wxPropertyGridPage(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

void sipwxPropertyGridPage::OnShow()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::wxPropertyGridPage::OnShow();
        return;
    }

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

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

bool sipwxPropertyGridPage::IsHandlingAllEvents() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxPropertyGridPage::IsHandlingAllEvents();

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

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

void sipwxPropertyGridPage::Init()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::wxPropertyGridPage::Init();
        return;
    }

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

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

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

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

    if (!sipMeth)
    {
        ::wxPropertyGridPage::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);
}

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

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

    if (!sipMeth)
        return ::wxPropertyGridPage::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 sipwxPropertyGridPage::DoSetSplitterPosition(int pos, int splitterColumn, int flags)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
        ::wxPropertyGridPage::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);
}

void sipwxPropertyGridPage::Clear()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_Clear);

    if (!sipMeth)
    {
        ::wxPropertyGridPage::Clear();
        return;
    }

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

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

::wxPGVIterator sipwxPropertyGridPage::GetVIterator(int flags) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxPropertyGridPage::GetVIterator(flags);

    extern ::wxPGVIterator sipVH__propgrid_54(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    return sipVH__propgrid_54(sipGILState, 0, sipPySelf, sipMeth, flags);
}

void sipwxPropertyGridPage::RefreshGrid(::wxPropertyGridPageState*state)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[8], &sipPySelf, SIP_NULLPTR, sipName_RefreshGrid);

    if (!sipMeth)
    {
        ::wxPropertyGridPage::RefreshGrid(state);
        return;
    }

    extern void sipVH__propgrid_55(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxPropertyGridPageState*);

    sipVH__propgrid_55(sipGILState, 0, sipPySelf, sipMeth, state);
}

void sipwxPropertyGridPage::RefreshProperty(::wxPGProperty*p)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[9], &sipPySelf, SIP_NULLPTR, sipName_RefreshProperty);

    if (!sipMeth)
    {
        ::wxPropertyGridPage::RefreshProperty(p);
        return;
    }

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

    sipVH__propgrid_56(sipGILState, 0, sipPySelf, sipMeth, p);
}

bool sipwxPropertyGridPage::ProcessEvent(::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[10], &sipPySelf, SIP_NULLPTR, sipName_ProcessEvent);

    if (!sipMeth)
        return ::wxPropertyGridPage::ProcessEvent(event);

    extern bool sipVH__propgrid_49(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxEvent&);

    return sipVH__propgrid_49(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxPropertyGridPage::TryBefore(::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[11], &sipPySelf, SIP_NULLPTR, sipName_TryBefore);

    if (!sipMeth)
        return ::wxPropertyGridPage::TryBefore(event);

    extern bool sipVH__propgrid_49(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxEvent&);

    return sipVH__propgrid_49(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxPropertyGridPage::TryAfter(::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[12], &sipPySelf, SIP_NULLPTR, sipName_TryAfter);

    if (!sipMeth)
        return ::wxPropertyGridPage::TryAfter(event);

    extern bool sipVH__propgrid_49(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxEvent&);

    return sipVH__propgrid_49(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxPropertyGridPage::sipProtectVirt_TryBefore(bool sipSelfWasArg, ::wxEvent& event)
{
    return (sipSelfWasArg ? ::wxEvtHandler::TryBefore(event) : TryBefore(event));
}

bool sipwxPropertyGridPage::sipProtectVirt_TryAfter(bool sipSelfWasArg, ::wxEvent& event)
{
    return (sipSelfWasArg ? ::wxEvtHandler::TryAfter(event) : TryAfter(event));
}


PyDoc_STRVAR(doc_wxPropertyGridPage_TryBefore, "TryBefore(event) -> bool\n"
"\n"
"Method called by ProcessEvent() before examining this object event\n"
"tables.");

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

    {
        ::wxEvent* event;
        sipwxPropertyGridPage *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxPropertyGridPage, &sipCpp, sipType_wxEvent, &event))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_TryBefore(sipSelfWasArg, *event);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_TryBefore, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_TryAfter, "TryAfter(event) -> bool\n"
"\n"
"Method called by ProcessEvent() as last resort.");

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

    {
        ::wxEvent* event;
        sipwxPropertyGridPage *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxPropertyGridPage, &sipCpp, sipType_wxEvent, &event))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_TryAfter(sipSelfWasArg, *event);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_TryAfter, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_Clear, "Clear() -> None\n"
"\n"
"Deletes all properties on page.");

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

    {
        ::wxPropertyGridPage *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxPropertyGridPage::Clear() : sipCpp->Clear());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_Clear, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_FitColumns, "FitColumns() -> wx.Size\n"
"\n"
"Reduces column sizes to minimum possible that contents are still\n"
"visibly (naturally some margin space will be applied as well).");

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

    {
        ::wxPropertyGridPage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxSize(sipCpp->FitColumns());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_FitColumns, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_GetIndex, "GetIndex() -> int\n"
"\n"
"Returns page index in manager;.");

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

    {
        const ::wxPropertyGridPage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetIndex();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_GetIndex, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_GetRoot, "GetRoot() -> PGProperty\n"
"\n"
"Returns \"root property\".");

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

    {
        const ::wxPropertyGridPage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetRoot();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_GetRoot, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_GetSplitterPosition, "GetSplitterPosition(col=0) -> int\n"
"\n"
"Returns x-coordinate position of splitter on a page.");

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

    {
        int col = 0;
        const ::wxPropertyGridPage *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_wxPropertyGridPage, &sipCpp, &col))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetSplitterPosition(col);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_GetSplitterPosition, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_GetStatePtr, "GetStatePtr() -> PropertyGridPageState\n"
"\n"
"Returns pointer to contained property grid state.");

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

    {
        ::wxPropertyGridPage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetStatePtr();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_GetStatePtr, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_GetToolId, "GetToolId() -> int\n"
"\n"
"Returns id of the tool bar item that represents this page on\n"
"wxPropertyGridManager's wxToolBar.");

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

    {
        const ::wxPropertyGridPage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetToolId();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_GetToolId, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_Init, "Init() -> None\n"
"\n"
"Do any member initialization in this method.");

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

    {
        ::wxPropertyGridPage *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxPropertyGridPage::Init() : sipCpp->Init());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_Init, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_IsHandlingAllEvents, "IsHandlingAllEvents() -> bool\n"
"\n"
"Return false here to indicate unhandled events should be propagated to\n"
"manager's parent, as normal.");

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

    {
        const ::wxPropertyGridPage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxPropertyGridPage::IsHandlingAllEvents() : sipCpp->IsHandlingAllEvents());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_IsHandlingAllEvents, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_OnShow, "OnShow() -> None\n"
"\n"
"Called every time page is about to be shown.");

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

    {
        ::wxPropertyGridPage *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxPropertyGridPage::OnShow() : sipCpp->OnShow());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_OnShow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_RefreshProperty, "RefreshProperty(p) -> None\n"
"\n"
"Refreshes given property on page.");

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

    {
        ::wxPGProperty* p;
        ::wxPropertyGridPage *sipCpp;

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

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

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxPropertyGridPage::RefreshProperty(p) : sipCpp->RefreshProperty(p));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_RefreshProperty, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_SetSplitterPosition, "SetSplitterPosition(splitterPos, col=0) -> None\n"
"\n"
"Sets splitter position on page.");

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

    {
        int splitterPos;
        int col = 0;
        ::wxPropertyGridPage *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi|i", &sipSelf, sipType_wxPropertyGridPage, &sipCpp, &splitterPos, &col))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetSplitterPosition(splitterPos, col);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_SetSplitterPosition, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxPropertyGridPage)
        return sipCppV;

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

    if (targetType == sipType_wxPropertyGridInterface)
        return static_cast< ::wxPropertyGridInterface *>(sipCpp);

    if (targetType == sipType_wxPropertyGridPageState)
        return static_cast< ::wxPropertyGridPageState *>(sipCpp);

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxPropertyGridPage *>(sipCppV);
    else
        delete reinterpret_cast< ::wxPropertyGridPage *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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


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

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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxPropertyGridPage();
            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_wxPropertyGridPage[] = {{14, 0, 0}, {66, 255, 0}, {72, 255, 1}};


static PyMethodDef methods_wxPropertyGridPage[] = {
    {sipName_Clear, meth_wxPropertyGridPage_Clear, METH_VARARGS, doc_wxPropertyGridPage_Clear},
    {sipName_FitColumns, meth_wxPropertyGridPage_FitColumns, METH_VARARGS, doc_wxPropertyGridPage_FitColumns},
    {sipName_GetIndex, meth_wxPropertyGridPage_GetIndex, METH_VARARGS, doc_wxPropertyGridPage_GetIndex},
    {sipName_GetRoot, meth_wxPropertyGridPage_GetRoot, METH_VARARGS, doc_wxPropertyGridPage_GetRoot},
    {sipName_GetSplitterPosition, SIP_MLMETH_CAST(meth_wxPropertyGridPage_GetSplitterPosition), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPage_GetSplitterPosition},
    {sipName_GetStatePtr, meth_wxPropertyGridPage_GetStatePtr, METH_VARARGS, doc_wxPropertyGridPage_GetStatePtr},
    {sipName_GetToolId, meth_wxPropertyGridPage_GetToolId, METH_VARARGS, doc_wxPropertyGridPage_GetToolId},
    {sipName_Init, meth_wxPropertyGridPage_Init, METH_VARARGS, doc_wxPropertyGridPage_Init},
    {sipName_IsHandlingAllEvents, meth_wxPropertyGridPage_IsHandlingAllEvents, METH_VARARGS, doc_wxPropertyGridPage_IsHandlingAllEvents},
    {sipName_OnShow, meth_wxPropertyGridPage_OnShow, METH_VARARGS, doc_wxPropertyGridPage_OnShow},
    {sipName_RefreshProperty, SIP_MLMETH_CAST(meth_wxPropertyGridPage_RefreshProperty), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPage_RefreshProperty},
    {sipName_SetSplitterPosition, SIP_MLMETH_CAST(meth_wxPropertyGridPage_SetSplitterPosition), METH_VARARGS|METH_KEYWORDS, doc_wxPropertyGridPage_SetSplitterPosition},
    {sipName_TryAfter, SIP_MLMETH_CAST(meth_wxPropertyGridPage_TryAfter), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR},
    {sipName_TryBefore, SIP_MLMETH_CAST(meth_wxPropertyGridPage_TryBefore), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR}
};

sipVariableDef variables_wxPropertyGridPage[] = {
    {PropertyVariable, sipName_ToolId, &methods_wxPropertyGridPage[6], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_StatePtr, &methods_wxPropertyGridPage[5], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_SplitterPosition, &methods_wxPropertyGridPage[4], &methods_wxPropertyGridPage[11], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Root, &methods_wxPropertyGridPage[3], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Index, &methods_wxPropertyGridPage[2], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxPropertyGridPage, "PropertyGridPage() -> None\n"
"\n"
"Holder of property grid page information.");


sipClassTypeDef sipTypeDef__propgrid_wxPropertyGridPage = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxPropertyGridPage,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_PropertyGridPage,
        {0, 0, 1},
        14, methods_wxPropertyGridPage,
        0, SIP_NULLPTR,
        5, variables_wxPropertyGridPage,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxPropertyGridPage,
    -1,
    -1,
    supers_wxPropertyGridPage,
    SIP_NULLPTR,
    init_type_wxPropertyGridPage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxPropertyGridPage,
    SIP_NULLPTR,
    array_wxPropertyGridPage,
    SIP_NULLPTR,
    release_wxPropertyGridPage,
    cast_wxPropertyGridPage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxPropertyGridPage,
    sizeof (::wxPropertyGridPage),
};
