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

#include "sipAPI_core.h"
        #include <wx/filectrl.h>
        #include <wx/object.h>
        #include <wx/event.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxFileCtrlEvent : public ::wxFileCtrlEvent
{
public:
    sipwxFileCtrlEvent(::wxEventType, ::wxObject*, int);
    sipwxFileCtrlEvent(const ::wxFileCtrlEvent&);
    virtual ~sipwxFileCtrlEvent();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    ::wxEventCategory GetEventCategory() const SIP_OVERRIDE;
    ::wxEvent* Clone() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipwxFileCtrlEvent::sipwxFileCtrlEvent(::wxEventType type, ::wxObject*evtObject, int id): ::wxFileCtrlEvent(type, evtObject, id), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

::wxEventCategory sipwxFileCtrlEvent::GetEventCategory() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_GetEventCategory);

    if (!sipMeth)
        return ::wxFileCtrlEvent::GetEventCategory();

    extern ::wxEventCategory sipVH__core_104(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__core_104(sipGILState, 0, sipPySelf, sipMeth);
}

::wxEvent* sipwxFileCtrlEvent::Clone() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[1]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_Clone);

    if (!sipMeth)
        return ::wxFileCtrlEvent::Clone();

    extern ::wxEvent* sipVH__core_103(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__core_103(sipGILState, 0, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_wxFileCtrlEvent_GetDirectory, "GetDirectory() -> str\n"
"\n"
"Returns the current directory.");

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

    {
        const ::wxFileCtrlEvent *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString(sipCpp->GetDirectory());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_FileCtrlEvent, sipName_GetDirectory, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFileCtrlEvent_GetFile, "GetFile() -> str\n"
"\n"
"Returns the file selected (assuming it is only one file).");

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

    {
        const ::wxFileCtrlEvent *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString(sipCpp->GetFile());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_FileCtrlEvent, sipName_GetFile, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFileCtrlEvent_GetFiles, "GetFiles() -> List[str]\n"
"\n"
"Returns the files selected.");

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

    {
        const ::wxFileCtrlEvent *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxArrayString(sipCpp->GetFiles());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_FileCtrlEvent, sipName_GetFiles, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFileCtrlEvent_GetFilterIndex, "GetFilterIndex() -> int\n"
"\n"
"Returns the current file filter index.");

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

    {
        const ::wxFileCtrlEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxFileCtrlEvent, &sipCpp))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetFilterIndex();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_FileCtrlEvent, sipName_GetFilterIndex, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFileCtrlEvent_SetFiles, "SetFiles(files) -> None\n"
"\n"
"Sets the files changed by this event.");

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

    {
        const ::wxArrayString* files;
        int filesState = 0;
        ::wxFileCtrlEvent *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxFileCtrlEvent, &sipCpp, sipType_wxArrayString, &files, &filesState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetFiles(*files);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxArrayString *>(files), sipType_wxArrayString, filesState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_FileCtrlEvent, sipName_SetFiles, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFileCtrlEvent_SetDirectory, "SetDirectory(directory) -> None\n"
"\n"
"Sets the directory of this event.");

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

    {
        const ::wxString* directory;
        int directoryState = 0;
        ::wxFileCtrlEvent *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxFileCtrlEvent, &sipCpp, sipType_wxString, &directory, &directoryState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetDirectory(*directory);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(directory), sipType_wxString, directoryState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_FileCtrlEvent, sipName_SetDirectory, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFileCtrlEvent_SetFilterIndex, "SetFilterIndex(index) -> None\n"
"\n"
"Sets the filter index changed by this event.");

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

    {
        int index;
        ::wxFileCtrlEvent *sipCpp;

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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetFilterIndex(index);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_FileCtrlEvent, sipName_SetFilterIndex, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxFileCtrlEvent_Clone, "Clone(self) -> Event|None");

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

    {
        const ::wxFileCtrlEvent *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxFileCtrlEvent::Clone() : sipCpp->Clone());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_FileCtrlEvent, sipName_Clone, doc_wxFileCtrlEvent_Clone);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxFileCtrlEvent)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_wxCommandEvent)->ctd_cast(static_cast< ::wxCommandEvent *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxFileCtrlEvent *>(sipCppV);
    else
        delete reinterpret_cast< ::wxFileCtrlEvent *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

    {
        ::wxEventType type;
        ::wxObject* evtObject;
        int id;

        static const char *sipKwdList[] = {
            sipName_type,
            sipName_evtObject,
            sipName_id,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "iJ8i", &type, sipType_wxObject, &evtObject, &id))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxFileCtrlEvent(type, evtObject, id);
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::wxFileCtrlEvent* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxFileCtrlEvent[] = {
    {sipName_Clone, meth_wxFileCtrlEvent_Clone, METH_VARARGS, doc_wxFileCtrlEvent_Clone},
    {sipName_GetDirectory, meth_wxFileCtrlEvent_GetDirectory, METH_VARARGS, doc_wxFileCtrlEvent_GetDirectory},
    {sipName_GetFile, meth_wxFileCtrlEvent_GetFile, METH_VARARGS, doc_wxFileCtrlEvent_GetFile},
    {sipName_GetFiles, meth_wxFileCtrlEvent_GetFiles, METH_VARARGS, doc_wxFileCtrlEvent_GetFiles},
    {sipName_GetFilterIndex, meth_wxFileCtrlEvent_GetFilterIndex, METH_VARARGS, doc_wxFileCtrlEvent_GetFilterIndex},
    {sipName_SetDirectory, SIP_MLMETH_CAST(meth_wxFileCtrlEvent_SetDirectory), METH_VARARGS|METH_KEYWORDS, doc_wxFileCtrlEvent_SetDirectory},
    {sipName_SetFiles, SIP_MLMETH_CAST(meth_wxFileCtrlEvent_SetFiles), METH_VARARGS|METH_KEYWORDS, doc_wxFileCtrlEvent_SetFiles},
    {sipName_SetFilterIndex, SIP_MLMETH_CAST(meth_wxFileCtrlEvent_SetFilterIndex), METH_VARARGS|METH_KEYWORDS, doc_wxFileCtrlEvent_SetFilterIndex}
};

sipVariableDef variables_wxFileCtrlEvent[] = {
    {PropertyVariable, sipName_FilterIndex, &methods_wxFileCtrlEvent[4], &methods_wxFileCtrlEvent[7], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Files, &methods_wxFileCtrlEvent[3], &methods_wxFileCtrlEvent[6], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_File, &methods_wxFileCtrlEvent[2], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Directory, &methods_wxFileCtrlEvent[1], &methods_wxFileCtrlEvent[5], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxFileCtrlEvent, "FileCtrlEvent(type, evtObject, id) -> None\n"
"\n"
"A file control event holds information about events associated with\n"
"wxFileCtrl objects.");


sipClassTypeDef sipTypeDef__core_wxFileCtrlEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxFileCtrlEvent,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_FileCtrlEvent,
        {0, 0, 1},
        8, methods_wxFileCtrlEvent,
        0, SIP_NULLPTR,
        4, variables_wxFileCtrlEvent,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxFileCtrlEvent,
    -1,
    -1,
    supers_wxFileCtrlEvent,
    SIP_NULLPTR,
    init_type_wxFileCtrlEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxFileCtrlEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxFileCtrlEvent,
    cast_wxFileCtrlEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxFileCtrlEvent),
};
