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

#include "sipAPI_propgrid.h"

        #include <wx/propgrid/editors.h>

        #include <wx/propgrid/property.h>
        #include <wx/window.h>
        #include <wx/propgrid/propgrid.h>
        #include <wx/event.h>
        #include <wx/propgrid/editors.h>
        #include <wx/gdicmn.h>
        #include <wx/gdicmn.h>
        #include <wx/propgrid/property.h>
        #include <wx/dc.h>
        #include <wx/gdicmn.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxPGTextCtrlEditor : public  ::wxPGTextCtrlEditor
{
public:
    sipwxPGTextCtrlEditor();
    sipwxPGTextCtrlEditor(const  ::wxPGTextCtrlEditor&);
    virtual ~sipwxPGTextCtrlEditor();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool GetValueFromControl( ::wxPGVariant&, ::wxPGProperty*, ::wxWindow*) const SIP_OVERRIDE;
     ::wxString GetName() const SIP_OVERRIDE;
     ::wxPGWindowList CreateControls( ::wxPropertyGrid*, ::wxPGProperty*,const  ::wxPoint&,const  ::wxSize&) const SIP_OVERRIDE;
    void UpdateControl( ::wxPGProperty*, ::wxWindow*) const SIP_OVERRIDE;
    void DrawValue( ::wxDC&,const  ::wxRect&, ::wxPGProperty*,const  ::wxString&) const SIP_OVERRIDE;
    bool OnEvent( ::wxPropertyGrid*, ::wxPGProperty*, ::wxWindow*, ::wxEvent&) const SIP_OVERRIDE;
    void SetValueToUnspecified( ::wxPGProperty*, ::wxWindow*) const SIP_OVERRIDE;
    void SetControlAppearance( ::wxPropertyGrid*, ::wxPGProperty*, ::wxWindow*,const  ::wxPGCell&,const  ::wxPGCell&,bool) const SIP_OVERRIDE;
    void SetControlStringValue( ::wxPGProperty*, ::wxWindow*,const  ::wxString&) const SIP_OVERRIDE;
    void SetControlIntValue( ::wxPGProperty*, ::wxWindow*,int) const SIP_OVERRIDE;
    int InsertItem( ::wxWindow*,const  ::wxString&,int) const SIP_OVERRIDE;
    void DeleteItem( ::wxWindow*,int) const SIP_OVERRIDE;
    void OnFocus( ::wxPGProperty*, ::wxWindow*) const SIP_OVERRIDE;
    bool CanContainCustomImage() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[14];
};

sipwxPGTextCtrlEditor::sipwxPGTextCtrlEditor():  ::wxPGTextCtrlEditor(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

bool sipwxPGTextCtrlEditor::GetValueFromControl( ::wxPGVariant& variant, ::wxPGProperty*property, ::wxWindow*ctrl) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxPGTextCtrlEditor::GetValueFromControl(variant,property,ctrl);

    extern bool sipVH__propgrid_34(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGVariant&, ::wxPGProperty*, ::wxWindow*);

    return sipVH__propgrid_34(sipGILState, 0, sipPySelf, sipMeth, variant, property, ctrl);
}

 ::wxString sipwxPGTextCtrlEditor::GetName() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxPGTextCtrlEditor::GetName();

    extern  ::wxString sipVH__propgrid_22(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

 ::wxPGWindowList sipwxPGTextCtrlEditor::CreateControls( ::wxPropertyGrid*propgrid, ::wxPGProperty*property,const  ::wxPoint& pos,const  ::wxSize& size) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[2]),sipPySelf,SIP_NULLPTR,sipName_CreateControls);

    if (!sipMeth)
        return  ::wxPGTextCtrlEditor::CreateControls(propgrid,property,pos,size);

    extern  ::wxPGWindowList sipVH__propgrid_23(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPropertyGrid*, ::wxPGProperty*,const  ::wxPoint&,const  ::wxSize&);

    return sipVH__propgrid_23(sipGILState, 0, sipPySelf, sipMeth, propgrid, property, pos, size);
}

