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

#include "sipAPI_richtext.h"

        #include <wx/richtext/richtextbuffer.h>

        #include <wx/richtext/richtextbuffer.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/window.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/gdicmn.h>
        #include <wx/dc.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/gdicmn.h>
        #include <wx/gdicmn.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxRichTextFieldType : public  ::wxRichTextFieldType
{
public:
    sipwxRichTextFieldType(const  ::wxString&);
    sipwxRichTextFieldType(const  ::wxRichTextFieldType&);
    virtual ~sipwxRichTextFieldType();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool IsTopLevel( ::wxRichTextField*) const SIP_OVERRIDE;
    bool UpdateField( ::wxRichTextBuffer*, ::wxRichTextField*) SIP_OVERRIDE;
     ::wxString GetPropertiesMenuLabel( ::wxRichTextField*) const SIP_OVERRIDE;
    bool EditProperties( ::wxRichTextField*, ::wxWindow*, ::wxRichTextBuffer*) SIP_OVERRIDE;
    bool CanEditProperties( ::wxRichTextField*) const SIP_OVERRIDE;
    bool GetRangeSize( ::wxRichTextField*,const  ::wxRichTextRange&, ::wxSize&,int&, ::wxDC&, ::wxRichTextDrawingContext&,int,const  ::wxPoint&,const  ::wxSize&, ::wxArrayInt*) const SIP_OVERRIDE;
    bool Layout( ::wxRichTextField*, ::wxDC&, ::wxRichTextDrawingContext&,const  ::wxRect&,const  ::wxRect&,int) SIP_OVERRIDE;
    bool Draw( ::wxRichTextField*, ::wxDC&, ::wxRichTextDrawingContext&,const  ::wxRichTextRange&,const  ::wxRichTextSelection&,const  ::wxRect&,int,int) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[8];
};

sipwxRichTextFieldType::sipwxRichTextFieldType(const  ::wxString& name):  ::wxRichTextFieldType(name), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxRichTextFieldType::sipwxRichTextFieldType(const  ::wxRichTextFieldType& fieldType):  ::wxRichTextFieldType(fieldType), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

bool sipwxRichTextFieldType::IsTopLevel( ::wxRichTextField*obj) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextFieldType::IsTopLevel(obj);

    extern bool sipVH__richtext_78(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextField*);

    return sipVH__richtext_78(sipGILState, 0, sipPySelf, sipMeth, obj);
}

bool sipwxRichTextFieldType::UpdateField( ::wxRichTextBuffer*buffer, ::wxRichTextField*obj)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextFieldType::UpdateField(buffer,obj);

    extern bool sipVH__richtext_81(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextBuffer*, ::wxRichTextField*);

    return sipVH__richtext_81(sipGILState, 0, sipPySelf, sipMeth, buffer, obj);
}

 ::wxString sipwxRichTextFieldType::GetPropertiesMenuLabel( ::wxRichTextField*obj) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextFieldType::GetPropertiesMenuLabel(obj);

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

    return sipVH__richtext_80(sipGILState, 0, sipPySelf, sipMeth, obj);
}

bool sipwxRichTextFieldType::EditProperties( ::wxRichTextField*obj, ::wxWindow*parent, ::wxRichTextBuffer*buffer)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextFieldType::EditProperties(obj,parent,buffer);

    extern bool sipVH__richtext_79(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextField*, ::wxWindow*, ::wxRichTextBuffer*);

    return sipVH__richtext_79(sipGILState, 0, sipPySelf, sipMeth, obj, parent, buffer);
}

bool sipwxRichTextFieldType::CanEditProperties( ::wxRichTextField*obj) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextFieldType::CanEditProperties(obj);

    extern bool sipVH__richtext_78(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextField*);

    return sipVH__richtext_78(sipGILState, 0, sipPySelf, sipMeth, obj);
}

bool sipwxRichTextFieldType::GetRangeSize( ::wxRichTextField*obj,const  ::wxRichTextRange& range, ::wxSize& size,int& descent, ::wxDC& dc, ::wxRichTextDrawingContext& context,int flags,const  ::wxPoint& position,const  ::wxSize& parentSize, ::wxArrayInt*partialExtents) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return 0;

    extern bool sipVH__richtext_77(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextField*,const  ::wxRichTextRange&, ::wxSize&,int&, ::wxDC&, ::wxRichTextDrawingContext&,int,const  ::wxPoint&,const  ::wxSize&, ::wxArrayInt*);

    return sipVH__richtext_77(sipGILState, 0, sipPySelf, sipMeth, obj, range, size, descent, dc, context, flags, position, parentSize, partialExtents);
}

