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

#include "sipAPI_core.h"

        #include <wx/mousemanager.h>

        #include <wx/window.h>
        #include <wx/gdicmn.h>
        #include <wx/event.h>
        #include <wx/eventfilter.h>
        #include <wx/event.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxMouseEventsManager : public  ::wxMouseEventsManager
{
public:
    sipwxMouseEventsManager();
    sipwxMouseEventsManager( ::wxWindow*);
    virtual ~sipwxMouseEventsManager();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    bool sipProtectVirt_TryBefore(bool, ::wxEvent&);
    bool sipProtectVirt_TryAfter(bool, ::wxEvent&);
    int sipProtect_MouseHitTest(const  ::wxPoint&);
    bool sipProtect_MouseClicked(int);
    bool sipProtect_MouseDragBegin(int,const  ::wxPoint&);
    void sipProtect_MouseDragging(int,const  ::wxPoint&);
    void sipProtect_MouseDragEnd(int,const  ::wxPoint&);
    void sipProtect_MouseDragCancelled(int);
    void sipProtectVirt_MouseClickBegin(bool,int);
    void sipProtectVirt_MouseClickCancelled(bool,int);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void MouseClickCancelled(int) SIP_OVERRIDE;
    void MouseClickBegin(int) SIP_OVERRIDE;
    void MouseDragCancelled(int) SIP_OVERRIDE;
    void MouseDragEnd(int,const  ::wxPoint&) SIP_OVERRIDE;
    void MouseDragging(int,const  ::wxPoint&) SIP_OVERRIDE;
    bool MouseDragBegin(int,const  ::wxPoint&) SIP_OVERRIDE;
    bool MouseClicked(int) SIP_OVERRIDE;
    int MouseHitTest(const  ::wxPoint&) SIP_OVERRIDE;
    bool ProcessEvent( ::wxEvent&) SIP_OVERRIDE;
    bool TryBefore( ::wxEvent&) SIP_OVERRIDE;
    bool TryAfter( ::wxEvent&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[11];
};

sipwxMouseEventsManager::sipwxMouseEventsManager():  ::wxMouseEventsManager(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxMouseEventsManager::sipwxMouseEventsManager( ::wxWindow*win):  ::wxMouseEventsManager(win), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

void sipwxMouseEventsManager::MouseClickCancelled(int item)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxMouseEventsManager::MouseClickCancelled(item);
        return;
    }

    extern void sipVH__core_108(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    sipVH__core_108(sipGILState, 0, sipPySelf, sipMeth, item);
}

void sipwxMouseEventsManager::MouseClickBegin(int item)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::wxMouseEventsManager::MouseClickBegin(item);
        return;
    }

    extern void sipVH__core_108(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    sipVH__core_108(sipGILState, 0, sipPySelf, sipMeth, item);
}

void sipwxMouseEventsManager::MouseDragCancelled(int item)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,sipName_MouseEventsManager,sipName_MouseDragCancelled);

    if (!sipMeth)
        return;

    extern void sipVH__core_108(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    sipVH__core_108(sipGILState, 0, sipPySelf, sipMeth, item);
}

void sipwxMouseEventsManager::MouseDragEnd(int item,const  ::wxPoint& pos)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,sipName_MouseEventsManager,sipName_MouseDragEnd);

    if (!sipMeth)
        return;

    extern void sipVH__core_228(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,const  ::wxPoint&);

    sipVH__core_228(sipGILState, 0, sipPySelf, sipMeth, item, pos);
}

void sipwxMouseEventsManager::MouseDragging(int item,const  ::wxPoint& pos)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,sipName_MouseEventsManager,sipName_MouseDragging);

    if (!sipMeth)
        return;

    extern void sipVH__core_228(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,const  ::wxPoint&);

    sipVH__core_228(sipGILState, 0, sipPySelf, sipMeth, item, pos);
}

bool sipwxMouseEventsManager::MouseDragBegin(int item,const  ::wxPoint& pos)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,sipName_MouseEventsManager,sipName_MouseDragBegin);

    if (!sipMeth)
        return 0;

    extern bool sipVH__core_227(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int,const  ::wxPoint&);

    return sipVH__core_227(sipGILState, 0, sipPySelf, sipMeth, item, pos);
}

bool sipwxMouseEventsManager::MouseClicked(int item)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,sipName_MouseEventsManager,sipName_MouseClicked);

    if (!sipMeth)
        return 0;

    extern bool sipVH__core_143(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

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

int sipwxMouseEventsManager::MouseHitTest(const  ::wxPoint& pos)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[7],sipPySelf,sipName_MouseEventsManager,sipName_MouseHitTest);

    if (!sipMeth)
        return 0;

    extern int sipVH__core_226(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxPoint&);

    return sipVH__core_226(sipGILState, 0, sipPySelf, sipMeth, pos);
}

