/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.1
 *
 *     Copyright: (c) 2020 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/richtext/richtextbuffer.h>
        #include <wx/richtext/richtextctrl.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/gdicmn.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxRichTextAction : public ::wxRichTextAction
{
public:
    sipwxRichTextAction(::wxRichTextCommand*, const ::wxString&, ::wxRichTextCommandId, ::wxRichTextBuffer*, ::wxRichTextParagraphLayoutBox*, ::wxRichTextCtrl*, bool);
    sipwxRichTextAction(const ::wxRichTextAction&);
    ~sipwxRichTextAction();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipwxRichTextAction(const sipwxRichTextAction &);
    sipwxRichTextAction &operator = (const sipwxRichTextAction &);
};

sipwxRichTextAction::sipwxRichTextAction(::wxRichTextCommand*cmd, const ::wxString& name, ::wxRichTextCommandId id, ::wxRichTextBuffer*buffer, ::wxRichTextParagraphLayoutBox*container, ::wxRichTextCtrl*ctrl, bool ignoreFirstTime): ::wxRichTextAction(cmd, name, id, buffer, container, ctrl, ignoreFirstTime), sipPySelf(SIP_NULLPTR)
{
}

sipwxRichTextAction::sipwxRichTextAction(const ::wxRichTextAction& a0): ::wxRichTextAction(a0), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_wxRichTextAction_Do, "Do() -> bool\n"
"\n"
"Performs the action.");

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

    {
        ::wxRichTextAction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextAction, &sipCpp))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->Do();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_Do, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_Undo, "Undo() -> bool\n"
"\n"
"Undoes the action.");

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

    {
        ::wxRichTextAction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextAction, &sipCpp))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->Undo();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_Undo, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_UpdateAppearance, "UpdateAppearance(caretPosition, sendUpdateEvent=False, oldFloatRect=wx.Rect(), optimizationLineCharPositions=None, optimizationLineYPositions=None, isDoCmd=True) -> None\n"
"\n"
"Updates the control appearance, optimizing if possible given\n"
"information from the call to Layout.");

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

    {
        long caretPosition;
        bool sendUpdateEvent = 0;
        const ::wxRect& oldFloatRectdef = wxRect();
        const ::wxRect* oldFloatRect = &oldFloatRectdef;
        int oldFloatRectState = 0;
        ::wxArrayInt* optimizationLineCharPositions = 0;
        int optimizationLineCharPositionsState = 0;
        ::wxArrayInt* optimizationLineYPositions = 0;
        int optimizationLineYPositionsState = 0;
        bool isDoCmd = 1;
        ::wxRichTextAction *sipCpp;

        static const char *sipKwdList[] = {
            sipName_caretPosition,
            sipName_sendUpdateEvent,
            sipName_oldFloatRect,
            sipName_optimizationLineCharPositions,
            sipName_optimizationLineYPositions,
            sipName_isDoCmd,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bl|bJ1J0J0b", &sipSelf, sipType_wxRichTextAction, &sipCpp, &caretPosition, &sendUpdateEvent, sipType_wxRect, &oldFloatRect, &oldFloatRectState, sipType_wxArrayInt, &optimizationLineCharPositions, &optimizationLineCharPositionsState, sipType_wxArrayInt, &optimizationLineYPositions, &optimizationLineYPositionsState, &isDoCmd))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->UpdateAppearance(caretPosition, sendUpdateEvent, *oldFloatRect, optimizationLineCharPositions, optimizationLineYPositions, isDoCmd);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxRect *>(oldFloatRect), sipType_wxRect, oldFloatRectState);
            sipReleaseType(optimizationLineCharPositions, sipType_wxArrayInt, optimizationLineCharPositionsState);
            sipReleaseType(optimizationLineYPositions, sipType_wxArrayInt, optimizationLineYPositionsState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_UpdateAppearance, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_ApplyParagraphs, "ApplyParagraphs(fragment) -> None\n"
"\n"
"Replaces the buffer paragraphs with the given fragment.");

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

    {
        const ::wxRichTextParagraphLayoutBox* fragment;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxRichTextParagraphLayoutBox, &fragment))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->ApplyParagraphs(*fragment);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_ApplyParagraphs, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetNewParagraphs, "GetNewParagraphs() -> RichTextParagraphLayoutBox\n"
"\n"
"Returns the new fragments.");

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

    {
        ::wxRichTextAction *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = &sipCpp->GetNewParagraphs();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes, sipType_wxRichTextParagraphLayoutBox, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetNewParagraphs, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetOldParagraphs, "GetOldParagraphs() -> RichTextParagraphLayoutBox\n"
"\n"
"Returns the old fragments.");

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

    {
        ::wxRichTextAction *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = &sipCpp->GetOldParagraphs();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes, sipType_wxRichTextParagraphLayoutBox, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetOldParagraphs, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetAttributes, "GetAttributes() -> RichTextAttr\n"
"\n"
"Returns the attributes, for single-object commands.");

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

    {
        ::wxRichTextAction *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = &sipCpp->GetAttributes();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes, sipType_wxRichTextAttr, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetAttributes, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetObject, "GetObject() -> RichTextObject\n"
"\n"
"Returns the object to replace the one at the position defined by the\n"
"container address and the action's range start position.");

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

    {
        const ::wxRichTextAction *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetObject();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes, sipType_wxRichTextObject, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetObject, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_StoreObject, "StoreObject(obj) -> None\n"
"\n"
"Stores the object to replace the one at the position defined by the\n"
"container address without making an address for it.");

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

    {
        ::wxRichTextObject* obj;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxRichTextObject, &obj))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->StoreObject(obj);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_StoreObject, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_SetObject, "SetObject(obj) -> None\n"