void sipwxPGTextCtrlEditor::UpdateControl( ::wxPGProperty*property, ::wxWindow*ctrl) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[3]),sipPySelf,SIP_NULLPTR,sipName_UpdateControl);

    if (!sipMeth)
    {
         ::wxPGTextCtrlEditor::UpdateControl(property,ctrl);
        return;
    }

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

    sipVH__propgrid_24(sipGILState, 0, sipPySelf, sipMeth, property, ctrl);
}

void sipwxPGTextCtrlEditor::DrawValue( ::wxDC& dc,const  ::wxRect& rect, ::wxPGProperty*property,const  ::wxString& text) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[4]),sipPySelf,SIP_NULLPTR,sipName_DrawValue);

    if (!sipMeth)
    {
         ::wxPGTextCtrlEditor::DrawValue(dc,rect,property,text);
        return;
    }

    extern void sipVH__propgrid_25(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxDC&,const  ::wxRect&, ::wxPGProperty*,const  ::wxString&);

    sipVH__propgrid_25(sipGILState, 0, sipPySelf, sipMeth, dc, rect, property, text);
}

bool sipwxPGTextCtrlEditor::OnEvent( ::wxPropertyGrid*propgrid, ::wxPGProperty*property, ::wxWindow*wnd_primary, ::wxEvent& event) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxPGTextCtrlEditor::OnEvent(propgrid,property,wnd_primary,event);

    extern bool sipVH__propgrid_26(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPropertyGrid*, ::wxPGProperty*, ::wxWindow*, ::wxEvent&);

    return sipVH__propgrid_26(sipGILState, 0, sipPySelf, sipMeth, propgrid, property, wnd_primary, event);
}

void sipwxPGTextCtrlEditor::SetValueToUnspecified( ::wxPGProperty*property, ::wxWindow*ctrl) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxPGTextCtrlEditor::SetValueToUnspecified(property,ctrl);
        return;
    }

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

    sipVH__propgrid_24(sipGILState, 0, sipPySelf, sipMeth, property, ctrl);
}

void sipwxPGTextCtrlEditor::SetControlAppearance( ::wxPropertyGrid*pg, ::wxPGProperty*property, ::wxWindow*ctrl,const  ::wxPGCell& appearance,const  ::wxPGCell& oldAppearance,bool unspecified) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxPGTextCtrlEditor::SetControlAppearance(pg,property,ctrl,appearance,oldAppearance,unspecified);
        return;
    }

    extern void sipVH__propgrid_28(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPropertyGrid*, ::wxPGProperty*, ::wxWindow*,const  ::wxPGCell&,const  ::wxPGCell&,bool);

    sipVH__propgrid_28(sipGILState, 0, sipPySelf, sipMeth, pg, property, ctrl, appearance, oldAppearance, unspecified);
}

void sipwxPGTextCtrlEditor::SetControlStringValue( ::wxPGProperty*property, ::wxWindow*ctrl,const  ::wxString& txt) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxPGTextCtrlEditor::SetControlStringValue(property,ctrl,txt);
        return;
    }

    extern void sipVH__propgrid_29(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGProperty*, ::wxWindow*,const  ::wxString&);

    sipVH__propgrid_29(sipGILState, 0, sipPySelf, sipMeth, property, ctrl, txt);
}

void sipwxPGTextCtrlEditor::SetControlIntValue( ::wxPGProperty*property, ::wxWindow*ctrl,int value) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxPGTextCtrlEditor::SetControlIntValue(property,ctrl,value);
        return;
    }

    extern void sipVH__propgrid_30(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGProperty*, ::wxWindow*,int);

    sipVH__propgrid_30(sipGILState, 0, sipPySelf, sipMeth, property, ctrl, value);
}

