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

#include "sipAPI_grid.h"
        #include <wx/grid.h>



PyDoc_STRVAR(doc_wxGridActivationResult_DoNothing, "DoNothing() -> GridActivationResult\n"
"\n"
"Indicate that nothing should be done and the cell shouldn't be edited\n"
"at all.");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            ::wxGridActivationResult*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxGridActivationResult(::wxGridActivationResult::DoNothing());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_GridActivationResult, sipName_DoNothing, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridActivationResult_DoChange, "DoChange(newval) -> GridActivationResult\n"
"\n"
"Indicate that activating the cell is possible and would change its\n"
"value to the given one.");

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

    {
        const ::wxString* newval;
        int newvalState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString, &newval, &newvalState))
        {
            ::wxGridActivationResult*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxGridActivationResult(::wxGridActivationResult::DoChange(*newval));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(newval), sipType_wxString, newvalState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_GridActivationResult, sipName_DoChange, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridActivationResult_DoEdit, "DoEdit() -> GridActivationResult\n"
"\n"
"Indicate that the editor control should be shown and the cell should\n"
"be edited normally.");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            ::wxGridActivationResult*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxGridActivationResult(::wxGridActivationResult::DoEdit());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_GridActivationResult, sipName_DoEdit, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

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

    Py_END_ALLOW_THREADS
}


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


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

    {
        const ::wxGridActivationResult* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxGridActivationResult[] = {
    {sipName_DoChange, SIP_MLMETH_CAST(meth_wxGridActivationResult_DoChange), METH_VARARGS|METH_KEYWORDS, doc_wxGridActivationResult_DoChange},
    {sipName_DoEdit, meth_wxGridActivationResult_DoEdit, METH_VARARGS, doc_wxGridActivationResult_DoEdit},
    {sipName_DoNothing, meth_wxGridActivationResult_DoNothing, METH_VARARGS, doc_wxGridActivationResult_DoNothing}
};

PyDoc_STRVAR(doc_wxGridActivationResult, "Represents the result of wxGridCellEditor::TryActivate().");


sipClassTypeDef sipTypeDef__grid_wxGridActivationResult = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxGridActivationResult,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_GridActivationResult,
        {0, 0, 1},
        3, methods_wxGridActivationResult,
        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_wxGridActivationResult,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxGridActivationResult,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxGridActivationResult,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxGridActivationResult,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxGridActivationResult),
};
