/*
 * 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/dc.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/gdicmn.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxRichTextStdRenderer : public  ::wxRichTextStdRenderer
{
public:
    sipwxRichTextStdRenderer();
    sipwxRichTextStdRenderer(const  ::wxRichTextStdRenderer&);
    virtual ~sipwxRichTextStdRenderer();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool DrawStandardBullet( ::wxRichTextParagraph*, ::wxDC&,const  ::wxRichTextAttr&,const  ::wxRect&) SIP_OVERRIDE;
    bool DrawTextBullet( ::wxRichTextParagraph*, ::wxDC&,const  ::wxRichTextAttr&,const  ::wxRect&,const  ::wxString&) SIP_OVERRIDE;
    bool DrawBitmapBullet( ::wxRichTextParagraph*, ::wxDC&,const  ::wxRichTextAttr&,const  ::wxRect&) SIP_OVERRIDE;
    bool EnumerateStandardBulletNames( ::wxArrayString&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[4];
};

sipwxRichTextStdRenderer::sipwxRichTextStdRenderer():  ::wxRichTextStdRenderer(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

bool sipwxRichTextStdRenderer::DrawStandardBullet( ::wxRichTextParagraph*paragraph, ::wxDC& dc,const  ::wxRichTextAttr& attr,const  ::wxRect& rect)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextStdRenderer::DrawStandardBullet(paragraph,dc,attr,rect);

    extern bool sipVH__richtext_124(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextParagraph*, ::wxDC&,const  ::wxRichTextAttr&,const  ::wxRect&);

    return sipVH__richtext_124(sipGILState, 0, sipPySelf, sipMeth, paragraph, dc, attr, rect);
}

bool sipwxRichTextStdRenderer::DrawTextBullet( ::wxRichTextParagraph*paragraph, ::wxDC& dc,const  ::wxRichTextAttr& attr,const  ::wxRect& rect,const  ::wxString& text)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextStdRenderer::DrawTextBullet(paragraph,dc,attr,rect,text);

    extern bool sipVH__richtext_125(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextParagraph*, ::wxDC&,const  ::wxRichTextAttr&,const  ::wxRect&,const  ::wxString&);

    return sipVH__richtext_125(sipGILState, 0, sipPySelf, sipMeth, paragraph, dc, attr, rect, text);
}

bool sipwxRichTextStdRenderer::DrawBitmapBullet( ::wxRichTextParagraph*paragraph, ::wxDC& dc,const  ::wxRichTextAttr& attr,const  ::wxRect& rect)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextStdRenderer::DrawBitmapBullet(paragraph,dc,attr,rect);

    extern bool sipVH__richtext_124(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxRichTextParagraph*, ::wxDC&,const  ::wxRichTextAttr&,const  ::wxRect&);

    return sipVH__richtext_124(sipGILState, 0, sipPySelf, sipMeth, paragraph, dc, attr, rect);
}

bool sipwxRichTextStdRenderer::EnumerateStandardBulletNames( ::wxArrayString& bulletNames)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxRichTextStdRenderer::EnumerateStandardBulletNames(bulletNames);

    extern bool sipVH__richtext_126(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxArrayString&);

    return sipVH__richtext_126(sipGILState, 0, sipPySelf, sipMeth, bulletNames);
}


PyDoc_STRVAR(doc_wxRichTextStdRenderer_DrawStandardBullet, "DrawStandardBullet(paragraph, dc, attr, rect) -> bool\n"
"\n"
"Draws a standard bullet, as specified by the value of GetBulletName.");

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

    {
         ::wxRichTextParagraph* paragraph;
         ::wxDC* dc;
        const  ::wxRichTextAttr* attr;
        const  ::wxRect* rect;
        int rectState = 0;
         ::wxRichTextStdRenderer *sipCpp;

        static const char *sipKwdList[] = {
            sipName_paragraph,
            sipName_dc,
            sipName_attr,
            sipName_rect,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J9J9J1", &sipSelf, sipType_wxRichTextStdRenderer, &sipCpp, sipType_wxRichTextParagraph, &paragraph, sipType_wxDC, &dc, sipType_wxRichTextAttr, &attr, sipType_wxRect, &rect, &rectState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextStdRenderer::DrawStandardBullet(paragraph,*dc,*attr,*rect) : sipCpp->DrawStandardBullet(paragraph,*dc,*attr,*rect));
            Py_END_ALLOW_THREADS
            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_RichTextStdRenderer, sipName_DrawStandardBullet, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextStdRenderer_DrawTextBullet, "DrawTextBullet(paragraph, dc, attr, rect, text) -> bool\n"
"\n"
"Draws a bullet that can be described by text, such as numbered or\n"
"symbol bullets.");

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

    {
         ::wxRichTextParagraph* paragraph;
         ::wxDC* dc;
        const  ::wxRichTextAttr* attr;
        const  ::wxRect* rect;
        int rectState = 0;
        const  ::wxString* text;
        int textState = 0;
         ::wxRichTextStdRenderer *sipCpp;

        static const char *sipKwdList[] = {
            sipName_paragraph,
            sipName_dc,
            sipName_attr,
            sipName_rect,
            sipName_text,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J9J9J1J1", &sipSelf, sipType_wxRichTextStdRenderer, &sipCpp, sipType_wxRichTextParagraph, &paragraph, sipType_wxDC, &dc, sipType_wxRichTextAttr, &attr, sipType_wxRect, &rect, &rectState, sipType_wxString,&text, &textState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextStdRenderer::DrawTextBullet(paragraph,*dc,*attr,*rect,*text) : sipCpp->DrawTextBullet(paragraph,*dc,*attr,*rect,*text));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxRect *>(rect),sipType_wxRect,rectState);
            sipReleaseType(const_cast< ::wxString *>(text),sipType_wxString,textState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextStdRenderer_DrawBitmapBullet, "DrawBitmapBullet(paragraph, dc, attr, rect) -> bool\n"
"\n"
"Draws a bitmap bullet, where the bullet bitmap is specified by the\n"
"value of GetBulletName.");

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

    {
         ::wxRichTextParagraph* paragraph;
         ::wxDC* dc;
        const  ::wxRichTextAttr* attr;
        const  ::wxRect* rect;
        int rectState = 0;
         ::wxRichTextStdRenderer *sipCpp;

        static const char *sipKwdList[] = {
            sipName_paragraph,
            sipName_dc,
            sipName_attr,
            sipName_rect,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J9J9J1", &sipSelf, sipType_wxRichTextStdRenderer, &sipCpp, sipType_wxRichTextParagraph, &paragraph, sipType_wxDC, &dc, sipType_wxRichTextAttr, &attr, sipType_wxRect, &rect, &rectState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextStdRenderer::DrawBitmapBullet(paragraph,*dc,*attr,*rect) : sipCpp->DrawBitmapBullet(paragraph,*dc,*attr,*rect));
            Py_END_ALLOW_THREADS
            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_RichTextStdRenderer, sipName_DrawBitmapBullet, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextStdRenderer_EnumerateStandardBulletNames, "EnumerateStandardBulletNames(bulletNames) -> bool\n"
"\n"
"Enumerate the standard bullet names currently supported.");

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

    {
         ::wxArrayString* bulletNames;
        int bulletNamesState = 0;
         ::wxRichTextStdRenderer *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRichTextStdRenderer, &sipCpp, sipType_wxArrayString,&bulletNames, &bulletNamesState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxRichTextStdRenderer::EnumerateStandardBulletNames(*bulletNames) : sipCpp->EnumerateStandardBulletNames(*bulletNames));
            Py_END_ALLOW_THREADS
            sipReleaseType(bulletNames,sipType_wxArrayString,bulletNamesState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxRichTextRenderer)
        return static_cast< ::wxRichTextRenderer *>(sipCpp);

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

    return sipCppV;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxRichTextStdRenderer *>(sipCppV);
    else
        delete reinterpret_cast< ::wxRichTextStdRenderer *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void *array_wxRichTextStdRenderer(SIP_SSIZE_T);}
static void *array_wxRichTextStdRenderer(SIP_SSIZE_T sipNrElem)
{
    return new  ::wxRichTextStdRenderer[sipNrElem];
}


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


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

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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxRichTextStdRenderer();
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxRichTextStdRenderer* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxRichTextStdRenderer[] = {
    {SIP_MLNAME_CAST(sipName_DrawBitmapBullet), SIP_MLMETH_CAST(meth_wxRichTextStdRenderer_DrawBitmapBullet), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextStdRenderer_DrawBitmapBullet)},
    {SIP_MLNAME_CAST(sipName_DrawStandardBullet), SIP_MLMETH_CAST(meth_wxRichTextStdRenderer_DrawStandardBullet), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextStdRenderer_DrawStandardBullet)},
    {SIP_MLNAME_CAST(sipName_DrawTextBullet), SIP_MLMETH_CAST(meth_wxRichTextStdRenderer_DrawTextBullet), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextStdRenderer_DrawTextBullet)},
    {SIP_MLNAME_CAST(sipName_EnumerateStandardBulletNames), SIP_MLMETH_CAST(meth_wxRichTextStdRenderer_EnumerateStandardBulletNames), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextStdRenderer_EnumerateStandardBulletNames)}
};

PyDoc_STRVAR(doc_wxRichTextStdRenderer, "RichTextStdRenderer()\n"
"\n"
"The standard renderer for drawing bullets.");


sipClassTypeDef sipTypeDef__richtext_wxRichTextStdRenderer = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxRichTextStdRenderer,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_RichTextStdRenderer,
        {0, 0, 1},
        4, methods_wxRichTextStdRenderer,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxRichTextStdRenderer,
    -1,
    -1,
    supers_wxRichTextStdRenderer,
    SIP_NULLPTR,
    init_type_wxRichTextStdRenderer,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxRichTextStdRenderer,
    assign_wxRichTextStdRenderer,
    array_wxRichTextStdRenderer,
    copy_wxRichTextStdRenderer,
    release_wxRichTextStdRenderer,
    cast_wxRichTextStdRenderer,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