bool sipwxRichTextFieldType::Layout( ::wxRichTextField*obj, ::wxDC& dc, ::wxRichTextDrawingContext& context,const  ::wxRect& rect,const  ::wxRect& parentRect,int style)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,sipName_RichTextFieldType,sipName_Layout);

    if (!sipMeth)
        return 0;

    extern bool sipVH__richtext_76(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextField*, ::wxDC&, ::wxRichTextDrawingContext&,const  ::wxRect&,const  ::wxRect&,int);

    return sipVH__richtext_76(sipGILState, 0, sipPySelf, sipMeth, obj, dc, context, rect, parentRect, style);
}

bool sipwxRichTextFieldType::Draw( ::wxRichTextField*obj, ::wxDC& dc, ::wxRichTextDrawingContext& context,const  ::wxRichTextRange& range,const  ::wxRichTextSelection& selection,const  ::wxRect& rect,int descent,int style)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[7],sipPySelf,sipName_RichTextFieldType,sipName_Draw);

    if (!sipMeth)
        return 0;

    extern bool sipVH__richtext_75(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextField*, ::wxDC&, ::wxRichTextDrawingContext&,const  ::wxRichTextRange&,const  ::wxRichTextSelection&,const  ::wxRect&,int,int);

    return sipVH__richtext_75(sipGILState, 0, sipPySelf, sipMeth, obj, dc, context, range, selection, rect, descent, style);
}


PyDoc_STRVAR(doc_wxRichTextFieldType_Copy, "Copy(fieldType)");

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

    {
        const  ::wxRichTextFieldType* fieldType;
         ::wxRichTextFieldType *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextFieldType, &fieldType))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Copy(*fieldType);
            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_RichTextFieldType, sipName_Copy, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_Draw, "Draw(obj, dc, context, range, selection, rect, descent, style) -> bool\n"