int sipwxPGTextCtrlEditor::InsertItem( ::wxWindow*ctrl,const  ::wxString& label,int index) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[10]),sipPySelf,SIP_NULLPTR,sipName_InsertItem);

    if (!sipMeth)
        return  ::wxPGTextCtrlEditor::InsertItem(ctrl,label,index);

    extern int sipVH__propgrid_31(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxWindow*,const  ::wxString&,int);

    return sipVH__propgrid_31(sipGILState, 0, sipPySelf, sipMeth, ctrl, label, index);
}

void sipwxPGTextCtrlEditor::DeleteItem( ::wxWindow*ctrl,int index) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxPGTextCtrlEditor::DeleteItem(ctrl,index);
        return;
    }

    extern void sipVH__propgrid_32(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxWindow*,int);

    sipVH__propgrid_32(sipGILState, 0, sipPySelf, sipMeth, ctrl, index);
}

void sipwxPGTextCtrlEditor::OnFocus( ::wxPGProperty*property, ::wxWindow*wnd) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxPGTextCtrlEditor::OnFocus(property,wnd);
        return;
    }

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

    sipVH__propgrid_24(sipGILState, 0, sipPySelf, sipMeth, property, wnd);
}

bool sipwxPGTextCtrlEditor::CanContainCustomImage() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxPGTextCtrlEditor::CanContainCustomImage();

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

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


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_CreateControls, "CreateControls(propgrid, property, pos, size) -> PGWindowList\n"
"\n"
"Instantiates editor controls.");

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

    {
         ::wxPropertyGrid* propgrid;
         ::wxPGProperty* property;
        const  ::wxPoint* pos;
        int posState = 0;
        const  ::wxSize* size;
        int sizeState = 0;
        const  ::wxPGTextCtrlEditor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_propgrid,
            sipName_property,
            sipName_pos,
            sipName_size,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8J1J1", &sipSelf, sipType_wxPGTextCtrlEditor, &sipCpp, sipType_wxPropertyGrid, &propgrid, sipType_wxPGProperty, &property, sipType_wxPoint, &pos, &posState, sipType_wxSize, &size, &sizeState))
        {
             ::wxPGWindowList*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxPGWindowList((sipSelfWasArg ? sipCpp-> ::wxPGTextCtrlEditor::CreateControls(propgrid,property,*pos,*size) : sipCpp->CreateControls(propgrid,property,*pos,*size)));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxPoint *>(pos),sipType_wxPoint,posState);
            sipReleaseType(const_cast< ::wxSize *>(size),sipType_wxSize,sizeState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_CreateControls, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_UpdateControl, "UpdateControl(property, ctrl)\n"
"\n"
"Loads value from property to the control.");

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

    {
         ::wxPGProperty* property;
         ::wxWindow* ctrl;
        const  ::wxPGTextCtrlEditor *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8", &sipSelf, sipType_wxPGTextCtrlEditor, &sipCpp, sipType_wxPGProperty, &property, sipType_wxWindow, &ctrl))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp-> ::wxPGTextCtrlEditor::UpdateControl(property,ctrl) : sipCpp->UpdateControl(property,ctrl));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_UpdateControl, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_OnEvent, "OnEvent(propgrid, property, wnd_primary, event) -> bool\n"
"\n"
"Handles events.");

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

    {
         ::wxPropertyGrid* propgrid;
         ::wxPGProperty* property;
         ::wxWindow* wnd_primary;
         ::wxEvent* event;
        const  ::wxPGTextCtrlEditor *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8J8J9", &sipSelf, sipType_wxPGTextCtrlEditor, &sipCpp, sipType_wxPropertyGrid, &propgrid, sipType_wxPGProperty, &property, sipType_wxWindow, &wnd_primary, sipType_wxEvent, &event))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxPGTextCtrlEditor::OnEvent(propgrid,property,wnd_primary,*event) : sipCpp->OnEvent(propgrid,property,wnd_primary,*event));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_OnEvent, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_GetValueFromControl, "GetValueFromControl(variant, property, ctrl) -> bool\n"
"\n"
"Returns value from control, via parameter variant.");

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

    {
         ::wxPGVariant* variant;
        int variantState = 0;
         ::wxPGProperty* property;
         ::wxWindow* ctrl;
        const  ::wxPGTextCtrlEditor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_variant,
            sipName_property,
            sipName_ctrl,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J8J8", &sipSelf, sipType_wxPGTextCtrlEditor, &sipCpp, sipType_wxPGVariant,&variant, &variantState, sipType_wxPGProperty, &property, sipType_wxWindow, &ctrl))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxPGTextCtrlEditor::GetValueFromControl(*variant,property,ctrl) : sipCpp->GetValueFromControl(*variant,property,ctrl));
            Py_END_ALLOW_THREADS
            sipReleaseType(variant,sipType_wxPGVariant,variantState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_GetValueFromControl, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_GetName, "GetName() -> String\n"
"\n"
"Returns pointer to the name of the editor.");

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

    {
        const  ::wxPGTextCtrlEditor *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxString((sipSelfWasArg ? sipCpp-> ::wxPGTextCtrlEditor::GetName() : sipCpp->GetName()));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_GetName, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_SetControlStringValue, "SetControlStringValue(property, ctrl, txt)\n"
"\n"
"Sets control's value specifically from string.");

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

    {
         ::wxPGProperty* property;
         ::wxWindow* ctrl;
        const  ::wxString* txt;
        int txtState = 0;
        const  ::wxPGTextCtrlEditor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_property,
            sipName_ctrl,
            sipName_txt,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8J1", &sipSelf, sipType_wxPGTextCtrlEditor, &sipCpp, sipType_wxPGProperty, &property, sipType_wxWindow, &ctrl, sipType_wxString,&txt, &txtState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp-> ::wxPGTextCtrlEditor::SetControlStringValue(property,ctrl,*txt) : sipCpp->SetControlStringValue(property,ctrl,*txt));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(txt),sipType_wxString,txtState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_SetControlStringValue, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_OnFocus, "OnFocus(property, wnd)\n"
"\n"
"Extra processing when control gains focus.");

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

    {
         ::wxPGProperty* property;
         ::wxWindow* wnd;
        const  ::wxPGTextCtrlEditor *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8", &sipSelf, sipType_wxPGTextCtrlEditor, &sipCpp, sipType_wxPGProperty, &property, sipType_wxWindow, &wnd))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp-> ::wxPGTextCtrlEditor::OnFocus(property,wnd) : sipCpp->OnFocus(property,wnd));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_OnFocus, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_OnTextCtrlEvent, "OnTextCtrlEvent(propgrid, property, ctrl, event) -> bool");

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

    {
         ::wxPropertyGrid* propgrid;
         ::wxPGProperty* property;
         ::wxWindow* ctrl;
         ::wxEvent* event;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J8J8J8J9", sipType_wxPropertyGrid, &propgrid, sipType_wxPGProperty, &property, sipType_wxWindow, &ctrl, sipType_wxEvent, &event))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes =  ::wxPGTextCtrlEditor::OnTextCtrlEvent(propgrid,property,ctrl,*event);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_OnTextCtrlEvent, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGTextCtrlEditor_GetTextCtrlValueFromControl, "GetTextCtrlValueFromControl(variant, property, ctrl) -> bool");

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

    {
         ::wxPGVariant* variant;
        int variantState = 0;
         ::wxPGProperty* property;
         ::wxWindow* ctrl;

        static const char *sipKwdList[] = {
            sipName_variant,
            sipName_property,
            sipName_ctrl,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J8J8", sipType_wxPGVariant,&variant, &variantState, sipType_wxPGProperty, &property, sipType_wxWindow, &ctrl))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes =  ::wxPGTextCtrlEditor::GetTextCtrlValueFromControl(*variant,property,ctrl);
            Py_END_ALLOW_THREADS
            sipReleaseType(variant,sipType_wxPGVariant,variantState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PGTextCtrlEditor, sipName_GetTextCtrlValueFromControl, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxPGEditor)
        return static_cast< ::wxPGEditor *>(sipCpp);

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

    return sipCppV;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxPGTextCtrlEditor *>(sipCppV);
    else
        delete reinterpret_cast< ::wxPGTextCtrlEditor *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void assign_wxPGTextCtrlEditor(void *, SIP_SSIZE_T, void *);}
static void assign_wxPGTextCtrlEditor(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxPGTextCtrlEditor *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxPGTextCtrlEditor *>(sipSrc);
}


extern "C" {static void *copy_wxPGTextCtrlEditor(const void *, SIP_SSIZE_T);}
static void *copy_wxPGTextCtrlEditor(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::wxPGTextCtrlEditor(reinterpret_cast<const  ::wxPGTextCtrlEditor *>(sipSrc)[sipSrcIdx]);
}


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

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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxPGTextCtrlEditor();
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxPGTextCtrlEditor* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxPGTextCtrlEditor[] = {
    {SIP_MLNAME_CAST(sipName_CreateControls), SIP_MLMETH_CAST(meth_wxPGTextCtrlEditor_CreateControls), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_CreateControls)},
    {SIP_MLNAME_CAST(sipName_GetName), meth_wxPGTextCtrlEditor_GetName, METH_VARARGS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_GetName)},
    {SIP_MLNAME_CAST(sipName_GetTextCtrlValueFromControl), SIP_MLMETH_CAST(meth_wxPGTextCtrlEditor_GetTextCtrlValueFromControl), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_GetTextCtrlValueFromControl)},
    {SIP_MLNAME_CAST(sipName_GetValueFromControl), SIP_MLMETH_CAST(meth_wxPGTextCtrlEditor_GetValueFromControl), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_GetValueFromControl)},
    {SIP_MLNAME_CAST(sipName_OnEvent), SIP_MLMETH_CAST(meth_wxPGTextCtrlEditor_OnEvent), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_OnEvent)},
    {SIP_MLNAME_CAST(sipName_OnFocus), SIP_MLMETH_CAST(meth_wxPGTextCtrlEditor_OnFocus), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_OnFocus)},
    {SIP_MLNAME_CAST(sipName_OnTextCtrlEvent), SIP_MLMETH_CAST(meth_wxPGTextCtrlEditor_OnTextCtrlEvent), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_OnTextCtrlEvent)},
    {SIP_MLNAME_CAST(sipName_SetControlStringValue), SIP_MLMETH_CAST(meth_wxPGTextCtrlEditor_SetControlStringValue), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_SetControlStringValue)},
    {SIP_MLNAME_CAST(sipName_UpdateControl), SIP_MLMETH_CAST(meth_wxPGTextCtrlEditor_UpdateControl), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxPGTextCtrlEditor_UpdateControl)}
};

sipVariableDef variables_wxPGTextCtrlEditor[] = {
    {PropertyVariable, sipName_Name, &methods_wxPGTextCtrlEditor[1], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxPGTextCtrlEditor, "PGTextCtrlEditor()");


sipClassTypeDef sipTypeDef__propgrid_wxPGTextCtrlEditor = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxPGTextCtrlEditor,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_PGTextCtrlEditor,
        {0, 0, 1},
        9, methods_wxPGTextCtrlEditor,
        0, SIP_NULLPTR,
        1, variables_wxPGTextCtrlEditor,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxPGTextCtrlEditor,
    -1,
    -1,
    supers_wxPGTextCtrlEditor,
    SIP_NULLPTR,
    init_type_wxPGTextCtrlEditor,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxPGTextCtrlEditor,
    assign_wxPGTextCtrlEditor,
    array_wxPGTextCtrlEditor,
    copy_wxPGTextCtrlEditor,
    release_wxPGTextCtrlEditor,
    cast_wxPGTextCtrlEditor,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