"\n"
"Sets the object to replace the one at the position defined by the\n"
"container address and the action's range start position.");

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

    {
        ::wxRichTextObject* obj;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxRichTextObject, &obj))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetObject(obj);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_SetObject, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_MakeObject, "MakeObject(obj) -> None\n"
"\n"
"Makes an address from the given object.");

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

    {
        ::wxRichTextObject* obj;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxRichTextObject, &obj))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->MakeObject(obj);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_MakeObject, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_SetOldAndNewObjects, "SetOldAndNewObjects(oldObj, newObj) -> None\n"
"\n"
"Sets the existing and new objects, for use with\n"
"wxRICHTEXT_CHANGE_OBJECT.");

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

    {
        ::wxRichTextObject* oldObj;
        ::wxRichTextObject* newObj;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxRichTextObject, &oldObj, sipType_wxRichTextObject, &newObj))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetOldAndNewObjects(oldObj, newObj);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_SetOldAndNewObjects, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_CalculateRefreshOptimizations, "CalculateRefreshOptimizations(optimizationLineCharPositions, optimizationLineYPositions, oldFloatRect) -> None\n"
"\n"
"Calculate arrays for refresh optimization.");

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

    {
        ::wxArrayInt* optimizationLineCharPositions;
        int optimizationLineCharPositionsState = 0;
        ::wxArrayInt* optimizationLineYPositions;
        int optimizationLineYPositionsState = 0;
        ::wxRect* oldFloatRect;
        int oldFloatRectState = 0;
        ::wxRichTextAction *sipCpp;

        static const char *sipKwdList[] = {
            sipName_optimizationLineCharPositions,
            sipName_optimizationLineYPositions,
            sipName_oldFloatRect,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J1J1", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxArrayInt, &optimizationLineCharPositions, &optimizationLineCharPositionsState, sipType_wxArrayInt, &optimizationLineYPositions, &optimizationLineYPositionsState, sipType_wxRect, &oldFloatRect, &oldFloatRectState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->CalculateRefreshOptimizations(*optimizationLineCharPositions, *optimizationLineYPositions, *oldFloatRect);
            Py_END_ALLOW_THREADS
            sipReleaseType(optimizationLineCharPositions, sipType_wxArrayInt, optimizationLineCharPositionsState);
            sipReleaseType(optimizationLineYPositions, sipType_wxArrayInt, optimizationLineYPositionsState);
            sipReleaseType(oldFloatRect, sipType_wxRect, oldFloatRectState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_CalculateRefreshOptimizations, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_SetPosition, "SetPosition(pos) -> None\n"
"\n"
"Sets the position used for e.g.");

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

    {
        long pos;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bl", &sipSelf, sipType_wxRichTextAction, &sipCpp, &pos))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetPosition(pos);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_SetPosition, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetPosition, "GetPosition() -> int\n"
"\n"
"Returns the position used for e.g.");

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

    {
        const ::wxRichTextAction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextAction, &sipCpp))
        {
            long sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetPosition();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetPosition, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_SetRange, "SetRange(range) -> None\n"
"\n"
"Sets the range for e.g.");

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

    {
        const ::wxRichTextRange* range;
        int rangeState = 0;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxRichTextRange, &range, &rangeState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetRange(*range);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxRichTextRange *>(range), sipType_wxRichTextRange, rangeState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_SetRange, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetRange, "GetRange() -> RichTextRange\n"
"\n"
"Returns the range for e.g.");

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

    {
        const ::wxRichTextAction *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxRichTextRange(sipCpp->GetRange());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetRange, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetContainerAddress, "GetContainerAddress() -> RichTextObjectAddress\n"
"\n"
"Returns the address (nested position) of the container within the\n"
"buffer being manipulated.");

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

    {
        ::wxRichTextAction *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = &sipCpp->GetContainerAddress();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes, sipType_wxRichTextObjectAddress, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetContainerAddress, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_SetContainerAddress, "SetContainerAddress(address) -> None\n"
"SetContainerAddress(container, obj) -> None\n"
"\n"
"Sets the address (nested position) of the container within the buffer\n"
"being manipulated.\n"
"");

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

    {
        const ::wxRichTextObjectAddress* address;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxRichTextObjectAddress, &address))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetContainerAddress(*address);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        ::wxRichTextParagraphLayoutBox* container;
        ::wxRichTextObject* obj;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8", &sipSelf, sipType_wxRichTextAction, &sipCpp, sipType_wxRichTextParagraphLayoutBox, &container, sipType_wxRichTextObject, &obj))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetContainerAddress(container, obj);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_SetContainerAddress, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetContainer, "GetContainer() -> RichTextParagraphLayoutBox\n"