"\n"
"Draw the item, within the given range.");

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

    {
         ::wxRichTextField* obj;
         ::wxDC* dc;
         ::wxRichTextDrawingContext* context;
        const  ::wxRichTextRange* range;
        int rangeState = 0;
        const  ::wxRichTextSelection* selection;
        const  ::wxRect* rect;
        int rectState = 0;
        int descent;
        int style;
         ::wxRichTextFieldType *sipCpp;

        static const char *sipKwdList[] = {
            sipName_obj,
            sipName_dc,
            sipName_context,
            sipName_range,
            sipName_selection,
            sipName_rect,
            sipName_descent,
            sipName_style,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J9J9J1J9J1ii", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextField, &obj, sipType_wxDC, &dc, sipType_wxRichTextDrawingContext, &context, sipType_wxRichTextRange, &range, &rangeState, sipType_wxRichTextSelection, &selection, sipType_wxRect, &rect, &rectState, &descent, &style))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_RichTextFieldType, sipName_Draw);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->Draw(obj,*dc,*context,*range,*selection,*rect,descent,style);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxRichTextRange *>(range),sipType_wxRichTextRange,rangeState);
            sipReleaseType(const_cast< ::wxRect *>(rect),sipType_wxRect,rectState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_Layout, "Layout(obj, dc, context, rect, parentRect, style) -> bool\n"
"\n"
"Lay the item out at the specified position with the given size\n"
"constraint.");

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

    {
         ::wxRichTextField* obj;
         ::wxDC* dc;
         ::wxRichTextDrawingContext* context;
        const  ::wxRect* rect;
        int rectState = 0;
        const  ::wxRect* parentRect;
        int parentRectState = 0;
        int style;
         ::wxRichTextFieldType *sipCpp;

        static const char *sipKwdList[] = {
            sipName_obj,
            sipName_dc,
            sipName_context,
            sipName_rect,
            sipName_parentRect,
            sipName_style,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J9J9J1J1i", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextField, &obj, sipType_wxDC, &dc, sipType_wxRichTextDrawingContext, &context, sipType_wxRect, &rect, &rectState, sipType_wxRect, &parentRect, &parentRectState, &style))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_RichTextFieldType, sipName_Layout);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->Layout(obj,*dc,*context,*rect,*parentRect,style);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxRect *>(rect),sipType_wxRect,rectState);
            sipReleaseType(const_cast< ::wxRect *>(parentRect),sipType_wxRect,parentRectState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_GetRangeSize, "GetRangeSize(obj, range, size, descent, dc, context, flags, position=wx.Point(0,0), parentSize=wx.DefaultSize, partialExtents=None) -> bool\n"
"\n"
"Returns the object size for the given range.");

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

    {
         ::wxRichTextField* obj;
        const  ::wxRichTextRange* range;
        int rangeState = 0;
         ::wxSize* size;
        int sizeState = 0;
        int descent;
         ::wxDC* dc;
         ::wxRichTextDrawingContext* context;
        int flags;
        const  ::wxPoint& positiondef = wxPoint(0,0);
        const  ::wxPoint* position = &positiondef;
        int positionState = 0;
        const  ::wxSize& parentSizedef = wxDefaultSize;
        const  ::wxSize* parentSize = &parentSizedef;
        int parentSizeState = 0;
         ::wxArrayInt* partialExtents = 0;
        int partialExtentsState = 0;
        const  ::wxRichTextFieldType *sipCpp;

        static const char *sipKwdList[] = {
            sipName_obj,
            sipName_range,
            sipName_size,
            sipName_dc,
            sipName_context,
            sipName_flags,
            sipName_position,
            sipName_parentSize,
            sipName_partialExtents,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J1J1J9J9i|J1J1J0", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextField, &obj, sipType_wxRichTextRange, &range, &rangeState, sipType_wxSize, &size, &sizeState, sipType_wxDC, &dc, sipType_wxRichTextDrawingContext, &context, &flags, sipType_wxPoint, &position, &positionState, sipType_wxSize, &parentSize, &parentSizeState, sipType_wxArrayInt,&partialExtents, &partialExtentsState))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_RichTextFieldType, sipName_GetRangeSize);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetRangeSize(obj,*range,*size,descent,*dc,*context,flags,*position,*parentSize,partialExtents);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxRichTextRange *>(range),sipType_wxRichTextRange,rangeState);
            sipReleaseType(size,sipType_wxSize,sizeState);
            sipReleaseType(const_cast< ::wxPoint *>(position),sipType_wxPoint,positionState);
            sipReleaseType(const_cast< ::wxSize *>(parentSize),sipType_wxSize,parentSizeState);
            sipReleaseType(partialExtents,sipType_wxArrayInt,partialExtentsState);

            if (PyErr_Occurred())
                return 0;

            return sipBuildResult(0,"(bi)",sipRes,descent);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_CanEditProperties, "CanEditProperties(obj) -> bool\n"
"\n"
"Returns true if we can edit the object's properties via a GUI.");

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

    {
         ::wxRichTextField* obj;
        const  ::wxRichTextFieldType *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextField, &obj))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextFieldType::CanEditProperties(obj) : sipCpp->CanEditProperties(obj));
            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_RichTextFieldType, sipName_CanEditProperties, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_EditProperties, "EditProperties(obj, parent, buffer) -> bool\n"
"\n"
"Edits the object's properties via a GUI.");

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

    {
         ::wxRichTextField* obj;
         ::wxWindow* parent;
         ::wxRichTextBuffer* buffer;
         ::wxRichTextFieldType *sipCpp;

        static const char *sipKwdList[] = {
            sipName_obj,
            sipName_parent,
            sipName_buffer,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8J8", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextField, &obj, sipType_wxWindow, &parent, sipType_wxRichTextBuffer, &buffer))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextFieldType::EditProperties(obj,parent,buffer) : sipCpp->EditProperties(obj,parent,buffer));
            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_RichTextFieldType, sipName_EditProperties, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_GetPropertiesMenuLabel, "GetPropertiesMenuLabel(obj) -> String\n"
"\n"
"Returns the label to be used for the properties context menu item.");

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

    {
         ::wxRichTextField* obj;
        const  ::wxRichTextFieldType *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextField, &obj))
        {
             ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::wxString((sipSelfWasArg ? sipCpp-> ::wxRichTextFieldType::GetPropertiesMenuLabel(obj) : sipCpp->GetPropertiesMenuLabel(obj)));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_UpdateField, "UpdateField(buffer, obj) -> bool\n"
"\n"
"Update the field.");

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

    {
         ::wxRichTextBuffer* buffer;
         ::wxRichTextField* obj;
         ::wxRichTextFieldType *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextBuffer, &buffer, sipType_wxRichTextField, &obj))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextFieldType::UpdateField(buffer,obj) : sipCpp->UpdateField(buffer,obj));
            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_RichTextFieldType, sipName_UpdateField, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_IsTopLevel, "IsTopLevel(obj) -> bool\n"
