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

#include "sipAPI_adv.h"
        #include <wx/richtooltip.h>
        #include <wx/window.h>
        #include <wx/gdicmn.h>
        #include <wx/font.h>
        #include <wx/colour.h>
        #include <wx/bmpbndl.h>


PyDoc_STRVAR(doc_wxRichToolTip_SetIcon, "SetIcon(icon=wx.ICON_INFORMATION) -> None\n"
"SetIcon(icon) -> None\n"
"\n"
"Set the small icon to show.\n"
"");

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

    {
        int icon = wxICON_INFORMATION;
        ::wxRichToolTip *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_wxRichToolTip, &sipCpp, &icon))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetIcon(icon);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const ::wxBitmapBundle* icon;
        int iconState = 0;
        ::wxRichToolTip *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxRichToolTip, &sipCpp, sipType_wxBitmapBundle, &icon, &iconState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetIcon(*icon);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxBitmapBundle *>(icon), sipType_wxBitmapBundle, iconState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichToolTip, sipName_SetIcon, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichToolTip_SetBackgroundColour, "SetBackgroundColour(col, colEnd=wx.Colour()) -> None\n"
"\n"
"Set the background colour.");

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

    {
        const ::wxColour* col;
        int colState = 0;
        const ::wxColour& colEnddef = wxColour();
        const ::wxColour* colEnd = &colEnddef;
        int colEndState = 0;
        ::wxRichToolTip *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J1", &sipSelf, sipType_wxRichToolTip, &sipCpp, sipType_wxColour, &col, &colState, sipType_wxColour, &colEnd, &colEndState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetBackgroundColour(*col, *colEnd);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxColour *>(col), sipType_wxColour, colState);
            sipReleaseType(const_cast< ::wxColour *>(colEnd), sipType_wxColour, colEndState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichToolTip, sipName_SetBackgroundColour, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichToolTip_SetTimeout, "SetTimeout(millisecondsTimeout, millisecondsDelay=0) -> None\n"
"\n"
"Set timeout after which the tooltip should disappear and optionally\n"
"set a delay before the tooltip is shown, in milliseconds.");

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

    {
        uint millisecondsTimeout;
        uint millisecondsDelay = 0;
        ::wxRichToolTip *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bu|u", &sipSelf, sipType_wxRichToolTip, &sipCpp, &millisecondsTimeout, &millisecondsDelay))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetTimeout(millisecondsTimeout, millisecondsDelay);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichToolTip, sipName_SetTimeout, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichToolTip_SetTipKind, "SetTipKind(tipKind) -> None\n"
"\n"
"Choose the tip kind, possibly none.");

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

    {
        ::wxTipKind tipKind;
        ::wxRichToolTip *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BE", &sipSelf, sipType_wxRichToolTip, &sipCpp, sipType_wxTipKind, &tipKind))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetTipKind(tipKind);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichToolTip, sipName_SetTipKind, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichToolTip_SetTitleFont, "SetTitleFont(font) -> None\n"
"\n"
"Set the title text font.");

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

    {
        const ::wxFont* font;
        ::wxRichToolTip *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxRichToolTip, &sipCpp, sipType_wxFont, &font))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetTitleFont(*font);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichToolTip, sipName_SetTitleFont, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichToolTip_ShowFor, "ShowFor(win, rect=None) -> None\n"
"\n"
"Show the tooltip for the given window and optionally specify where to\n"
"show the tooltip.");

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

    {
        ::wxWindow* win;
        const ::wxRect* rect = 0;
        int rectState = 0;
        ::wxRichToolTip *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8|J0", &sipSelf, sipType_wxRichToolTip, &sipCpp, sipType_wxWindow, &win, sipType_wxRect, &rect, &rectState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->ShowFor(win, rect);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxRect *>(rect), sipType_wxRect, rectState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichToolTip, sipName_ShowFor, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    delete reinterpret_cast< ::wxRichToolTip *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_wxRichToolTip(sipSimpleWrapper *);}
static void dealloc_wxRichToolTip(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_wxRichToolTip(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_wxRichToolTip(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_wxRichToolTip(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::wxRichToolTip *sipCpp = SIP_NULLPTR;

    {
        const ::wxString* title;
        int titleState = 0;
        const ::wxString* message;
        int messageState = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1J1", sipType_wxString, &title, &titleState, sipType_wxString, &message, &messageState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxRichToolTip(*title, *message);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(title), sipType_wxString, titleState);
            sipReleaseType(const_cast< ::wxString *>(message), sipType_wxString, messageState);

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxRichToolTip[] = {
    {sipName_SetBackgroundColour, SIP_MLMETH_CAST(meth_wxRichToolTip_SetBackgroundColour), METH_VARARGS|METH_KEYWORDS, doc_wxRichToolTip_SetBackgroundColour},
    {sipName_SetIcon, SIP_MLMETH_CAST(meth_wxRichToolTip_SetIcon), METH_VARARGS|METH_KEYWORDS, doc_wxRichToolTip_SetIcon},
    {sipName_SetTimeout, SIP_MLMETH_CAST(meth_wxRichToolTip_SetTimeout), METH_VARARGS|METH_KEYWORDS, doc_wxRichToolTip_SetTimeout},
    {sipName_SetTipKind, SIP_MLMETH_CAST(meth_wxRichToolTip_SetTipKind), METH_VARARGS|METH_KEYWORDS, doc_wxRichToolTip_SetTipKind},
    {sipName_SetTitleFont, SIP_MLMETH_CAST(meth_wxRichToolTip_SetTitleFont), METH_VARARGS|METH_KEYWORDS, doc_wxRichToolTip_SetTitleFont},
    {sipName_ShowFor, SIP_MLMETH_CAST(meth_wxRichToolTip_ShowFor), METH_VARARGS|METH_KEYWORDS, doc_wxRichToolTip_ShowFor}
};

PyDoc_STRVAR(doc_wxRichToolTip, "RichToolTip(title, message) -> None\n"
"\n"
"Allows showing a tool tip with more customizations than wxToolTip.");


sipClassTypeDef sipTypeDef__adv_wxRichToolTip = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxRichToolTip,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_RichToolTip,
        {0, 0, 1},
        6, methods_wxRichToolTip,
        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_wxRichToolTip,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxRichToolTip,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxRichToolTip,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxRichToolTip,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxRichToolTip),
};
