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

#include "sipAPI_html.h"
        #include <wx/html/helpctrl.h>
        #include <wx/window.h>


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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

    {
        ::wxWindow* parent;
        const ::wxString* helpFile;
        int helpFileState = 0;
        const ::wxString& topicdef = wxEmptyString;
        const ::wxString* topic = &topicdef;
        int topicState = 0;
        int style = wxHF_DEFAULT_STYLE|wxHF_DIALOG|wxHF_MODAL;

        static const char *sipKwdList[] = {
            sipName_parent,
            sipName_helpFile,
            sipName_topic,
            sipName_style,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8J1|J1i", sipType_wxWindow, &parent, sipType_wxString, &helpFile, &helpFileState, sipType_wxString, &topic, &topicState, &style))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxHtmlModalHelp(parent, *helpFile, *topic, style);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(helpFile), sipType_wxString, helpFileState);
            sipReleaseType(const_cast< ::wxString *>(topic), sipType_wxString, topicState);

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

            return sipCpp;
        }
    }

    {
        const ::wxHtmlModalHelp* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}

PyDoc_STRVAR(doc_wxHtmlModalHelp, "HtmlModalHelp(parent, helpFile, topic='', style=HF_DEFAULT_STYLE|HF_DIALOG|HF_MODAL) -> None\n"
"\n"
"This class uses wxHtmlHelpController to display help in a modal\n"
"dialog.");


sipClassTypeDef sipTypeDef__html_wxHtmlModalHelp = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxHtmlModalHelp,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_HtmlModalHelp,
        {0, 0, 1},
        0, SIP_NULLPTR,
        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_wxHtmlModalHelp,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxHtmlModalHelp,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxHtmlModalHelp,
    assign_wxHtmlModalHelp,
    SIP_NULLPTR,
    copy_wxHtmlModalHelp,
    release_wxHtmlModalHelp,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxHtmlModalHelp),
};