"\n"
"Returns true if this object is top-level, i.e. contains its own\n"
"paragraphs, such as a text box.");

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

    {
         ::wxRichTextField* obj;
        const  ::wxRichTextFieldType *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxRichTextField, &obj))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextFieldType::IsTopLevel(obj) : sipCpp->IsTopLevel(obj));
            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_RichTextFieldType, sipName_IsTopLevel, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_SetName, "SetName(name)\n"
"\n"
"Sets the field type name.");

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

    {
        const  ::wxString* name;
        int nameState = 0;
         ::wxRichTextFieldType *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRichTextFieldType, &sipCpp, sipType_wxString,&name, &nameState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetName(*name);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(name),sipType_wxString,nameState);

            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_RichTextFieldType, sipName_SetName, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextFieldType_GetName, "GetName() -> String\n"
"\n"
"Returns the field type name.");

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

    {
        const  ::wxRichTextFieldType *sipCpp;

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

            PyErr_Clear();

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

            if (PyErr_Occurred())
                return 0;

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

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

    return SIP_NULLPTR;
}


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

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

    return sipCppV;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxRichTextFieldType *>(sipCppV);
    else
        delete reinterpret_cast< ::wxRichTextFieldType *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

    {
        const  ::wxString& namedef = wxEmptyString;
        const  ::wxString* name = &namedef;
        int nameState = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1", sipType_wxString,&name, &nameState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxRichTextFieldType(*name);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(name),sipType_wxString,nameState);

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxRichTextFieldType* fieldType;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9", sipType_wxRichTextFieldType, &fieldType))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxRichTextFieldType(*fieldType);
            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_wxRichTextFieldType[] = {{41, 0, 1}};


static PyMethodDef methods_wxRichTextFieldType[] = {
    {SIP_MLNAME_CAST(sipName_CanEditProperties), SIP_MLMETH_CAST(meth_wxRichTextFieldType_CanEditProperties), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_CanEditProperties)},
    {SIP_MLNAME_CAST(sipName_Copy), SIP_MLMETH_CAST(meth_wxRichTextFieldType_Copy), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_Copy)},
    {SIP_MLNAME_CAST(sipName_Draw), SIP_MLMETH_CAST(meth_wxRichTextFieldType_Draw), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_Draw)},
    {SIP_MLNAME_CAST(sipName_EditProperties), SIP_MLMETH_CAST(meth_wxRichTextFieldType_EditProperties), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_EditProperties)},
    {SIP_MLNAME_CAST(sipName_GetName), meth_wxRichTextFieldType_GetName, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_GetName)},
    {SIP_MLNAME_CAST(sipName_GetPropertiesMenuLabel), SIP_MLMETH_CAST(meth_wxRichTextFieldType_GetPropertiesMenuLabel), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_GetPropertiesMenuLabel)},
    {SIP_MLNAME_CAST(sipName_GetRangeSize), SIP_MLMETH_CAST(meth_wxRichTextFieldType_GetRangeSize), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_GetRangeSize)},
    {SIP_MLNAME_CAST(sipName_IsTopLevel), SIP_MLMETH_CAST(meth_wxRichTextFieldType_IsTopLevel), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_IsTopLevel)},
    {SIP_MLNAME_CAST(sipName_Layout), SIP_MLMETH_CAST(meth_wxRichTextFieldType_Layout), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_Layout)},
    {SIP_MLNAME_CAST(sipName_SetName), SIP_MLMETH_CAST(meth_wxRichTextFieldType_SetName), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_SetName)},
    {SIP_MLNAME_CAST(sipName_UpdateField), SIP_MLMETH_CAST(meth_wxRichTextFieldType_UpdateField), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextFieldType_UpdateField)}
};

sipVariableDef variables_wxRichTextFieldType[] = {
    {PropertyVariable, sipName_Name, &methods_wxRichTextFieldType[4], &methods_wxRichTextFieldType[9], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxRichTextFieldType, "RichTextFieldType(name=wx.EmptyString)\n"
"RichTextFieldType(fieldType)\n"
"\n"
"The base class for custom field types.");


sipClassTypeDef sipTypeDef__richtext_wxRichTextFieldType = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxRichTextFieldType,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_RichTextFieldType,
        {0, 0, 1},
        11, methods_wxRichTextFieldType,
        0, SIP_NULLPTR,
        1, variables_wxRichTextFieldType,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxRichTextFieldType,
    -1,
    -1,
    supers_wxRichTextFieldType,
    SIP_NULLPTR,
    init_type_wxRichTextFieldType,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxRichTextFieldType,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxRichTextFieldType,
    cast_wxRichTextFieldType,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
