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

#include "sipAPI_propgrid.h"

        #include <wx/propgrid/manager.h>

        #include <wx/propgrid/property.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/bitmap.h>
        #include <wx/propgrid/propgridpagestate.h>
        #include <wx/propgrid/property.h>
        #include <wx/propgrid/propgridpagestate.h>
        #include <wx/propgrid/propgridpagestate.h>
        #include <wx/gdicmn.h>
        #include <wx/dcclient.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 RefreshProperty( ::wxPGProperty*) SIP_OVERRIDE;
    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;
    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[12];
};

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

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

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

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

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

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

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

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

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],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[2]),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[3],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[4],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[5],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[6],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[7],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[8]),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);
}

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

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],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[10],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[11],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);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    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);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_TryAfter, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_Clear, "Clear()\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;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    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);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    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 SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    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);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    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 SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_GetSplitterPosition, 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 SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_GetToolId, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_Init, "Init()\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;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    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);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_IsHandlingAllEvents, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_OnShow, "OnShow()\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;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_OnShow, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_RefreshProperty, "RefreshProperty(p)\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;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PropertyGridPage, sipName_RefreshProperty, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPropertyGridPage_SetSplitterPosition, "SetSplitterPosition(splitterPos, col=0)\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;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    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_wxEvtHandler)
        return static_cast< ::wxEvtHandler *>(sipCpp);

    if (targetType == sipType_wxObject)
        return static_cast< ::wxObject *>(sipCpp);

    if (targetType == sipType_wxTrackable)
        return static_cast< ::wxTrackable *>(sipCpp);

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

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

    return sipCppV;
}


/* 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 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}, {65, 255, 0}, {71, 255, 1}};


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

sipVariableDef variables_wxPropertyGridPage[] = {
    {PropertyVariable, sipName_ToolId, &methods_wxPropertyGridPage[5], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_SplitterPosition, &methods_wxPropertyGridPage[4], &methods_wxPropertyGridPage[10], 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()\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},
        13, methods_wxPropertyGridPage,
        0, SIP_NULLPTR,
        4, 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,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxPropertyGridPage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxPropertyGridPage,
    cast_wxPropertyGridPage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
