/*
 * 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/props.h>

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


class sipwxFlagsProperty : public  ::wxFlagsProperty
{
public:
    sipwxFlagsProperty(const  ::wxString&,const  ::wxString&, ::wxPGChoices&,long);
    sipwxFlagsProperty(const  ::wxString&,const  ::wxString&,const  ::wxArrayString&,const  ::wxArrayInt&,int);
    sipwxFlagsProperty(const  ::wxFlagsProperty&);
    virtual ~sipwxFlagsProperty();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void OnSetValue() SIP_OVERRIDE;
     ::wxPGVariant DoGetValue() const SIP_OVERRIDE;
    bool ValidateValue( ::wxPGVariant&, ::wxPGValidationInfo&) const SIP_OVERRIDE;
    bool StringToValue( ::wxPGVariant&,const  ::wxString&,int) const SIP_OVERRIDE;
    bool IntToValue( ::wxPGVariant&,int,int) const SIP_OVERRIDE;
     ::wxString ValueToString( ::wxPGVariant&,int) const SIP_OVERRIDE;
     ::wxSize OnMeasureImage(int) const SIP_OVERRIDE;
    bool OnEvent( ::wxPropertyGrid*, ::wxWindow*, ::wxEvent&) SIP_OVERRIDE;
     ::wxPGVariant ChildChanged( ::wxPGVariant&,int, ::wxPGVariant&) const SIP_OVERRIDE;
    const  ::wxPGEditor* DoGetEditorClass() const SIP_OVERRIDE;
     ::wxValidator* DoGetValidator() const SIP_OVERRIDE;
    void OnCustomPaint( ::wxDC&,const  ::wxRect&, ::wxPGPaintData&) SIP_OVERRIDE;
     ::wxPGCellRenderer* GetCellRenderer(int) const SIP_OVERRIDE;
    int GetChoiceSelection() const SIP_OVERRIDE;
    void RefreshChildren() SIP_OVERRIDE;
    bool DoSetAttribute(const  ::wxString&, ::wxPGVariant&) SIP_OVERRIDE;
     ::wxPGVariant DoGetAttribute(const  ::wxString&) const SIP_OVERRIDE;
     ::wxPGEditorDialogAdapter* GetEditorDialog() const SIP_OVERRIDE;
    void OnValidationFailure( ::wxPGVariant&) SIP_OVERRIDE;
     ::wxString GetValueAsString(int) const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[20];
};

sipwxFlagsProperty::sipwxFlagsProperty(const  ::wxString& label,const  ::wxString& name, ::wxPGChoices& choices,long value):  ::wxFlagsProperty(label,name,choices,value), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxFlagsProperty::sipwxFlagsProperty(const  ::wxString& label,const  ::wxString& name,const  ::wxArrayString& labels,const  ::wxArrayInt& values,int value):  ::wxFlagsProperty(label,name,labels,values,value), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

void sipwxFlagsProperty::OnSetValue()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxFlagsProperty::OnSetValue();
        return;
    }

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

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

 ::wxPGVariant sipwxFlagsProperty::DoGetValue() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::DoGetValue();

    extern  ::wxPGVariant sipVH__propgrid_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipwxFlagsProperty::ValidateValue( ::wxPGVariant& value, ::wxPGValidationInfo& validationInfo) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::ValidateValue(value,validationInfo);

    extern bool sipVH__propgrid_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGVariant&, ::wxPGValidationInfo&);

    return sipVH__propgrid_5(sipGILState, 0, sipPySelf, sipMeth, value, validationInfo);
}

bool sipwxFlagsProperty::StringToValue( ::wxPGVariant& variant,const  ::wxString& text,int argFlags) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::StringToValue(variant,text,argFlags);

    extern bool sipVH__propgrid_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGVariant&,const  ::wxString&,int);

    return sipVH__propgrid_6(sipGILState, 0, sipPySelf, sipMeth, variant, text, argFlags);
}

bool sipwxFlagsProperty::IntToValue( ::wxPGVariant& variant,int number,int argFlags) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::IntToValue(variant,number,argFlags);

    extern bool sipVH__propgrid_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGVariant&,int,int);

    return sipVH__propgrid_7(sipGILState, 0, sipPySelf, sipMeth, variant, number, argFlags);
}

 ::wxString sipwxFlagsProperty::ValueToString( ::wxPGVariant& value,int argFlags) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::ValueToString(value,argFlags);

    extern  ::wxString sipVH__propgrid_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGVariant&,int);

    return sipVH__propgrid_8(sipGILState, 0, sipPySelf, sipMeth, value, argFlags);
}

 ::wxSize sipwxFlagsProperty::OnMeasureImage(int item) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::OnMeasureImage(item);

    extern  ::wxSize sipVH__propgrid_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    return sipVH__propgrid_9(sipGILState, 0, sipPySelf, sipMeth, item);
}

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

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[7],sipPySelf,SIP_NULLPTR,sipName_OnEvent);

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

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

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

 ::wxPGVariant sipwxFlagsProperty::ChildChanged( ::wxPGVariant& thisValue,int childIndex, ::wxPGVariant& childValue) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::ChildChanged(thisValue,childIndex,childValue);

    extern  ::wxPGVariant sipVH__propgrid_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGVariant&,int, ::wxPGVariant&);

    return sipVH__propgrid_11(sipGILState, 0, sipPySelf, sipMeth, thisValue, childIndex, childValue);
}

const  ::wxPGEditor* sipwxFlagsProperty::DoGetEditorClass() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::DoGetEditorClass();

    extern const  ::wxPGEditor* sipVH__propgrid_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

 ::wxValidator* sipwxFlagsProperty::DoGetValidator() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::DoGetValidator();

    extern  ::wxValidator* sipVH__propgrid_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

void sipwxFlagsProperty::OnCustomPaint( ::wxDC& dc,const  ::wxRect& rect, ::wxPGPaintData& paintdata)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxFlagsProperty::OnCustomPaint(dc,rect,paintdata);
        return;
    }

    extern void sipVH__propgrid_14(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxDC&,const  ::wxRect&, ::wxPGPaintData&);

    sipVH__propgrid_14(sipGILState, 0, sipPySelf, sipMeth, dc, rect, paintdata);
}

 ::wxPGCellRenderer* sipwxFlagsProperty::GetCellRenderer(int column) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::GetCellRenderer(column);

    extern  ::wxPGCellRenderer* sipVH__propgrid_15(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    return sipVH__propgrid_15(sipGILState, 0, sipPySelf, sipMeth, column);
}

int sipwxFlagsProperty::GetChoiceSelection() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::GetChoiceSelection();

    extern int sipVH__propgrid_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

void sipwxFlagsProperty::RefreshChildren()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[14],sipPySelf,SIP_NULLPTR,sipName_RefreshChildren);

    if (!sipMeth)
    {
         ::wxFlagsProperty::RefreshChildren();
        return;
    }

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

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

bool sipwxFlagsProperty::DoSetAttribute(const  ::wxString& name, ::wxPGVariant& value)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[15],sipPySelf,SIP_NULLPTR,sipName_DoSetAttribute);

    if (!sipMeth)
        return  ::wxFlagsProperty::DoSetAttribute(name,value);

    extern bool sipVH__propgrid_17(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxString&, ::wxPGVariant&);

    return sipVH__propgrid_17(sipGILState, 0, sipPySelf, sipMeth, name, value);
}

 ::wxPGVariant sipwxFlagsProperty::DoGetAttribute(const  ::wxString& name) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::DoGetAttribute(name);

    extern  ::wxPGVariant sipVH__propgrid_18(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxString&);

    return sipVH__propgrid_18(sipGILState, 0, sipPySelf, sipMeth, name);
}

 ::wxPGEditorDialogAdapter* sipwxFlagsProperty::GetEditorDialog() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::GetEditorDialog();

    extern  ::wxPGEditorDialogAdapter* sipVH__propgrid_19(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

void sipwxFlagsProperty::OnValidationFailure( ::wxPGVariant& pendingValue)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[18],sipPySelf,SIP_NULLPTR,sipName_OnValidationFailure);

    if (!sipMeth)
    {
         ::wxFlagsProperty::OnValidationFailure(pendingValue);
        return;
    }

    extern void sipVH__propgrid_20(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxPGVariant&);

    sipVH__propgrid_20(sipGILState, 0, sipPySelf, sipMeth, pendingValue);
}

 ::wxString sipwxFlagsProperty::GetValueAsString(int argFlags) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxFlagsProperty::GetValueAsString(argFlags);

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

    return sipVH__propgrid_21(sipGILState, 0, sipPySelf, sipMeth, argFlags);
}


PyDoc_STRVAR(doc_wxFlagsProperty_OnSetValue, "OnSetValue()\n"
"\n"
"This virtual function is called after m_value has been set.");

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

    {
         ::wxFlagsProperty *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp-> ::wxFlagsProperty::OnSetValue() : sipCpp->OnSetValue());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_OnSetValue, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFlagsProperty_ValueToString, "ValueToString(value, argFlags=0) -> String\n"
"\n"
"Converts property value into a text representation.");

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

    {
         ::wxPGVariant* value;
        int valueState = 0;
        int argFlags = 0;
        const  ::wxFlagsProperty *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|i", &sipSelf, sipType_wxFlagsProperty, &sipCpp, sipType_wxPGVariant,&value, &valueState, &argFlags))
        {
             ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxString((sipSelfWasArg ? sipCpp-> ::wxFlagsProperty::ValueToString(*value,argFlags) : sipCpp->ValueToString(*value,argFlags)));
            Py_END_ALLOW_THREADS
            sipReleaseType(value,sipType_wxPGVariant,valueState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_ValueToString, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFlagsProperty_StringToValue, "StringToValue(text, argFlags) -> (bool, variant)\n"
"\n"
"Converts text into wxVariant value appropriate for this property.");

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

    {
         ::wxPGVariant* variant;
        const  ::wxString* text;
        int textState = 0;
        int argFlags;
        const  ::wxFlagsProperty *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1i", &sipSelf, sipType_wxFlagsProperty, &sipCpp, sipType_wxString,&text, &textState, &argFlags))
        {
            bool sipRes;
            variant = new  ::wxPGVariant();

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxFlagsProperty::StringToValue(*variant,*text,argFlags) : sipCpp->StringToValue(*variant,*text,argFlags));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(text),sipType_wxString,textState);

            if (PyErr_Occurred())
                return 0;

            return sipBuildResult(0,"(bN)",sipRes,variant,sipType_wxPGVariant,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_StringToValue, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFlagsProperty_ChildChanged, "ChildChanged(thisValue, childIndex, childValue) -> PGVariant\n"
"\n"
"Called after value of a child property has been altered.");

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

    {
         ::wxPGVariant* thisValue;
        int thisValueState = 0;
        int childIndex;
         ::wxPGVariant* childValue;
        int childValueState = 0;
        const  ::wxFlagsProperty *sipCpp;

        static const char *sipKwdList[] = {
            sipName_thisValue,
            sipName_childIndex,
            sipName_childValue,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1iJ1", &sipSelf, sipType_wxFlagsProperty, &sipCpp, sipType_wxPGVariant,&thisValue, &thisValueState, &childIndex, sipType_wxPGVariant,&childValue, &childValueState))
        {
             ::wxPGVariant*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxPGVariant((sipSelfWasArg ? sipCpp-> ::wxFlagsProperty::ChildChanged(*thisValue,childIndex,*childValue) : sipCpp->ChildChanged(*thisValue,childIndex,*childValue)));
            Py_END_ALLOW_THREADS
            sipReleaseType(thisValue,sipType_wxPGVariant,thisValueState);
            sipReleaseType(childValue,sipType_wxPGVariant,childValueState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_ChildChanged, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFlagsProperty_RefreshChildren, "RefreshChildren()\n"
"\n"
"Refresh values of child properties.");

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

    {
         ::wxFlagsProperty *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp-> ::wxFlagsProperty::RefreshChildren() : sipCpp->RefreshChildren());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_RefreshChildren, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFlagsProperty_DoSetAttribute, "DoSetAttribute(name, value) -> bool\n"
"\n"
"Reimplement this member function to add special handling for\n"
"attributes of this property.");

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

    {
        const  ::wxString* name;
        int nameState = 0;
         ::wxPGVariant* value;
        int valueState = 0;
         ::wxFlagsProperty *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J1", &sipSelf, sipType_wxFlagsProperty, &sipCpp, sipType_wxString,&name, &nameState, sipType_wxPGVariant,&value, &valueState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxFlagsProperty::DoSetAttribute(*name,*value) : sipCpp->DoSetAttribute(*name,*value));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(name),sipType_wxString,nameState);
            sipReleaseType(value,sipType_wxPGVariant,valueState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_DoSetAttribute, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFlagsProperty_GetChoiceSelection, "GetChoiceSelection() -> int\n"
"\n"
"Returns which choice is currently selected.");

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

    {
        const  ::wxFlagsProperty *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxFlagsProperty::GetChoiceSelection() : sipCpp->GetChoiceSelection());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_GetChoiceSelection, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFlagsProperty_GetItemCount, "GetItemCount() -> size_t");

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

    {
        const  ::wxFlagsProperty *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxFlagsProperty, &sipCpp))
        {
            size_t sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetItemCount();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_GetItemCount, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFlagsProperty_GetLabel, "GetLabel(ind) -> String");

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

    {
        size_t ind;
        const  ::wxFlagsProperty *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B=", &sipSelf, sipType_wxFlagsProperty, &sipCpp, &ind))
        {
             ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxString(sipCpp->GetLabel(ind));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_FlagsProperty, sipName_GetLabel, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxPGProperty)
        return static_cast< ::wxPGProperty *>(sipCpp);

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

    return sipCppV;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxFlagsProperty *>(sipCppV);
    else
        delete reinterpret_cast< ::wxFlagsProperty *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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


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


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

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


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

    {
        const  ::wxString* label;
        int labelState = 0;
        const  ::wxString* name;
        int nameState = 0;
         ::wxPGChoices* choices;
        long value = 0;

        static const char *sipKwdList[] = {
            sipName_label,
            sipName_name,
            sipName_choices,
            sipName_value,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1J1J9|l", sipType_wxString,&label, &labelState, sipType_wxString,&name, &nameState, sipType_wxPGChoices, &choices, &value))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxFlagsProperty(*label,*name,*choices,value);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(label),sipType_wxString,labelState);
            sipReleaseType(const_cast< ::wxString *>(name),sipType_wxString,nameState);

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxString& labeldef = wxPG_LABEL;
        const  ::wxString* label = &labeldef;
        int labelState = 0;
        const  ::wxString& namedef = wxPG_LABEL;
        const  ::wxString* name = &namedef;
        int nameState = 0;
        const  ::wxArrayString& labelsdef = wxArrayString();
        const  ::wxArrayString* labels = &labelsdef;
        int labelsState = 0;
        const  ::wxArrayInt& valuesdef = wxArrayInt();
        const  ::wxArrayInt* values = &valuesdef;
        int valuesState = 0;
        int value = 0;

        static const char *sipKwdList[] = {
            sipName_label,
            sipName_name,
            sipName_labels,
            sipName_values,
            sipName_value,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1J1J1J1i", sipType_wxString,&label, &labelState, sipType_wxString,&name, &nameState, sipType_wxArrayString,&labels, &labelsState, sipType_wxArrayInt,&values, &valuesState, &value))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxFlagsProperty(*label,*name,*labels,*values,value);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(label),sipType_wxString,labelState);
            sipReleaseType(const_cast< ::wxString *>(name),sipType_wxString,nameState);
            sipReleaseType(const_cast< ::wxArrayString *>(labels),sipType_wxArrayString,labelsState);
            sipReleaseType(const_cast< ::wxArrayInt *>(values),sipType_wxArrayInt,valuesState);

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxFlagsProperty* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxFlagsProperty[] = {
    {SIP_MLNAME_CAST(sipName_ChildChanged), SIP_MLMETH_CAST(meth_wxFlagsProperty_ChildChanged), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFlagsProperty_ChildChanged)},
    {SIP_MLNAME_CAST(sipName_DoSetAttribute), SIP_MLMETH_CAST(meth_wxFlagsProperty_DoSetAttribute), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFlagsProperty_DoSetAttribute)},
    {SIP_MLNAME_CAST(sipName_GetChoiceSelection), meth_wxFlagsProperty_GetChoiceSelection, METH_VARARGS, SIP_MLDOC_CAST(doc_wxFlagsProperty_GetChoiceSelection)},
    {SIP_MLNAME_CAST(sipName_GetItemCount), meth_wxFlagsProperty_GetItemCount, METH_VARARGS, SIP_MLDOC_CAST(doc_wxFlagsProperty_GetItemCount)},
    {SIP_MLNAME_CAST(sipName_GetLabel), SIP_MLMETH_CAST(meth_wxFlagsProperty_GetLabel), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFlagsProperty_GetLabel)},
    {SIP_MLNAME_CAST(sipName_OnSetValue), meth_wxFlagsProperty_OnSetValue, METH_VARARGS, SIP_MLDOC_CAST(doc_wxFlagsProperty_OnSetValue)},
    {SIP_MLNAME_CAST(sipName_RefreshChildren), meth_wxFlagsProperty_RefreshChildren, METH_VARARGS, SIP_MLDOC_CAST(doc_wxFlagsProperty_RefreshChildren)},
    {SIP_MLNAME_CAST(sipName_StringToValue), SIP_MLMETH_CAST(meth_wxFlagsProperty_StringToValue), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFlagsProperty_StringToValue)},
    {SIP_MLNAME_CAST(sipName_ValueToString), SIP_MLMETH_CAST(meth_wxFlagsProperty_ValueToString), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFlagsProperty_ValueToString)}
};

sipVariableDef variables_wxFlagsProperty[] = {
    {PropertyVariable, sipName_ItemCount, &methods_wxFlagsProperty[3], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_ChoiceSelection, &methods_wxFlagsProperty[2], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxFlagsProperty, "FlagsProperty(label, name, choices, value=0)\n"
"FlagsProperty(label=PG_LABEL, name=PG_LABEL, labels=[], values=[], value=0)\n"
"\n"
"Represents a bit set that fits in a long integer.");


sipClassTypeDef sipTypeDef__propgrid_wxFlagsProperty = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxFlagsProperty,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_FlagsProperty,
        {0, 0, 1},
        9, methods_wxFlagsProperty,
        0, SIP_NULLPTR,
        2, variables_wxFlagsProperty,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxFlagsProperty,
    -1,
    -1,
    supers_wxFlagsProperty,
    SIP_NULLPTR,
    init_type_wxFlagsProperty,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxFlagsProperty,
    assign_wxFlagsProperty,
    array_wxFlagsProperty,
    copy_wxFlagsProperty,
    release_wxFlagsProperty,
    cast_wxFlagsProperty,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