bool sipwxMouseEventsManager::ProcessEvent( ::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[8],sipPySelf,SIP_NULLPTR,sipName_ProcessEvent);

    if (!sipMeth)
        return  ::wxMouseEventsManager::ProcessEvent(event);

    extern bool sipVH__core_97(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxEvent&);

    return sipVH__core_97(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxMouseEventsManager::TryBefore( ::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],sipPySelf,SIP_NULLPTR,sipName_TryBefore);

    if (!sipMeth)
        return  ::wxMouseEventsManager::TryBefore(event);

    extern bool sipVH__core_97(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxEvent&);

    return sipVH__core_97(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxMouseEventsManager::TryAfter( ::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[10],sipPySelf,SIP_NULLPTR,sipName_TryAfter);

    if (!sipMeth)
        return  ::wxMouseEventsManager::TryAfter(event);

    extern bool sipVH__core_97(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxEvent&);

    return sipVH__core_97(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxMouseEventsManager::sipProtectVirt_TryBefore(bool sipSelfWasArg, ::wxEvent& event)
{
    return (sipSelfWasArg ?  ::wxEvtHandler::TryBefore(event) : TryBefore(event));
}

bool sipwxMouseEventsManager::sipProtectVirt_TryAfter(bool sipSelfWasArg, ::wxEvent& event)
{
    return (sipSelfWasArg ?  ::wxEvtHandler::TryAfter(event) : TryAfter(event));
}

int sipwxMouseEventsManager::sipProtect_MouseHitTest(const  ::wxPoint& pos)
{
    return MouseHitTest(pos);
}

bool sipwxMouseEventsManager::sipProtect_MouseClicked(int item)
{
    return MouseClicked(item);
}

bool sipwxMouseEventsManager::sipProtect_MouseDragBegin(int item,const  ::wxPoint& pos)
{
    return MouseDragBegin(item,pos);
}

void sipwxMouseEventsManager::sipProtect_MouseDragging(int item,const  ::wxPoint& pos)
{
    MouseDragging(item,pos);
}

void sipwxMouseEventsManager::sipProtect_MouseDragEnd(int item,const  ::wxPoint& pos)
{
    MouseDragEnd(item,pos);
}

void sipwxMouseEventsManager::sipProtect_MouseDragCancelled(int item)
{
    MouseDragCancelled(item);
}

void sipwxMouseEventsManager::sipProtectVirt_MouseClickBegin(bool sipSelfWasArg,int item)
{
    (sipSelfWasArg ?  ::wxMouseEventsManager::MouseClickBegin(item) : MouseClickBegin(item));
}

void sipwxMouseEventsManager::sipProtectVirt_MouseClickCancelled(bool sipSelfWasArg,int item)
{
    (sipSelfWasArg ?  ::wxMouseEventsManager::MouseClickCancelled(item) : MouseClickCancelled(item));
}


PyDoc_STRVAR(doc_wxMouseEventsManager_TryBefore, "TryBefore(event) -> bool\n"
"\n"
"Method called by ProcessEvent() before examining this object event\n"
"tables.");

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

    {
         ::wxEvent* event;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, sipType_wxEvent, &event))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_TryBefore(sipSelfWasArg,*event);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_TryBefore, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_TryAfter, "TryAfter(event) -> bool\n"
"\n"
"Method called by ProcessEvent() as last resort.");

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

    {
         ::wxEvent* event;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, sipType_wxEvent, &event))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_TryAfter(sipSelfWasArg,*event);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_TryAfter, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_Create, "Create(win) -> bool\n"
"\n"
"Finishes initialization of the object created using default\n"
"constructor.");

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

    {
         ::wxWindow* win;
         ::wxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, sipType_wxWindow, &win))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->Create(win);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_Create, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_MouseHitTest, "MouseHitTest(pos) -> int\n"
"\n"
"Must be overridden to return the item at the given position.");

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

    {
        const  ::wxPoint* pos;
        int posState = 0;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, sipType_wxPoint, &pos, &posState))
        {
            int sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_MouseEventsManager, sipName_MouseHitTest);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtect_MouseHitTest(*pos);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxPoint *>(pos),sipType_wxPoint,posState);

            if (PyErr_Occurred())
                return 0;

            return SIPLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_MouseHitTest, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_MouseClicked, "MouseClicked(item) -> bool\n"
"\n"
"Must be overridden to react to mouse clicks.");

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

    {
        int item;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, &item))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_MouseEventsManager, sipName_MouseClicked);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtect_MouseClicked(item);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_MouseClicked, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_MouseDragBegin, "MouseDragBegin(item, pos) -> bool\n"