"\n"
"Returns the container that this action refers to, using the container\n"
"address and top-level buffer.");

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

    {
        const ::wxRichTextAction *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetContainer();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes, sipType_wxRichTextParagraphLayoutBox, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetContainer, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetName, "GetName() -> str\n"
"\n"
"Returns the action name.");

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

    {
        const ::wxRichTextAction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextAction, &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);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetName, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_SetIgnoreFirstTime, "SetIgnoreFirstTime(b) -> None\n"
"\n"
"Instructs the first Do() command should be skipped as it's already\n"
"been applied.");

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

    {
        bool b;
        ::wxRichTextAction *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bb", &sipSelf, sipType_wxRichTextAction, &sipCpp, &b))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetIgnoreFirstTime(b);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_SetIgnoreFirstTime, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextAction_GetIgnoreFirstTime, "GetIgnoreFirstTime() -> bool\n"
"\n"
"Returns true if the first Do() command should be skipped as it's\n"
"already been applied.");

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

    {
        const ::wxRichTextAction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRichTextAction, &sipCpp))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetIgnoreFirstTime();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextAction, sipName_GetIgnoreFirstTime, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxRichTextAction)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxRichTextAction *>(sipCppV);
    else
        delete reinterpret_cast< ::wxRichTextAction *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_wxRichTextAction(void *, Py_ssize_t, void *);}
static void assign_wxRichTextAction(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxRichTextAction *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxRichTextAction *>(sipSrc);
}


extern "C" {static void *copy_wxRichTextAction(const void *, Py_ssize_t);}
static void *copy_wxRichTextAction(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::wxRichTextAction(reinterpret_cast<const ::wxRichTextAction *>(sipSrc)[sipSrcIdx]);
}


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

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


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

    {
        ::wxRichTextCommand* cmd;
        const ::wxString* name;
        int nameState = 0;
        ::wxRichTextCommandId id;
        ::wxRichTextBuffer* buffer;
        ::wxRichTextParagraphLayoutBox* container;
        ::wxRichTextCtrl* ctrl;
        bool ignoreFirstTime = 0;

        static const char *sipKwdList[] = {
            sipName_cmd,
            sipName_name,
            sipName_id,
            sipName_buffer,
            sipName_container,
            sipName_ctrl,
            sipName_ignoreFirstTime,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8J1EJ8J8J8|b", sipType_wxRichTextCommand, &cmd, sipType_wxString, &name, &nameState, sipType_wxRichTextCommandId, &id, sipType_wxRichTextBuffer, &buffer, sipType_wxRichTextParagraphLayoutBox, &container, sipType_wxRichTextCtrl, &ctrl, &ignoreFirstTime))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxRichTextAction(cmd, *name, id, buffer, container, ctrl, ignoreFirstTime);
            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 ::wxRichTextAction* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxRichTextAction[] = {{42, 0, 1}};


static PyMethodDef methods_wxRichTextAction[] = {
    {sipName_ApplyParagraphs, SIP_MLMETH_CAST(meth_wxRichTextAction_ApplyParagraphs), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_ApplyParagraphs},
    {sipName_CalculateRefreshOptimizations, SIP_MLMETH_CAST(meth_wxRichTextAction_CalculateRefreshOptimizations), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_CalculateRefreshOptimizations},
    {sipName_Do, meth_wxRichTextAction_Do, METH_VARARGS, doc_wxRichTextAction_Do},
    {sipName_GetAttributes, meth_wxRichTextAction_GetAttributes, METH_VARARGS, doc_wxRichTextAction_GetAttributes},
    {sipName_GetContainer, meth_wxRichTextAction_GetContainer, METH_VARARGS, doc_wxRichTextAction_GetContainer},
    {sipName_GetContainerAddress, meth_wxRichTextAction_GetContainerAddress, METH_VARARGS, doc_wxRichTextAction_GetContainerAddress},
    {sipName_GetIgnoreFirstTime, meth_wxRichTextAction_GetIgnoreFirstTime, METH_VARARGS, doc_wxRichTextAction_GetIgnoreFirstTime},
    {sipName_GetName, meth_wxRichTextAction_GetName, METH_VARARGS, doc_wxRichTextAction_GetName},
    {sipName_GetNewParagraphs, meth_wxRichTextAction_GetNewParagraphs, METH_VARARGS, doc_wxRichTextAction_GetNewParagraphs},
    {sipName_GetObject, meth_wxRichTextAction_GetObject, METH_VARARGS, doc_wxRichTextAction_GetObject},
    {sipName_GetOldParagraphs, meth_wxRichTextAction_GetOldParagraphs, METH_VARARGS, doc_wxRichTextAction_GetOldParagraphs},
    {sipName_GetPosition, meth_wxRichTextAction_GetPosition, METH_VARARGS, doc_wxRichTextAction_GetPosition},
    {sipName_GetRange, meth_wxRichTextAction_GetRange, METH_VARARGS, doc_wxRichTextAction_GetRange},
    {sipName_MakeObject, SIP_MLMETH_CAST(meth_wxRichTextAction_MakeObject), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_MakeObject},
    {sipName_SetContainerAddress, SIP_MLMETH_CAST(meth_wxRichTextAction_SetContainerAddress), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_SetContainerAddress},
    {sipName_SetIgnoreFirstTime, SIP_MLMETH_CAST(meth_wxRichTextAction_SetIgnoreFirstTime), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_SetIgnoreFirstTime},
    {sipName_SetObject, SIP_MLMETH_CAST(meth_wxRichTextAction_SetObject), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_SetObject},
    {sipName_SetOldAndNewObjects, SIP_MLMETH_CAST(meth_wxRichTextAction_SetOldAndNewObjects), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_SetOldAndNewObjects},
    {sipName_SetPosition, SIP_MLMETH_CAST(meth_wxRichTextAction_SetPosition), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_SetPosition},
    {sipName_SetRange, SIP_MLMETH_CAST(meth_wxRichTextAction_SetRange), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_SetRange},
    {sipName_StoreObject, SIP_MLMETH_CAST(meth_wxRichTextAction_StoreObject), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_StoreObject},
    {sipName_Undo, meth_wxRichTextAction_Undo, METH_VARARGS, doc_wxRichTextAction_Undo},
    {sipName_UpdateAppearance, SIP_MLMETH_CAST(meth_wxRichTextAction_UpdateAppearance), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextAction_UpdateAppearance}
};

sipVariableDef variables_wxRichTextAction[] = {
    {PropertyVariable, sipName_Range, &methods_wxRichTextAction[12], &methods_wxRichTextAction[19], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Position, &methods_wxRichTextAction[11], &methods_wxRichTextAction[18], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_OldParagraphs, &methods_wxRichTextAction[10], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Object, &methods_wxRichTextAction[9], &methods_wxRichTextAction[16], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_NewParagraphs, &methods_wxRichTextAction[8], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Name, &methods_wxRichTextAction[7], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_IgnoreFirstTime, &methods_wxRichTextAction[6], &methods_wxRichTextAction[15], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_ContainerAddress, &methods_wxRichTextAction[5], &methods_wxRichTextAction[14], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Container, &methods_wxRichTextAction[4], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Attributes, &methods_wxRichTextAction[3], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxRichTextAction, "RichTextAction(cmd, name, id, buffer, container, ctrl, ignoreFirstTime=False) -> None\n"
"\n"
"Implements a part of a command.");


sipClassTypeDef sipTypeDef__richtext_wxRichTextAction = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxRichTextAction,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_RichTextAction,
        {0, 0, 1},
        23, methods_wxRichTextAction,
        0, SIP_NULLPTR,
        10, variables_wxRichTextAction,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxRichTextAction,
    -1,
    -1,
    supers_wxRichTextAction,
    SIP_NULLPTR,
    init_type_wxRichTextAction,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxRichTextAction,
    assign_wxRichTextAction,
    SIP_NULLPTR,
    copy_wxRichTextAction,
    release_wxRichTextAction,
    cast_wxRichTextAction,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxRichTextAction),
};