"\n"
"Must be overridden to allow or deny dragging of the item.");

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

    {
        int item;
        const  ::wxPoint* pos;
        int posState = 0;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiJ1", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, &item, sipType_wxPoint, &pos, &posState))
        {
            bool sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_MouseEventsManager, sipName_MouseDragBegin);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtect_MouseDragBegin(item,*pos);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxPoint *>(pos),sipType_wxPoint,posState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_MouseDragBegin, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_MouseDragging, "MouseDragging(item, pos)\n"
"\n"
"Must be overridden to provide feed back while an item is being\n"
"dragged.");

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

    {
        int item;
        const  ::wxPoint* pos;
        int posState = 0;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiJ1", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, &item, sipType_wxPoint, &pos, &posState))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_MouseEventsManager, sipName_MouseDragging);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtect_MouseDragging(item,*pos);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxPoint *>(pos),sipType_wxPoint,posState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_MouseDragging, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_MouseDragEnd, "MouseDragEnd(item, pos)\n"
"\n"
"Must be overridden to handle item drop.");

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

    {
        int item;
        const  ::wxPoint* pos;
        int posState = 0;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BiJ1", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, &item, sipType_wxPoint, &pos, &posState))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_MouseEventsManager, sipName_MouseDragEnd);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtect_MouseDragEnd(item,*pos);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxPoint *>(pos),sipType_wxPoint,posState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_MouseDragEnd, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_MouseDragCancelled, "MouseDragCancelled(item)\n"
"\n"
"Must be overridden to handle cancellation of mouse dragging.");

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

    {
        int item;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, &item))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_MouseEventsManager, sipName_MouseDragCancelled);
                return SIP_NULLPTR;
            }

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtect_MouseDragCancelled(item);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_MouseDragCancelled, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_MouseClickBegin, "MouseClickBegin(item)\n"
"\n"
"May be overridden to update the state of an item when it is pressed.");

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

    {
        int item;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, &item))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_MouseClickBegin(sipSelfWasArg,item);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_MouseClickBegin, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMouseEventsManager_MouseClickCancelled, "MouseClickCancelled(item)\n"
"\n"
"Must be overridden to reset the item appearance changed by\n"
"MouseClickBegin().");

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

    {
        int item;
        sipwxMouseEventsManager *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxMouseEventsManager, &sipCpp, &item))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_MouseClickCancelled(sipSelfWasArg,item);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_MouseEventsManager, sipName_MouseClickCancelled, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxEvtHandler)
        return static_cast< ::wxEvtHandler *>(sipCpp);

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

    if (targetType == sipType_wxTrackable)
        return static_cast< ::wxTrackable *>(sipCpp);

    return sipCppV;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxMouseEventsManager *>(sipCppV);
    else
        delete reinterpret_cast< ::wxMouseEventsManager *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxMouseEventsManager();
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
         ::wxWindow* win;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8", sipType_wxWindow, &win))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxMouseEventsManager(win);
            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_wxMouseEventsManager[] = {{154, 255, 1}};


static PyMethodDef methods_wxMouseEventsManager[] = {
    {SIP_MLNAME_CAST(sipName_Create), SIP_MLMETH_CAST(meth_wxMouseEventsManager_Create), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_Create)},
    {SIP_MLNAME_CAST(sipName_MouseClickBegin), SIP_MLMETH_CAST(meth_wxMouseEventsManager_MouseClickBegin), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_MouseClickBegin)},
    {SIP_MLNAME_CAST(sipName_MouseClickCancelled), SIP_MLMETH_CAST(meth_wxMouseEventsManager_MouseClickCancelled), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_MouseClickCancelled)},
    {SIP_MLNAME_CAST(sipName_MouseClicked), SIP_MLMETH_CAST(meth_wxMouseEventsManager_MouseClicked), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_MouseClicked)},
    {SIP_MLNAME_CAST(sipName_MouseDragBegin), SIP_MLMETH_CAST(meth_wxMouseEventsManager_MouseDragBegin), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_MouseDragBegin)},
    {SIP_MLNAME_CAST(sipName_MouseDragCancelled), SIP_MLMETH_CAST(meth_wxMouseEventsManager_MouseDragCancelled), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_MouseDragCancelled)},
    {SIP_MLNAME_CAST(sipName_MouseDragEnd), SIP_MLMETH_CAST(meth_wxMouseEventsManager_MouseDragEnd), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_MouseDragEnd)},
    {SIP_MLNAME_CAST(sipName_MouseDragging), SIP_MLMETH_CAST(meth_wxMouseEventsManager_MouseDragging), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_MouseDragging)},
    {SIP_MLNAME_CAST(sipName_MouseHitTest), SIP_MLMETH_CAST(meth_wxMouseEventsManager_MouseHitTest), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxMouseEventsManager_MouseHitTest)},
    {SIP_MLNAME_CAST(sipName_TryAfter), SIP_MLMETH_CAST(meth_wxMouseEventsManager_TryAfter), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR},
    {SIP_MLNAME_CAST(sipName_TryBefore), SIP_MLMETH_CAST(meth_wxMouseEventsManager_TryBefore), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR}
};

PyDoc_STRVAR(doc_wxMouseEventsManager, "MouseEventsManager()\n"
"MouseEventsManager(win)\n"
"\n"
"Helper for handling mouse input events in windows containing multiple\n"
"items.");


sipClassTypeDef sipTypeDef__core_wxMouseEventsManager = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxMouseEventsManager,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_MouseEventsManager,
        {0, 0, 1},
        11, methods_wxMouseEventsManager,
        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_wxMouseEventsManager,
    -1,
    -1,
    supers_wxMouseEventsManager,
    SIP_NULLPTR,
    init_type_wxMouseEventsManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxMouseEventsManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxMouseEventsManager,
    cast_wxMouseEventsManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
