/* Generated by Cython 3.0.0a11 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "GL_SILENCE_DEPRECATION",
                "1"
            ]
        ],
        "depends": [
            "/tmp/build-env-em3j6y9i/lib/python3.7/site-packages/cysignals/macros.h",
            "/tmp/build-env-em3j6y9i/lib/python3.7/site-packages/cysignals/struct_signals.h",
            "src/pyglui/cygl/include_glew.h"
        ],
        "extra_compile_args": [
            "-Wno-strict-aliasing",
            "-O2"
        ],
        "extra_link_args": [],
        "include_dirs": [
            "src/pyglui/cygl",
            "/tmp/build-env-em3j6y9i/lib/python3.7/site-packages/cysignals",
            "src/pyglui/cygl/",
            ".",
            "/tmp/build-env-em3j6y9i/lib/python3.7/site-packages/numpy/core/include",
            "/usr/include/GL",
            "src/pyglui/pyfontstash/fontstash/src"
        ],
        "language": "c++",
        "libraries": [
            "GLEW",
            "GL"
        ],
        "name": "pyglui.ui",
        "sources": [
            "src/pyglui/ui.pyx"
        ]
    },
    "module_name": "pyglui.ui"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#define CYTHON_ABI "3_0_0a11"
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x030000AB
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
  #endif
#elif defined(CYTHON_LIMITED_API)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS 1
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(U other) { return *ptr == other; }
    template<typename U> bool operator !=(U other) { return *ptr != other; }
  private:
    T *ptr;
};

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(p))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#ifndef CO_COROUTINE
  #define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
  #define CO_ASYNC_GENERATOR 0x200
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX < 0x030900B1
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE(obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef PyUnicode_Contains
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__pyglui__ui
#define __PYX_HAVE_API__pyglui__ui
/* Early includes */
#include <string.h>
#include <stdio.h>
#include "struct_signals.h"
#include <stdint.h>
#include "include_glew.h"
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <vector>
#include "gl.h"
#include "stb_truetype.h"
#include "fontstash.h"
#include "glfontstash.h"
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
{
    const wchar_t *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char *__pyx_f[] = {
  "src/pyglui/ui.pyx",
  "<stringsource>",
  "src/pyglui/ui_elements.pxi",
  "src/pyglui/menus.pxi",
  "src/pyglui/gldraw.pxi",
  "src/pyglui/helpers.pxi",
  "src/pyglui/custom.pxi",
  "src/pyglui/timelines.pxi",
  "type.pxd",
  "src/pyglui/cygl/utils.pxd",
  "src/pyglui/pyfontstash/fontstash.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_6pyglui_4cygl_5utils_RGBA;
struct __pyx_obj_6pyglui_4cygl_5utils_Render_Target;
struct __pyx_obj_6pyglui_4cygl_5utils_Named_Texture;
struct __pyx_obj_6pyglui_4cygl_5utils_Sphere;
struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context;
struct __pyx_obj_6pyglui_2ui_UI;
struct __pyx_obj_6pyglui_2ui_UI_element;
struct __pyx_obj_6pyglui_2ui_Slider;
struct __pyx_obj_6pyglui_2ui_Switch;
struct __pyx_obj_6pyglui_2ui_Selector;
struct __pyx_obj_6pyglui_2ui_Text_Input;
struct __pyx_obj_6pyglui_2ui_Slider_Text_Input;
struct __pyx_obj_6pyglui_2ui_Button;
struct __pyx_obj_6pyglui_2ui_Separator;
struct __pyx_obj_6pyglui_2ui_Info_Text;
struct __pyx_obj_6pyglui_2ui_Color_Legend;
struct __pyx_obj_6pyglui_2ui_Thumb;
struct __pyx_obj_6pyglui_2ui_Icon;
struct __pyx_obj_6pyglui_2ui_Hot_Key;
struct __pyx_obj_6pyglui_2ui_Seek_Bar;
struct __pyx_obj_6pyglui_2ui_Timeline;
struct __pyx_obj_6pyglui_2ui_Base_Menu;
struct __pyx_obj_6pyglui_2ui_Movable_Menu;
struct __pyx_obj_6pyglui_2ui_Stretching_Menu;
struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu;
struct __pyx_obj_6pyglui_2ui_Growing_Menu;
struct __pyx_obj_6pyglui_2ui_Scrolling_Menu;
struct __pyx_obj_6pyglui_2ui_Container;
struct __pyx_obj_6pyglui_2ui_Timeline_Menu;
struct __pyx_obj_6pyglui_2ui_Synced_Value;
struct __pyx_obj_6pyglui_2ui_Input;
struct __pyx_obj_6pyglui_2ui_Draggable;
struct __pyx_obj_6pyglui_2ui_FitBox;
struct __pyx_obj_6pyglui_2ui_Vec2;
struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off;
struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange;
struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__;
struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_bars;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_x;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_polyline;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_polyline_norm;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_progress;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_tooltip;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_circle;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points_norm;
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_rounded_rect;
struct __pyx_t_6pyglui_4cygl_5utils_fbo_tex_id;
typedef struct __pyx_t_6pyglui_4cygl_5utils_fbo_tex_id __pyx_t_6pyglui_4cygl_5utils_fbo_tex_id;

/* "utils.pxd":13
 * cpdef init()
 * 
 * cpdef draw_bars(verts, float height, float thickness=*,RGBA color=*)             # <<<<<<<<<<<<<<
 * cpdef draw_x(verts, float width, float height, float thickness=*,RGBA color=*)
 * cpdef draw_polyline(verts,float thickness=*,RGBA color=*,line_type =*)
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_bars {
  int __pyx_n;
  float thickness;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
};

/* "utils.pxd":14
 * 
 * cpdef draw_bars(verts, float height, float thickness=*,RGBA color=*)
 * cpdef draw_x(verts, float width, float height, float thickness=*,RGBA color=*)             # <<<<<<<<<<<<<<
 * cpdef draw_polyline(verts,float thickness=*,RGBA color=*,line_type =*)
 * cpdef draw_polyline_norm(verts,float thickness=*,RGBA color=*,line_type =*)
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_x {
  int __pyx_n;
  float thickness;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
};

/* "utils.pxd":15
 * cpdef draw_bars(verts, float height, float thickness=*,RGBA color=*)
 * cpdef draw_x(verts, float width, float height, float thickness=*,RGBA color=*)
 * cpdef draw_polyline(verts,float thickness=*,RGBA color=*,line_type =*)             # <<<<<<<<<<<<<<
 * cpdef draw_polyline_norm(verts,float thickness=*,RGBA color=*,line_type =*)
 * 
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_polyline {
  int __pyx_n;
  float thickness;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
  PyObject *line_type;
};

/* "utils.pxd":16
 * cpdef draw_x(verts, float width, float height, float thickness=*,RGBA color=*)
 * cpdef draw_polyline(verts,float thickness=*,RGBA color=*,line_type =*)
 * cpdef draw_polyline_norm(verts,float thickness=*,RGBA color=*,line_type =*)             # <<<<<<<<<<<<<<
 * 
 * cpdef draw_points(points,float size=*,RGBA color=*,float sharpness=*)
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_polyline_norm {
  int __pyx_n;
  float thickness;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
  PyObject *line_type;
};

/* "utils.pxd":18
 * cpdef draw_polyline_norm(verts,float thickness=*,RGBA color=*,line_type =*)
 * 
 * cpdef draw_points(points,float size=*,RGBA color=*,float sharpness=*)             # <<<<<<<<<<<<<<
 * cpdef draw_progress(location, float start, float stop, float inner_radius=*,
 *                     float outer_radius=*, RGBA color=*, float sharpness=*)
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points {
  int __pyx_n;
  float size;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
  float sharpness;
};

/* "utils.pxd":19
 * 
 * cpdef draw_points(points,float size=*,RGBA color=*,float sharpness=*)
 * cpdef draw_progress(location, float start, float stop, float inner_radius=*,             # <<<<<<<<<<<<<<
 *                     float outer_radius=*, RGBA color=*, float sharpness=*)
 * cdef draw_tooltip(tip_location, text_size, padding=*,
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_progress {
  int __pyx_n;
  float inner_radius;
  float outer_radius;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
  float sharpness;
};

/* "utils.pxd":21
 * cpdef draw_progress(location, float start, float stop, float inner_radius=*,
 *                     float outer_radius=*, RGBA color=*, float sharpness=*)
 * cdef draw_tooltip(tip_location, text_size, padding=*,             # <<<<<<<<<<<<<<
 *                    RGBA tooltip_color=*, float sharpness=*)
 * cpdef draw_circle(center_position=*,float radius=*,float stroke_width=*,
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_tooltip {
  int __pyx_n;
  PyObject *padding;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *tooltip_color;
  float sharpness;
};

/* "utils.pxd":23
 * cdef draw_tooltip(tip_location, text_size, padding=*,
 *                    RGBA tooltip_color=*, float sharpness=*)
 * cpdef draw_circle(center_position=*,float radius=*,float stroke_width=*,             # <<<<<<<<<<<<<<
 *                   RGBA color=*,float sharpness=*)
 * cpdef draw_points_norm(points,float size=*,RGBA color=*,float sharpness=*)
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_circle {
  int __pyx_n;
  PyObject *center_position;
  float radius;
  float stroke_width;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
  float sharpness;
};

/* "utils.pxd":25
 * cpdef draw_circle(center_position=*,float radius=*,float stroke_width=*,
 *                   RGBA color=*,float sharpness=*)
 * cpdef draw_points_norm(points,float size=*,RGBA color=*,float sharpness=*)             # <<<<<<<<<<<<<<
 * 
 * cpdef draw_rounded_rect(origin, size, float corner_radius, RGBA color=*, float sharpness=*)
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points_norm {
  int __pyx_n;
  float size;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
  float sharpness;
};

/* "utils.pxd":27
 * cpdef draw_points_norm(points,float size=*,RGBA color=*,float sharpness=*)
 * 
 * cpdef draw_rounded_rect(origin, size, float corner_radius, RGBA color=*, float sharpness=*)             # <<<<<<<<<<<<<<
 * 
 * ctypedef struct fbo_tex_id:
 */
struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_rounded_rect {
  int __pyx_n;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
  float sharpness;
};

/* "utils.pxd":29
 * cpdef draw_rounded_rect(origin, size, float corner_radius, RGBA color=*, float sharpness=*)
 * 
 * ctypedef struct fbo_tex_id:             # <<<<<<<<<<<<<<
 *     GLuint fbo_id
 *     GLuint tex_id
 */
struct __pyx_t_6pyglui_4cygl_5utils_fbo_tex_id {
  GLuint fbo_id;
  GLuint tex_id;
};
struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_draw_multi_line_text;
struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_compute_breaking_text;
struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_draw_breaking_text;

/* "fontstash.pxd":26
 *     cpdef draw_limited_text(self, float x, float y, object text, float width)
 *     cpdef get_first_char_idx(self, object text, float width)
 *     cpdef draw_multi_line_text(self, float x, float y, object text, float line_height =*)             # <<<<<<<<<<<<<<
 *     cpdef compute_breaking_text(self, float x, float y, object text, float width,float height,float line_height =*)
 *     cpdef draw_breaking_text(self, float x, float y, object text, float width,float height,float line_height =*)
 */
struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_draw_multi_line_text {
  int __pyx_n;
  float line_height;
};

/* "fontstash.pxd":27
 *     cpdef get_first_char_idx(self, object text, float width)
 *     cpdef draw_multi_line_text(self, float x, float y, object text, float line_height =*)
 *     cpdef compute_breaking_text(self, float x, float y, object text, float width,float height,float line_height =*)             # <<<<<<<<<<<<<<
 *     cpdef draw_breaking_text(self, float x, float y, object text, float width,float height,float line_height =*)
 *     cpdef vertical_metrics(self)
 */
struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_compute_breaking_text {
  int __pyx_n;
  float line_height;
};

/* "fontstash.pxd":28
 *     cpdef draw_multi_line_text(self, float x, float y, object text, float line_height =*)
 *     cpdef compute_breaking_text(self, float x, float y, object text, float width,float height,float line_height =*)
 *     cpdef draw_breaking_text(self, float x, float y, object text, float width,float height,float line_height =*)             # <<<<<<<<<<<<<<
 *     cpdef vertical_metrics(self)
 *     cpdef char_cumulative_width(self, float x, float y, object text)
 */
struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_draw_breaking_text {
  int __pyx_n;
  float line_height;
};
struct __pyx_opt_args_6pyglui_2ui_tripple_h;
struct __pyx_t_6pyglui_2ui_fbo_tex_id;
typedef struct __pyx_t_6pyglui_2ui_fbo_tex_id __pyx_t_6pyglui_2ui_fbo_tex_id;
struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw;
struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay;
struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input;
struct __pyx_opt_args_6pyglui_2ui_6Slider_draw;
struct __pyx_opt_args_6pyglui_2ui_6Slider_handle_input;
struct __pyx_opt_args_6pyglui_2ui_6Switch_draw;
struct __pyx_opt_args_6pyglui_2ui_6Switch_handle_input;
struct __pyx_opt_args_6pyglui_2ui_8Selector_draw;
struct __pyx_opt_args_6pyglui_2ui_8Selector_handle_input;
struct __pyx_opt_args_6pyglui_2ui_10Text_Input_draw;
struct __pyx_opt_args_6pyglui_2ui_10Text_Input_handle_input;
struct __pyx_opt_args_6pyglui_2ui_6Button_draw;
struct __pyx_opt_args_6pyglui_2ui_6Button_handle_input;
struct __pyx_opt_args_6pyglui_2ui_9Separator_draw;
struct __pyx_opt_args_6pyglui_2ui_9Info_Text_draw;
struct __pyx_opt_args_6pyglui_2ui_12Color_Legend_draw;
struct __pyx_opt_args_6pyglui_2ui_5Thumb_draw;
struct __pyx_opt_args_6pyglui_2ui_5Thumb_handle_input;
struct __pyx_opt_args_6pyglui_2ui_4Icon_handle_input;
struct __pyx_opt_args_6pyglui_2ui_4Icon_draw;
struct __pyx_opt_args_6pyglui_2ui_4Icon_draw_overlay;
struct __pyx_opt_args_6pyglui_2ui_7Hot_Key_handle_input;
struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_draw;
struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_draw_overlay;
struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_handle_input;
struct __pyx_opt_args_6pyglui_2ui_8Timeline_draw;
struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_draw;
struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_draw_overlay;
struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_handle_input;
struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_draw;
struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_draw_overlay;
struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_handle_input;
struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_draw;
struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_draw_overlay;
struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_handle_input;
struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_draw;
struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_draw_overlay;
struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_handle_input;
struct __pyx_opt_args_6pyglui_2ui_9Container_draw;
struct __pyx_opt_args_6pyglui_2ui_9Container_draw_overlay;
struct __pyx_opt_args_6pyglui_2ui_9Container_handle_input;
struct __pyx_opt_args_6pyglui_2ui_13Timeline_Menu_draw;
struct __pyx_opt_args_6pyglui_2ui_9Draggable_draw;
struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch;

/* "src/pyglui/gldraw.pxi":45
 *     gl.glEnd()
 * 
 * cdef inline tripple_h(Vec2 org, Vec2 size, RGBA color=RGBA(1.,1.,1.,.5)):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.6*ui_scale)
 */
struct __pyx_opt_args_6pyglui_2ui_tripple_h {
  int __pyx_n;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
};

/* "src/pyglui/gldraw.pxi":203
 * ### Using this saves us considerable cpu/gpu time when the UI remains static.
 * ### An almost identical implementation can be found in cylg.utils
 * ctypedef struct fbo_tex_id:             # <<<<<<<<<<<<<<
 *     gl.GLuint fbo_id
 *     gl.GLuint tex_id
 */
struct __pyx_t_6pyglui_2ui_fbo_tex_id {
  GLuint fbo_id;
  GLuint tex_id;
};

/* "src/pyglui/ui_elements.pxi":19
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":22
 *         pass
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":25
 *         pass
 * 
 *     cpdef handle_input(self,Input new_input,bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":133
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance:
 *         self.outline.compute(parent)
 */
struct __pyx_opt_args_6pyglui_2ui_6Slider_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":189
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
struct __pyx_opt_args_6pyglui_2ui_6Slider_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":268
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
struct __pyx_opt_args_6pyglui_2ui_6Switch_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":311
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
struct __pyx_opt_args_6pyglui_2ui_6Switch_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":399
 * 
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         #update appearance
 */
struct __pyx_opt_args_6pyglui_2ui_8Selector_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":450
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
struct __pyx_opt_args_6pyglui_2ui_8Selector_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":540
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         # read only rendering rules
 */
struct __pyx_opt_args_6pyglui_2ui_10Text_Input_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":705
 *             return unicode(obj)
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef double d_double_click = 0.5  # delay used for double click
 */
struct __pyx_opt_args_6pyglui_2ui_10Text_Input_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":916
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef tuple text_color
 *         cdef RGBA bg_color
 */
struct __pyx_opt_args_6pyglui_2ui_6Button_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":977
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
struct __pyx_opt_args_6pyglui_2ui_6Button_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1012
 *         pass
 * 
 *     cpdef draw(self, FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
struct __pyx_opt_args_6pyglui_2ui_9Separator_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1090
 *                 self._centered = new_value
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
struct __pyx_opt_args_6pyglui_2ui_9Info_Text_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1145
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
struct __pyx_opt_args_6pyglui_2ui_12Color_Legend_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1285
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
struct __pyx_opt_args_6pyglui_2ui_5Thumb_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1339
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
struct __pyx_opt_args_6pyglui_2ui_5Thumb_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1426
 *         self._indicator_stop = val
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         unused = super(Icon, self).handle_input(new_input, visible, parent_read_only)
 *         global should_redraw_overlay
 */
struct __pyx_opt_args_6pyglui_2ui_4Icon_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1438
 *         return unused
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
struct __pyx_opt_args_6pyglui_2ui_4Icon_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1473
 *         glfont.pop_state()
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef basestring T = self.tooltip
 *         cdef float ref_size = min(self.button.size)
 */
struct __pyx_opt_args_6pyglui_2ui_4Icon_draw_overlay {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/ui_elements.pxi":1539
 *         self.sync_val.sync()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):
 */
struct __pyx_opt_args_6pyglui_2ui_7Hot_Key_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/custom.pxi":109
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))
 */
struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/custom.pxi":115
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         self.backwards.draw(self.outline, nested=True, parent_read_only=False)
 */
struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_draw_overlay {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/custom.pxi":213
 *         return '{:02.0f}:{:06.3f}'.format(minutes, seconds)
 * 
 *     cpdef handle_input(self,Input new_input, bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.backwards.handle_input(new_input, True, parent_read_only=False)
 *         self.play.handle_input(new_input, True, parent_read_only=False)
 */
struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/timelines.pxi":21
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.data_area.compute(self.outline)
 */
struct __pyx_opt_args_6pyglui_2ui_8Timeline_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":312
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float h = 0,y_spacing=0,org_y=0
 *         if not self.collapsed:
 */
struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":333
 *                 self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_draw_overlay {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":340
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":379
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float w=0, x_spacing=0, org_x=0
 *         if not self.collapsed:
 */
struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":400
 *                 self.outline.org.x = org_x
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_draw_overlay {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":407
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":461
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":481
 *             self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_draw_overlay {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":488
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 */
struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":603
 *         return "Scrolling_Menu {}".format(self._label)
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":628
 *             self.draw_scroll_window_elements(parent_read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_draw_overlay {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":695
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef bint mouse_over_menu = 0
 */
struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":792
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         # compute constraints
 *         cdef FitBox copy = parent.computed_copy()
 */
struct __pyx_opt_args_6pyglui_2ui_9Container_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":814
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
struct __pyx_opt_args_6pyglui_2ui_9Container_draw_overlay {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":821
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
struct __pyx_opt_args_6pyglui_2ui_9Container_handle_input {
  int __pyx_n;
  int parent_read_only;
};

/* "src/pyglui/menus.pxi":840
 * 
 * cdef class Timeline_Menu(Scrolling_Menu):
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
struct __pyx_opt_args_6pyglui_2ui_13Timeline_Menu_draw {
  int __pyx_n;
  int nested;
  int parent_read_only;
};

/* "pyglui/ui.pyx":468
 *         pass
 * 
 *     cdef draw(self, FitBox parent_size,bint nested=True):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent_size)
 *         self.outline.sketch()
 */
struct __pyx_opt_args_6pyglui_2ui_9Draggable_draw {
  int __pyx_n;
  int nested;
};

/* "pyglui/ui.pyx":727
 *         return d
 * 
 *     cdef sketch(self, RGBA color=RGBA(*rect_color_default)):             # <<<<<<<<<<<<<<
 *         rect(self.org, self.size, color)
 * 
 */
struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch {
  int __pyx_n;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
};

/* "utils.pxd":8
 * 
 * 
 * cdef class RGBA:             # <<<<<<<<<<<<<<
 *     cdef public float r,g,b,a
 * 
 */
struct __pyx_obj_6pyglui_4cygl_5utils_RGBA {
  PyObject_HEAD
  float r;
  float g;
  float b;
  float a;
};


/* "utils.pxd":33
 *     GLuint tex_id
 * 
 * cdef class Render_Target:             # <<<<<<<<<<<<<<
 *     cdef fbo_tex_id fbo_tex
 * 
 */
struct __pyx_obj_6pyglui_4cygl_5utils_Render_Target {
  PyObject_HEAD
  __pyx_t_6pyglui_4cygl_5utils_fbo_tex_id fbo_tex;
};


/* "utils.pxd":36
 *     cdef fbo_tex_id fbo_tex
 * 
 * cdef class Named_Texture:             # <<<<<<<<<<<<<<
 *     cdef GLuint texture_id
 *     cdef bint use_yuv_shader
 */
struct __pyx_obj_6pyglui_4cygl_5utils_Named_Texture {
  PyObject_HEAD
  GLuint texture_id;
  int use_yuv_shader;
};


/* "utils.pxd":40
 *     cdef bint use_yuv_shader
 * 
 * cdef class Sphere:             # <<<<<<<<<<<<<<
 *     cdef GLuint vertex_buffer_id
 *     cdef GLuint index_buffer_id
 */
struct __pyx_obj_6pyglui_4cygl_5utils_Sphere {
  PyObject_HEAD
  GLuint vertex_buffer_id;
  GLuint index_buffer_id;
  int vertex_buffer_size;
  int index_buffer_size;
  int indices_amount;
};


/* "fontstash.pxd":16
 * 
 * 
 * cdef class Context:             # <<<<<<<<<<<<<<
 *     cdef fs.FONScontext * ctx
 *     cdef dict fonts
 */
struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *__pyx_vtab;
  struct FONScontext *ctx;
  PyObject *fonts;
};


/* "pyglui/ui.pyx":69
 * 
 * 
 * cdef class UI:             # <<<<<<<<<<<<<<
 *     '''
 *     The UI context for a glfw window.
 */
struct __pyx_obj_6pyglui_2ui_UI {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pyglui_2ui_UI *__pyx_vtab;
  struct __pyx_obj_6pyglui_2ui_Input *new_input;
  PyObject *elements;
  struct __pyx_obj_6pyglui_2ui_FitBox *window;
  __pyx_t_6pyglui_2ui_fbo_tex_id ui_layer;
  __pyx_t_6pyglui_2ui_fbo_tex_id overlay_layer;
};


/* "src/pyglui/ui_elements.pxi":4
 * # Base class
 * # see 'design_params.pxi' for design parameters
 * cdef class UI_element:             # <<<<<<<<<<<<<<
 *     '''
 *     The base class for all UI elements.
 */
struct __pyx_obj_6pyglui_2ui_UI_element {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element *__pyx_vtab;
  float _order;
  PyObject *uid;
  struct __pyx_obj_6pyglui_2ui_FitBox *outline;
  PyObject *_label;
  int _read_only;
};


/* "src/pyglui/ui_elements.pxi":82
 * #    +--------------------------------+
 * 
 * cdef class Slider(UI_element):             # <<<<<<<<<<<<<<
 *     cdef public float minimum,maximum,step
 *     cdef public FitBox field
 */
struct __pyx_obj_6pyglui_2ui_Slider {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  float minimum;
  float maximum;
  float step;
  struct __pyx_obj_6pyglui_2ui_FitBox *field;
  int selected;
  struct __pyx_obj_6pyglui_2ui_Vec2 *slider_pos;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *sync_val;
  int steps;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *line_default_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *line_highlight_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *text_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *button_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *button_selected_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *button_shadow_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *step_color;
  struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *label_field;
};


/* "src/pyglui/ui_elements.pxi":236
 * 
 * 
 * cdef class Switch(UI_element):             # <<<<<<<<<<<<<<
 *     cdef public FitBox field,button
 *     cdef bint selected
 */
struct __pyx_obj_6pyglui_2ui_Switch {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  struct __pyx_obj_6pyglui_2ui_FitBox *field;
  struct __pyx_obj_6pyglui_2ui_FitBox *button;
  int selected;
  int on_val;
  int off_val;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *sync_val;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *text_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *button_color_on;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *button_color_off;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *button_shadow_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *button_selected_color;
};


/* "src/pyglui/ui_elements.pxi":341
 * 
 * 
 * cdef class Selector(UI_element):             # <<<<<<<<<<<<<<
 *     cdef public FitBox field
 *     cdef FitBox select_field
 */
struct __pyx_obj_6pyglui_2ui_Selector {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  struct __pyx_obj_6pyglui_2ui_FitBox *field;
  struct __pyx_obj_6pyglui_2ui_FitBox *select_field;
  PyObject *selection;
  PyObject *selection_labels;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *sync_val;
  int selection_idx;
  int selected;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *text_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *triangle_color;
  PyObject *selection_getter;
};


/* "src/pyglui/ui_elements.pxi":498
 * #   +--------------------------------+
 * 
 * cdef class Text_Input(UI_element):             # <<<<<<<<<<<<<<
 *     '''
 *     Text input field.
 */
struct __pyx_obj_6pyglui_2ui_Text_Input {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  struct __pyx_obj_6pyglui_2ui_FitBox *field;
  struct __pyx_obj_6pyglui_2ui_FitBox *textfield;
  int selected;
  int highlight;
  int catch_input;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *sync_val;
  PyObject *preview;
  int caret;
  int start_char_idx;
  int end_char_idx;
  int start_highlight_idx;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *text_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *text_input_highlight_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *text_input_line_highlight_color;
  PyObject *data_type;
  double t_long_press;
  double t_double_click;
};


/* "src/pyglui/ui_elements.pxi":854
 * 
 * 
 * cdef class Slider_Text_Input(Text_Input):             # <<<<<<<<<<<<<<
 * 
 *     cdef public object validator
 */
struct __pyx_obj_6pyglui_2ui_Slider_Text_Input {
  struct __pyx_obj_6pyglui_2ui_Text_Input __pyx_base;
  PyObject *validator;
  PyObject *display_format;
};


/* "src/pyglui/ui_elements.pxi":895
 * 
 * 
 * cdef class Button(UI_element):             # <<<<<<<<<<<<<<
 *     cdef FitBox field, button
 *     cdef bint selected
 */
struct __pyx_obj_6pyglui_2ui_Button {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  struct __pyx_obj_6pyglui_2ui_FitBox *field;
  struct __pyx_obj_6pyglui_2ui_FitBox *button;
  int selected;
  PyObject *function;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *text_color;
  PyObject *_outer_label;
};


/* "src/pyglui/ui_elements.pxi":1003
 * 
 * 
 * cdef class Separator(UI_element):             # <<<<<<<<<<<<<<
 *     cdef float separator_height
 * 
 */
struct __pyx_obj_6pyglui_2ui_Separator {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  float separator_height;
};


/* "src/pyglui/ui_elements.pxi":1029
 *         self.outline.compute(parent)
 * 
 * cdef class Info_Text(UI_element):             # <<<<<<<<<<<<<<
 *     cdef basestring _text
 *     cdef int max_height
 */
struct __pyx_obj_6pyglui_2ui_Info_Text {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  PyObject *_text;
  int max_height;
  struct __pyx_obj_6pyglui_2ui_FitBox *text_area;
  float _text_size;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *_text_color;
  int _centered;
};


/* "src/pyglui/ui_elements.pxi":1122
 * 
 * 
 * cdef class Color_Legend(UI_element):             # <<<<<<<<<<<<<<
 *     cdef basestring _text
 *     cdef FitBox text_area
 */
struct __pyx_obj_6pyglui_2ui_Color_Legend {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  PyObject *_text;
  struct __pyx_obj_6pyglui_2ui_FitBox *text_area;
  float _text_size;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *_text_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *_line_color;
  int max_height;
};


/* "src/pyglui/ui_elements.pxi":1195
 * 
 * 
 * cdef class Thumb(UI_element):             # <<<<<<<<<<<<<<
 *     '''
 *     Not a classical UI element. Use button instead.
 */
struct __pyx_obj_6pyglui_2ui_Thumb {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  struct __pyx_obj_6pyglui_2ui_FitBox *button;
  int selected;
  int on_val;
  int off_val;
  float offset_x;
  float offset_y;
  float offset_size;
  float label_line_height;
  PyObject *label_font;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *sync_val;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *_on_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *_off_color;
  PyObject *_status_text;
  PyObject *hotkey;
  PyObject *label_getter;
};


/* "src/pyglui/ui_elements.pxi":1377
 *                             break
 * 
 * cdef class Icon(Thumb):             # <<<<<<<<<<<<<<
 *     cdef float _indicator_start, _indicator_stop
 *     cdef basestring _tooltip
 */
struct __pyx_obj_6pyglui_2ui_Icon {
  struct __pyx_obj_6pyglui_2ui_Thumb __pyx_base;
  float _indicator_start;
  float _indicator_stop;
  PyObject *_tooltip;
  int being_hovered;
};


/* "src/pyglui/ui_elements.pxi":1514
 * 
 * 
 * cdef class Hot_Key(UI_element):             # <<<<<<<<<<<<<<
 *     '''
 *     Just a hotkey. Not displayed.
 */
struct __pyx_obj_6pyglui_2ui_Hot_Key {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  int on_val;
  int off_val;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *sync_val;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *on_color;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *off_color;
  PyObject *hotkey;
};


/* "src/pyglui/custom.pxi":5
 * 
 * 
 * cdef class Seek_Bar(UI_element):             # <<<<<<<<<<<<<<
 *     '''Seek bar that visualizes seek handles, trim marks and playback buttons
 * 
 */
struct __pyx_obj_6pyglui_2ui_Seek_Bar {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  int recent_idx;
  double recent_ts;
  double min_ts;
  double mid_ts;
  double max_ts;
  struct __pyx_obj_6pyglui_2ui_Vec2 *point_click_seek_loc;
  int hovering;
  struct __pyx_obj_6pyglui_2ui_FitBox *bar;
  struct __pyx_obj_6pyglui_2ui_FitBox *seek_handle;
  struct __pyx_obj_6pyglui_2ui_FitBox *trim_left_handle;
  struct __pyx_obj_6pyglui_2ui_FitBox *trim_right_handle;
  int seeking;
  int trimming_left;
  int trimming_right;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *trim_left;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *trim_right;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *playback_speed;
  PyObject *recent_idx_ts_getter;
  PyObject *playback_time_setter;
  PyObject *seeking_cb;
  struct __pyx_obj_6pyglui_2ui_Timeline_Menu *handle_start_reference;
  struct __pyx_obj_6pyglui_2ui_Icon *backwards;
  struct __pyx_obj_6pyglui_2ui_Icon *play;
  struct __pyx_obj_6pyglui_2ui_Icon *forwards;
};


/* "src/pyglui/timelines.pxi":1
 * cdef class Timeline(UI_element):             # <<<<<<<<<<<<<<
 *     cdef public RGBA color
 *     cdef public double point_size, xstart, xstop, ystart, ystop, ypad
 */
struct __pyx_obj_6pyglui_2ui_Timeline {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
  double point_size;
  double xstart;
  double xstop;
  double ystart;
  double ystop;
  double ypad;
  PyObject *draw_data;
  PyObject *draw_label;
  struct __pyx_obj_6pyglui_2ui_FitBox *data_area;
};


/* "src/pyglui/menus.pxi":7
 * 
 * 
 * cdef class Base_Menu(UI_element):             # <<<<<<<<<<<<<<
 *     """
 *     Base class that other menu inherit from. Dont use this.
 */
struct __pyx_obj_6pyglui_2ui_Base_Menu {
  struct __pyx_obj_6pyglui_2ui_UI_element __pyx_base;
  PyObject *elements;
  struct __pyx_obj_6pyglui_2ui_FitBox *element_space;
  int header_pos_id;
  struct __pyx_obj_6pyglui_2ui_Draggable *menu_bar;
  struct __pyx_obj_6pyglui_2ui_Draggable *minimize_corner;
  struct __pyx_obj_6pyglui_2ui_Draggable *resize_corner;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *color;
};


/* "src/pyglui/menus.pxi":200
 * 
 * 
 * cdef class Movable_Menu(Base_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract class that implemented movable ui elements.
 */
struct __pyx_obj_6pyglui_2ui_Movable_Menu {
  struct __pyx_obj_6pyglui_2ui_Base_Menu __pyx_base;
};


/* "src/pyglui/menus.pxi":292
 * 
 * 
 * cdef class Stretching_Menu(Base_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     A simple menu
 */
struct __pyx_obj_6pyglui_2ui_Stretching_Menu {
  struct __pyx_obj_6pyglui_2ui_Base_Menu __pyx_base;
  int collapsed;
};


/* "src/pyglui/menus.pxi":359
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 * cdef class Horizontally_Stretching_Menu(Base_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     A simple menu
 */
struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu {
  struct __pyx_obj_6pyglui_2ui_Base_Menu __pyx_base;
  int collapsed;
};


/* "src/pyglui/menus.pxi":426
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 * cdef class Growing_Menu(Movable_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     Growing_Menu is a movable object on the canvas grows with its content
 */
struct __pyx_obj_6pyglui_2ui_Growing_Menu {
  struct __pyx_obj_6pyglui_2ui_Movable_Menu __pyx_base;
  int _collapsed;
};


/* "src/pyglui/menus.pxi":557
 * 
 * 
 * cdef class Scrolling_Menu(Movable_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     Scrolling_Menu is a movable object on the canvas that contains other elements
 */
struct __pyx_obj_6pyglui_2ui_Scrolling_Menu {
  struct __pyx_obj_6pyglui_2ui_Movable_Menu __pyx_base;
  struct __pyx_obj_6pyglui_2ui_FitBox *uncollapsed_outline;
  struct __pyx_obj_6pyglui_2ui_Draggable *scrollbar;
  struct __pyx_obj_6pyglui_2ui_Vec2 *scrollstate;
  float scroll_factor;
  int _collapsed;
};


/* "src/pyglui/menus.pxi":777
 * 
 * 
 * cdef class Container(Base_Menu):             # <<<<<<<<<<<<<<
 * 
 *     cdef public UI_element horizontal_constraint, vertical_constraint
 */
struct __pyx_obj_6pyglui_2ui_Container {
  struct __pyx_obj_6pyglui_2ui_Base_Menu __pyx_base;
  struct __pyx_obj_6pyglui_2ui_UI_element *horizontal_constraint;
  struct __pyx_obj_6pyglui_2ui_UI_element *vertical_constraint;
};


/* "src/pyglui/menus.pxi":839
 * 
 * 
 * cdef class Timeline_Menu(Scrolling_Menu):             # <<<<<<<<<<<<<<
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         self.outline.compute(parent)
 */
struct __pyx_obj_6pyglui_2ui_Timeline_Menu {
  struct __pyx_obj_6pyglui_2ui_Scrolling_Menu __pyx_base;
};


/* "pyglui/ui.pyx":308
 * 
 * #below are classes used by menu and ui_elements.
 * cdef class Synced_Value:             # <<<<<<<<<<<<<<
 *     '''
 *     an element that has a synced value
 */
struct __pyx_obj_6pyglui_2ui_Synced_Value {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *__pyx_vtab;
  PyObject *attribute_context;
  int use_dict;
  int trigger_overlay_only;
  PyObject *attribute_name;
  PyObject *_value;
  PyObject *getter;
  PyObject *setter;
  PyObject *on_change;
};


/* "pyglui/ui.pyx":397
 * 
 * 
 * cdef class Input:             # <<<<<<<<<<<<<<
 *     '''
 *     Holds accumulated user input collect during a frame.
 */
struct __pyx_obj_6pyglui_2ui_Input {
  PyObject_HEAD
  PyObject *keys;
  PyObject *chars;
  PyObject *buttons;
  PyObject *active_ui_elements;
  PyObject *cb;
  struct __pyx_obj_6pyglui_2ui_Vec2 *dm;
  struct __pyx_obj_6pyglui_2ui_Vec2 *m;
  struct __pyx_obj_6pyglui_2ui_Vec2 *s;
};


/* "pyglui/ui.pyx":439
 * 
 * DEF drag_threshold = 10
 * cdef class Draggable:             # <<<<<<<<<<<<<<
 *     '''
 *     A rectangle that can be dragged.
 */
struct __pyx_obj_6pyglui_2ui_Draggable {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pyglui_2ui_Draggable *__pyx_vtab;
  struct __pyx_obj_6pyglui_2ui_FitBox *outline;
  struct __pyx_obj_6pyglui_2ui_Vec2 *touch_point;
  struct __pyx_obj_6pyglui_2ui_Vec2 *drag_accumulator;
  int selected;
  int zero_crossing;
  int dragged;
  int catch_input;
  struct __pyx_obj_6pyglui_2ui_Vec2 *value;
  int arrest_axis;
  PyObject *click_cb;
};


/* "pyglui/ui.pyx":537
 *         pass
 * 
 * cdef class FitBox:             # <<<<<<<<<<<<<<
 *     '''
 *     A box that will fit itself into a context.
 */
struct __pyx_obj_6pyglui_2ui_FitBox {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pyglui_2ui_FitBox *__pyx_vtab;
  struct __pyx_obj_6pyglui_2ui_Vec2 *design_org;
  struct __pyx_obj_6pyglui_2ui_Vec2 *org;
  struct __pyx_obj_6pyglui_2ui_Vec2 *design_size;
  struct __pyx_obj_6pyglui_2ui_Vec2 *size;
  struct __pyx_obj_6pyglui_2ui_Vec2 *min_size;
};


/* "pyglui/ui.pyx":743
 * 
 * 
 * cdef class Vec2:             # <<<<<<<<<<<<<<
 *     cdef public float x,y
 * 
 */
struct __pyx_obj_6pyglui_2ui_Vec2 {
  PyObject_HEAD
  float x;
  float y;
};


/* "pyglui/ui.pyx":8
 *     from cysignals.signals cimport sig_off, sig_on
 * 
 *     @contextmanager             # <<<<<<<<<<<<<<
 *     def sig_on_off():
 *         sig_on()
 */
struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off {
  PyObject_HEAD
};


/* "src/pyglui/helpers.pxi":31
 *     return value
 * 
 * def frange(start, stop, step):             # <<<<<<<<<<<<<<
 *     '''
 *     todo: translate to cython function
 */
struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange {
  PyObject_HEAD
  PyObject *__pyx_v_start;
  PyObject *__pyx_v_step;
  PyObject *__pyx_v_stop;
};


/* "src/pyglui/ui_elements.pxi":351
 *     cdef object selection_getter
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, selection = [], labels=None, label=None, setter=None, getter=None, selection_getter = None):             # <<<<<<<<<<<<<<
 *         # NOTE: implementing a custom selection_getter can lead to race-conditions. Make
 *         # sure that the current set value is always contained in the returned selections
 */
struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ {
  PyObject_HEAD
  PyObject *__pyx_v_labels;
  PyObject *__pyx_v_selection;
};


/* "src/pyglui/custom.pxi":27
 *     cdef Icon backwards, play, forwards
 * 
 *     def __cinit__(self, object sync_ctx,             # <<<<<<<<<<<<<<
 *                   double min_ts,
 *                   double max_ts,
 */
struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ {
  PyObject_HEAD
  PyObject *__pyx_v_decr_pbs_icon;
  PyObject *__pyx_v_incr_pbs_icon;
  PyObject *__pyx_v_pause_icon;
  PyObject *__pyx_v_play_icon;
  PyObject *__pyx_v_step_bwd_icon;
  PyObject *__pyx_v_step_fwd_icon;
  PyObject *__pyx_v_sync_ctx;
};


/* "cfunc.to_py":66
 * 
 * @cname("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm")
 * cdef object __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*f)(UI_element) except *):             # <<<<<<<<<<<<<<
 *     def wrap(UI_element elm):
 *         """wrap(elm: 'UI_element') -> 'float'"""
 */
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm {
  PyObject_HEAD
  float (*__pyx_v_f)(struct __pyx_obj_6pyglui_2ui_UI_element *);
};



/* "fontstash.pxd":16
 * 
 * 
 * cdef class Context:             # <<<<<<<<<<<<<<
 *     cdef fs.FONScontext * ctx
 *     cdef dict fonts
 */

struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context {
  PyObject *(*draw_text)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, float, float, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*set_color_float)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*draw_limited_text)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, float, float, PyObject *, float, int __pyx_skip_dispatch);
  PyObject *(*get_first_char_idx)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, PyObject *, float, int __pyx_skip_dispatch);
  PyObject *(*draw_multi_line_text)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, float, float, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_draw_multi_line_text *__pyx_optional_args);
  PyObject *(*compute_breaking_text)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, float, float, PyObject *, float, float, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_compute_breaking_text *__pyx_optional_args);
  PyObject *(*draw_breaking_text)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, float, float, PyObject *, float, float, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_draw_breaking_text *__pyx_optional_args);
  PyObject *(*vertical_metrics)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, int __pyx_skip_dispatch);
  PyObject *(*char_cumulative_width)(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *, float, float, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *__pyx_vtabptr_6pyglui_11pyfontstash_9fontstash_Context;


/* "pyglui/ui.pyx":69
 * 
 * 
 * cdef class UI:             # <<<<<<<<<<<<<<
 *     '''
 *     The UI context for a glfw window.
 */

struct __pyx_vtabstruct_6pyglui_2ui_UI {
  PyObject *(*sync)(struct __pyx_obj_6pyglui_2ui_UI *);
  PyObject *(*handle_input)(struct __pyx_obj_6pyglui_2ui_UI *);
  PyObject *(*draw)(struct __pyx_obj_6pyglui_2ui_UI *);
  PyObject *(*get_submenu_config)(struct __pyx_obj_6pyglui_2ui_UI *);
  PyObject *(*set_submenu_config)(struct __pyx_obj_6pyglui_2ui_UI *, PyObject *);
};
static struct __pyx_vtabstruct_6pyglui_2ui_UI *__pyx_vtabptr_6pyglui_2ui_UI;


/* "src/pyglui/ui_elements.pxi":4
 * # Base class
 * # see 'design_params.pxi' for design parameters
 * cdef class UI_element:             # <<<<<<<<<<<<<<
 *     '''
 *     The base class for all UI elements.
 */

struct __pyx_vtabstruct_6pyglui_2ui_UI_element {
  PyObject *(*sync)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch);
  PyObject *(*draw)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args);
  PyObject *(*draw_overlay)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args);
  PyObject *(*handle_input)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args);
  PyObject *(*pre_handle_input)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int __pyx_skip_dispatch);
  PyObject *(*precompute)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pyglui_2ui_UI_element *__pyx_vtabptr_6pyglui_2ui_UI_element;


/* "src/pyglui/ui_elements.pxi":82
 * #    +--------------------------------+
 * 
 * cdef class Slider(UI_element):             # <<<<<<<<<<<<<<
 *     cdef public float minimum,maximum,step
 *     cdef public FitBox field
 */

struct __pyx_vtabstruct_6pyglui_2ui_Slider {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
  PyObject *(*validate)(struct __pyx_obj_6pyglui_2ui_Slider *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Slider *__pyx_vtabptr_6pyglui_2ui_Slider;


/* "src/pyglui/ui_elements.pxi":236
 * 
 * 
 * cdef class Switch(UI_element):             # <<<<<<<<<<<<<<
 *     cdef public FitBox field,button
 *     cdef bint selected
 */

struct __pyx_vtabstruct_6pyglui_2ui_Switch {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Switch *__pyx_vtabptr_6pyglui_2ui_Switch;


/* "src/pyglui/ui_elements.pxi":341
 * 
 * 
 * cdef class Selector(UI_element):             # <<<<<<<<<<<<<<
 *     cdef public FitBox field
 *     cdef FitBox select_field
 */

struct __pyx_vtabstruct_6pyglui_2ui_Selector {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
  PyObject *(*init_selection)(struct __pyx_obj_6pyglui_2ui_Selector *);
  PyObject *(*finish_selection)(struct __pyx_obj_6pyglui_2ui_Selector *, float);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Selector *__pyx_vtabptr_6pyglui_2ui_Selector;


/* "src/pyglui/ui_elements.pxi":498
 * #   +--------------------------------+
 * 
 * cdef class Text_Input(UI_element):             # <<<<<<<<<<<<<<
 *     '''
 *     Text input field.
 */

struct __pyx_vtabstruct_6pyglui_2ui_Text_Input {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
  PyObject *(*to_unicode)(struct __pyx_obj_6pyglui_2ui_Text_Input *, PyObject *);
  PyObject *(*finish_input)(struct __pyx_obj_6pyglui_2ui_Text_Input *);
  PyObject *(*update_input_val)(struct __pyx_obj_6pyglui_2ui_Text_Input *);
  PyObject *(*abort_input)(struct __pyx_obj_6pyglui_2ui_Text_Input *);
  PyObject *(*calculate_start_idx)(struct __pyx_obj_6pyglui_2ui_Text_Input *);
  PyObject *(*draw_text_field)(struct __pyx_obj_6pyglui_2ui_Text_Input *);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *__pyx_vtabptr_6pyglui_2ui_Text_Input;


/* "src/pyglui/ui_elements.pxi":854
 * 
 * 
 * cdef class Slider_Text_Input(Text_Input):             # <<<<<<<<<<<<<<
 * 
 *     cdef public object validator
 */

struct __pyx_vtabstruct_6pyglui_2ui_Slider_Text_Input {
  struct __pyx_vtabstruct_6pyglui_2ui_Text_Input __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Slider_Text_Input *__pyx_vtabptr_6pyglui_2ui_Slider_Text_Input;


/* "src/pyglui/ui_elements.pxi":895
 * 
 * 
 * cdef class Button(UI_element):             # <<<<<<<<<<<<<<
 *     cdef FitBox field, button
 *     cdef bint selected
 */

struct __pyx_vtabstruct_6pyglui_2ui_Button {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Button *__pyx_vtabptr_6pyglui_2ui_Button;


/* "src/pyglui/ui_elements.pxi":1003
 * 
 * 
 * cdef class Separator(UI_element):             # <<<<<<<<<<<<<<
 *     cdef float separator_height
 * 
 */

struct __pyx_vtabstruct_6pyglui_2ui_Separator {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Separator *__pyx_vtabptr_6pyglui_2ui_Separator;


/* "src/pyglui/ui_elements.pxi":1029
 *         self.outline.compute(parent)
 * 
 * cdef class Info_Text(UI_element):             # <<<<<<<<<<<<<<
 *     cdef basestring _text
 *     cdef int max_height
 */

struct __pyx_vtabstruct_6pyglui_2ui_Info_Text {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Info_Text *__pyx_vtabptr_6pyglui_2ui_Info_Text;


/* "src/pyglui/ui_elements.pxi":1122
 * 
 * 
 * cdef class Color_Legend(UI_element):             # <<<<<<<<<<<<<<
 *     cdef basestring _text
 *     cdef FitBox text_area
 */

struct __pyx_vtabstruct_6pyglui_2ui_Color_Legend {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Color_Legend *__pyx_vtabptr_6pyglui_2ui_Color_Legend;


/* "src/pyglui/ui_elements.pxi":1195
 * 
 * 
 * cdef class Thumb(UI_element):             # <<<<<<<<<<<<<<
 *     '''
 *     Not a classical UI element. Use button instead.
 */

struct __pyx_vtabstruct_6pyglui_2ui_Thumb {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Thumb *__pyx_vtabptr_6pyglui_2ui_Thumb;


/* "src/pyglui/ui_elements.pxi":1377
 *                             break
 * 
 * cdef class Icon(Thumb):             # <<<<<<<<<<<<<<
 *     cdef float _indicator_start, _indicator_stop
 *     cdef basestring _tooltip
 */

struct __pyx_vtabstruct_6pyglui_2ui_Icon {
  struct __pyx_vtabstruct_6pyglui_2ui_Thumb __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Icon *__pyx_vtabptr_6pyglui_2ui_Icon;


/* "src/pyglui/ui_elements.pxi":1514
 * 
 * 
 * cdef class Hot_Key(UI_element):             # <<<<<<<<<<<<<<
 *     '''
 *     Just a hotkey. Not displayed.
 */

struct __pyx_vtabstruct_6pyglui_2ui_Hot_Key {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Hot_Key *__pyx_vtabptr_6pyglui_2ui_Hot_Key;


/* "src/pyglui/custom.pxi":5
 * 
 * 
 * cdef class Seek_Bar(UI_element):             # <<<<<<<<<<<<<<
 *     '''Seek bar that visualizes seek handles, trim marks and playback buttons
 * 
 */

struct __pyx_vtabstruct_6pyglui_2ui_Seek_Bar {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
  PyObject *(*format_ts)(struct __pyx_obj_6pyglui_2ui_Seek_Bar *, double);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Seek_Bar *__pyx_vtabptr_6pyglui_2ui_Seek_Bar;


/* "src/pyglui/timelines.pxi":1
 * cdef class Timeline(UI_element):             # <<<<<<<<<<<<<<
 *     cdef public RGBA color
 *     cdef public double point_size, xstart, xstop, ystart, ystop, ypad
 */

struct __pyx_vtabstruct_6pyglui_2ui_Timeline {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
  PyObject *(*refresh)(struct __pyx_obj_6pyglui_2ui_Timeline *, int __pyx_skip_dispatch);
  PyObject *(*draw_label_default)(struct __pyx_obj_6pyglui_2ui_Timeline *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Timeline *__pyx_vtabptr_6pyglui_2ui_Timeline;


/* "src/pyglui/menus.pxi":7
 * 
 * 
 * cdef class Base_Menu(UI_element):             # <<<<<<<<<<<<<<
 *     """
 *     Base class that other menu inherit from. Dont use this.
 */

struct __pyx_vtabstruct_6pyglui_2ui_Base_Menu {
  struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_base;
  PyObject *(*get_submenu_config)(struct __pyx_obj_6pyglui_2ui_Base_Menu *);
  PyObject *(*set_submenu_config)(struct __pyx_obj_6pyglui_2ui_Base_Menu *, PyObject *);
  PyObject *(*draw_menu)(struct __pyx_obj_6pyglui_2ui_Base_Menu *, int);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Base_Menu *__pyx_vtabptr_6pyglui_2ui_Base_Menu;


/* "src/pyglui/menus.pxi":200
 * 
 * 
 * cdef class Movable_Menu(Base_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract class that implemented movable ui elements.
 */

struct __pyx_vtabstruct_6pyglui_2ui_Movable_Menu {
  struct __pyx_vtabstruct_6pyglui_2ui_Base_Menu __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Movable_Menu *__pyx_vtabptr_6pyglui_2ui_Movable_Menu;


/* "src/pyglui/menus.pxi":292
 * 
 * 
 * cdef class Stretching_Menu(Base_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     A simple menu
 */

struct __pyx_vtabstruct_6pyglui_2ui_Stretching_Menu {
  struct __pyx_vtabstruct_6pyglui_2ui_Base_Menu __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Stretching_Menu *__pyx_vtabptr_6pyglui_2ui_Stretching_Menu;


/* "src/pyglui/menus.pxi":359
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 * cdef class Horizontally_Stretching_Menu(Base_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     A simple menu
 */

struct __pyx_vtabstruct_6pyglui_2ui_Horizontally_Stretching_Menu {
  struct __pyx_vtabstruct_6pyglui_2ui_Base_Menu __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_vtabptr_6pyglui_2ui_Horizontally_Stretching_Menu;


/* "src/pyglui/menus.pxi":426
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 * cdef class Growing_Menu(Movable_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     Growing_Menu is a movable object on the canvas grows with its content
 */

struct __pyx_vtabstruct_6pyglui_2ui_Growing_Menu {
  struct __pyx_vtabstruct_6pyglui_2ui_Movable_Menu __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Growing_Menu *__pyx_vtabptr_6pyglui_2ui_Growing_Menu;


/* "src/pyglui/menus.pxi":557
 * 
 * 
 * cdef class Scrolling_Menu(Movable_Menu):             # <<<<<<<<<<<<<<
 *     '''
 *     Scrolling_Menu is a movable object on the canvas that contains other elements
 */

struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu {
  struct __pyx_vtabstruct_6pyglui_2ui_Movable_Menu __pyx_base;
  PyObject *(*draw_scroll_window_elements)(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *, int);
  PyObject *(*push_scissor)(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *);
  PyObject *(*pop_scissor)(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu *__pyx_vtabptr_6pyglui_2ui_Scrolling_Menu;


/* "src/pyglui/menus.pxi":777
 * 
 * 
 * cdef class Container(Base_Menu):             # <<<<<<<<<<<<<<
 * 
 *     cdef public UI_element horizontal_constraint, vertical_constraint
 */

struct __pyx_vtabstruct_6pyglui_2ui_Container {
  struct __pyx_vtabstruct_6pyglui_2ui_Base_Menu __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Container *__pyx_vtabptr_6pyglui_2ui_Container;


/* "src/pyglui/menus.pxi":839
 * 
 * 
 * cdef class Timeline_Menu(Scrolling_Menu):             # <<<<<<<<<<<<<<
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         self.outline.compute(parent)
 */

struct __pyx_vtabstruct_6pyglui_2ui_Timeline_Menu {
  struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu __pyx_base;
};
static struct __pyx_vtabstruct_6pyglui_2ui_Timeline_Menu *__pyx_vtabptr_6pyglui_2ui_Timeline_Menu;


/* "pyglui/ui.pyx":308
 * 
 * #below are classes used by menu and ui_elements.
 * cdef class Synced_Value:             # <<<<<<<<<<<<<<
 *     '''
 *     an element that has a synced value
 */

struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value {
  PyObject *(*sync)(struct __pyx_obj_6pyglui_2ui_Synced_Value *);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *__pyx_vtabptr_6pyglui_2ui_Synced_Value;


/* "pyglui/ui.pyx":439
 * 
 * DEF drag_threshold = 10
 * cdef class Draggable:             # <<<<<<<<<<<<<<
 *     '''
 *     A rectangle that can be dragged.
 */

struct __pyx_vtabstruct_6pyglui_2ui_Draggable {
  PyObject *(*draw)(struct __pyx_obj_6pyglui_2ui_Draggable *, struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_opt_args_6pyglui_2ui_9Draggable_draw *__pyx_optional_args);
  PyObject *(*pre_handle_input)(struct __pyx_obj_6pyglui_2ui_Draggable *, struct __pyx_obj_6pyglui_2ui_Input *, int __pyx_skip_dispatch);
  PyObject *(*handle_input)(struct __pyx_obj_6pyglui_2ui_Draggable *, struct __pyx_obj_6pyglui_2ui_Input *, int);
  PyObject *(*sync)(struct __pyx_obj_6pyglui_2ui_Draggable *);
};
static struct __pyx_vtabstruct_6pyglui_2ui_Draggable *__pyx_vtabptr_6pyglui_2ui_Draggable;


/* "pyglui/ui.pyx":537
 *         pass
 * 
 * cdef class FitBox:             # <<<<<<<<<<<<<<
 *     '''
 *     A box that will fit itself into a context.
 */

struct __pyx_vtabstruct_6pyglui_2ui_FitBox {
  PyObject *(*collapse)(struct __pyx_obj_6pyglui_2ui_FitBox *);
  PyObject *(*inflate)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_FitBox *);
  PyObject *(*compute)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_FitBox *);
  int (*mouse_over)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_Vec2 *, int __pyx_skip_dispatch);
  int (*mouse_over_margin)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *, int __pyx_skip_dispatch);
  PyObject *(*same_design)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_FitBox *);
  PyObject *(*design_distance)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_FitBox *);
  PyObject *(*sketch)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch *__pyx_optional_args);
  PyObject *(*copy)(struct __pyx_obj_6pyglui_2ui_FitBox *);
  PyObject *(*computed_copy)(struct __pyx_obj_6pyglui_2ui_FitBox *);
  PyObject *(*has_area)(struct __pyx_obj_6pyglui_2ui_FitBox *);
};
static struct __pyx_vtabstruct_6pyglui_2ui_FitBox *__pyx_vtabptr_6pyglui_2ui_FitBox;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* pep479.proto */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen);

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* ModFloat[double].proto */
static CYTHON_INLINE double __Pyx_mod_double(double, double);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    const char* function_name);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03080000
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()
  #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
#else
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
#endif
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* PyIntFromDouble.proto */
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value);
#else
#define __Pyx_PyInt_FromDouble(value) PyLong_FromDouble(value)
#endif

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* PyObjectCall2Args.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* pop_index.proto */
static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix);
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix);
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix);
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#else
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\
    __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
        __Pyx__PyObject_PopIndex(L, py_ix))
#endif

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#endif

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_AddObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* pybytes_as_double.proto */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
    return __Pyx__PyBytes_AsDouble(obj, PyBytes_AS_STRING(obj), PyBytes_GET_SIZE(obj));
}
static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
    return __Pyx__PyBytes_AsDouble(obj, PyByteArray_AS_STRING(obj), PyByteArray_GET_SIZE(obj));
}

/* pyunicode_as_double.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
    int last_was_punctuation;
    Py_ssize_t i;
    last_was_punctuation = 1;
    for (i=start; i <= end; i++) {
        Py_UCS4 chr = PyUnicode_READ(kind, data, i);
        int is_punctuation = (chr == '_') | (chr == '.');
        *buffer = (char)chr;
        buffer += (chr != '_');
        if (unlikely(chr > 127)) goto parse_failure;
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
    int matches = 1;
    Py_UCS4 chr;
    Py_UCS4 sign = PyUnicode_READ(kind, data, start);
    int is_signed = (sign == '-') | (sign == '+');
    start += is_signed;
    length -= is_signed;
    switch (PyUnicode_READ(kind, data, start)) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'a') | (chr == 'A');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'n') | (chr == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'f') | (chr == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+3);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+4);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+5);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+6);
            matches &= (chr == 't') | (chr == 'T');
            chr = PyUnicode_READ(kind, data, start+7);
            matches &= (chr == 'y') | (chr == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
    double value;
    const char *last;
    char *end;
    Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
    const int kind = PyUnicode_KIND(obj);
    const void* data = PyUnicode_DATA(obj);
    start = 0;
    while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
        start++;
    while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
        length--;
    length -= start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    if (length < 40) {
        char number[40];
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}
#endif
static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
        return (double)-1;
    if (likely(PyUnicode_IS_ASCII(obj))) {
        const char *s;
        Py_ssize_t length;
        s = PyUnicode_AsUTF8AndSize(obj, &length);
        return __Pyx__PyBytes_AsDouble(obj, s, length);
    }
    return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
#else
    return __Pyx_SlowPyString_AsDouble(obj);
#endif
}

/* pyobject_as_double.proto */
static double __Pyx__PyObject_AsDouble(PyObject* obj);
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj)\
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\
 likely(PyInt_CheckExact(obj)) ?\
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj)\
((likely(PyFloat_CheckExact(obj))) ?  PyFloat_AS_DOUBLE(obj) :\
 likely(PyLong_CheckExact(obj)) ?\
 PyLong_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* SliceTupleAndList.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* PyObject_Str.proto */
#define __Pyx_PyObject_Str(obj)\
    (likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif

/* FetchSharedCythonModule.proto */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto */
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#else
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
#endif

/* PyMethodNew.proto */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1
    PyObject *func_classobj;
#endif
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_CyFunctionType = 0;
#endif
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_IsCyOrPyCFunction(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* RaiseClosureNameError.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyUnicode_Substring.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop);

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
    #endif
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))

/* PyObject_Unicode.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
#else
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* GetItemIntUnicode.proto */
#define __Pyx_GetItemInt_Unicode(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Unicode_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "string index out of range"), (Py_UCS4)-1))
static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i,
                                                           int wraparound, int boundscheck);

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_RemainderObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_RemainderObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2))
#endif

/* SliceObject.proto */
#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
    __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* PyUnicodeContains.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
    int result = PyUnicode_Contains(text, substring);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* PyUnicode_Unicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* ValidateBasesTuple.proto */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
static CYTHON_UNUSED int __Pyx_PyType_Ready(PyTypeObject *t);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* MergeVTables.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_MergeVtables(PyTypeObject *type);
#endif

/* SetupReduce.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce(PyObject* type_obj);
#endif

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
#if __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
#endif

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* None.proto */
#include <new>

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE GLsizei __Pyx_PyInt_As_GLsizei(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE GLint __Pyx_PyInt_As_GLint(PyObject *);

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_Occurred(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CoroutineBase.proto */
struct __pyx_CoroutineObject;
typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct __pyx_CoroutineObject {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(PyObject *module);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* VoidPtrImport.proto */
static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig);

/* FunctionImport.proto */
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

/* InitStrings.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str);
#else
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
#endif

/* #### Code section: module_declarations ### */
static PyObject *__pyx_f_6pyglui_2ui_2UI_sync(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_2UI_handle_input(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_2UI_draw(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_2UI_get_submenu_config(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_2UI_set_submenu_config(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_submenus); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_sync(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_draw(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_draw_overlay(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_handle_input(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, CYTHON_UNUSED int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_pre_handle_input(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_precompute(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Slider_sync(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Slider_draw(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Slider_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Slider_handle_input(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Slider_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Slider_validate(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Switch_sync(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Switch_draw(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Switch_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Switch_handle_input(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Switch_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Selector_sync(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Selector_draw(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Selector_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Selector_handle_input(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Selector_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Selector_init_selection(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Selector_finish_selection(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, float __pyx_v_mouse_y); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_sync(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_draw(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10Text_Input_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_pre_handle_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_to_unicode(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_handle_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10Text_Input_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_finish_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_update_input_val(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_abort_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_calculate_start_idx(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_draw_text_field(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_17Slider_Text_Input_update_input_val(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_17Slider_Text_Input_to_unicode(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Button_draw(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Button_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Button_handle_input(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Button_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Separator_draw(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Separator_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Separator_precompute(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Info_Text_draw(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Info_Text_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Info_Text_precompute(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Color_Legend_draw(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_12Color_Legend_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Color_Legend_precompute(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_5Thumb_sync(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_5Thumb_draw(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_5Thumb_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_5Thumb_handle_input(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_5Thumb_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_4Icon_handle_input(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_4Icon_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_4Icon_draw(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_4Icon_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_4Icon_draw_overlay(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_4Icon_draw_overlay *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_7Hot_Key_sync(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_7Hot_Key_handle_input(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, CYTHON_UNUSED int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_7Hot_Key_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_sync(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_draw(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_draw_overlay(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_draw_overlay *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_format_ts(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, double __pyx_v_ts); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_handle_input(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, CYTHON_UNUSED int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Timeline_draw(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Timeline_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Timeline_refresh(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Timeline_draw_label_default(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_width, CYTHON_UNUSED PyObject *__pyx_v_height, PyObject *__pyx_v_scale, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Base_Menu_sync(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Base_Menu_get_submenu_config(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Base_Menu_set_submenu_config(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_submenus); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Base_Menu_draw_menu(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, int __pyx_v_nested); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_15Stretching_Menu_draw(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_15Stretching_Menu_draw_overlay(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_draw_overlay *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_15Stretching_Menu_handle_input(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_draw(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_draw_overlay(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_draw_overlay *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_handle_input(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Growing_Menu_draw(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Growing_Menu_draw_overlay(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_draw_overlay *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Growing_Menu_handle_input(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Growing_Menu_precompute(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw_overlay(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_draw_overlay *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw_scroll_window_elements(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, int __pyx_v_parent_read_only); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_push_scissor(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_pop_scissor(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_handle_input(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Container_draw(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Container_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Container_draw_overlay(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Container_draw_overlay *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Container_handle_input(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Container_handle_input *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_13Timeline_Menu_draw(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_13Timeline_Menu_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Synced_Value_sync(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Draggable_draw(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent_size, struct __pyx_opt_args_6pyglui_2ui_9Draggable_draw *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Draggable_pre_handle_input(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Draggable_handle_input(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Draggable_sync(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_collapse(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_inflate(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_target); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_compute(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_context); /* proto*/
static int __pyx_f_6pyglui_2ui_6FitBox_mouse_over(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_6pyglui_2ui_6FitBox_mouse_over_margin(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_margin, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_same_design(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_other); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_design_distance(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_other); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_sketch(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_copy(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_computed_copy(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6pyglui_2ui_6FitBox_has_area(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto*/

/* Module declarations from "libc.string" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "libc.stdio" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "__builtin__" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.type" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
#endif

/* Module declarations from "cpython" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.object" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cysignals.signals" */
#if !CYTHON_USE_MODULE_STATE
#endif
static cysigs_t *__pyx_vp_9cysignals_7signals_cysigs = 0;
#define cysigs (*__pyx_vp_9cysignals_7signals_cysigs)
static void (*__pyx_f_9cysignals_7signals_verify_exc_value)(void); /*proto*/
static void (*_sig_on_interrupt_received)(void); /*proto*/
static void (*_sig_on_recover)(void); /*proto*/
static void (*_sig_off_warning)(char const *, int); /*proto*/
static void (*print_backtrace)(void); /*proto*/

/* Module declarations from "pyglui.cygl" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "libc.stdint" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "pyglui.cygl.glew" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "libcpp.vector" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "pyglui.cygl.utils" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_6pyglui_4cygl_5utils_RGBA = 0;
static PyTypeObject *__pyx_ptype_6pyglui_4cygl_5utils_Render_Target = 0;
static PyTypeObject *__pyx_ptype_6pyglui_4cygl_5utils_Named_Texture = 0;
static PyTypeObject *__pyx_ptype_6pyglui_4cygl_5utils_Sphere = 0;
#endif
static PyObject *(*__pyx_f_6pyglui_4cygl_5utils_draw_polyline)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_polyline *__pyx_optional_args); /*proto*/
static PyObject *(*__pyx_f_6pyglui_4cygl_5utils_draw_points)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points *__pyx_optional_args); /*proto*/
static PyObject *(*__pyx_f_6pyglui_4cygl_5utils_draw_progress)(PyObject *, float, float, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_progress *__pyx_optional_args); /*proto*/
static PyObject *(*__pyx_f_6pyglui_4cygl_5utils_draw_tooltip)(PyObject *, PyObject *, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_tooltip *__pyx_optional_args); /*proto*/
static PyObject *(*__pyx_f_6pyglui_4cygl_5utils_draw_circle)(int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_circle *__pyx_optional_args); /*proto*/
static PyObject *(*__pyx_f_6pyglui_4cygl_5utils_draw_rounded_rect)(PyObject *, PyObject *, float, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_rounded_rect *__pyx_optional_args); /*proto*/

/* Module declarations from "pyglui.pyfontstash.cfontstash" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "pyglui.pyfontstash" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "pyglui.pyfontstash.fontstash" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context = 0;
#endif
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT)
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_CENTER = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_CENTER (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_CENTER)
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_RIGHT = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_RIGHT (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_RIGHT)
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP)
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE)
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BOTTOM = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BOTTOM (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BOTTOM)
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BASELINE = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BASELINE (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BASELINE)
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ZERO_TOPLEFT = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ZERO_TOPLEFT (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ZERO_TOPLEFT)
static int *__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ZERO_BOTTOMLEFT = 0;
#define __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ZERO_BOTTOMLEFT (*__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ZERO_BOTTOMLEFT)

/* Module declarations from "cython" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "libc.math" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "pyglui.ui" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_6pyglui_2ui_UI = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_UI_element = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Slider = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Switch = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Selector = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Text_Input = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Slider_Text_Input = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Button = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Separator = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Info_Text = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Color_Legend = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Thumb = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Icon = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Hot_Key = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Seek_Bar = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Timeline = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Base_Menu = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Movable_Menu = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Stretching_Menu = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Growing_Menu = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Scrolling_Menu = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Container = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Timeline_Menu = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Synced_Value = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Input = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Draggable = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_FitBox = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui_Vec2 = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__ = 0;
static PyTypeObject *__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__ = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm = 0;
#endif
static int __pyx_v_6pyglui_2ui_UI_MOD_KEY;
static struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *__pyx_v_6pyglui_2ui_glfont = 0;
static double __pyx_v_6pyglui_2ui_ui_scale;
static int __pyx_v_6pyglui_2ui_should_redraw;
static int __pyx_v_6pyglui_2ui_should_redraw_overlay;
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_push_view(struct __pyx_obj_6pyglui_2ui_Vec2 *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_pop_view(void); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_rect(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_rect_outline(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *, float, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_rect_corners(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_tripple_h(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_opt_args_6pyglui_2ui_tripple_h *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_tripple_d(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_triangle_h(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_tripple_v(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_triangle_left(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_line(struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *); /*proto*/
static CYTHON_INLINE struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_f_6pyglui_2ui_draw_seek_handle(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *); /*proto*/
static CYTHON_INLINE struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_f_6pyglui_2ui_draw_trim_handle(struct __pyx_obj_6pyglui_2ui_FitBox *, float, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *); /*proto*/
static __pyx_t_6pyglui_2ui_fbo_tex_id __pyx_f_6pyglui_2ui_create_ui_texture(struct __pyx_obj_6pyglui_2ui_Vec2 *); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_destroy_ui_texture(__pyx_t_6pyglui_2ui_fbo_tex_id); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_resize_ui_texture(__pyx_t_6pyglui_2ui_fbo_tex_id, struct __pyx_obj_6pyglui_2ui_Vec2 *); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_render_to_ui_texture(__pyx_t_6pyglui_2ui_fbo_tex_id); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_render_to_screen(void); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_draw_ui_texture(__pyx_t_6pyglui_2ui_fbo_tex_id); /*proto*/
static CYTHON_INLINE double __pyx_f_6pyglui_2ui_lmap(double, double, double, double, double); /*proto*/
static CYTHON_INLINE double __pyx_f_6pyglui_2ui_clamp(double, double, double); /*proto*/
static CYTHON_INLINE double __pyx_f_6pyglui_2ui_clampmap(double, double, double, double, double); /*proto*/
static CYTHON_INLINE int __pyx_f_6pyglui_2ui_mouse_over_center(struct __pyx_obj_6pyglui_2ui_Vec2 *, double, double, struct __pyx_obj_6pyglui_2ui_Vec2 *); /*proto*/
static CYTHON_INLINE double __pyx_f_6pyglui_2ui_step(double, double, double, double); /*proto*/
static float __pyx_f_6pyglui_2ui_sort_key(struct __pyx_obj_6pyglui_2ui_UI_element *); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui___pyx_unpickle_UI_element__set_state(struct __pyx_obj_6pyglui_2ui_UI_element *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui___pyx_unpickle_Base_Menu__set_state(struct __pyx_obj_6pyglui_2ui_Base_Menu *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui___pyx_unpickle_Movable_Menu__set_state(struct __pyx_obj_6pyglui_2ui_Movable_Menu *, PyObject *); /*proto*/
static PyObject *__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*)(struct __pyx_obj_6pyglui_2ui_UI_element *)); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "pyglui.ui"
extern int __pyx_module_is_main_pyglui__ui;
int __pyx_module_is_main_pyglui__ui = 0;

/* Implementation of "pyglui.ui" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_chr;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_min;
static PyObject *__pyx_builtin_eval;
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_NotImplemented;
static PyObject *__pyx_builtin_IndexError;
/* #### Code section: string_decls ### */
static const char __pyx_k_c[] = "c";
static const char __pyx_k_d[] = " \342\200\223 {:d}";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_h[] = "h";
static const char __pyx_k_m[] = "m";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_w[] = "w";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_UI[] = "UI";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_mx[] = "mx";
static const char __pyx_k_my[] = "my";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_sx[] = "sx";
static const char __pyx_k_sy[] = "sy";
static const char __pyx_k__34[] = "";
static const char __pyx_k__50[] = "_";
static const char __pyx_k__88[] = "'";
static const char __pyx_k__93[] = ".";
static const char __pyx_k__97[] = "*";
static const char __pyx_k_chr[] = "chr";
static const char __pyx_k_elm[] = "elm";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_idx[] = "idx";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_min[] = "min";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_pos[] = "pos";
static const char __pyx_k_six[] = "six";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_top[] = "top";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_x_2[] = "{}x";
static const char __pyx_k_x_3[] = "x: ";
static const char __pyx_k_y_2[] = " y: ";
static const char __pyx_k_0_2f[] = "%0.2f";
static const char __pyx_k_Dict[] = "Dict: '";
static const char __pyx_k_Icon[] = "Icon";
static const char __pyx_k_Keys[] = "\n   Keys: ";
static const char __pyx_k_None[] = "None";
static const char __pyx_k_Vec2[] = "Vec2";
static const char __pyx_k__330[] = "?";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_char[] = "char";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_draw[] = "draw";
static const char __pyx_k_eval[] = "eval";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_file[] = "__file__";
static const char __pyx_k_init[] = "init";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_left[] = "left";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mods[] = "mods";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_objs[] = "objs";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_play[] = "play";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_sort[] = "sort";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_step[] = "step";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_sync[] = "sync";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_text[] = "text";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_wrap[] = "wrap";
static const char __pyx_k_xpad[] = "xpad";
static const char __pyx_k_ypad[] = "ypad";
static const char __pyx_k_Chars[] = "\n   Chars: ";
static const char __pyx_k_Input[] = "Input";
static const char __pyx_k_Thumb[] = "Thumb";
static const char __pyx_k_chars[] = "chars";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_label[] = "label";
static const char __pyx_k_purge[] = "purge";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_right[] = "right";
static const char __pyx_k_scale[] = "scale";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_width[] = "width";
static const char __pyx_k_1_31_0[] = "1.31.0";
static const char __pyx_k_Button[] = "Button";
static const char __pyx_k_Darwin[] = "Darwin";
static const char __pyx_k_FitBox[] = "FitBox";
static const char __pyx_k_Scroll[] = "\n   Scroll: ";
static const char __pyx_k_Slider[] = "Slider";
static const char __pyx_k_Switch[] = "Switch";
static const char __pyx_k_action[] = "action";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_bottom[] = "bottom";
static const char __pyx_k_button[] = "button";
static const char __pyx_k_center[] = "center";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_extend[] = "extend";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_frange[] = "frange";
static const char __pyx_k_getter[] = "getter";
static const char __pyx_k_height[] = "height";
static const char __pyx_k_hidden[] = "hidden";
static const char __pyx_k_hotkey[] = "hotkey";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_insert[] = "insert";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_labels[] = "labels";
static const char __pyx_k_margin[] = "margin";
static const char __pyx_k_max_ts[] = "max_ts";
static const char __pyx_k_min_ts[] = "min_ts";
static const char __pyx_k_nested[] = "nested";
static const char __pyx_k_on_val[] = "on_val";
static const char __pyx_k_parent[] = "parent";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_remove[] = "remove";
static const char __pyx_k_roboto[] = "roboto";
static const char __pyx_k_setter[] = "setter";
static const char __pyx_k_size_2[] = " size: ";
static const char __pyx_k_system[] = "system";
static const char __pyx_k_to_str[] = "to_str";
static const char __pyx_k_unichr[] = "unichr";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_window[] = "window";
static const char __pyx_k_Buttons[] = "\n   Buttons: ";
static const char __pyx_k_Hot_Key[] = "Hot_Key";
static const char __pyx_k_buttons[] = "buttons";
static const char __pyx_k_dirname[] = "dirname";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_off_val[] = "off_val";
static const char __pyx_k_padding[] = "padding";
static const char __pyx_k_refresh[] = "refresh";
static const char __pyx_k_tooltip[] = "tooltip";
static const char __pyx_k_version[] = "__version__";
static const char __pyx_k_visible[] = "visible";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_Seek_Bar[] = "Seek_Bar";
static const char __pyx_k_Selector[] = "Selector";
static const char __pyx_k_Timeline[] = "Timeline";
static const char __pyx_k_add_font[] = "add_font";
static const char __pyx_k_as_tuple[] = "as_tuple";
static const char __pyx_k_centered[] = "centered";
static const char __pyx_k_click_cb[] = "click_cb";
static const char __pyx_k_forwards[] = "forwards";
static const char __pyx_k_function[] = "function";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_headline[] = "headline";
static const char __pyx_k_min_size[] = "min_size";
static const char __pyx_k_on_color[] = "on_color";
static const char __pyx_k_opensans[] = "opensans";
static const char __pyx_k_platform[] = "platform";
static const char __pyx_k_position[] = "position";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_scancode[] = "scancode";
static const char __pyx_k_set_blur[] = "set_blur";
static const char __pyx_k_set_font[] = "set_font";
static const char __pyx_k_set_play[] = "set_play";
static const char __pyx_k_set_size[] = "set_size";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_submenus[] = "submenus";
static const char __pyx_k_sync_ctx[] = "sync_ctx";
static const char __pyx_k_validate[] = "validate";
static const char __pyx_k_Base_Menu[] = "Base_Menu";
static const char __pyx_k_Container[] = "Container";
static const char __pyx_k_Draggable[] = "Draggable";
static const char __pyx_k_Icon_draw[] = "Icon.draw";
static const char __pyx_k_Info_Text[] = "Info_Text";
static const char __pyx_k_Separator[] = "Separator";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_UI_append[] = "UI.append";
static const char __pyx_k_UI_extend[] = "UI.extend";
static const char __pyx_k_UI_remove[] = "UI.remove";
static const char __pyx_k_UI_update[] = "UI.update";
static const char __pyx_k_backwards[] = "backwards";
static const char __pyx_k_clipboard[] = "clipboard";
static const char __pyx_k_collapsed[] = "collapsed";
static const char __pyx_k_cysignals[] = "cysignals";
static const char __pyx_k_font_name[] = "font_name";
static const char __pyx_k_font_path[] = "font_path";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_new_input[] = "new_input";
static const char __pyx_k_new_value[] = "new_value";
static const char __pyx_k_off_color[] = "off_color";
static const char __pyx_k_on_change[] = "_on_change";
static const char __pyx_k_pop_state[] = "pop_state";
static const char __pyx_k_pyglui_ui[] = "pyglui.ui";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_selection[] = "selection";
static const char __pyx_k_set_align[] = "set_align";
static const char __pyx_k_terminate[] = "terminate";
static const char __pyx_k_text_size[] = "text_size";
static const char __pyx_k_typed_val[] = "typed_val";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_Text_Input[] = "Text_Input";
static const char __pyx_k_Thumb_draw[] = "Thumb.draw";
static const char __pyx_k_Thumb_sync[] = "Thumb.sync";
static const char __pyx_k_UI_element[] = "UI_element";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_comptd_org[] = "\n   comptd org: ";
static const char __pyx_k_contextlib[] = "contextlib";
static const char __pyx_k_header_pos[] = "header_pos";
static const char __pyx_k_is_of_type[] = "\" is of type ";
static const char __pyx_k_label_font[] = "label_font";
static const char __pyx_k_line_color[] = "line_color";
static const char __pyx_k_mouse_over[] = "mouse_over";
static const char __pyx_k_namedtuple[] = "namedtuple";
static const char __pyx_k_precompute[] = "precompute";
static const char __pyx_k_push_state[] = "push_state";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_seeking_cb[] = "seeking_cb";
static const char __pyx_k_sig_on_off[] = "sig_on_off";
static const char __pyx_k_text_color[] = "text_color";
static const char __pyx_k_update_key[] = "update_key";
static const char __pyx_k_02_0f_06_3f[] = "{:02.0f}:{:06.3f}";
static const char __pyx_k_Button_draw[] = "Button.draw";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_Input_purge[] = "Input.purge";
static const char __pyx_k_Mouse_delta[] = "\n   Mouse delta: ";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_Slider_draw[] = "Slider.draw";
static const char __pyx_k_Slider_sync[] = "Slider.sync";
static const char __pyx_k_Switch_draw[] = "Switch.draw";
static const char __pyx_k_Switch_sync[] = "Switch.sync";
static const char __pyx_k_UI_add_font[] = "UI.add_font";
static const char __pyx_k_arrest_axis[] = "arrest_axis";
static const char __pyx_k_catch_input[] = "catch_input";
static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py";
static const char __pyx_k_clear_state[] = "clear_state";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_on_change_2[] = "on_change";
static const char __pyx_k_outer_label[] = "outer_label";
static const char __pyx_k_pupil_icons[] = "pupil_icons";
static const char __pyx_k_scrollstate[] = "scrollstate";
static const char __pyx_k_text_bounds[] = "text_bounds";
static const char __pyx_k_update_char[] = "update_char";
static const char __pyx_k_window_size[] = "window_size";
static const char __pyx_k_Color_Legend[] = "Color_Legend";
static const char __pyx_k_Growing_Menu[] = "Growing_Menu";
static const char __pyx_k_Hot_Key_sync[] = "Hot_Key.sync";
static const char __pyx_k_Movable_Menu[] = "Movable_Menu";
static const char __pyx_k_Synced_Value[] = "Synced_Value";
static const char __pyx_k_UI_terminate[] = "UI.terminate";
static const char __pyx_k_Unused_Input[] = "Unused_Input";
static const char __pyx_k_draw_overlay[] = "draw_overlay";
static const char __pyx_k_handle_input[] = "handle_input";
static const char __pyx_k_has_no_entry[] = "' has no entry '";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_label_getter[] = "label_getter";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "<stringsource>";
static const char __pyx_k_trim_left_ts[] = "trim_left_ts";
static const char __pyx_k_unused_Input[] = "unused_Input";
static const char __pyx_k_update_mouse[] = "update_mouse";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_Seek_Bar_draw[] = "Seek_Bar.draw";
static const char __pyx_k_Seek_Bar_sync[] = "Seek_Bar.sync";
static const char __pyx_k_Selector_draw[] = "Selector.draw";
static const char __pyx_k_Selector_sync[] = "Selector.sync";
static const char __pyx_k_Timeline_Menu[] = "Timeline_Menu";
static const char __pyx_k_Timeline_draw[] = "Timeline.draw";
static const char __pyx_k_UI_update_key[] = "UI.update_key";
static const char __pyx_k_class_getitem[] = "__class_getitem__";
static const char __pyx_k_collect_menus[] = "collect_menus";
static const char __pyx_k_configuration[] = "configuration";
static const char __pyx_k_header_pos_id[] = "header_pos_id";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_trim_right_ts[] = "trim_right_ts";
static const char __pyx_k_update_button[] = "update_button";
static const char __pyx_k_update_scroll[] = "update_scroll";
static const char __pyx_k_update_window[] = "update_window";
static const char __pyx_k_zero_crossing[] = "zero_crossing";
static const char __pyx_k_AssertionError[] = "AssertionError";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_Base_Menu_sync[] = "Base_Menu.sync";
static const char __pyx_k_Container_draw[] = "Container.draw";
static const char __pyx_k_Container_init[] = "Container.init";
static const char __pyx_k_Info_Text_draw[] = "Info_Text.draw";
static const char __pyx_k_NotImplemented[] = "NotImplemented";
static const char __pyx_k_Scrolling_Menu[] = "Scrolling_Menu {}";
static const char __pyx_k_Separator_draw[] = "Separator.draw";
static const char __pyx_k_UI_update_char[] = "UI.update_char";
static const char __pyx_k_attribute_name[] = "attribute_name";
static const char __pyx_k_content_height[] = "content_height";
static const char __pyx_k_contextmanager[] = "contextmanager";
static const char __pyx_k_display_format[] = "display_format";
static const char __pyx_k_indicator_stop[] = "indicator_stop";
static const char __pyx_k_label_offset_x[] = "label_offset_x";
static const char __pyx_k_label_offset_y[] = "label_offset_y";
static const char __pyx_k_playback_speed[] = "playback_speed";
static const char __pyx_k_Slider_validate[] = "Slider.validate";
static const char __pyx_k_Stretching_Menu[] = "Stretching_Menu";
static const char __pyx_k_Text_Input_draw[] = "Text_Input.draw";
static const char __pyx_k_Text_Input_sync[] = "Text_Input.sync";
static const char __pyx_k_UI_element_draw[] = "UI_element.draw";
static const char __pyx_k_UI_element_sync[] = "UI_element.sync";
static const char __pyx_k_UI_update_mouse[] = "UI.update_mouse";
static const char __pyx_k_indicator_start[] = "indicator_start";
static const char __pyx_k_pupil_icons_ttf[] = "pupil_icons.ttf";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_uncollapsed_pos[] = "uncollapsed_pos";
static const char __pyx_k_Base_Menu_append[] = "Base_Menu.append";
static const char __pyx_k_Base_Menu_extend[] = "Base_Menu.extend";
static const char __pyx_k_Base_Menu_insert[] = "Base_Menu.insert";
static const char __pyx_k_Base_Menu_remove[] = "Base_Menu.remove";
static const char __pyx_k_Scrolling_Menu_2[] = "Scrolling_Menu";
static const char __pyx_k_Timeline_refresh[] = "Timeline.refresh";
static const char __pyx_k_UI_collect_menus[] = "UI.collect_menus";
static const char __pyx_k_UI_update_button[] = "UI.update_button";
static const char __pyx_k_UI_update_scroll[] = "UI.update_scroll";
static const char __pyx_k_UI_update_window[] = "UI.update_window";
static const char __pyx_k_has_no_attribute[] = "' has no attribute '";
static const char __pyx_k_parent_read_only[] = "parent_read_only";
static const char __pyx_k_pre_handle_input[] = "pre_handle_input";
static const char __pyx_k_selection_getter[] = "selection_getter";
static const char __pyx_k_toggle_iconified[] = "toggle_iconified";
static const char __pyx_k_uncollapsed_size[] = "uncollapsed_size";
static const char __pyx_k_update_clipboard[] = "update_clipboard";
static const char __pyx_k_Color_Legend_draw[] = "Color_Legend.draw";
static const char __pyx_k_FitBox_design_org[] = "FitBox:\n   design org: ";
static const char __pyx_k_FitBox_mouse_over[] = "FitBox.mouse_over";
static const char __pyx_k_Growing_Menu_draw[] = "Growing_Menu.draw";
static const char __pyx_k_Icon_draw_overlay[] = "Icon.draw_overlay";
static const char __pyx_k_Icon_handle_input[] = "Icon.handle_input";
static const char __pyx_k_Slider_Text_Input[] = "Slider_Text_Input";
static const char __pyx_k_attribute_context[] = "attribute_context";
static const char __pyx_k_collect_in_window[] = "collect_in_window";
static const char __pyx_k_label_line_height[] = "label_line_height";
static const char __pyx_k_label_offset_size[] = "label_offset_size";
static const char __pyx_k_mouse_over_margin[] = "mouse_over_margin";
static const char __pyx_k_src_pyglui_ui_pyx[] = "src/pyglui/ui.pyx";
static const char __pyx_k_Roboto_Regular_ttf[] = "Roboto-Regular.ttf";
static const char __pyx_k_Thumb_handle_input[] = "Thumb.handle_input";
static const char __pyx_k_Timeline_Menu_draw[] = "Timeline_Menu.draw";
static const char __pyx_k_UI___reduce_cython[] = "UI.__reduce_cython__";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_draw_data_callback[] = "draw_data_callback";
static const char __pyx_k_draw_label_default[] = "draw_label_default";
static const char __pyx_k_get_all_font_paths[] = "get_all_font_paths";
static const char __pyx_k_Button_handle_input[] = "Button.handle_input";
static const char __pyx_k_Scrolling_Menu_draw[] = "Scrolling_Menu.draw";
static const char __pyx_k_Selector__on_change[] = "Selector._on_change";
static const char __pyx_k_Slider_handle_input[] = "Slider.handle_input";
static const char __pyx_k_Switch_handle_input[] = "Switch.handle_input";
static const char __pyx_k_UI_update_clipboard[] = "UI.update_clipboard";
static const char __pyx_k_draw_label_callback[] = "draw_label_callback";
static const char __pyx_k_Hot_Key_handle_input[] = "Hot_Key.handle_input";
static const char __pyx_k_Icon___reduce_cython[] = "Icon.__reduce_cython__";
static const char __pyx_k_Info_Text_precompute[] = "Info_Text.precompute";
static const char __pyx_k_OpenSans_Regular_ttf[] = "OpenSans-Regular.ttf";
static const char __pyx_k_Separator_precompute[] = "Separator.precompute";
static const char __pyx_k_Stretching_Menu_draw[] = "Stretching_Menu.draw";
static const char __pyx_k_Timeline_Menu_append[] = "Timeline_Menu.append";
static const char __pyx_k_Timeline_Menu_extend[] = "Timeline_Menu.extend";
static const char __pyx_k_Timeline_Menu_insert[] = "Timeline_Menu.insert";
static const char __pyx_k_Timeline_Menu_remove[] = "Timeline_Menu.remove";
static const char __pyx_k_UI___setstate_cython[] = "UI.__setstate_cython__";
static const char __pyx_k_Vec2___reduce_cython[] = "Vec2.__reduce_cython__";
static const char __pyx_k_get_roboto_font_path[] = "get_roboto_font_path";
static const char __pyx_k_playback_time_setter[] = "playback_time_setter";
static const char __pyx_k_recent_idx_ts_getter[] = "recent_idx_ts_getter";
static const char __pyx_k_src_pyglui_menus_pxi[] = "src/pyglui/menus.pxi";
static const char __pyx_k_trigger_overlay_only[] = "trigger_overlay_only";
static const char __pyx_k_uncollapsed_min_size[] = "uncollapsed_min_size";
static const char __pyx_k_Input___reduce_cython[] = "Input.__reduce_cython__";
static const char __pyx_k_Seek_Bar_draw_overlay[] = "Seek_Bar.draw_overlay";
static const char __pyx_k_Seek_Bar_handle_input[] = "Seek_Bar.handle_input";
static const char __pyx_k_Selector_handle_input[] = "Selector.handle_input";
static const char __pyx_k_Thumb___reduce_cython[] = "Thumb.__reduce_cython__";
static const char __pyx_k_UI_element_precompute[] = "UI_element.precompute";
static const char __pyx_k_cinit___locals_lambda[] = "__cinit__.<locals>.<lambda>";
static const char __pyx_k_src_pyglui_custom_pxi[] = "src/pyglui/custom.pxi";
static const char __pyx_k_Button___reduce_cython[] = "Button.__reduce_cython__";
static const char __pyx_k_Container_draw_overlay[] = "Container.draw_overlay";
static const char __pyx_k_Container_handle_input[] = "Container.handle_input";
static const char __pyx_k_FitBox___reduce_cython[] = "FitBox.__reduce_cython__";
static const char __pyx_k_Icon___setstate_cython[] = "Icon.__setstate_cython__";
static const char __pyx_k_Slider___reduce_cython[] = "Slider.__reduce_cython__";
static const char __pyx_k_Switch___reduce_cython[] = "Switch.__reduce_cython__";
static const char __pyx_k_Vec2___setstate_cython[] = "Vec2.__setstate_cython__";
static const char __pyx_k_get_opensans_font_path[] = "get_opensans_font_path";
static const char __pyx_k_handle_start_reference[] = "handle_start_reference";
static const char __pyx_k_pyx_unpickle_Base_Menu[] = "__pyx_unpickle_Base_Menu";
static const char __pyx_k_src_pyglui_helpers_pxi[] = "src/pyglui/helpers.pxi";
static const char __pyx_k_Color_Legend_precompute[] = "Color_Legend.precompute";
static const char __pyx_k_Current_Input_Mouse_pos[] = "Current Input: \n   Mouse pos  : ";
static const char __pyx_k_Growing_Menu_precompute[] = "Growing_Menu.precompute";
static const char __pyx_k_Hot_Key___reduce_cython[] = "Hot_Key.__reduce_cython__";
static const char __pyx_k_Input___setstate_cython[] = "Input.__setstate_cython__";
static const char __pyx_k_Text_Input_handle_input[] = "Text_Input.handle_input";
static const char __pyx_k_Thumb___setstate_cython[] = "Thumb.__setstate_cython__";
static const char __pyx_k_UI_element_draw_overlay[] = "UI_element.draw_overlay";
static const char __pyx_k_UI_element_handle_input[] = "UI_element.handle_input";
static const char __pyx_k_cinit___locals_set_play[] = "__cinit__.<locals>.set_play";
static const char __pyx_k_pyx_unpickle_UI_element[] = "__pyx_unpickle_UI_element";
static const char __pyx_k_Button___setstate_cython[] = "Button.__setstate_cython__";
static const char __pyx_k_FitBox___setstate_cython[] = "FitBox.__setstate_cython__";
static const char __pyx_k_FitBox_mouse_over_margin[] = "FitBox.mouse_over_margin";
static const char __pyx_k_Seek_Bar___reduce_cython[] = "Seek_Bar.__reduce_cython__";
static const char __pyx_k_Selector___reduce_cython[] = "Selector.__reduce_cython__";
static const char __pyx_k_Slider___setstate_cython[] = "Slider.__setstate_cython__";
static const char __pyx_k_Switch___setstate_cython[] = "Switch.__setstate_cython__";
static const char __pyx_k_Timeline___reduce_cython[] = "Timeline.__reduce_cython__";
static const char __pyx_k_default_selection_getter[] = "default_selection_getter";
static const char __pyx_k_src_pyglui_timelines_pxi[] = "src/pyglui/timelines.pxi";
static const char __pyx_k_Base_Menu___reduce_cython[] = "Base_Menu.__reduce_cython__";
static const char __pyx_k_Container___reduce_cython[] = "Container.__reduce_cython__";
static const char __pyx_k_Draggable___reduce_cython[] = "Draggable.__reduce_cython__";
static const char __pyx_k_Growing_Menu_draw_overlay[] = "Growing_Menu.draw_overlay";
static const char __pyx_k_Growing_Menu_handle_input[] = "Growing_Menu.handle_input";
static const char __pyx_k_Hot_Key___setstate_cython[] = "Hot_Key.__setstate_cython__";
static const char __pyx_k_Info_Text___reduce_cython[] = "Info_Text.__reduce_cython__";
static const char __pyx_k_Separator___reduce_cython[] = "Separator.__reduce_cython__";
static const char __pyx_k_get_pupil_icons_font_path[] = "get_pupil_icons_font_path";
static const char __pyx_k_pyx_unpickle_Movable_Menu[] = "__pyx_unpickle_Movable_Menu";
static const char __pyx_k_Draggable_pre_handle_input[] = "Draggable.pre_handle_input";
static const char __pyx_k_Seek_Bar___setstate_cython[] = "Seek_Bar.__setstate_cython__";
static const char __pyx_k_Selector___setstate_cython[] = "Selector.__setstate_cython__";
static const char __pyx_k_Text_Input___reduce_cython[] = "Text_Input.__reduce_cython__";
static const char __pyx_k_Timeline___setstate_cython[] = "Timeline.__setstate_cython__";
static const char __pyx_k_UI_element___reduce_cython[] = "UI_element.__reduce_cython__";
static const char __pyx_k_src_pyglui_ui_elements_pxi[] = "src/pyglui/ui_elements.pxi";
static const char __pyx_k_Base_Menu___setstate_cython[] = "Base_Menu.__setstate_cython__";
static const char __pyx_k_Base_Menu_collect_in_window[] = "Base_Menu.collect_in_window";
static const char __pyx_k_Container___setstate_cython[] = "Container.__setstate_cython__";
static const char __pyx_k_Draggable___setstate_cython[] = "Draggable.__setstate_cython__";
static const char __pyx_k_Info_Text___setstate_cython[] = "Info_Text.__setstate_cython__";
static const char __pyx_k_Scrolling_Menu_draw_overlay[] = "Scrolling_Menu.draw_overlay";
static const char __pyx_k_Scrolling_Menu_handle_input[] = "Scrolling_Menu.handle_input";
static const char __pyx_k_Separator___setstate_cython[] = "Separator.__setstate_cython__";
static const char __pyx_k_Text_Input_pre_handle_input[] = "Text_Input.pre_handle_input";
static const char __pyx_k_Timeline_draw_label_default[] = "Timeline.draw_label_default";
static const char __pyx_k_UI_element_pre_handle_input[] = "UI_element.pre_handle_input";
static const char __pyx_k_Color_Legend___reduce_cython[] = "Color_Legend.__reduce_cython__";
static const char __pyx_k_Growing_Menu___reduce_cython[] = "Growing_Menu.__reduce_cython__";
static const char __pyx_k_Horizontally_Stretching_Menu[] = "Horizontally_Stretching_Menu";
static const char __pyx_k_Movable_Menu___reduce_cython[] = "Movable_Menu.__reduce_cython__";
static const char __pyx_k_Stretching_Menu_draw_overlay[] = "Stretching_Menu.draw_overlay";
static const char __pyx_k_Stretching_Menu_handle_input[] = "Stretching_Menu.handle_input";
static const char __pyx_k_Synced_Value___reduce_cython[] = "Synced_Value.__reduce_cython__";
static const char __pyx_k_Text_Input___setstate_cython[] = "Text_Input.__setstate_cython__";
static const char __pyx_k_UI_element___setstate_cython[] = "UI_element.__setstate_cython__";
static const char __pyx_k_Growing_Menu_toggle_iconified[] = "Growing_Menu.toggle_iconified";
static const char __pyx_k_Timeline_Menu___reduce_cython[] = "Timeline_Menu.__reduce_cython__";
static const char __pyx_k_Color_Legend___setstate_cython[] = "Color_Legend.__setstate_cython__";
static const char __pyx_k_Growing_Menu___setstate_cython[] = "Growing_Menu.__setstate_cython__";
static const char __pyx_k_Movable_Menu___setstate_cython[] = "Movable_Menu.__setstate_cython__";
static const char __pyx_k_Pyx_CFunc_float__lParenUI_elem[] = "__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm.<locals>.wrap";
static const char __pyx_k_Scrolling_Menu___reduce_cython[] = "Scrolling_Menu.__reduce_cython__";
static const char __pyx_k_Synced_Value___setstate_cython[] = "Synced_Value.__setstate_cython__";
static const char __pyx_k_Timeline_Menu_toggle_iconified[] = "Timeline_Menu.toggle_iconified";
static const char __pyx_k_cinit___locals_default_selecti[] = "__cinit__.<locals>.default_selection_getter.<locals>.to_str";
static const char __pyx_k_Can_only_append_UI_elements_not[] = "Can only append UI elements, not: '%s'";
static const char __pyx_k_Scrolling_Menu_toggle_iconified[] = "Scrolling_Menu.toggle_iconified";
static const char __pyx_k_Stretching_Menu___reduce_cython[] = "Stretching_Menu.__reduce_cython__";
static const char __pyx_k_Timeline_Menu___setstate_cython[] = "Timeline_Menu.__setstate_cython__";
static const char __pyx_k_Header_Positon_argument_needs_to[] = "Header Positon argument needs to be one of 'top,right,left,bottom','headline' was %s ";
static const char __pyx_k_Horizontally_Stretching_Menu___r[] = "Horizontally_Stretching_Menu.__reduce_cython__";
static const char __pyx_k_Horizontally_Stretching_Menu___s[] = "Horizontally_Stretching_Menu.__setstate_cython__";
static const char __pyx_k_Horizontally_Stretching_Menu_dra[] = "Horizontally_Stretching_Menu.draw";
static const char __pyx_k_Horizontally_Stretching_Menu_han[] = "Horizontally_Stretching_Menu.handle_input";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))";
static const char __pyx_k_Indicator_values_are_required_to[] = "Indicator values are required to be floats";
static const char __pyx_k_Scrolling_Menu___setstate_cython[] = "Scrolling_Menu.__setstate_cython__";
static const char __pyx_k_Slider_Text_Input___reduce_cytho[] = "Slider_Text_Input.__reduce_cython__";
static const char __pyx_k_Slider_Text_Input___setstate_cyt[] = "Slider_Text_Input.__setstate_cython__";
static const char __pyx_k_Slider_values_should_be_float_or[] = "Slider values should be float or int type. \"";
static const char __pyx_k_Stretching_Menu___setstate_cytho[] = "Stretching_Menu.__setstate_cython__";
static const char __pyx_k_Synced_value_s_is_not_part_of_se[] = "Synced value '%s' is not part of selection.";
static const char __pyx_k_UI_Framebuffer_could_not_be_crea[] = "UI Framebuffer could not be created.";
static const char __pyx_k_cinit___locals_default_selecti_2[] = "__cinit__.<locals>.default_selection_getter";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_Horizontally_Stretching_Menu_dra_2[] = "Horizontally_Stretching_Menu.draw_overlay";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))";
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_kp_u_02_0f_06_3f;
static PyObject *__pyx_kp_u_0_2f;
static PyObject *__pyx_kp_u_1_31_0;
static PyObject *__pyx_n_s_AssertionError;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_Base_Menu;
static PyObject *__pyx_n_s_Base_Menu___reduce_cython;
static PyObject *__pyx_n_s_Base_Menu___setstate_cython;
static PyObject *__pyx_n_s_Base_Menu_append;
static PyObject *__pyx_n_s_Base_Menu_collect_in_window;
static PyObject *__pyx_n_s_Base_Menu_extend;
static PyObject *__pyx_n_s_Base_Menu_insert;
static PyObject *__pyx_n_s_Base_Menu_remove;
static PyObject *__pyx_n_s_Base_Menu_sync;
static PyObject *__pyx_n_s_Button;
static PyObject *__pyx_n_s_Button___reduce_cython;
static PyObject *__pyx_n_s_Button___setstate_cython;
static PyObject *__pyx_n_s_Button_draw;
static PyObject *__pyx_n_s_Button_handle_input;
static PyObject *__pyx_kp_u_Buttons;
static PyObject *__pyx_kp_u_Can_only_append_UI_elements_not;
static PyObject *__pyx_kp_u_Chars;
static PyObject *__pyx_n_s_Color_Legend;
static PyObject *__pyx_n_s_Color_Legend___reduce_cython;
static PyObject *__pyx_n_s_Color_Legend___setstate_cython;
static PyObject *__pyx_n_s_Color_Legend_draw;
static PyObject *__pyx_n_s_Color_Legend_precompute;
static PyObject *__pyx_n_s_Container;
static PyObject *__pyx_n_u_Container;
static PyObject *__pyx_n_s_Container___reduce_cython;
static PyObject *__pyx_n_s_Container___setstate_cython;
static PyObject *__pyx_n_s_Container_draw;
static PyObject *__pyx_n_s_Container_draw_overlay;
static PyObject *__pyx_n_s_Container_handle_input;
static PyObject *__pyx_n_s_Container_init;
static PyObject *__pyx_kp_u_Current_Input_Mouse_pos;
static PyObject *__pyx_n_u_Darwin;
static PyObject *__pyx_kp_u_Dict;
static PyObject *__pyx_n_s_Draggable;
static PyObject *__pyx_n_s_Draggable___reduce_cython;
static PyObject *__pyx_n_s_Draggable___setstate_cython;
static PyObject *__pyx_n_s_Draggable_pre_handle_input;
static PyObject *__pyx_n_s_FitBox;
static PyObject *__pyx_n_s_FitBox___reduce_cython;
static PyObject *__pyx_n_s_FitBox___setstate_cython;
static PyObject *__pyx_kp_u_FitBox_design_org;
static PyObject *__pyx_n_s_FitBox_mouse_over;
static PyObject *__pyx_n_s_FitBox_mouse_over_margin;
static PyObject *__pyx_n_s_Growing_Menu;
static PyObject *__pyx_n_s_Growing_Menu___reduce_cython;
static PyObject *__pyx_n_s_Growing_Menu___setstate_cython;
static PyObject *__pyx_n_s_Growing_Menu_draw;
static PyObject *__pyx_n_s_Growing_Menu_draw_overlay;
static PyObject *__pyx_n_s_Growing_Menu_handle_input;
static PyObject *__pyx_n_s_Growing_Menu_precompute;
static PyObject *__pyx_n_s_Growing_Menu_toggle_iconified;
static PyObject *__pyx_kp_u_Header_Positon_argument_needs_to;
static PyObject *__pyx_n_s_Horizontally_Stretching_Menu;
static PyObject *__pyx_n_s_Horizontally_Stretching_Menu___r;
static PyObject *__pyx_n_s_Horizontally_Stretching_Menu___s;
static PyObject *__pyx_n_s_Horizontally_Stretching_Menu_dra;
static PyObject *__pyx_n_s_Horizontally_Stretching_Menu_dra_2;
static PyObject *__pyx_n_s_Horizontally_Stretching_Menu_han;
static PyObject *__pyx_n_s_Hot_Key;
static PyObject *__pyx_n_s_Hot_Key___reduce_cython;
static PyObject *__pyx_n_s_Hot_Key___setstate_cython;
static PyObject *__pyx_n_s_Hot_Key_handle_input;
static PyObject *__pyx_n_s_Hot_Key_sync;
static PyObject *__pyx_n_s_Icon;
static PyObject *__pyx_n_s_Icon___reduce_cython;
static PyObject *__pyx_n_s_Icon___setstate_cython;
static PyObject *__pyx_n_s_Icon_draw;
static PyObject *__pyx_n_s_Icon_draw_overlay;
static PyObject *__pyx_n_s_Icon_handle_input;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_u_Indicator_values_are_required_to;
static PyObject *__pyx_n_s_Info_Text;
static PyObject *__pyx_n_s_Info_Text___reduce_cython;
static PyObject *__pyx_n_s_Info_Text___setstate_cython;
static PyObject *__pyx_n_s_Info_Text_draw;
static PyObject *__pyx_n_s_Info_Text_precompute;
static PyObject *__pyx_n_s_Input;
static PyObject *__pyx_n_s_Input___reduce_cython;
static PyObject *__pyx_n_s_Input___setstate_cython;
static PyObject *__pyx_n_s_Input_purge;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_kp_u_Keys;
static PyObject *__pyx_kp_u_Mouse_delta;
static PyObject *__pyx_n_s_Movable_Menu;
static PyObject *__pyx_n_s_Movable_Menu___reduce_cython;
static PyObject *__pyx_n_s_Movable_Menu___setstate_cython;
static PyObject *__pyx_kp_u_None;
static PyObject *__pyx_n_s_NotImplemented;
static PyObject *__pyx_kp_u_OpenSans_Regular_ttf;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_Pyx_CFunc_float__lParenUI_elem;
static PyObject *__pyx_kp_u_Roboto_Regular_ttf;
static PyObject *__pyx_kp_u_Scroll;
static PyObject *__pyx_kp_u_Scrolling_Menu;
static PyObject *__pyx_n_s_Scrolling_Menu_2;
static PyObject *__pyx_n_s_Scrolling_Menu___reduce_cython;
static PyObject *__pyx_n_s_Scrolling_Menu___setstate_cython;
static PyObject *__pyx_n_s_Scrolling_Menu_draw;
static PyObject *__pyx_n_s_Scrolling_Menu_draw_overlay;
static PyObject *__pyx_n_s_Scrolling_Menu_handle_input;
static PyObject *__pyx_n_s_Scrolling_Menu_toggle_iconified;
static PyObject *__pyx_n_s_Seek_Bar;
static PyObject *__pyx_n_s_Seek_Bar___reduce_cython;
static PyObject *__pyx_n_s_Seek_Bar___setstate_cython;
static PyObject *__pyx_n_s_Seek_Bar_draw;
static PyObject *__pyx_n_s_Seek_Bar_draw_overlay;
static PyObject *__pyx_n_s_Seek_Bar_handle_input;
static PyObject *__pyx_n_s_Seek_Bar_sync;
static PyObject *__pyx_n_s_Selector;
static PyObject *__pyx_n_s_Selector___reduce_cython;
static PyObject *__pyx_n_s_Selector___setstate_cython;
static PyObject *__pyx_n_s_Selector__on_change;
static PyObject *__pyx_n_s_Selector_draw;
static PyObject *__pyx_n_s_Selector_handle_input;
static PyObject *__pyx_n_s_Selector_sync;
static PyObject *__pyx_n_s_Separator;
static PyObject *__pyx_n_s_Separator___reduce_cython;
static PyObject *__pyx_n_s_Separator___setstate_cython;
static PyObject *__pyx_n_s_Separator_draw;
static PyObject *__pyx_n_s_Separator_precompute;
static PyObject *__pyx_n_s_Slider;
static PyObject *__pyx_n_s_Slider_Text_Input;
static PyObject *__pyx_n_s_Slider_Text_Input___reduce_cytho;
static PyObject *__pyx_n_s_Slider_Text_Input___setstate_cyt;
static PyObject *__pyx_n_s_Slider___reduce_cython;
static PyObject *__pyx_n_s_Slider___setstate_cython;
static PyObject *__pyx_n_s_Slider_draw;
static PyObject *__pyx_n_s_Slider_handle_input;
static PyObject *__pyx_n_s_Slider_sync;
static PyObject *__pyx_n_s_Slider_validate;
static PyObject *__pyx_kp_u_Slider_values_should_be_float_or;
static PyObject *__pyx_n_s_Stretching_Menu;
static PyObject *__pyx_n_s_Stretching_Menu___reduce_cython;
static PyObject *__pyx_n_s_Stretching_Menu___setstate_cytho;
static PyObject *__pyx_n_s_Stretching_Menu_draw;
static PyObject *__pyx_n_s_Stretching_Menu_draw_overlay;
static PyObject *__pyx_n_s_Stretching_Menu_handle_input;
static PyObject *__pyx_n_s_Switch;
static PyObject *__pyx_n_s_Switch___reduce_cython;
static PyObject *__pyx_n_s_Switch___setstate_cython;
static PyObject *__pyx_n_s_Switch_draw;
static PyObject *__pyx_n_s_Switch_handle_input;
static PyObject *__pyx_n_s_Switch_sync;
static PyObject *__pyx_n_s_Synced_Value;
static PyObject *__pyx_n_s_Synced_Value___reduce_cython;
static PyObject *__pyx_n_s_Synced_Value___setstate_cython;
static PyObject *__pyx_kp_u_Synced_value_s_is_not_part_of_se;
static PyObject *__pyx_n_s_Text_Input;
static PyObject *__pyx_n_s_Text_Input___reduce_cython;
static PyObject *__pyx_n_s_Text_Input___setstate_cython;
static PyObject *__pyx_n_s_Text_Input_draw;
static PyObject *__pyx_n_s_Text_Input_handle_input;
static PyObject *__pyx_n_s_Text_Input_pre_handle_input;
static PyObject *__pyx_n_s_Text_Input_sync;
static PyObject *__pyx_n_s_Thumb;
static PyObject *__pyx_n_s_Thumb___reduce_cython;
static PyObject *__pyx_n_s_Thumb___setstate_cython;
static PyObject *__pyx_n_s_Thumb_draw;
static PyObject *__pyx_n_s_Thumb_handle_input;
static PyObject *__pyx_n_s_Thumb_sync;
static PyObject *__pyx_n_s_Timeline;
static PyObject *__pyx_n_s_Timeline_Menu;
static PyObject *__pyx_n_s_Timeline_Menu___reduce_cython;
static PyObject *__pyx_n_s_Timeline_Menu___setstate_cython;
static PyObject *__pyx_n_s_Timeline_Menu_append;
static PyObject *__pyx_n_s_Timeline_Menu_draw;
static PyObject *__pyx_n_s_Timeline_Menu_extend;
static PyObject *__pyx_n_s_Timeline_Menu_insert;
static PyObject *__pyx_n_s_Timeline_Menu_remove;
static PyObject *__pyx_n_s_Timeline_Menu_toggle_iconified;
static PyObject *__pyx_n_s_Timeline___reduce_cython;
static PyObject *__pyx_n_s_Timeline___setstate_cython;
static PyObject *__pyx_n_s_Timeline_draw;
static PyObject *__pyx_n_s_Timeline_draw_label_default;
static PyObject *__pyx_n_s_Timeline_refresh;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_UI;
static PyObject *__pyx_kp_u_UI_Framebuffer_could_not_be_crea;
static PyObject *__pyx_n_s_UI___reduce_cython;
static PyObject *__pyx_n_s_UI___setstate_cython;
static PyObject *__pyx_n_s_UI_add_font;
static PyObject *__pyx_n_s_UI_append;
static PyObject *__pyx_n_s_UI_collect_menus;
static PyObject *__pyx_n_s_UI_element;
static PyObject *__pyx_n_s_UI_element___reduce_cython;
static PyObject *__pyx_n_s_UI_element___setstate_cython;
static PyObject *__pyx_n_s_UI_element_draw;
static PyObject *__pyx_n_s_UI_element_draw_overlay;
static PyObject *__pyx_n_s_UI_element_handle_input;
static PyObject *__pyx_n_s_UI_element_pre_handle_input;
static PyObject *__pyx_n_s_UI_element_precompute;
static PyObject *__pyx_n_s_UI_element_sync;
static PyObject *__pyx_n_s_UI_extend;
static PyObject *__pyx_n_s_UI_remove;
static PyObject *__pyx_n_s_UI_terminate;
static PyObject *__pyx_n_s_UI_update;
static PyObject *__pyx_n_s_UI_update_button;
static PyObject *__pyx_n_s_UI_update_char;
static PyObject *__pyx_n_s_UI_update_clipboard;
static PyObject *__pyx_n_s_UI_update_key;
static PyObject *__pyx_n_s_UI_update_mouse;
static PyObject *__pyx_n_s_UI_update_scroll;
static PyObject *__pyx_n_s_UI_update_window;
static PyObject *__pyx_n_s_Unused_Input;
static PyObject *__pyx_n_u_Unused_Input;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Vec2;
static PyObject *__pyx_n_s_Vec2___reduce_cython;
static PyObject *__pyx_n_s_Vec2___setstate_cython;
static PyObject *__pyx_n_s__330;
static PyObject *__pyx_kp_u__34;
static PyObject *__pyx_n_s__50;
static PyObject *__pyx_kp_u__88;
static PyObject *__pyx_kp_u__93;
static PyObject *__pyx_n_s__97;
static PyObject *__pyx_n_s_action;
static PyObject *__pyx_n_s_add_font;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_arrest_axis;
static PyObject *__pyx_n_s_as_tuple;
static PyObject *__pyx_n_s_asyncio_coroutines;
static PyObject *__pyx_n_s_attribute_context;
static PyObject *__pyx_n_s_attribute_name;
static PyObject *__pyx_n_u_backwards;
static PyObject *__pyx_n_u_bottom;
static PyObject *__pyx_n_s_button;
static PyObject *__pyx_n_u_buttons;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_s_catch_input;
static PyObject *__pyx_n_s_center;
static PyObject *__pyx_n_s_centered;
static PyObject *__pyx_n_s_cfunc_to_py;
static PyObject *__pyx_n_s_char;
static PyObject *__pyx_n_u_chars;
static PyObject *__pyx_n_s_chr;
static PyObject *__pyx_n_s_cinit___locals_default_selecti;
static PyObject *__pyx_n_s_cinit___locals_default_selecti_2;
static PyObject *__pyx_n_s_cinit___locals_lambda;
static PyObject *__pyx_n_s_cinit___locals_set_play;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_class_getitem;
static PyObject *__pyx_n_s_clear_state;
static PyObject *__pyx_n_s_click_cb;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_clipboard;
static PyObject *__pyx_n_u_clipboard;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_collapsed;
static PyObject *__pyx_n_u_collapsed;
static PyObject *__pyx_n_s_collect_in_window;
static PyObject *__pyx_n_s_collect_menus;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_kp_u_comptd_org;
static PyObject *__pyx_n_s_configuration;
static PyObject *__pyx_n_s_content_height;
static PyObject *__pyx_n_s_contextlib;
static PyObject *__pyx_n_s_contextmanager;
static PyObject *__pyx_n_s_cysignals;
static PyObject *__pyx_kp_u_d;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_default_selection_getter;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_n_s_dirname;
static PyObject *__pyx_kp_u_disable;
static PyObject *__pyx_n_s_display_format;
static PyObject *__pyx_n_s_draw;
static PyObject *__pyx_n_s_draw_data_callback;
static PyObject *__pyx_n_s_draw_label_callback;
static PyObject *__pyx_n_s_draw_label_default;
static PyObject *__pyx_n_s_draw_overlay;
static PyObject *__pyx_n_s_e;
static PyObject *__pyx_n_s_elm;
static PyObject *__pyx_kp_u_enable;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_eval;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_extend;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_font_name;
static PyObject *__pyx_n_s_font_path;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_u_forwards;
static PyObject *__pyx_n_s_frange;
static PyObject *__pyx_n_s_function;
static PyObject *__pyx_kp_u_gc;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_all_font_paths;
static PyObject *__pyx_n_s_get_opensans_font_path;
static PyObject *__pyx_n_s_get_pupil_icons_font_path;
static PyObject *__pyx_n_s_get_roboto_font_path;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_getter;
static PyObject *__pyx_n_s_h;
static PyObject *__pyx_n_s_handle_input;
static PyObject *__pyx_n_s_handle_start_reference;
static PyObject *__pyx_kp_u_has_no_attribute;
static PyObject *__pyx_kp_u_has_no_entry;
static PyObject *__pyx_n_s_header_pos;
static PyObject *__pyx_n_s_header_pos_id;
static PyObject *__pyx_n_u_headline;
static PyObject *__pyx_n_s_height;
static PyObject *__pyx_n_u_hidden;
static PyObject *__pyx_n_s_hotkey;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_idx;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_indicator_start;
static PyObject *__pyx_n_s_indicator_stop;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_initializing;
static PyObject *__pyx_n_s_insert;
static PyObject *__pyx_n_s_is_coroutine;
static PyObject *__pyx_kp_u_is_of_type;
static PyObject *__pyx_kp_u_isenabled;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_u_keys;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_label;
static PyObject *__pyx_n_u_label;
static PyObject *__pyx_n_s_label_font;
static PyObject *__pyx_n_s_label_getter;
static PyObject *__pyx_n_s_label_line_height;
static PyObject *__pyx_n_s_label_offset_size;
static PyObject *__pyx_n_s_label_offset_x;
static PyObject *__pyx_n_s_label_offset_y;
static PyObject *__pyx_n_s_labels;
static PyObject *__pyx_n_u_left;
static PyObject *__pyx_n_s_line_color;
static PyObject *__pyx_n_s_m;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_margin;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_max_ts;
static PyObject *__pyx_n_s_min;
static PyObject *__pyx_n_s_min_size;
static PyObject *__pyx_n_u_min_size;
static PyObject *__pyx_n_s_min_ts;
static PyObject *__pyx_n_s_mods;
static PyObject *__pyx_n_s_mouse_over;
static PyObject *__pyx_n_s_mouse_over_margin;
static PyObject *__pyx_n_s_mx;
static PyObject *__pyx_n_s_my;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_namedtuple;
static PyObject *__pyx_n_s_nested;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_new_input;
static PyObject *__pyx_n_s_new_value;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_objs;
static PyObject *__pyx_n_s_off_color;
static PyObject *__pyx_n_s_off_val;
static PyObject *__pyx_n_s_on_change;
static PyObject *__pyx_n_s_on_change_2;
static PyObject *__pyx_n_s_on_color;
static PyObject *__pyx_n_s_on_val;
static PyObject *__pyx_n_u_opensans;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_outer_label;
static PyObject *__pyx_n_s_padding;
static PyObject *__pyx_n_s_parent;
static PyObject *__pyx_n_s_parent_read_only;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_platform;
static PyObject *__pyx_n_s_play;
static PyObject *__pyx_n_u_play;
static PyObject *__pyx_n_u_playback_speed;
static PyObject *__pyx_n_s_playback_time_setter;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_pop_state;
static PyObject *__pyx_n_s_pos;
static PyObject *__pyx_n_u_pos;
static PyObject *__pyx_n_s_position;
static PyObject *__pyx_n_s_pre_handle_input;
static PyObject *__pyx_n_s_precompute;
static PyObject *__pyx_n_u_pupil_icons;
static PyObject *__pyx_kp_u_pupil_icons_ttf;
static PyObject *__pyx_n_s_purge;
static PyObject *__pyx_n_s_push_state;
static PyObject *__pyx_n_s_pyglui_ui;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_Base_Menu;
static PyObject *__pyx_n_s_pyx_unpickle_Movable_Menu;
static PyObject *__pyx_n_s_pyx_unpickle_UI_element;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_recent_idx_ts_getter;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_refresh;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_u_right;
static PyObject *__pyx_n_u_roboto;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_n_s_scale;
static PyObject *__pyx_n_s_scancode;
static PyObject *__pyx_n_u_scrollstate;
static PyObject *__pyx_n_s_seeking_cb;
static PyObject *__pyx_n_s_selection;
static PyObject *__pyx_n_s_selection_getter;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_set_align;
static PyObject *__pyx_n_s_set_blur;
static PyObject *__pyx_n_s_set_font;
static PyObject *__pyx_n_s_set_play;
static PyObject *__pyx_n_s_set_size;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_setter;
static PyObject *__pyx_n_s_sig_on_off;
static PyObject *__pyx_n_s_six;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_u_size;
static PyObject *__pyx_kp_u_size_2;
static PyObject *__pyx_n_s_sort;
static PyObject *__pyx_n_s_spec;
static PyObject *__pyx_kp_s_src_pyglui_custom_pxi;
static PyObject *__pyx_kp_s_src_pyglui_helpers_pxi;
static PyObject *__pyx_kp_s_src_pyglui_menus_pxi;
static PyObject *__pyx_kp_s_src_pyglui_timelines_pxi;
static PyObject *__pyx_kp_s_src_pyglui_ui_elements_pxi;
static PyObject *__pyx_kp_s_src_pyglui_ui_pyx;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_step;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_u_submenus;
static PyObject *__pyx_n_s_sum;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_sx;
static PyObject *__pyx_n_s_sy;
static PyObject *__pyx_n_s_sync;
static PyObject *__pyx_n_s_sync_ctx;
static PyObject *__pyx_n_s_system;
static PyObject *__pyx_n_s_terminate;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_text;
static PyObject *__pyx_n_s_text_bounds;
static PyObject *__pyx_n_s_text_color;
static PyObject *__pyx_n_s_text_size;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_to_str;
static PyObject *__pyx_n_s_toggle_iconified;
static PyObject *__pyx_n_s_tooltip;
static PyObject *__pyx_n_u_top;
static PyObject *__pyx_n_s_trigger_overlay_only;
static PyObject *__pyx_n_u_trim_left_ts;
static PyObject *__pyx_n_u_trim_right_ts;
static PyObject *__pyx_n_s_typed_val;
static PyObject *__pyx_n_u_uncollapsed_min_size;
static PyObject *__pyx_n_u_uncollapsed_pos;
static PyObject *__pyx_n_u_uncollapsed_size;
static PyObject *__pyx_n_s_unichr;
static PyObject *__pyx_n_s_unused_Input;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_update_button;
static PyObject *__pyx_n_s_update_char;
static PyObject *__pyx_n_s_update_clipboard;
static PyObject *__pyx_n_s_update_key;
static PyObject *__pyx_n_s_update_mouse;
static PyObject *__pyx_n_s_update_scroll;
static PyObject *__pyx_n_s_update_window;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_kp_u_utf_8;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_validate;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_visible;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_width;
static PyObject *__pyx_n_s_window;
static PyObject *__pyx_n_s_window_size;
static PyObject *__pyx_n_s_wrap;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_kp_u_x_2;
static PyObject *__pyx_kp_u_x_3;
static PyObject *__pyx_n_s_xpad;
static PyObject *__pyx_n_s_y;
static PyObject *__pyx_kp_u_y_2;
static PyObject *__pyx_n_s_ypad;
static PyObject *__pyx_n_s_zero_crossing;
#endif
/* #### Code section: decls ### */
static PyObject *__pyx_pf_6pyglui_2ui_sig_on_off(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_3frange(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_step); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6get_roboto_font_path(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8get_opensans_font_path(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10get_pupil_icons_font_path(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12get_all_font_paths(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI___cinit__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_4add_font(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_font_name, PyObject *__pyx_v_font_path); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_6terminate(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_8update_mouse(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_mx, PyObject *__pyx_v_my); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_10update_window(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_w, PyObject *__pyx_v_h); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_12update_scroll(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_sx, PyObject *__pyx_v_sy); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_14update_key(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_scancode, PyObject *__pyx_v_action, PyObject *__pyx_v_mods); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_16update_char(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_18update_button(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_button, PyObject *__pyx_v_action, PyObject *__pyx_v_mods); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_20update_clipboard(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_clipboard); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_22update(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_24collect_menus(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_26append(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_28extend(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_objs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_30remove(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_13configuration___get__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_new_conf); /* proto */
static Py_ssize_t __pyx_pf_6pyglui_2ui_2UI_32__len__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_34__getitem__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI_36__setitem__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_obj); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI_38__delitem__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI_40__contains__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_5scale___get__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI_5scale_2__set__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, float __pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_8elements___get__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI_8elements_2__set__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_2UI_8elements_4__del__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_42__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_2UI_44__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_sync(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_2draw(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_4draw_overlay(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_6handle_input(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_8pre_handle_input(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_10precompute(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_5width___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_6height___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_9read_only___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_10UI_element_9read_only_2__set__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, int __pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_5label___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_10UI_element_5label_2__set__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_5order___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_10UI_element_5order_2__set__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, float __pyx_v_order); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_3uid___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_7outline___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_10UI_element_7outline_2__set__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_10UI_element_7outline_4__del__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_12__reduce_cython__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_14__setstate_cython__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_6Slider___cinit__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_label, PyObject *__pyx_v_min, PyObject *__pyx_v_max, PyObject *__pyx_v_step, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter); /* proto */
static int __pyx_pf_6pyglui_2ui_6Slider_2__init__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_min, CYTHON_UNUSED PyObject *__pyx_v_max, CYTHON_UNUSED PyObject *__pyx_v_step, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_getter); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_4sync(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_6draw(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_8handle_input(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_10validate(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_14display_format___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Slider_14display_format_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_7minimum___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Slider_7minimum_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_7maximum___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Slider_7maximum_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_4step___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Slider_4step_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_5field___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Slider_5field_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_6Slider_5field_4__del__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Slider_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_6Switch___cinit__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_on_val, PyObject *__pyx_v_off_val, PyObject *__pyx_v_label, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter); /* proto */
static int __pyx_pf_6pyglui_2ui_6Switch_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_on_val, CYTHON_UNUSED PyObject *__pyx_v_off_val, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_getter); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Switch_4sync(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Switch_6draw(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Switch_8handle_input(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Switch_5field___get__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Switch_5field_2__set__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_6Switch_5field_4__del__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Switch_6button___get__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Switch_6button_2__set__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_6Switch_6button_4__del__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Switch_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Switch_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_9__cinit___default_selection_getter(PyObject *__pyx_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Selector___cinit__(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_selection, PyObject *__pyx_v_labels, PyObject *__pyx_v_label, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter, PyObject *__pyx_v_selection_getter); /* proto */
static int __pyx_pf_6pyglui_2ui_8Selector_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_4sync(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_6_on_change(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, PyObject *__pyx_v_new_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_8draw(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_10handle_input(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_5field___get__(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Selector_5field_2__set__(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_8Selector_5field_4__del__(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Selector_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_10Text_Input___cinit__(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_label, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter); /* proto */
static int __pyx_pf_6pyglui_2ui_10Text_Input_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_getter); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_4sync(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_6draw(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_8pre_handle_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_10handle_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_8sync_val___get__(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input___cinit__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator___get__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator_2__set__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator_4__del__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format___get__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format_2__set__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format_4__del__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_17Slider_Text_Input_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_17Slider_Text_Input_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_6Button___cinit__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_function, PyObject *__pyx_v_outer_label); /* proto */
static int __pyx_pf_6pyglui_2ui_6Button_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Button_4draw(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Button_6handle_input(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Button_11outer_label___get__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Button_11outer_label_2__set__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Button_8function___get__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_6Button_8function_2__set__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_6Button_8function_4__del__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Button_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6Button_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_9Separator___cinit__(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Separator_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Separator_4draw(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Separator_6precompute(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Separator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Separator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_9Info_Text___cinit__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, PyObject *__pyx_v_text); /* proto */
static int __pyx_pf_6pyglui_2ui_9Info_Text_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_text); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_4text___get__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Info_Text_4text_2__set__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, PyObject *__pyx_v_new_text); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_9text_size___get__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Info_Text_9text_size_2__set__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, float __pyx_v_new_text_size); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_10text_color___get__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Info_Text_10text_color_2__set__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_new_text_color); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_8centered___get__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Info_Text_8centered_2__set__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, int __pyx_v_new_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_4draw(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_6precompute(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_12Color_Legend___cinit__(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, PyObject *__pyx_v_line_color, PyObject *__pyx_v_text); /* proto */
static int __pyx_pf_6pyglui_2ui_12Color_Legend_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_line_color, CYTHON_UNUSED PyObject *__pyx_v_text); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Color_Legend_4draw(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Color_Legend_6precompute(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Color_Legend_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Color_Legend_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb___cinit__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_on_val, PyObject *__pyx_v_off_val, PyObject *__pyx_v_label, PyObject *__pyx_v_label_font, PyObject *__pyx_v_label_offset_x, PyObject *__pyx_v_label_offset_y, PyObject *__pyx_v_label_offset_size, PyObject *__pyx_v_label_line_height, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter, PyObject *__pyx_v_hotkey, PyObject *__pyx_v_on_color, PyObject *__pyx_v_off_color, PyObject *__pyx_v_label_getter); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_11status_text___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb_11status_text_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, PyObject *__pyx_v_new_status_text); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_8on_color___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb_8on_color_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_new_color); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_9off_color___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb_9off_color_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_new_color); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_4sync(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_6draw(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_8handle_input(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_6button___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb_6button_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb_6button_4__del__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_10label_font___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb_10label_font_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_5Thumb_10label_font_4__del__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_4Icon___cinit__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Icon_7tooltip___get__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_4Icon_7tooltip_2__set__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Icon_15indicator_start___get__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_4Icon_15indicator_start_2__set__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Icon_14indicator_stop___get__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_4Icon_14indicator_stop_2__set__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Icon_2handle_input(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Icon_4draw(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Icon_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Icon_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Icon_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_7Hot_Key___cinit__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_on_val, PyObject *__pyx_v_off_val, PyObject *__pyx_v_label, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter, PyObject *__pyx_v_hotkey); /* proto */
static int __pyx_pf_6pyglui_2ui_7Hot_Key_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_on_val, CYTHON_UNUSED PyObject *__pyx_v_off_val, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_getter, CYTHON_UNUSED PyObject *__pyx_v_hotkey); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_4sync(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_6handle_input(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_8on_color___get__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_7Hot_Key_8on_color_2__set__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_7Hot_Key_8on_color_4__del__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_9off_color___get__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_7Hot_Key_9off_color_2__set__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_7Hot_Key_9off_color_4__del__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_9__cinit___set_play(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Seek_Bar___cinit__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, PyObject *__pyx_v_sync_ctx, double __pyx_v_min_ts, double __pyx_v_max_ts, PyObject *__pyx_v_recent_idx_ts_getter, PyObject *__pyx_v_playback_time_setter, PyObject *__pyx_v_seeking_cb, struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_handle_start_reference, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static int __pyx_pf_6pyglui_2ui_8Seek_Bar_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_4sync(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_6draw(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_8draw_overlay(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_10handle_input(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_8hovering___get__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_7seeking___get__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_13trimming_left___get__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_14trimming_right___get__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline___cinit__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_draw_data_callback, PyObject *__pyx_v_draw_label_callback, double __pyx_v_content_height, PyObject *__pyx_v_xpad, PyObject *__pyx_v_ypad, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_4draw(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_6refresh(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_14content_height___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_14content_height_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_8draw_label_default(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_scale); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_5color___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_5color_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_5color_4__del__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_10point_size___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_10point_size_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_6xstart___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_6xstart_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_5xstop___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_5xstop_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_6ystart___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_6ystart_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_5ystop___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_5ystop_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_4ypad___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_8Timeline_4ypad_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_sync(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_2append(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_4insert(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_6extend(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_objs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_8remove(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static Py_ssize_t __pyx_pf_6pyglui_2ui_9Base_Menu_10__len__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_12__getitem__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_6pyglui_2ui_9Base_Menu_14__setitem__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_obj); /* proto */
static int __pyx_pf_6pyglui_2ui_9Base_Menu_16__delitem__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_6pyglui_2ui_9Base_Menu_18__contains__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static int __pyx_pf_6pyglui_2ui_9Base_Menu_20__bool__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_22collect_in_window(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_window); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_8elements___get__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Base_Menu_8elements_2__set__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_9Base_Menu_8elements_4__del__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_13header_pos_id___get__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_5color___get__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Base_Menu_5color_2__set__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_9Base_Menu_5color_4__del__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_24__reduce_cython__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_26__setstate_cython__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Movable_Menu_10header_pos___get__(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_12Movable_Menu_10header_pos_2__set__(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v_self, PyObject *__pyx_v_header_pos); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Movable_Menu___reduce_cython__(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Movable_Menu_2__setstate_cython__(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_15Stretching_Menu___cinit__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_pos, PyObject *__pyx_v_size); /* proto */
static int __pyx_pf_6pyglui_2ui_15Stretching_Menu_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_pos, CYTHON_UNUSED PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_4draw(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_8handle_input(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_15Stretching_Menu_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_new_conf); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_15Stretching_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu___cinit__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_pos, PyObject *__pyx_v_size); /* proto */
static int __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_pos, CYTHON_UNUSED PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_4draw(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_8handle_input(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_new_conf); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_12Growing_Menu___cinit__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_pos, PyObject *__pyx_v_size, PyObject *__pyx_v_header_pos); /* proto */
static int __pyx_pf_6pyglui_2ui_12Growing_Menu_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_pos, CYTHON_UNUSED PyObject *__pyx_v_size, CYTHON_UNUSED PyObject *__pyx_v_header_pos); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_4draw(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_8handle_input(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_10precompute(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_6height___get__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_12toggle_iconified(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_12Growing_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, PyObject *__pyx_v_collapsed); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_12Growing_Menu_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, PyObject *__pyx_v_new_conf); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_14Scrolling_Menu___cinit__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_pos, PyObject *__pyx_v_size, PyObject *__pyx_v_header_pos); /* proto */
static int __pyx_pf_6pyglui_2ui_14Scrolling_Menu_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_pos, CYTHON_UNUSED PyObject *__pyx_v_size, CYTHON_UNUSED PyObject *__pyx_v_header_pos); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_4__str__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_6draw(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_8draw_overlay(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_10handle_input(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_12toggle_iconified(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_14Scrolling_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, PyObject *__pyx_v_should_collapse); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_14Scrolling_Menu_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, PyObject *__pyx_v_new_conf); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_9Container___cinit__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_size, PyObject *__pyx_v_padding); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_2init(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_4draw(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_8handle_input(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Container_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, PyObject *__pyx_v_new_conf); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint___get__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint_2__set__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint_4__del__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_19vertical_constraint___get__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_9Container_19vertical_constraint_2__set__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_9Container_19vertical_constraint_4__del__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Container_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_draw(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_13Timeline_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_collapsed); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_2toggle_iconified(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_4append(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_6insert(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_8extend(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_objs); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_10remove(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_12Synced_Value___cinit__(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_getter, PyObject *__pyx_v_setter, PyObject *__pyx_v_on_change, PyObject *__pyx_v_trigger_overlay_only); /* proto */
static int __pyx_pf_6pyglui_2ui_12Synced_Value_2__init__(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_getter, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_on_change, CYTHON_UNUSED PyObject *__pyx_v_trigger_overlay_only); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Synced_Value_5value___get__(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_12Synced_Value_5value_2__set__(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self, PyObject *__pyx_v_new_val); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Synced_Value_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_12Synced_Value_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input___cinit__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_4__nonzero__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_6purge(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_8__str__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_4keys___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_4keys_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_4keys_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_5chars___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_5chars_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_5chars_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_7buttons___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_7buttons_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_7buttons_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_18active_ui_elements___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_18active_ui_elements_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_18active_ui_elements_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_2cb___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_2cb_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pyglui_2ui_5Input_2cb_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_5Input_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_9Draggable___cinit__(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_pos, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_value, PyObject *__pyx_v_arrest_axis, PyObject *__pyx_v_zero_crossing, PyObject *__pyx_v_click_cb, PyObject *__pyx_v_catch_input); /* proto */
static int __pyx_pf_6pyglui_2ui_9Draggable_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_pos, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_arrest_axis, CYTHON_UNUSED PyObject *__pyx_v_zero_crossing, CYTHON_UNUSED PyObject *__pyx_v_click_cb, CYTHON_UNUSED PyObject *__pyx_v_catch_input); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Draggable_4pre_handle_input(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Draggable_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_9Draggable_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_6FitBox___cinit__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_position, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_min_size); /* proto */
static int __pyx_pf_6pyglui_2ui_6FitBox_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_position, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_min_size); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_4rect___get__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_7ellipse___get__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_6center___get__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_4mouse_over(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_6mouse_over_margin(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_margin); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_8__str__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pyglui_2ui_4Vec2___cinit__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, float __pyx_v_x, float __pyx_v_y); /* proto */
static int __pyx_pf_6pyglui_2ui_4Vec2_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_y); /* proto */
static int __pyx_pf_6pyglui_2ui_4Vec2_4__nonzero__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_6__add__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_8__iadd__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_10__mul__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, float __pyx_v_factor); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_12__imul__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, float __pyx_v_factor); /* proto */
#if PY_VERSION_HEX >= 0x03050000
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_14__matmul__(PyObject *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other); /* proto */
#endif
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_16__sub__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_18__isub__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_20__truediv__(PyObject *__pyx_v_self, float __pyx_v_divident); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_22__itruediv__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, float __pyx_v_divident); /* proto */
static Py_ssize_t __pyx_pf_6pyglui_2ui_4Vec2_24__len__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_26__str__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_28__richcmp__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_30__getitem__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
static int __pyx_pf_6pyglui_2ui_4Vec2_32__setitem__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_1x___get__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_4Vec2_1x_2__set__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_1y___get__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self); /* proto */
static int __pyx_pf_6pyglui_2ui_4Vec2_1y_2__set__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_14__pyx_unpickle_UI_element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_16__pyx_unpickle_Base_Menu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pyglui_2ui_18__pyx_unpickle_Movable_Menu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_wrap(PyObject *__pyx_self, struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_elm); /* proto */
static PyObject *__pyx_tp_new_6pyglui_2ui_UI(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_UI_element(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Slider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Switch(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Selector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Text_Input(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Slider_Text_Input(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Button(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Separator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Info_Text(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Color_Legend(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Thumb(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Icon(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Hot_Key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Seek_Bar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Timeline(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Base_Menu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Movable_Menu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Stretching_Menu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Horizontally_Stretching_Menu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Growing_Menu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Scrolling_Menu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Container(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Timeline_Menu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Synced_Value(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Input(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Draggable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_FitBox(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui_Vec2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui___pyx_scope_struct__sig_on_off(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_1_frange(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_2___cinit__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_3___cinit__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, 0, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_index = {0, 0, 0, 0, 0};
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_float__0;
static PyObject *__pyx_float__1;
static PyObject *__pyx_float__3;
static PyObject *__pyx_float__5;
static PyObject *__pyx_float__8;
static PyObject *__pyx_float__9;
static PyObject *__pyx_float_0_;
static PyObject *__pyx_float_1_;
static PyObject *__pyx_float_2_;
static PyObject *__pyx_float_3_;
static PyObject *__pyx_float_5_;
static PyObject *__pyx_float_8_;
static PyObject *__pyx_float__77;
static PyObject *__pyx_float_0_0;
static PyObject *__pyx_float_0_3;
static PyObject *__pyx_float_0_4;
static PyObject *__pyx_float_0_5;
static PyObject *__pyx_float_0_6;
static PyObject *__pyx_float_0_8;
static PyObject *__pyx_float_0_9;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_float_21_;
static PyObject *__pyx_float_0_25;
static PyObject *__pyx_float_0_75;
static PyObject *__pyx_float_0_84;
static PyObject *__pyx_float_10_0;
static PyObject *__pyx_float_10_5;
static PyObject *__pyx_float_130_;
static PyObject *__pyx_float_18_0;
static PyObject *__pyx_float_20_0;
static PyObject *__pyx_float_38_0;
static PyObject *__pyx_float_40_0;
static PyObject *__pyx_float_44_0;
static PyObject *__pyx_float_50_0;
static PyObject *__pyx_float_65_0;
static PyObject *__pyx_float_80_0;
static PyObject *__pyx_float_300_0;
static PyObject *__pyx_float__0000001;
static PyObject *__pyx_float_neg_0_0;
static PyObject *__pyx_float_neg_30_;
static PyObject *__pyx_float_neg_50_;
static PyObject *__pyx_float_neg_10_0;
static PyObject *__pyx_float_neg_20_0;
static PyObject *__pyx_float_neg_38_0;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_20;
static PyObject *__pyx_int_30;
static PyObject *__pyx_int_32;
static PyObject *__pyx_int_40;
static PyObject *__pyx_int_60;
static PyObject *__pyx_int_65;
static PyObject *__pyx_int_67;
static PyObject *__pyx_int_75;
static PyObject *__pyx_int_86;
static PyObject *__pyx_int_88;
static PyObject *__pyx_int_100;
static PyObject *__pyx_int_130;
static PyObject *__pyx_int_200;
static PyObject *__pyx_int_256;
static PyObject *__pyx_int_257;
static PyObject *__pyx_int_259;
static PyObject *__pyx_int_261;
static PyObject *__pyx_int_262;
static PyObject *__pyx_int_263;
static PyObject *__pyx_int_268;
static PyObject *__pyx_int_269;
static PyObject *__pyx_int_57375;
static PyObject *__pyx_int_57376;
static PyObject *__pyx_int_57396;
static PyObject *__pyx_int_57399;
static PyObject *__pyx_int_57412;
static PyObject *__pyx_int_57413;
static PyObject *__pyx_int_64022378;
static PyObject *__pyx_int_72070923;
static PyObject *__pyx_int_126102751;
static PyObject *__pyx_int_150088119;
static PyObject *__pyx_int_180366278;
static PyObject *__pyx_int_251175041;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_neg_10;
static PyObject *__pyx_int_neg_25;
#endif
#if !CYTHON_USE_MODULE_STATE
static struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_k__2;
static PyObject *__pyx_k__27;
static PyObject *__pyx_k__67;
static struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_k__89;
static struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_k__90;
static struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_k__91;
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_slice__8;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__26;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__202;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__210;
static PyObject *__pyx_tuple__214;
static PyObject *__pyx_tuple__216;
static PyObject *__pyx_tuple__218;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__230;
static PyObject *__pyx_tuple__232;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__256;
static PyObject *__pyx_tuple__258;
static PyObject *__pyx_tuple__260;
static PyObject *__pyx_tuple__264;
static PyObject *__pyx_tuple__266;
static PyObject *__pyx_tuple__268;
static PyObject *__pyx_tuple__272;
static PyObject *__pyx_tuple__274;
static PyObject *__pyx_tuple__276;
static PyObject *__pyx_tuple__282;
static PyObject *__pyx_tuple__284;
static PyObject *__pyx_tuple__286;
static PyObject *__pyx_tuple__290;
static PyObject *__pyx_tuple__293;
static PyObject *__pyx_tuple__295;
static PyObject *__pyx_tuple__297;
static PyObject *__pyx_tuple__301;
static PyObject *__pyx_tuple__305;
static PyObject *__pyx_tuple__318;
static PyObject *__pyx_tuple__320;
static PyObject *__pyx_tuple__326;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__101;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__195;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__199;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__201;
static PyObject *__pyx_codeobj__203;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__205;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__207;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__211;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__213;
static PyObject *__pyx_codeobj__215;
static PyObject *__pyx_codeobj__217;
static PyObject *__pyx_codeobj__219;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__221;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__225;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__227;
static PyObject *__pyx_codeobj__229;
static PyObject *__pyx_codeobj__231;
static PyObject *__pyx_codeobj__233;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__241;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__243;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__247;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__251;
static PyObject *__pyx_codeobj__252;
static PyObject *__pyx_codeobj__253;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__255;
static PyObject *__pyx_codeobj__257;
static PyObject *__pyx_codeobj__259;
static PyObject *__pyx_codeobj__261;
static PyObject *__pyx_codeobj__262;
static PyObject *__pyx_codeobj__263;
static PyObject *__pyx_codeobj__265;
static PyObject *__pyx_codeobj__267;
static PyObject *__pyx_codeobj__269;
static PyObject *__pyx_codeobj__270;
static PyObject *__pyx_codeobj__271;
static PyObject *__pyx_codeobj__273;
static PyObject *__pyx_codeobj__275;
static PyObject *__pyx_codeobj__277;
static PyObject *__pyx_codeobj__278;
static PyObject *__pyx_codeobj__279;
static PyObject *__pyx_codeobj__280;
static PyObject *__pyx_codeobj__281;
static PyObject *__pyx_codeobj__283;
static PyObject *__pyx_codeobj__285;
static PyObject *__pyx_codeobj__287;
static PyObject *__pyx_codeobj__288;
static PyObject *__pyx_codeobj__289;
static PyObject *__pyx_codeobj__291;
static PyObject *__pyx_codeobj__292;
static PyObject *__pyx_codeobj__294;
static PyObject *__pyx_codeobj__296;
static PyObject *__pyx_codeobj__298;
static PyObject *__pyx_codeobj__299;
static PyObject *__pyx_codeobj__300;
static PyObject *__pyx_codeobj__302;
static PyObject *__pyx_codeobj__303;
static PyObject *__pyx_codeobj__304;
static PyObject *__pyx_codeobj__306;
static PyObject *__pyx_codeobj__307;
static PyObject *__pyx_codeobj__308;
static PyObject *__pyx_codeobj__309;
static PyObject *__pyx_codeobj__310;
static PyObject *__pyx_codeobj__311;
static PyObject *__pyx_codeobj__312;
static PyObject *__pyx_codeobj__313;
static PyObject *__pyx_codeobj__314;
static PyObject *__pyx_codeobj__315;
static PyObject *__pyx_codeobj__316;
static PyObject *__pyx_codeobj__317;
static PyObject *__pyx_codeobj__319;
static PyObject *__pyx_codeobj__321;
static PyObject *__pyx_codeobj__322;
static PyObject *__pyx_codeobj__323;
static PyObject *__pyx_codeobj__324;
static PyObject *__pyx_codeobj__325;
static PyObject *__pyx_codeobj__327;
static PyObject *__pyx_codeobj__328;
static PyObject *__pyx_codeobj__329;
#endif
/* #### Code section: late_includes ### */
#include "macros.h"
/* #### Code section: module_state ### */
#if CYTHON_USE_MODULE_STATE
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_6pyglui_4cygl_5utils_RGBA;
  PyTypeObject *__pyx_ptype_6pyglui_4cygl_5utils_Render_Target;
  PyTypeObject *__pyx_ptype_6pyglui_4cygl_5utils_Named_Texture;
  PyTypeObject *__pyx_ptype_6pyglui_4cygl_5utils_Sphere;
  PyTypeObject *__pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_UI;
  PyObject *__pyx_type_6pyglui_2ui_UI;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_UI_element;
  PyObject *__pyx_type_6pyglui_2ui_UI_element;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Slider;
  PyObject *__pyx_type_6pyglui_2ui_Slider;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Switch;
  PyObject *__pyx_type_6pyglui_2ui_Switch;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Selector;
  PyObject *__pyx_type_6pyglui_2ui_Selector;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Text_Input;
  PyObject *__pyx_type_6pyglui_2ui_Text_Input;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Slider_Text_Input;
  PyObject *__pyx_type_6pyglui_2ui_Slider_Text_Input;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Button;
  PyObject *__pyx_type_6pyglui_2ui_Button;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Separator;
  PyObject *__pyx_type_6pyglui_2ui_Separator;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Info_Text;
  PyObject *__pyx_type_6pyglui_2ui_Info_Text;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Color_Legend;
  PyObject *__pyx_type_6pyglui_2ui_Color_Legend;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Thumb;
  PyObject *__pyx_type_6pyglui_2ui_Thumb;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Icon;
  PyObject *__pyx_type_6pyglui_2ui_Icon;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Hot_Key;
  PyObject *__pyx_type_6pyglui_2ui_Hot_Key;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Seek_Bar;
  PyObject *__pyx_type_6pyglui_2ui_Seek_Bar;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Timeline;
  PyObject *__pyx_type_6pyglui_2ui_Timeline;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Base_Menu;
  PyObject *__pyx_type_6pyglui_2ui_Base_Menu;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Movable_Menu;
  PyObject *__pyx_type_6pyglui_2ui_Movable_Menu;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Stretching_Menu;
  PyObject *__pyx_type_6pyglui_2ui_Stretching_Menu;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu;
  PyObject *__pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Growing_Menu;
  PyObject *__pyx_type_6pyglui_2ui_Growing_Menu;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Scrolling_Menu;
  PyObject *__pyx_type_6pyglui_2ui_Scrolling_Menu;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Container;
  PyObject *__pyx_type_6pyglui_2ui_Container;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Timeline_Menu;
  PyObject *__pyx_type_6pyglui_2ui_Timeline_Menu;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Synced_Value;
  PyObject *__pyx_type_6pyglui_2ui_Synced_Value;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Input;
  PyObject *__pyx_type_6pyglui_2ui_Input;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Draggable;
  PyObject *__pyx_type_6pyglui_2ui_Draggable;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_FitBox;
  PyObject *__pyx_type_6pyglui_2ui_FitBox;
  PyTypeObject *__pyx_ptype_6pyglui_2ui_Vec2;
  PyObject *__pyx_type_6pyglui_2ui_Vec2;
  PyTypeObject *__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off;
  PyObject *__pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off;
  PyTypeObject *__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange;
  PyObject *__pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange;
  PyTypeObject *__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__;
  PyObject *__pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit__;
  PyTypeObject *__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__;
  PyObject *__pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit__;
  PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm;
  PyObject *__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm;
  PyObject *__pyx_kp_u_02_0f_06_3f;
  PyObject *__pyx_kp_u_0_2f;
  PyObject *__pyx_kp_u_1_31_0;
  PyObject *__pyx_n_s_AssertionError;
  PyObject *__pyx_n_s_AttributeError;
  PyObject *__pyx_n_s_Base_Menu;
  PyObject *__pyx_n_s_Base_Menu___reduce_cython;
  PyObject *__pyx_n_s_Base_Menu___setstate_cython;
  PyObject *__pyx_n_s_Base_Menu_append;
  PyObject *__pyx_n_s_Base_Menu_collect_in_window;
  PyObject *__pyx_n_s_Base_Menu_extend;
  PyObject *__pyx_n_s_Base_Menu_insert;
  PyObject *__pyx_n_s_Base_Menu_remove;
  PyObject *__pyx_n_s_Base_Menu_sync;
  PyObject *__pyx_n_s_Button;
  PyObject *__pyx_n_s_Button___reduce_cython;
  PyObject *__pyx_n_s_Button___setstate_cython;
  PyObject *__pyx_n_s_Button_draw;
  PyObject *__pyx_n_s_Button_handle_input;
  PyObject *__pyx_kp_u_Buttons;
  PyObject *__pyx_kp_u_Can_only_append_UI_elements_not;
  PyObject *__pyx_kp_u_Chars;
  PyObject *__pyx_n_s_Color_Legend;
  PyObject *__pyx_n_s_Color_Legend___reduce_cython;
  PyObject *__pyx_n_s_Color_Legend___setstate_cython;
  PyObject *__pyx_n_s_Color_Legend_draw;
  PyObject *__pyx_n_s_Color_Legend_precompute;
  PyObject *__pyx_n_s_Container;
  PyObject *__pyx_n_u_Container;
  PyObject *__pyx_n_s_Container___reduce_cython;
  PyObject *__pyx_n_s_Container___setstate_cython;
  PyObject *__pyx_n_s_Container_draw;
  PyObject *__pyx_n_s_Container_draw_overlay;
  PyObject *__pyx_n_s_Container_handle_input;
  PyObject *__pyx_n_s_Container_init;
  PyObject *__pyx_kp_u_Current_Input_Mouse_pos;
  PyObject *__pyx_n_u_Darwin;
  PyObject *__pyx_kp_u_Dict;
  PyObject *__pyx_n_s_Draggable;
  PyObject *__pyx_n_s_Draggable___reduce_cython;
  PyObject *__pyx_n_s_Draggable___setstate_cython;
  PyObject *__pyx_n_s_Draggable_pre_handle_input;
  PyObject *__pyx_n_s_FitBox;
  PyObject *__pyx_n_s_FitBox___reduce_cython;
  PyObject *__pyx_n_s_FitBox___setstate_cython;
  PyObject *__pyx_kp_u_FitBox_design_org;
  PyObject *__pyx_n_s_FitBox_mouse_over;
  PyObject *__pyx_n_s_FitBox_mouse_over_margin;
  PyObject *__pyx_n_s_Growing_Menu;
  PyObject *__pyx_n_s_Growing_Menu___reduce_cython;
  PyObject *__pyx_n_s_Growing_Menu___setstate_cython;
  PyObject *__pyx_n_s_Growing_Menu_draw;
  PyObject *__pyx_n_s_Growing_Menu_draw_overlay;
  PyObject *__pyx_n_s_Growing_Menu_handle_input;
  PyObject *__pyx_n_s_Growing_Menu_precompute;
  PyObject *__pyx_n_s_Growing_Menu_toggle_iconified;
  PyObject *__pyx_kp_u_Header_Positon_argument_needs_to;
  PyObject *__pyx_n_s_Horizontally_Stretching_Menu;
  PyObject *__pyx_n_s_Horizontally_Stretching_Menu___r;
  PyObject *__pyx_n_s_Horizontally_Stretching_Menu___s;
  PyObject *__pyx_n_s_Horizontally_Stretching_Menu_dra;
  PyObject *__pyx_n_s_Horizontally_Stretching_Menu_dra_2;
  PyObject *__pyx_n_s_Horizontally_Stretching_Menu_han;
  PyObject *__pyx_n_s_Hot_Key;
  PyObject *__pyx_n_s_Hot_Key___reduce_cython;
  PyObject *__pyx_n_s_Hot_Key___setstate_cython;
  PyObject *__pyx_n_s_Hot_Key_handle_input;
  PyObject *__pyx_n_s_Hot_Key_sync;
  PyObject *__pyx_n_s_Icon;
  PyObject *__pyx_n_s_Icon___reduce_cython;
  PyObject *__pyx_n_s_Icon___setstate_cython;
  PyObject *__pyx_n_s_Icon_draw;
  PyObject *__pyx_n_s_Icon_draw_overlay;
  PyObject *__pyx_n_s_Icon_handle_input;
  PyObject *__pyx_n_s_ImportError;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
  PyObject *__pyx_n_s_IndexError;
  PyObject *__pyx_kp_u_Indicator_values_are_required_to;
  PyObject *__pyx_n_s_Info_Text;
  PyObject *__pyx_n_s_Info_Text___reduce_cython;
  PyObject *__pyx_n_s_Info_Text___setstate_cython;
  PyObject *__pyx_n_s_Info_Text_draw;
  PyObject *__pyx_n_s_Info_Text_precompute;
  PyObject *__pyx_n_s_Input;
  PyObject *__pyx_n_s_Input___reduce_cython;
  PyObject *__pyx_n_s_Input___setstate_cython;
  PyObject *__pyx_n_s_Input_purge;
  PyObject *__pyx_n_s_KeyError;
  PyObject *__pyx_kp_u_Keys;
  PyObject *__pyx_kp_u_Mouse_delta;
  PyObject *__pyx_n_s_Movable_Menu;
  PyObject *__pyx_n_s_Movable_Menu___reduce_cython;
  PyObject *__pyx_n_s_Movable_Menu___setstate_cython;
  PyObject *__pyx_kp_u_None;
  PyObject *__pyx_n_s_NotImplemented;
  PyObject *__pyx_kp_u_OpenSans_Regular_ttf;
  PyObject *__pyx_n_s_PickleError;
  PyObject *__pyx_n_s_Pyx_CFunc_float__lParenUI_elem;
  PyObject *__pyx_kp_u_Roboto_Regular_ttf;
  PyObject *__pyx_kp_u_Scroll;
  PyObject *__pyx_kp_u_Scrolling_Menu;
  PyObject *__pyx_n_s_Scrolling_Menu_2;
  PyObject *__pyx_n_s_Scrolling_Menu___reduce_cython;
  PyObject *__pyx_n_s_Scrolling_Menu___setstate_cython;
  PyObject *__pyx_n_s_Scrolling_Menu_draw;
  PyObject *__pyx_n_s_Scrolling_Menu_draw_overlay;
  PyObject *__pyx_n_s_Scrolling_Menu_handle_input;
  PyObject *__pyx_n_s_Scrolling_Menu_toggle_iconified;
  PyObject *__pyx_n_s_Seek_Bar;
  PyObject *__pyx_n_s_Seek_Bar___reduce_cython;
  PyObject *__pyx_n_s_Seek_Bar___setstate_cython;
  PyObject *__pyx_n_s_Seek_Bar_draw;
  PyObject *__pyx_n_s_Seek_Bar_draw_overlay;
  PyObject *__pyx_n_s_Seek_Bar_handle_input;
  PyObject *__pyx_n_s_Seek_Bar_sync;
  PyObject *__pyx_n_s_Selector;
  PyObject *__pyx_n_s_Selector___reduce_cython;
  PyObject *__pyx_n_s_Selector___setstate_cython;
  PyObject *__pyx_n_s_Selector__on_change;
  PyObject *__pyx_n_s_Selector_draw;
  PyObject *__pyx_n_s_Selector_handle_input;
  PyObject *__pyx_n_s_Selector_sync;
  PyObject *__pyx_n_s_Separator;
  PyObject *__pyx_n_s_Separator___reduce_cython;
  PyObject *__pyx_n_s_Separator___setstate_cython;
  PyObject *__pyx_n_s_Separator_draw;
  PyObject *__pyx_n_s_Separator_precompute;
  PyObject *__pyx_n_s_Slider;
  PyObject *__pyx_n_s_Slider_Text_Input;
  PyObject *__pyx_n_s_Slider_Text_Input___reduce_cytho;
  PyObject *__pyx_n_s_Slider_Text_Input___setstate_cyt;
  PyObject *__pyx_n_s_Slider___reduce_cython;
  PyObject *__pyx_n_s_Slider___setstate_cython;
  PyObject *__pyx_n_s_Slider_draw;
  PyObject *__pyx_n_s_Slider_handle_input;
  PyObject *__pyx_n_s_Slider_sync;
  PyObject *__pyx_n_s_Slider_validate;
  PyObject *__pyx_kp_u_Slider_values_should_be_float_or;
  PyObject *__pyx_n_s_Stretching_Menu;
  PyObject *__pyx_n_s_Stretching_Menu___reduce_cython;
  PyObject *__pyx_n_s_Stretching_Menu___setstate_cytho;
  PyObject *__pyx_n_s_Stretching_Menu_draw;
  PyObject *__pyx_n_s_Stretching_Menu_draw_overlay;
  PyObject *__pyx_n_s_Stretching_Menu_handle_input;
  PyObject *__pyx_n_s_Switch;
  PyObject *__pyx_n_s_Switch___reduce_cython;
  PyObject *__pyx_n_s_Switch___setstate_cython;
  PyObject *__pyx_n_s_Switch_draw;
  PyObject *__pyx_n_s_Switch_handle_input;
  PyObject *__pyx_n_s_Switch_sync;
  PyObject *__pyx_n_s_Synced_Value;
  PyObject *__pyx_n_s_Synced_Value___reduce_cython;
  PyObject *__pyx_n_s_Synced_Value___setstate_cython;
  PyObject *__pyx_kp_u_Synced_value_s_is_not_part_of_se;
  PyObject *__pyx_n_s_Text_Input;
  PyObject *__pyx_n_s_Text_Input___reduce_cython;
  PyObject *__pyx_n_s_Text_Input___setstate_cython;
  PyObject *__pyx_n_s_Text_Input_draw;
  PyObject *__pyx_n_s_Text_Input_handle_input;
  PyObject *__pyx_n_s_Text_Input_pre_handle_input;
  PyObject *__pyx_n_s_Text_Input_sync;
  PyObject *__pyx_n_s_Thumb;
  PyObject *__pyx_n_s_Thumb___reduce_cython;
  PyObject *__pyx_n_s_Thumb___setstate_cython;
  PyObject *__pyx_n_s_Thumb_draw;
  PyObject *__pyx_n_s_Thumb_handle_input;
  PyObject *__pyx_n_s_Thumb_sync;
  PyObject *__pyx_n_s_Timeline;
  PyObject *__pyx_n_s_Timeline_Menu;
  PyObject *__pyx_n_s_Timeline_Menu___reduce_cython;
  PyObject *__pyx_n_s_Timeline_Menu___setstate_cython;
  PyObject *__pyx_n_s_Timeline_Menu_append;
  PyObject *__pyx_n_s_Timeline_Menu_draw;
  PyObject *__pyx_n_s_Timeline_Menu_extend;
  PyObject *__pyx_n_s_Timeline_Menu_insert;
  PyObject *__pyx_n_s_Timeline_Menu_remove;
  PyObject *__pyx_n_s_Timeline_Menu_toggle_iconified;
  PyObject *__pyx_n_s_Timeline___reduce_cython;
  PyObject *__pyx_n_s_Timeline___setstate_cython;
  PyObject *__pyx_n_s_Timeline_draw;
  PyObject *__pyx_n_s_Timeline_draw_label_default;
  PyObject *__pyx_n_s_Timeline_refresh;
  PyObject *__pyx_n_s_TypeError;
  PyObject *__pyx_n_s_UI;
  PyObject *__pyx_kp_u_UI_Framebuffer_could_not_be_crea;
  PyObject *__pyx_n_s_UI___reduce_cython;
  PyObject *__pyx_n_s_UI___setstate_cython;
  PyObject *__pyx_n_s_UI_add_font;
  PyObject *__pyx_n_s_UI_append;
  PyObject *__pyx_n_s_UI_collect_menus;
  PyObject *__pyx_n_s_UI_element;
  PyObject *__pyx_n_s_UI_element___reduce_cython;
  PyObject *__pyx_n_s_UI_element___setstate_cython;
  PyObject *__pyx_n_s_UI_element_draw;
  PyObject *__pyx_n_s_UI_element_draw_overlay;
  PyObject *__pyx_n_s_UI_element_handle_input;
  PyObject *__pyx_n_s_UI_element_pre_handle_input;
  PyObject *__pyx_n_s_UI_element_precompute;
  PyObject *__pyx_n_s_UI_element_sync;
  PyObject *__pyx_n_s_UI_extend;
  PyObject *__pyx_n_s_UI_remove;
  PyObject *__pyx_n_s_UI_terminate;
  PyObject *__pyx_n_s_UI_update;
  PyObject *__pyx_n_s_UI_update_button;
  PyObject *__pyx_n_s_UI_update_char;
  PyObject *__pyx_n_s_UI_update_clipboard;
  PyObject *__pyx_n_s_UI_update_key;
  PyObject *__pyx_n_s_UI_update_mouse;
  PyObject *__pyx_n_s_UI_update_scroll;
  PyObject *__pyx_n_s_UI_update_window;
  PyObject *__pyx_n_s_Unused_Input;
  PyObject *__pyx_n_u_Unused_Input;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_Vec2;
  PyObject *__pyx_n_s_Vec2___reduce_cython;
  PyObject *__pyx_n_s_Vec2___setstate_cython;
  PyObject *__pyx_n_s__330;
  PyObject *__pyx_kp_u__34;
  PyObject *__pyx_n_s__50;
  PyObject *__pyx_kp_u__88;
  PyObject *__pyx_kp_u__93;
  PyObject *__pyx_n_s__97;
  PyObject *__pyx_n_s_action;
  PyObject *__pyx_n_s_add_font;
  PyObject *__pyx_n_s_append;
  PyObject *__pyx_n_s_args;
  PyObject *__pyx_n_s_arrest_axis;
  PyObject *__pyx_n_s_as_tuple;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_n_s_attribute_context;
  PyObject *__pyx_n_s_attribute_name;
  PyObject *__pyx_n_u_backwards;
  PyObject *__pyx_n_u_bottom;
  PyObject *__pyx_n_s_button;
  PyObject *__pyx_n_u_buttons;
  PyObject *__pyx_n_s_c;
  PyObject *__pyx_n_s_catch_input;
  PyObject *__pyx_n_s_center;
  PyObject *__pyx_n_s_centered;
  PyObject *__pyx_n_s_cfunc_to_py;
  PyObject *__pyx_n_s_char;
  PyObject *__pyx_n_u_chars;
  PyObject *__pyx_n_s_chr;
  PyObject *__pyx_n_s_cinit___locals_default_selecti;
  PyObject *__pyx_n_s_cinit___locals_default_selecti_2;
  PyObject *__pyx_n_s_cinit___locals_lambda;
  PyObject *__pyx_n_s_cinit___locals_set_play;
  PyObject *__pyx_n_s_class;
  PyObject *__pyx_n_s_class_getitem;
  PyObject *__pyx_n_s_clear_state;
  PyObject *__pyx_n_s_click_cb;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_clipboard;
  PyObject *__pyx_n_u_clipboard;
  PyObject *__pyx_n_s_close;
  PyObject *__pyx_n_s_collapsed;
  PyObject *__pyx_n_u_collapsed;
  PyObject *__pyx_n_s_collect_in_window;
  PyObject *__pyx_n_s_collect_menus;
  PyObject *__pyx_n_s_collections;
  PyObject *__pyx_kp_u_comptd_org;
  PyObject *__pyx_n_s_configuration;
  PyObject *__pyx_n_s_content_height;
  PyObject *__pyx_n_s_contextlib;
  PyObject *__pyx_n_s_contextmanager;
  PyObject *__pyx_n_s_cysignals;
  PyObject *__pyx_kp_u_d;
  PyObject *__pyx_n_s_decode;
  PyObject *__pyx_n_s_default_selection_getter;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_n_s_dirname;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_display_format;
  PyObject *__pyx_n_s_draw;
  PyObject *__pyx_n_s_draw_data_callback;
  PyObject *__pyx_n_s_draw_label_callback;
  PyObject *__pyx_n_s_draw_label_default;
  PyObject *__pyx_n_s_draw_overlay;
  PyObject *__pyx_n_s_e;
  PyObject *__pyx_n_s_elm;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_enter;
  PyObject *__pyx_n_s_eval;
  PyObject *__pyx_n_s_exit;
  PyObject *__pyx_n_s_extend;
  PyObject *__pyx_n_s_file;
  PyObject *__pyx_n_s_font_name;
  PyObject *__pyx_n_s_font_path;
  PyObject *__pyx_n_s_format;
  PyObject *__pyx_n_u_forwards;
  PyObject *__pyx_n_s_frange;
  PyObject *__pyx_n_s_function;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_get;
  PyObject *__pyx_n_s_get_all_font_paths;
  PyObject *__pyx_n_s_get_opensans_font_path;
  PyObject *__pyx_n_s_get_pupil_icons_font_path;
  PyObject *__pyx_n_s_get_roboto_font_path;
  PyObject *__pyx_n_s_getstate;
  PyObject *__pyx_n_s_getter;
  PyObject *__pyx_n_s_h;
  PyObject *__pyx_n_s_handle_input;
  PyObject *__pyx_n_s_handle_start_reference;
  PyObject *__pyx_kp_u_has_no_attribute;
  PyObject *__pyx_kp_u_has_no_entry;
  PyObject *__pyx_n_s_header_pos;
  PyObject *__pyx_n_s_header_pos_id;
  PyObject *__pyx_n_u_headline;
  PyObject *__pyx_n_s_height;
  PyObject *__pyx_n_u_hidden;
  PyObject *__pyx_n_s_hotkey;
  PyObject *__pyx_n_s_id;
  PyObject *__pyx_n_s_idx;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_s_index;
  PyObject *__pyx_n_s_indicator_start;
  PyObject *__pyx_n_s_indicator_stop;
  PyObject *__pyx_n_s_init;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_insert;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_kp_u_is_of_type;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_s_join;
  PyObject *__pyx_n_s_key;
  PyObject *__pyx_n_u_keys;
  PyObject *__pyx_n_s_kwargs;
  PyObject *__pyx_n_s_label;
  PyObject *__pyx_n_u_label;
  PyObject *__pyx_n_s_label_font;
  PyObject *__pyx_n_s_label_getter;
  PyObject *__pyx_n_s_label_line_height;
  PyObject *__pyx_n_s_label_offset_size;
  PyObject *__pyx_n_s_label_offset_x;
  PyObject *__pyx_n_s_label_offset_y;
  PyObject *__pyx_n_s_labels;
  PyObject *__pyx_n_u_left;
  PyObject *__pyx_n_s_line_color;
  PyObject *__pyx_n_s_m;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_margin;
  PyObject *__pyx_n_s_max;
  PyObject *__pyx_n_s_max_ts;
  PyObject *__pyx_n_s_min;
  PyObject *__pyx_n_s_min_size;
  PyObject *__pyx_n_u_min_size;
  PyObject *__pyx_n_s_min_ts;
  PyObject *__pyx_n_s_mods;
  PyObject *__pyx_n_s_mouse_over;
  PyObject *__pyx_n_s_mouse_over_margin;
  PyObject *__pyx_n_s_mx;
  PyObject *__pyx_n_s_my;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_namedtuple;
  PyObject *__pyx_n_s_nested;
  PyObject *__pyx_n_s_new;
  PyObject *__pyx_n_s_new_input;
  PyObject *__pyx_n_s_new_value;
  PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
  PyObject *__pyx_n_s_obj;
  PyObject *__pyx_n_s_objs;
  PyObject *__pyx_n_s_off_color;
  PyObject *__pyx_n_s_off_val;
  PyObject *__pyx_n_s_on_change;
  PyObject *__pyx_n_s_on_change_2;
  PyObject *__pyx_n_s_on_color;
  PyObject *__pyx_n_s_on_val;
  PyObject *__pyx_n_u_opensans;
  PyObject *__pyx_n_s_os;
  PyObject *__pyx_n_s_outer_label;
  PyObject *__pyx_n_s_padding;
  PyObject *__pyx_n_s_parent;
  PyObject *__pyx_n_s_parent_read_only;
  PyObject *__pyx_n_s_path;
  PyObject *__pyx_n_s_pickle;
  PyObject *__pyx_n_s_platform;
  PyObject *__pyx_n_s_play;
  PyObject *__pyx_n_u_play;
  PyObject *__pyx_n_u_playback_speed;
  PyObject *__pyx_n_s_playback_time_setter;
  PyObject *__pyx_n_s_pop;
  PyObject *__pyx_n_s_pop_state;
  PyObject *__pyx_n_s_pos;
  PyObject *__pyx_n_u_pos;
  PyObject *__pyx_n_s_position;
  PyObject *__pyx_n_s_pre_handle_input;
  PyObject *__pyx_n_s_precompute;
  PyObject *__pyx_n_u_pupil_icons;
  PyObject *__pyx_kp_u_pupil_icons_ttf;
  PyObject *__pyx_n_s_purge;
  PyObject *__pyx_n_s_push_state;
  PyObject *__pyx_n_s_pyglui_ui;
  PyObject *__pyx_n_s_pyx_PickleError;
  PyObject *__pyx_n_s_pyx_checksum;
  PyObject *__pyx_n_s_pyx_result;
  PyObject *__pyx_n_s_pyx_state;
  PyObject *__pyx_n_s_pyx_type;
  PyObject *__pyx_n_s_pyx_unpickle_Base_Menu;
  PyObject *__pyx_n_s_pyx_unpickle_Movable_Menu;
  PyObject *__pyx_n_s_pyx_unpickle_UI_element;
  PyObject *__pyx_n_s_pyx_vtable;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_recent_idx_ts_getter;
  PyObject *__pyx_n_s_reduce;
  PyObject *__pyx_n_s_reduce_cython;
  PyObject *__pyx_n_s_reduce_ex;
  PyObject *__pyx_n_s_refresh;
  PyObject *__pyx_n_s_remove;
  PyObject *__pyx_n_u_right;
  PyObject *__pyx_n_u_roboto;
  PyObject *__pyx_n_s_s;
  PyObject *__pyx_n_s_scale;
  PyObject *__pyx_n_s_scancode;
  PyObject *__pyx_n_u_scrollstate;
  PyObject *__pyx_n_s_seeking_cb;
  PyObject *__pyx_n_s_selection;
  PyObject *__pyx_n_s_selection_getter;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_send;
  PyObject *__pyx_n_s_set_align;
  PyObject *__pyx_n_s_set_blur;
  PyObject *__pyx_n_s_set_font;
  PyObject *__pyx_n_s_set_play;
  PyObject *__pyx_n_s_set_size;
  PyObject *__pyx_n_s_setstate;
  PyObject *__pyx_n_s_setstate_cython;
  PyObject *__pyx_n_s_setter;
  PyObject *__pyx_n_s_sig_on_off;
  PyObject *__pyx_n_s_six;
  PyObject *__pyx_n_s_size;
  PyObject *__pyx_n_u_size;
  PyObject *__pyx_kp_u_size_2;
  PyObject *__pyx_n_s_sort;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_kp_s_src_pyglui_custom_pxi;
  PyObject *__pyx_kp_s_src_pyglui_helpers_pxi;
  PyObject *__pyx_kp_s_src_pyglui_menus_pxi;
  PyObject *__pyx_kp_s_src_pyglui_timelines_pxi;
  PyObject *__pyx_kp_s_src_pyglui_ui_elements_pxi;
  PyObject *__pyx_kp_s_src_pyglui_ui_pyx;
  PyObject *__pyx_n_s_start;
  PyObject *__pyx_n_s_state;
  PyObject *__pyx_n_s_step;
  PyObject *__pyx_n_s_stop;
  PyObject *__pyx_kp_s_stringsource;
  PyObject *__pyx_n_u_submenus;
  PyObject *__pyx_n_s_sum;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_n_s_sx;
  PyObject *__pyx_n_s_sy;
  PyObject *__pyx_n_s_sync;
  PyObject *__pyx_n_s_sync_ctx;
  PyObject *__pyx_n_s_system;
  PyObject *__pyx_n_s_terminate;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_text;
  PyObject *__pyx_n_s_text_bounds;
  PyObject *__pyx_n_s_text_color;
  PyObject *__pyx_n_s_text_size;
  PyObject *__pyx_n_s_throw;
  PyObject *__pyx_n_s_time;
  PyObject *__pyx_n_s_to_str;
  PyObject *__pyx_n_s_toggle_iconified;
  PyObject *__pyx_n_s_tooltip;
  PyObject *__pyx_n_u_top;
  PyObject *__pyx_n_s_trigger_overlay_only;
  PyObject *__pyx_n_u_trim_left_ts;
  PyObject *__pyx_n_u_trim_right_ts;
  PyObject *__pyx_n_s_typed_val;
  PyObject *__pyx_n_u_uncollapsed_min_size;
  PyObject *__pyx_n_u_uncollapsed_pos;
  PyObject *__pyx_n_u_uncollapsed_size;
  PyObject *__pyx_n_s_unichr;
  PyObject *__pyx_n_s_unused_Input;
  PyObject *__pyx_n_s_update;
  PyObject *__pyx_n_s_update_button;
  PyObject *__pyx_n_s_update_char;
  PyObject *__pyx_n_s_update_clipboard;
  PyObject *__pyx_n_s_update_key;
  PyObject *__pyx_n_s_update_mouse;
  PyObject *__pyx_n_s_update_scroll;
  PyObject *__pyx_n_s_update_window;
  PyObject *__pyx_n_s_use_setstate;
  PyObject *__pyx_kp_u_utf_8;
  PyObject *__pyx_n_s_val;
  PyObject *__pyx_n_s_validate;
  PyObject *__pyx_n_s_value;
  PyObject *__pyx_n_s_version;
  PyObject *__pyx_n_s_visible;
  PyObject *__pyx_n_s_w;
  PyObject *__pyx_n_s_width;
  PyObject *__pyx_n_s_window;
  PyObject *__pyx_n_s_window_size;
  PyObject *__pyx_n_s_wrap;
  PyObject *__pyx_n_s_x;
  PyObject *__pyx_kp_u_x_2;
  PyObject *__pyx_kp_u_x_3;
  PyObject *__pyx_n_s_xpad;
  PyObject *__pyx_n_s_y;
  PyObject *__pyx_kp_u_y_2;
  PyObject *__pyx_n_s_ypad;
  PyObject *__pyx_n_s_zero_crossing;
  PyObject *__pyx_float__0;
  PyObject *__pyx_float__1;
  PyObject *__pyx_float__3;
  PyObject *__pyx_float__5;
  PyObject *__pyx_float__8;
  PyObject *__pyx_float__9;
  PyObject *__pyx_float_0_;
  PyObject *__pyx_float_1_;
  PyObject *__pyx_float_2_;
  PyObject *__pyx_float_3_;
  PyObject *__pyx_float_5_;
  PyObject *__pyx_float_8_;
  PyObject *__pyx_float__77;
  PyObject *__pyx_float_0_0;
  PyObject *__pyx_float_0_3;
  PyObject *__pyx_float_0_4;
  PyObject *__pyx_float_0_5;
  PyObject *__pyx_float_0_6;
  PyObject *__pyx_float_0_8;
  PyObject *__pyx_float_0_9;
  PyObject *__pyx_float_1_0;
  PyObject *__pyx_float_21_;
  PyObject *__pyx_float_0_25;
  PyObject *__pyx_float_0_75;
  PyObject *__pyx_float_0_84;
  PyObject *__pyx_float_10_0;
  PyObject *__pyx_float_10_5;
  PyObject *__pyx_float_130_;
  PyObject *__pyx_float_18_0;
  PyObject *__pyx_float_20_0;
  PyObject *__pyx_float_38_0;
  PyObject *__pyx_float_40_0;
  PyObject *__pyx_float_44_0;
  PyObject *__pyx_float_50_0;
  PyObject *__pyx_float_65_0;
  PyObject *__pyx_float_80_0;
  PyObject *__pyx_float_300_0;
  PyObject *__pyx_float__0000001;
  PyObject *__pyx_float_neg_0_0;
  PyObject *__pyx_float_neg_30_;
  PyObject *__pyx_float_neg_50_;
  PyObject *__pyx_float_neg_10_0;
  PyObject *__pyx_float_neg_20_0;
  PyObject *__pyx_float_neg_38_0;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_2;
  PyObject *__pyx_int_3;
  PyObject *__pyx_int_5;
  PyObject *__pyx_int_10;
  PyObject *__pyx_int_20;
  PyObject *__pyx_int_30;
  PyObject *__pyx_int_32;
  PyObject *__pyx_int_40;
  PyObject *__pyx_int_60;
  PyObject *__pyx_int_65;
  PyObject *__pyx_int_67;
  PyObject *__pyx_int_75;
  PyObject *__pyx_int_86;
  PyObject *__pyx_int_88;
  PyObject *__pyx_int_100;
  PyObject *__pyx_int_130;
  PyObject *__pyx_int_200;
  PyObject *__pyx_int_256;
  PyObject *__pyx_int_257;
  PyObject *__pyx_int_259;
  PyObject *__pyx_int_261;
  PyObject *__pyx_int_262;
  PyObject *__pyx_int_263;
  PyObject *__pyx_int_268;
  PyObject *__pyx_int_269;
  PyObject *__pyx_int_57375;
  PyObject *__pyx_int_57376;
  PyObject *__pyx_int_57396;
  PyObject *__pyx_int_57399;
  PyObject *__pyx_int_57412;
  PyObject *__pyx_int_57413;
  PyObject *__pyx_int_64022378;
  PyObject *__pyx_int_72070923;
  PyObject *__pyx_int_126102751;
  PyObject *__pyx_int_150088119;
  PyObject *__pyx_int_180366278;
  PyObject *__pyx_int_251175041;
  PyObject *__pyx_int_neg_1;
  PyObject *__pyx_int_neg_10;
  PyObject *__pyx_int_neg_25;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_k__2;
  PyObject *__pyx_k__27;
  PyObject *__pyx_k__67;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_k__89;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_k__90;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_k__91;
  PyObject *__pyx_codeobj_;
  PyObject *__pyx_slice__8;
  PyObject *__pyx_tuple__3;
  PyObject *__pyx_tuple__5;
  PyObject *__pyx_tuple__6;
  PyObject *__pyx_tuple__7;
  PyObject *__pyx_tuple__9;
  PyObject *__pyx_slice__26;
  PyObject *__pyx_tuple__10;
  PyObject *__pyx_tuple__11;
  PyObject *__pyx_tuple__12;
  PyObject *__pyx_tuple__13;
  PyObject *__pyx_tuple__14;
  PyObject *__pyx_tuple__15;
  PyObject *__pyx_tuple__16;
  PyObject *__pyx_tuple__17;
  PyObject *__pyx_tuple__18;
  PyObject *__pyx_tuple__19;
  PyObject *__pyx_tuple__20;
  PyObject *__pyx_tuple__21;
  PyObject *__pyx_tuple__22;
  PyObject *__pyx_tuple__23;
  PyObject *__pyx_tuple__24;
  PyObject *__pyx_tuple__25;
  PyObject *__pyx_tuple__28;
  PyObject *__pyx_tuple__30;
  PyObject *__pyx_tuple__32;
  PyObject *__pyx_tuple__33;
  PyObject *__pyx_tuple__35;
  PyObject *__pyx_tuple__36;
  PyObject *__pyx_tuple__37;
  PyObject *__pyx_tuple__38;
  PyObject *__pyx_tuple__39;
  PyObject *__pyx_tuple__40;
  PyObject *__pyx_tuple__41;
  PyObject *__pyx_tuple__42;
  PyObject *__pyx_tuple__43;
  PyObject *__pyx_tuple__44;
  PyObject *__pyx_tuple__45;
  PyObject *__pyx_tuple__46;
  PyObject *__pyx_tuple__47;
  PyObject *__pyx_tuple__48;
  PyObject *__pyx_tuple__49;
  PyObject *__pyx_tuple__51;
  PyObject *__pyx_tuple__52;
  PyObject *__pyx_tuple__53;
  PyObject *__pyx_tuple__54;
  PyObject *__pyx_tuple__55;
  PyObject *__pyx_tuple__56;
  PyObject *__pyx_tuple__57;
  PyObject *__pyx_tuple__58;
  PyObject *__pyx_tuple__59;
  PyObject *__pyx_tuple__60;
  PyObject *__pyx_tuple__62;
  PyObject *__pyx_tuple__63;
  PyObject *__pyx_tuple__64;
  PyObject *__pyx_tuple__65;
  PyObject *__pyx_tuple__66;
  PyObject *__pyx_tuple__68;
  PyObject *__pyx_tuple__69;
  PyObject *__pyx_tuple__70;
  PyObject *__pyx_tuple__71;
  PyObject *__pyx_tuple__72;
  PyObject *__pyx_tuple__73;
  PyObject *__pyx_tuple__74;
  PyObject *__pyx_tuple__75;
  PyObject *__pyx_tuple__76;
  PyObject *__pyx_tuple__77;
  PyObject *__pyx_tuple__78;
  PyObject *__pyx_tuple__79;
  PyObject *__pyx_tuple__80;
  PyObject *__pyx_tuple__81;
  PyObject *__pyx_tuple__82;
  PyObject *__pyx_tuple__83;
  PyObject *__pyx_tuple__84;
  PyObject *__pyx_tuple__85;
  PyObject *__pyx_tuple__86;
  PyObject *__pyx_tuple__87;
  PyObject *__pyx_tuple__92;
  PyObject *__pyx_tuple__94;
  PyObject *__pyx_tuple__95;
  PyObject *__pyx_tuple__98;
  PyObject *__pyx_tuple__99;
  PyObject *__pyx_codeobj__4;
  PyObject *__pyx_tuple__104;
  PyObject *__pyx_tuple__106;
  PyObject *__pyx_tuple__108;
  PyObject *__pyx_tuple__110;
  PyObject *__pyx_tuple__112;
  PyObject *__pyx_tuple__114;
  PyObject *__pyx_tuple__116;
  PyObject *__pyx_tuple__118;
  PyObject *__pyx_tuple__120;
  PyObject *__pyx_tuple__122;
  PyObject *__pyx_tuple__124;
  PyObject *__pyx_tuple__126;
  PyObject *__pyx_tuple__128;
  PyObject *__pyx_tuple__132;
  PyObject *__pyx_tuple__135;
  PyObject *__pyx_tuple__137;
  PyObject *__pyx_tuple__139;
  PyObject *__pyx_tuple__140;
  PyObject *__pyx_tuple__142;
  PyObject *__pyx_tuple__143;
  PyObject *__pyx_tuple__145;
  PyObject *__pyx_tuple__147;
  PyObject *__pyx_tuple__152;
  PyObject *__pyx_tuple__154;
  PyObject *__pyx_tuple__155;
  PyObject *__pyx_tuple__161;
  PyObject *__pyx_tuple__163;
  PyObject *__pyx_tuple__167;
  PyObject *__pyx_tuple__170;
  PyObject *__pyx_tuple__172;
  PyObject *__pyx_tuple__177;
  PyObject *__pyx_tuple__180;
  PyObject *__pyx_tuple__186;
  PyObject *__pyx_tuple__188;
  PyObject *__pyx_tuple__192;
  PyObject *__pyx_tuple__197;
  PyObject *__pyx_tuple__202;
  PyObject *__pyx_tuple__208;
  PyObject *__pyx_tuple__210;
  PyObject *__pyx_tuple__214;
  PyObject *__pyx_tuple__216;
  PyObject *__pyx_tuple__218;
  PyObject *__pyx_tuple__223;
  PyObject *__pyx_tuple__228;
  PyObject *__pyx_tuple__230;
  PyObject *__pyx_tuple__232;
  PyObject *__pyx_tuple__235;
  PyObject *__pyx_tuple__237;
  PyObject *__pyx_tuple__239;
  PyObject *__pyx_tuple__245;
  PyObject *__pyx_tuple__249;
  PyObject *__pyx_tuple__256;
  PyObject *__pyx_tuple__258;
  PyObject *__pyx_tuple__260;
  PyObject *__pyx_tuple__264;
  PyObject *__pyx_tuple__266;
  PyObject *__pyx_tuple__268;
  PyObject *__pyx_tuple__272;
  PyObject *__pyx_tuple__274;
  PyObject *__pyx_tuple__276;
  PyObject *__pyx_tuple__282;
  PyObject *__pyx_tuple__284;
  PyObject *__pyx_tuple__286;
  PyObject *__pyx_tuple__290;
  PyObject *__pyx_tuple__293;
  PyObject *__pyx_tuple__295;
  PyObject *__pyx_tuple__297;
  PyObject *__pyx_tuple__301;
  PyObject *__pyx_tuple__305;
  PyObject *__pyx_tuple__318;
  PyObject *__pyx_tuple__320;
  PyObject *__pyx_tuple__326;
  PyObject *__pyx_codeobj__29;
  PyObject *__pyx_codeobj__31;
  PyObject *__pyx_codeobj__61;
  PyObject *__pyx_codeobj__96;
  PyObject *__pyx_codeobj__100;
  PyObject *__pyx_codeobj__101;
  PyObject *__pyx_codeobj__102;
  PyObject *__pyx_codeobj__103;
  PyObject *__pyx_codeobj__105;
  PyObject *__pyx_codeobj__107;
  PyObject *__pyx_codeobj__109;
  PyObject *__pyx_codeobj__111;
  PyObject *__pyx_codeobj__113;
  PyObject *__pyx_codeobj__115;
  PyObject *__pyx_codeobj__117;
  PyObject *__pyx_codeobj__119;
  PyObject *__pyx_codeobj__121;
  PyObject *__pyx_codeobj__123;
  PyObject *__pyx_codeobj__125;
  PyObject *__pyx_codeobj__127;
  PyObject *__pyx_codeobj__129;
  PyObject *__pyx_codeobj__130;
  PyObject *__pyx_codeobj__131;
  PyObject *__pyx_codeobj__133;
  PyObject *__pyx_codeobj__134;
  PyObject *__pyx_codeobj__136;
  PyObject *__pyx_codeobj__138;
  PyObject *__pyx_codeobj__141;
  PyObject *__pyx_codeobj__144;
  PyObject *__pyx_codeobj__146;
  PyObject *__pyx_codeobj__148;
  PyObject *__pyx_codeobj__149;
  PyObject *__pyx_codeobj__150;
  PyObject *__pyx_codeobj__151;
  PyObject *__pyx_codeobj__153;
  PyObject *__pyx_codeobj__156;
  PyObject *__pyx_codeobj__157;
  PyObject *__pyx_codeobj__158;
  PyObject *__pyx_codeobj__159;
  PyObject *__pyx_codeobj__160;
  PyObject *__pyx_codeobj__162;
  PyObject *__pyx_codeobj__164;
  PyObject *__pyx_codeobj__165;
  PyObject *__pyx_codeobj__166;
  PyObject *__pyx_codeobj__168;
  PyObject *__pyx_codeobj__169;
  PyObject *__pyx_codeobj__171;
  PyObject *__pyx_codeobj__173;
  PyObject *__pyx_codeobj__174;
  PyObject *__pyx_codeobj__175;
  PyObject *__pyx_codeobj__176;
  PyObject *__pyx_codeobj__178;
  PyObject *__pyx_codeobj__179;
  PyObject *__pyx_codeobj__181;
  PyObject *__pyx_codeobj__182;
  PyObject *__pyx_codeobj__183;
  PyObject *__pyx_codeobj__184;
  PyObject *__pyx_codeobj__185;
  PyObject *__pyx_codeobj__187;
  PyObject *__pyx_codeobj__189;
  PyObject *__pyx_codeobj__190;
  PyObject *__pyx_codeobj__191;
  PyObject *__pyx_codeobj__193;
  PyObject *__pyx_codeobj__194;
  PyObject *__pyx_codeobj__195;
  PyObject *__pyx_codeobj__196;
  PyObject *__pyx_codeobj__198;
  PyObject *__pyx_codeobj__199;
  PyObject *__pyx_codeobj__200;
  PyObject *__pyx_codeobj__201;
  PyObject *__pyx_codeobj__203;
  PyObject *__pyx_codeobj__204;
  PyObject *__pyx_codeobj__205;
  PyObject *__pyx_codeobj__206;
  PyObject *__pyx_codeobj__207;
  PyObject *__pyx_codeobj__209;
  PyObject *__pyx_codeobj__211;
  PyObject *__pyx_codeobj__212;
  PyObject *__pyx_codeobj__213;
  PyObject *__pyx_codeobj__215;
  PyObject *__pyx_codeobj__217;
  PyObject *__pyx_codeobj__219;
  PyObject *__pyx_codeobj__220;
  PyObject *__pyx_codeobj__221;
  PyObject *__pyx_codeobj__222;
  PyObject *__pyx_codeobj__224;
  PyObject *__pyx_codeobj__225;
  PyObject *__pyx_codeobj__226;
  PyObject *__pyx_codeobj__227;
  PyObject *__pyx_codeobj__229;
  PyObject *__pyx_codeobj__231;
  PyObject *__pyx_codeobj__233;
  PyObject *__pyx_codeobj__234;
  PyObject *__pyx_codeobj__236;
  PyObject *__pyx_codeobj__238;
  PyObject *__pyx_codeobj__240;
  PyObject *__pyx_codeobj__241;
  PyObject *__pyx_codeobj__242;
  PyObject *__pyx_codeobj__243;
  PyObject *__pyx_codeobj__244;
  PyObject *__pyx_codeobj__246;
  PyObject *__pyx_codeobj__247;
  PyObject *__pyx_codeobj__248;
  PyObject *__pyx_codeobj__250;
  PyObject *__pyx_codeobj__251;
  PyObject *__pyx_codeobj__252;
  PyObject *__pyx_codeobj__253;
  PyObject *__pyx_codeobj__254;
  PyObject *__pyx_codeobj__255;
  PyObject *__pyx_codeobj__257;
  PyObject *__pyx_codeobj__259;
  PyObject *__pyx_codeobj__261;
  PyObject *__pyx_codeobj__262;
  PyObject *__pyx_codeobj__263;
  PyObject *__pyx_codeobj__265;
  PyObject *__pyx_codeobj__267;
  PyObject *__pyx_codeobj__269;
  PyObject *__pyx_codeobj__270;
  PyObject *__pyx_codeobj__271;
  PyObject *__pyx_codeobj__273;
  PyObject *__pyx_codeobj__275;
  PyObject *__pyx_codeobj__277;
  PyObject *__pyx_codeobj__278;
  PyObject *__pyx_codeobj__279;
  PyObject *__pyx_codeobj__280;
  PyObject *__pyx_codeobj__281;
  PyObject *__pyx_codeobj__283;
  PyObject *__pyx_codeobj__285;
  PyObject *__pyx_codeobj__287;
  PyObject *__pyx_codeobj__288;
  PyObject *__pyx_codeobj__289;
  PyObject *__pyx_codeobj__291;
  PyObject *__pyx_codeobj__292;
  PyObject *__pyx_codeobj__294;
  PyObject *__pyx_codeobj__296;
  PyObject *__pyx_codeobj__298;
  PyObject *__pyx_codeobj__299;
  PyObject *__pyx_codeobj__300;
  PyObject *__pyx_codeobj__302;
  PyObject *__pyx_codeobj__303;
  PyObject *__pyx_codeobj__304;
  PyObject *__pyx_codeobj__306;
  PyObject *__pyx_codeobj__307;
  PyObject *__pyx_codeobj__308;
  PyObject *__pyx_codeobj__309;
  PyObject *__pyx_codeobj__310;
  PyObject *__pyx_codeobj__311;
  PyObject *__pyx_codeobj__312;
  PyObject *__pyx_codeobj__313;
  PyObject *__pyx_codeobj__314;
  PyObject *__pyx_codeobj__315;
  PyObject *__pyx_codeobj__316;
  PyObject *__pyx_codeobj__317;
  PyObject *__pyx_codeobj__319;
  PyObject *__pyx_codeobj__321;
  PyObject *__pyx_codeobj__322;
  PyObject *__pyx_codeobj__323;
  PyObject *__pyx_codeobj__324;
  PyObject *__pyx_codeobj__325;
  PyObject *__pyx_codeobj__327;
  PyObject *__pyx_codeobj__328;
  PyObject *__pyx_codeobj__329;
} __pyx_mstate;

#ifdef __cplusplus
namespace {
  extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_4cygl_5utils_RGBA);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_4cygl_5utils_Render_Target);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_4cygl_5utils_Named_Texture);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_4cygl_5utils_Sphere);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_UI);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_UI);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_UI_element);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_UI_element);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Slider);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Slider);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Switch);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Switch);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Selector);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Selector);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Text_Input);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Text_Input);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Slider_Text_Input);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Slider_Text_Input);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Button);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Button);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Separator);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Separator);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Info_Text);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Info_Text);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Color_Legend);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Color_Legend);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Thumb);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Thumb);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Icon);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Icon);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Hot_Key);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Hot_Key);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Seek_Bar);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Seek_Bar);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Timeline);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Timeline);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Base_Menu);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Base_Menu);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Movable_Menu);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Movable_Menu);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Stretching_Menu);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Stretching_Menu);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Growing_Menu);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Growing_Menu);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Scrolling_Menu);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Scrolling_Menu);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Container);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Container);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Timeline_Menu);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Synced_Value);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Synced_Value);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Input);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Input);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Draggable);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Draggable);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_FitBox);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_FitBox);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui_Vec2);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui_Vec2);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit__);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__);
  Py_CLEAR(clear_module_state->__pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit__);
  Py_CLEAR(clear_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm);
  Py_CLEAR(clear_module_state->__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm);
  Py_CLEAR(clear_module_state->__pyx_kp_u_02_0f_06_3f);
  Py_CLEAR(clear_module_state->__pyx_kp_u_0_2f);
  Py_CLEAR(clear_module_state->__pyx_kp_u_1_31_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
  Py_CLEAR(clear_module_state->__pyx_n_s_AttributeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu_collect_in_window);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu_extend);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu_insert);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu_remove);
  Py_CLEAR(clear_module_state->__pyx_n_s_Base_Menu_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_Button);
  Py_CLEAR(clear_module_state->__pyx_n_s_Button___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Button___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Button_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Button_handle_input);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Buttons);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Can_only_append_UI_elements_not);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Chars);
  Py_CLEAR(clear_module_state->__pyx_n_s_Color_Legend);
  Py_CLEAR(clear_module_state->__pyx_n_s_Color_Legend___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Color_Legend___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Color_Legend_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Color_Legend_precompute);
  Py_CLEAR(clear_module_state->__pyx_n_s_Container);
  Py_CLEAR(clear_module_state->__pyx_n_u_Container);
  Py_CLEAR(clear_module_state->__pyx_n_s_Container___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Container___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Container_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Container_draw_overlay);
  Py_CLEAR(clear_module_state->__pyx_n_s_Container_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Container_init);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Current_Input_Mouse_pos);
  Py_CLEAR(clear_module_state->__pyx_n_u_Darwin);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_Draggable);
  Py_CLEAR(clear_module_state->__pyx_n_s_Draggable___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Draggable___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Draggable_pre_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_FitBox);
  Py_CLEAR(clear_module_state->__pyx_n_s_FitBox___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_FitBox___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_kp_u_FitBox_design_org);
  Py_CLEAR(clear_module_state->__pyx_n_s_FitBox_mouse_over);
  Py_CLEAR(clear_module_state->__pyx_n_s_FitBox_mouse_over_margin);
  Py_CLEAR(clear_module_state->__pyx_n_s_Growing_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_Growing_Menu___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Growing_Menu___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Growing_Menu_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Growing_Menu_draw_overlay);
  Py_CLEAR(clear_module_state->__pyx_n_s_Growing_Menu_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Growing_Menu_precompute);
  Py_CLEAR(clear_module_state->__pyx_n_s_Growing_Menu_toggle_iconified);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Header_Positon_argument_needs_to);
  Py_CLEAR(clear_module_state->__pyx_n_s_Horizontally_Stretching_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_Horizontally_Stretching_Menu___r);
  Py_CLEAR(clear_module_state->__pyx_n_s_Horizontally_Stretching_Menu___s);
  Py_CLEAR(clear_module_state->__pyx_n_s_Horizontally_Stretching_Menu_dra);
  Py_CLEAR(clear_module_state->__pyx_n_s_Horizontally_Stretching_Menu_dra_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Horizontally_Stretching_Menu_han);
  Py_CLEAR(clear_module_state->__pyx_n_s_Hot_Key);
  Py_CLEAR(clear_module_state->__pyx_n_s_Hot_Key___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Hot_Key___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Hot_Key_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Hot_Key_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_Icon);
  Py_CLEAR(clear_module_state->__pyx_n_s_Icon___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Icon___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Icon_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Icon_draw_overlay);
  Py_CLEAR(clear_module_state->__pyx_n_s_Icon_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Indicator_values_are_required_to);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info_Text);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info_Text___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info_Text___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info_Text_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info_Text_precompute);
  Py_CLEAR(clear_module_state->__pyx_n_s_Input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Input___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Input___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Input_purge);
  Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Keys);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Mouse_delta);
  Py_CLEAR(clear_module_state->__pyx_n_s_Movable_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_Movable_Menu___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Movable_Menu___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_kp_u_None);
  Py_CLEAR(clear_module_state->__pyx_n_s_NotImplemented);
  Py_CLEAR(clear_module_state->__pyx_kp_u_OpenSans_Regular_ttf);
  Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_CFunc_float__lParenUI_elem);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Roboto_Regular_ttf);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Scroll);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Scrolling_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_Scrolling_Menu_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Scrolling_Menu___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Scrolling_Menu___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Scrolling_Menu_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Scrolling_Menu_draw_overlay);
  Py_CLEAR(clear_module_state->__pyx_n_s_Scrolling_Menu_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Scrolling_Menu_toggle_iconified);
  Py_CLEAR(clear_module_state->__pyx_n_s_Seek_Bar);
  Py_CLEAR(clear_module_state->__pyx_n_s_Seek_Bar___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Seek_Bar___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Seek_Bar_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Seek_Bar_draw_overlay);
  Py_CLEAR(clear_module_state->__pyx_n_s_Seek_Bar_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Seek_Bar_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_Selector);
  Py_CLEAR(clear_module_state->__pyx_n_s_Selector___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Selector___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Selector__on_change);
  Py_CLEAR(clear_module_state->__pyx_n_s_Selector_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Selector_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Selector_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_Separator);
  Py_CLEAR(clear_module_state->__pyx_n_s_Separator___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Separator___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Separator_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Separator_precompute);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider_Text_Input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider_Text_Input___reduce_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider_Text_Input___setstate_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_Slider_validate);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Slider_values_should_be_float_or);
  Py_CLEAR(clear_module_state->__pyx_n_s_Stretching_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_Stretching_Menu___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Stretching_Menu___setstate_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_Stretching_Menu_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Stretching_Menu_draw_overlay);
  Py_CLEAR(clear_module_state->__pyx_n_s_Stretching_Menu_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Switch);
  Py_CLEAR(clear_module_state->__pyx_n_s_Switch___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Switch___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Switch_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Switch_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Switch_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_Synced_Value);
  Py_CLEAR(clear_module_state->__pyx_n_s_Synced_Value___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Synced_Value___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Synced_value_s_is_not_part_of_se);
  Py_CLEAR(clear_module_state->__pyx_n_s_Text_Input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Text_Input___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Text_Input___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Text_Input_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Text_Input_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Text_Input_pre_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Text_Input_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_Thumb);
  Py_CLEAR(clear_module_state->__pyx_n_s_Thumb___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Thumb___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Thumb_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Thumb_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_Thumb_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu_extend);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu_insert);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu_remove);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_Menu_toggle_iconified);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_draw_label_default);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeline_refresh);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI);
  Py_CLEAR(clear_module_state->__pyx_kp_u_UI_Framebuffer_could_not_be_crea);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_add_font);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_collect_menus);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element_draw_overlay);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element_pre_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element_precompute);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_element_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_extend);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_remove);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_terminate);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_update_button);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_update_char);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_update_clipboard);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_update_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_update_mouse);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_update_scroll);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_update_window);
  Py_CLEAR(clear_module_state->__pyx_n_s_Unused_Input);
  Py_CLEAR(clear_module_state->__pyx_n_u_Unused_Input);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Vec2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Vec2___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Vec2___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s__330);
  Py_CLEAR(clear_module_state->__pyx_kp_u__34);
  Py_CLEAR(clear_module_state->__pyx_n_s__50);
  Py_CLEAR(clear_module_state->__pyx_kp_u__88);
  Py_CLEAR(clear_module_state->__pyx_kp_u__93);
  Py_CLEAR(clear_module_state->__pyx_n_s__97);
  Py_CLEAR(clear_module_state->__pyx_n_s_action);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_font);
  Py_CLEAR(clear_module_state->__pyx_n_s_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
  Py_CLEAR(clear_module_state->__pyx_n_s_arrest_axis);
  Py_CLEAR(clear_module_state->__pyx_n_s_as_tuple);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_n_s_attribute_context);
  Py_CLEAR(clear_module_state->__pyx_n_s_attribute_name);
  Py_CLEAR(clear_module_state->__pyx_n_u_backwards);
  Py_CLEAR(clear_module_state->__pyx_n_u_bottom);
  Py_CLEAR(clear_module_state->__pyx_n_s_button);
  Py_CLEAR(clear_module_state->__pyx_n_u_buttons);
  Py_CLEAR(clear_module_state->__pyx_n_s_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_catch_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_center);
  Py_CLEAR(clear_module_state->__pyx_n_s_centered);
  Py_CLEAR(clear_module_state->__pyx_n_s_cfunc_to_py);
  Py_CLEAR(clear_module_state->__pyx_n_s_char);
  Py_CLEAR(clear_module_state->__pyx_n_u_chars);
  Py_CLEAR(clear_module_state->__pyx_n_s_chr);
  Py_CLEAR(clear_module_state->__pyx_n_s_cinit___locals_default_selecti);
  Py_CLEAR(clear_module_state->__pyx_n_s_cinit___locals_default_selecti_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_cinit___locals_lambda);
  Py_CLEAR(clear_module_state->__pyx_n_s_cinit___locals_set_play);
  Py_CLEAR(clear_module_state->__pyx_n_s_class);
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_clear_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_click_cb);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_clipboard);
  Py_CLEAR(clear_module_state->__pyx_n_u_clipboard);
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_collapsed);
  Py_CLEAR(clear_module_state->__pyx_n_u_collapsed);
  Py_CLEAR(clear_module_state->__pyx_n_s_collect_in_window);
  Py_CLEAR(clear_module_state->__pyx_n_s_collect_menus);
  Py_CLEAR(clear_module_state->__pyx_n_s_collections);
  Py_CLEAR(clear_module_state->__pyx_kp_u_comptd_org);
  Py_CLEAR(clear_module_state->__pyx_n_s_configuration);
  Py_CLEAR(clear_module_state->__pyx_n_s_content_height);
  Py_CLEAR(clear_module_state->__pyx_n_s_contextlib);
  Py_CLEAR(clear_module_state->__pyx_n_s_contextmanager);
  Py_CLEAR(clear_module_state->__pyx_n_s_cysignals);
  Py_CLEAR(clear_module_state->__pyx_kp_u_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_default_selection_getter);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_dirname);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_display_format);
  Py_CLEAR(clear_module_state->__pyx_n_s_draw);
  Py_CLEAR(clear_module_state->__pyx_n_s_draw_data_callback);
  Py_CLEAR(clear_module_state->__pyx_n_s_draw_label_callback);
  Py_CLEAR(clear_module_state->__pyx_n_s_draw_label_default);
  Py_CLEAR(clear_module_state->__pyx_n_s_draw_overlay);
  Py_CLEAR(clear_module_state->__pyx_n_s_e);
  Py_CLEAR(clear_module_state->__pyx_n_s_elm);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
  Py_CLEAR(clear_module_state->__pyx_n_s_enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_eval);
  Py_CLEAR(clear_module_state->__pyx_n_s_exit);
  Py_CLEAR(clear_module_state->__pyx_n_s_extend);
  Py_CLEAR(clear_module_state->__pyx_n_s_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_font_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_font_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_format);
  Py_CLEAR(clear_module_state->__pyx_n_u_forwards);
  Py_CLEAR(clear_module_state->__pyx_n_s_frange);
  Py_CLEAR(clear_module_state->__pyx_n_s_function);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_get);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_all_font_paths);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_opensans_font_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_pupil_icons_font_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_roboto_font_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_getter);
  Py_CLEAR(clear_module_state->__pyx_n_s_h);
  Py_CLEAR(clear_module_state->__pyx_n_s_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_handle_start_reference);
  Py_CLEAR(clear_module_state->__pyx_kp_u_has_no_attribute);
  Py_CLEAR(clear_module_state->__pyx_kp_u_has_no_entry);
  Py_CLEAR(clear_module_state->__pyx_n_s_header_pos);
  Py_CLEAR(clear_module_state->__pyx_n_s_header_pos_id);
  Py_CLEAR(clear_module_state->__pyx_n_u_headline);
  Py_CLEAR(clear_module_state->__pyx_n_s_height);
  Py_CLEAR(clear_module_state->__pyx_n_u_hidden);
  Py_CLEAR(clear_module_state->__pyx_n_s_hotkey);
  Py_CLEAR(clear_module_state->__pyx_n_s_id);
  Py_CLEAR(clear_module_state->__pyx_n_s_idx);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_s_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_indicator_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_indicator_stop);
  Py_CLEAR(clear_module_state->__pyx_n_s_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_insert);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_kp_u_is_of_type);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_s_join);
  Py_CLEAR(clear_module_state->__pyx_n_s_key);
  Py_CLEAR(clear_module_state->__pyx_n_u_keys);
  Py_CLEAR(clear_module_state->__pyx_n_s_kwargs);
  Py_CLEAR(clear_module_state->__pyx_n_s_label);
  Py_CLEAR(clear_module_state->__pyx_n_u_label);
  Py_CLEAR(clear_module_state->__pyx_n_s_label_font);
  Py_CLEAR(clear_module_state->__pyx_n_s_label_getter);
  Py_CLEAR(clear_module_state->__pyx_n_s_label_line_height);
  Py_CLEAR(clear_module_state->__pyx_n_s_label_offset_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_label_offset_x);
  Py_CLEAR(clear_module_state->__pyx_n_s_label_offset_y);
  Py_CLEAR(clear_module_state->__pyx_n_s_labels);
  Py_CLEAR(clear_module_state->__pyx_n_u_left);
  Py_CLEAR(clear_module_state->__pyx_n_s_line_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_m);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_margin);
  Py_CLEAR(clear_module_state->__pyx_n_s_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_ts);
  Py_CLEAR(clear_module_state->__pyx_n_s_min);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_size);
  Py_CLEAR(clear_module_state->__pyx_n_u_min_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_ts);
  Py_CLEAR(clear_module_state->__pyx_n_s_mods);
  Py_CLEAR(clear_module_state->__pyx_n_s_mouse_over);
  Py_CLEAR(clear_module_state->__pyx_n_s_mouse_over_margin);
  Py_CLEAR(clear_module_state->__pyx_n_s_mx);
  Py_CLEAR(clear_module_state->__pyx_n_s_my);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_namedtuple);
  Py_CLEAR(clear_module_state->__pyx_n_s_nested);
  Py_CLEAR(clear_module_state->__pyx_n_s_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_value);
  Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_CLEAR(clear_module_state->__pyx_n_s_obj);
  Py_CLEAR(clear_module_state->__pyx_n_s_objs);
  Py_CLEAR(clear_module_state->__pyx_n_s_off_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_off_val);
  Py_CLEAR(clear_module_state->__pyx_n_s_on_change);
  Py_CLEAR(clear_module_state->__pyx_n_s_on_change_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_on_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_on_val);
  Py_CLEAR(clear_module_state->__pyx_n_u_opensans);
  Py_CLEAR(clear_module_state->__pyx_n_s_os);
  Py_CLEAR(clear_module_state->__pyx_n_s_outer_label);
  Py_CLEAR(clear_module_state->__pyx_n_s_padding);
  Py_CLEAR(clear_module_state->__pyx_n_s_parent);
  Py_CLEAR(clear_module_state->__pyx_n_s_parent_read_only);
  Py_CLEAR(clear_module_state->__pyx_n_s_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_platform);
  Py_CLEAR(clear_module_state->__pyx_n_s_play);
  Py_CLEAR(clear_module_state->__pyx_n_u_play);
  Py_CLEAR(clear_module_state->__pyx_n_u_playback_speed);
  Py_CLEAR(clear_module_state->__pyx_n_s_playback_time_setter);
  Py_CLEAR(clear_module_state->__pyx_n_s_pop);
  Py_CLEAR(clear_module_state->__pyx_n_s_pop_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_pos);
  Py_CLEAR(clear_module_state->__pyx_n_u_pos);
  Py_CLEAR(clear_module_state->__pyx_n_s_position);
  Py_CLEAR(clear_module_state->__pyx_n_s_pre_handle_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_precompute);
  Py_CLEAR(clear_module_state->__pyx_n_u_pupil_icons);
  Py_CLEAR(clear_module_state->__pyx_kp_u_pupil_icons_ttf);
  Py_CLEAR(clear_module_state->__pyx_n_s_purge);
  Py_CLEAR(clear_module_state->__pyx_n_s_push_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyglui_ui);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Base_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Movable_Menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_UI_element);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_recent_idx_ts_getter);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
  Py_CLEAR(clear_module_state->__pyx_n_s_refresh);
  Py_CLEAR(clear_module_state->__pyx_n_s_remove);
  Py_CLEAR(clear_module_state->__pyx_n_u_right);
  Py_CLEAR(clear_module_state->__pyx_n_u_roboto);
  Py_CLEAR(clear_module_state->__pyx_n_s_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_scale);
  Py_CLEAR(clear_module_state->__pyx_n_s_scancode);
  Py_CLEAR(clear_module_state->__pyx_n_u_scrollstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_seeking_cb);
  Py_CLEAR(clear_module_state->__pyx_n_s_selection);
  Py_CLEAR(clear_module_state->__pyx_n_s_selection_getter);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_n_s_send);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_align);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_blur);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_font);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_play);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_setter);
  Py_CLEAR(clear_module_state->__pyx_n_s_sig_on_off);
  Py_CLEAR(clear_module_state->__pyx_n_s_six);
  Py_CLEAR(clear_module_state->__pyx_n_s_size);
  Py_CLEAR(clear_module_state->__pyx_n_u_size);
  Py_CLEAR(clear_module_state->__pyx_kp_u_size_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_sort);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_kp_s_src_pyglui_custom_pxi);
  Py_CLEAR(clear_module_state->__pyx_kp_s_src_pyglui_helpers_pxi);
  Py_CLEAR(clear_module_state->__pyx_kp_s_src_pyglui_menus_pxi);
  Py_CLEAR(clear_module_state->__pyx_kp_s_src_pyglui_timelines_pxi);
  Py_CLEAR(clear_module_state->__pyx_kp_s_src_pyglui_ui_elements_pxi);
  Py_CLEAR(clear_module_state->__pyx_kp_s_src_pyglui_ui_pyx);
  Py_CLEAR(clear_module_state->__pyx_n_s_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_step);
  Py_CLEAR(clear_module_state->__pyx_n_s_stop);
  Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
  Py_CLEAR(clear_module_state->__pyx_n_u_submenus);
  Py_CLEAR(clear_module_state->__pyx_n_s_sum);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_n_s_sx);
  Py_CLEAR(clear_module_state->__pyx_n_s_sy);
  Py_CLEAR(clear_module_state->__pyx_n_s_sync);
  Py_CLEAR(clear_module_state->__pyx_n_s_sync_ctx);
  Py_CLEAR(clear_module_state->__pyx_n_s_system);
  Py_CLEAR(clear_module_state->__pyx_n_s_terminate);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_text);
  Py_CLEAR(clear_module_state->__pyx_n_s_text_bounds);
  Py_CLEAR(clear_module_state->__pyx_n_s_text_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_text_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_throw);
  Py_CLEAR(clear_module_state->__pyx_n_s_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_toggle_iconified);
  Py_CLEAR(clear_module_state->__pyx_n_s_tooltip);
  Py_CLEAR(clear_module_state->__pyx_n_u_top);
  Py_CLEAR(clear_module_state->__pyx_n_s_trigger_overlay_only);
  Py_CLEAR(clear_module_state->__pyx_n_u_trim_left_ts);
  Py_CLEAR(clear_module_state->__pyx_n_u_trim_right_ts);
  Py_CLEAR(clear_module_state->__pyx_n_s_typed_val);
  Py_CLEAR(clear_module_state->__pyx_n_u_uncollapsed_min_size);
  Py_CLEAR(clear_module_state->__pyx_n_u_uncollapsed_pos);
  Py_CLEAR(clear_module_state->__pyx_n_u_uncollapsed_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_unichr);
  Py_CLEAR(clear_module_state->__pyx_n_s_unused_Input);
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_button);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_char);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_clipboard);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_mouse);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_scroll);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_window);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
  Py_CLEAR(clear_module_state->__pyx_kp_u_utf_8);
  Py_CLEAR(clear_module_state->__pyx_n_s_val);
  Py_CLEAR(clear_module_state->__pyx_n_s_validate);
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_visible);
  Py_CLEAR(clear_module_state->__pyx_n_s_w);
  Py_CLEAR(clear_module_state->__pyx_n_s_width);
  Py_CLEAR(clear_module_state->__pyx_n_s_window);
  Py_CLEAR(clear_module_state->__pyx_n_s_window_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_wrap);
  Py_CLEAR(clear_module_state->__pyx_n_s_x);
  Py_CLEAR(clear_module_state->__pyx_kp_u_x_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_x_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_xpad);
  Py_CLEAR(clear_module_state->__pyx_n_s_y);
  Py_CLEAR(clear_module_state->__pyx_kp_u_y_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ypad);
  Py_CLEAR(clear_module_state->__pyx_n_s_zero_crossing);
  Py_CLEAR(clear_module_state->__pyx_float__0);
  Py_CLEAR(clear_module_state->__pyx_float__1);
  Py_CLEAR(clear_module_state->__pyx_float__3);
  Py_CLEAR(clear_module_state->__pyx_float__5);
  Py_CLEAR(clear_module_state->__pyx_float__8);
  Py_CLEAR(clear_module_state->__pyx_float__9);
  Py_CLEAR(clear_module_state->__pyx_float_0_);
  Py_CLEAR(clear_module_state->__pyx_float_1_);
  Py_CLEAR(clear_module_state->__pyx_float_2_);
  Py_CLEAR(clear_module_state->__pyx_float_3_);
  Py_CLEAR(clear_module_state->__pyx_float_5_);
  Py_CLEAR(clear_module_state->__pyx_float_8_);
  Py_CLEAR(clear_module_state->__pyx_float__77);
  Py_CLEAR(clear_module_state->__pyx_float_0_0);
  Py_CLEAR(clear_module_state->__pyx_float_0_3);
  Py_CLEAR(clear_module_state->__pyx_float_0_4);
  Py_CLEAR(clear_module_state->__pyx_float_0_5);
  Py_CLEAR(clear_module_state->__pyx_float_0_6);
  Py_CLEAR(clear_module_state->__pyx_float_0_8);
  Py_CLEAR(clear_module_state->__pyx_float_0_9);
  Py_CLEAR(clear_module_state->__pyx_float_1_0);
  Py_CLEAR(clear_module_state->__pyx_float_21_);
  Py_CLEAR(clear_module_state->__pyx_float_0_25);
  Py_CLEAR(clear_module_state->__pyx_float_0_75);
  Py_CLEAR(clear_module_state->__pyx_float_0_84);
  Py_CLEAR(clear_module_state->__pyx_float_10_0);
  Py_CLEAR(clear_module_state->__pyx_float_10_5);
  Py_CLEAR(clear_module_state->__pyx_float_130_);
  Py_CLEAR(clear_module_state->__pyx_float_18_0);
  Py_CLEAR(clear_module_state->__pyx_float_20_0);
  Py_CLEAR(clear_module_state->__pyx_float_38_0);
  Py_CLEAR(clear_module_state->__pyx_float_40_0);
  Py_CLEAR(clear_module_state->__pyx_float_44_0);
  Py_CLEAR(clear_module_state->__pyx_float_50_0);
  Py_CLEAR(clear_module_state->__pyx_float_65_0);
  Py_CLEAR(clear_module_state->__pyx_float_80_0);
  Py_CLEAR(clear_module_state->__pyx_float_300_0);
  Py_CLEAR(clear_module_state->__pyx_float__0000001);
  Py_CLEAR(clear_module_state->__pyx_float_neg_0_0);
  Py_CLEAR(clear_module_state->__pyx_float_neg_30_);
  Py_CLEAR(clear_module_state->__pyx_float_neg_50_);
  Py_CLEAR(clear_module_state->__pyx_float_neg_10_0);
  Py_CLEAR(clear_module_state->__pyx_float_neg_20_0);
  Py_CLEAR(clear_module_state->__pyx_float_neg_38_0);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_2);
  Py_CLEAR(clear_module_state->__pyx_int_3);
  Py_CLEAR(clear_module_state->__pyx_int_5);
  Py_CLEAR(clear_module_state->__pyx_int_10);
  Py_CLEAR(clear_module_state->__pyx_int_20);
  Py_CLEAR(clear_module_state->__pyx_int_30);
  Py_CLEAR(clear_module_state->__pyx_int_32);
  Py_CLEAR(clear_module_state->__pyx_int_40);
  Py_CLEAR(clear_module_state->__pyx_int_60);
  Py_CLEAR(clear_module_state->__pyx_int_65);
  Py_CLEAR(clear_module_state->__pyx_int_67);
  Py_CLEAR(clear_module_state->__pyx_int_75);
  Py_CLEAR(clear_module_state->__pyx_int_86);
  Py_CLEAR(clear_module_state->__pyx_int_88);
  Py_CLEAR(clear_module_state->__pyx_int_100);
  Py_CLEAR(clear_module_state->__pyx_int_130);
  Py_CLEAR(clear_module_state->__pyx_int_200);
  Py_CLEAR(clear_module_state->__pyx_int_256);
  Py_CLEAR(clear_module_state->__pyx_int_257);
  Py_CLEAR(clear_module_state->__pyx_int_259);
  Py_CLEAR(clear_module_state->__pyx_int_261);
  Py_CLEAR(clear_module_state->__pyx_int_262);
  Py_CLEAR(clear_module_state->__pyx_int_263);
  Py_CLEAR(clear_module_state->__pyx_int_268);
  Py_CLEAR(clear_module_state->__pyx_int_269);
  Py_CLEAR(clear_module_state->__pyx_int_57375);
  Py_CLEAR(clear_module_state->__pyx_int_57376);
  Py_CLEAR(clear_module_state->__pyx_int_57396);
  Py_CLEAR(clear_module_state->__pyx_int_57399);
  Py_CLEAR(clear_module_state->__pyx_int_57412);
  Py_CLEAR(clear_module_state->__pyx_int_57413);
  Py_CLEAR(clear_module_state->__pyx_int_64022378);
  Py_CLEAR(clear_module_state->__pyx_int_72070923);
  Py_CLEAR(clear_module_state->__pyx_int_126102751);
  Py_CLEAR(clear_module_state->__pyx_int_150088119);
  Py_CLEAR(clear_module_state->__pyx_int_180366278);
  Py_CLEAR(clear_module_state->__pyx_int_251175041);
  Py_CLEAR(clear_module_state->__pyx_int_neg_1);
  Py_CLEAR(clear_module_state->__pyx_int_neg_10);
  Py_CLEAR(clear_module_state->__pyx_int_neg_25);
  Py_CLEAR(clear_module_state->__pyx_k__2);
  Py_CLEAR(clear_module_state->__pyx_k__27);
  Py_CLEAR(clear_module_state->__pyx_k__67);
  Py_CLEAR(clear_module_state->__pyx_k__89);
  Py_CLEAR(clear_module_state->__pyx_k__90);
  Py_CLEAR(clear_module_state->__pyx_k__91);
  Py_CLEAR(clear_module_state->__pyx_codeobj_);
  Py_CLEAR(clear_module_state->__pyx_slice__8);
  Py_CLEAR(clear_module_state->__pyx_tuple__3);
  Py_CLEAR(clear_module_state->__pyx_tuple__5);
  Py_CLEAR(clear_module_state->__pyx_tuple__6);
  Py_CLEAR(clear_module_state->__pyx_tuple__7);
  Py_CLEAR(clear_module_state->__pyx_tuple__9);
  Py_CLEAR(clear_module_state->__pyx_slice__26);
  Py_CLEAR(clear_module_state->__pyx_tuple__10);
  Py_CLEAR(clear_module_state->__pyx_tuple__11);
  Py_CLEAR(clear_module_state->__pyx_tuple__12);
  Py_CLEAR(clear_module_state->__pyx_tuple__13);
  Py_CLEAR(clear_module_state->__pyx_tuple__14);
  Py_CLEAR(clear_module_state->__pyx_tuple__15);
  Py_CLEAR(clear_module_state->__pyx_tuple__16);
  Py_CLEAR(clear_module_state->__pyx_tuple__17);
  Py_CLEAR(clear_module_state->__pyx_tuple__18);
  Py_CLEAR(clear_module_state->__pyx_tuple__19);
  Py_CLEAR(clear_module_state->__pyx_tuple__20);
  Py_CLEAR(clear_module_state->__pyx_tuple__21);
  Py_CLEAR(clear_module_state->__pyx_tuple__22);
  Py_CLEAR(clear_module_state->__pyx_tuple__23);
  Py_CLEAR(clear_module_state->__pyx_tuple__24);
  Py_CLEAR(clear_module_state->__pyx_tuple__25);
  Py_CLEAR(clear_module_state->__pyx_tuple__28);
  Py_CLEAR(clear_module_state->__pyx_tuple__30);
  Py_CLEAR(clear_module_state->__pyx_tuple__32);
  Py_CLEAR(clear_module_state->__pyx_tuple__33);
  Py_CLEAR(clear_module_state->__pyx_tuple__35);
  Py_CLEAR(clear_module_state->__pyx_tuple__36);
  Py_CLEAR(clear_module_state->__pyx_tuple__37);
  Py_CLEAR(clear_module_state->__pyx_tuple__38);
  Py_CLEAR(clear_module_state->__pyx_tuple__39);
  Py_CLEAR(clear_module_state->__pyx_tuple__40);
  Py_CLEAR(clear_module_state->__pyx_tuple__41);
  Py_CLEAR(clear_module_state->__pyx_tuple__42);
  Py_CLEAR(clear_module_state->__pyx_tuple__43);
  Py_CLEAR(clear_module_state->__pyx_tuple__44);
  Py_CLEAR(clear_module_state->__pyx_tuple__45);
  Py_CLEAR(clear_module_state->__pyx_tuple__46);
  Py_CLEAR(clear_module_state->__pyx_tuple__47);
  Py_CLEAR(clear_module_state->__pyx_tuple__48);
  Py_CLEAR(clear_module_state->__pyx_tuple__49);
  Py_CLEAR(clear_module_state->__pyx_tuple__51);
  Py_CLEAR(clear_module_state->__pyx_tuple__52);
  Py_CLEAR(clear_module_state->__pyx_tuple__53);
  Py_CLEAR(clear_module_state->__pyx_tuple__54);
  Py_CLEAR(clear_module_state->__pyx_tuple__55);
  Py_CLEAR(clear_module_state->__pyx_tuple__56);
  Py_CLEAR(clear_module_state->__pyx_tuple__57);
  Py_CLEAR(clear_module_state->__pyx_tuple__58);
  Py_CLEAR(clear_module_state->__pyx_tuple__59);
  Py_CLEAR(clear_module_state->__pyx_tuple__60);
  Py_CLEAR(clear_module_state->__pyx_tuple__62);
  Py_CLEAR(clear_module_state->__pyx_tuple__63);
  Py_CLEAR(clear_module_state->__pyx_tuple__64);
  Py_CLEAR(clear_module_state->__pyx_tuple__65);
  Py_CLEAR(clear_module_state->__pyx_tuple__66);
  Py_CLEAR(clear_module_state->__pyx_tuple__68);
  Py_CLEAR(clear_module_state->__pyx_tuple__69);
  Py_CLEAR(clear_module_state->__pyx_tuple__70);
  Py_CLEAR(clear_module_state->__pyx_tuple__71);
  Py_CLEAR(clear_module_state->__pyx_tuple__72);
  Py_CLEAR(clear_module_state->__pyx_tuple__73);
  Py_CLEAR(clear_module_state->__pyx_tuple__74);
  Py_CLEAR(clear_module_state->__pyx_tuple__75);
  Py_CLEAR(clear_module_state->__pyx_tuple__76);
  Py_CLEAR(clear_module_state->__pyx_tuple__77);
  Py_CLEAR(clear_module_state->__pyx_tuple__78);
  Py_CLEAR(clear_module_state->__pyx_tuple__79);
  Py_CLEAR(clear_module_state->__pyx_tuple__80);
  Py_CLEAR(clear_module_state->__pyx_tuple__81);
  Py_CLEAR(clear_module_state->__pyx_tuple__82);
  Py_CLEAR(clear_module_state->__pyx_tuple__83);
  Py_CLEAR(clear_module_state->__pyx_tuple__84);
  Py_CLEAR(clear_module_state->__pyx_tuple__85);
  Py_CLEAR(clear_module_state->__pyx_tuple__86);
  Py_CLEAR(clear_module_state->__pyx_tuple__87);
  Py_CLEAR(clear_module_state->__pyx_tuple__92);
  Py_CLEAR(clear_module_state->__pyx_tuple__94);
  Py_CLEAR(clear_module_state->__pyx_tuple__95);
  Py_CLEAR(clear_module_state->__pyx_tuple__98);
  Py_CLEAR(clear_module_state->__pyx_tuple__99);
  Py_CLEAR(clear_module_state->__pyx_codeobj__4);
  Py_CLEAR(clear_module_state->__pyx_tuple__104);
  Py_CLEAR(clear_module_state->__pyx_tuple__106);
  Py_CLEAR(clear_module_state->__pyx_tuple__108);
  Py_CLEAR(clear_module_state->__pyx_tuple__110);
  Py_CLEAR(clear_module_state->__pyx_tuple__112);
  Py_CLEAR(clear_module_state->__pyx_tuple__114);
  Py_CLEAR(clear_module_state->__pyx_tuple__116);
  Py_CLEAR(clear_module_state->__pyx_tuple__118);
  Py_CLEAR(clear_module_state->__pyx_tuple__120);
  Py_CLEAR(clear_module_state->__pyx_tuple__122);
  Py_CLEAR(clear_module_state->__pyx_tuple__124);
  Py_CLEAR(clear_module_state->__pyx_tuple__126);
  Py_CLEAR(clear_module_state->__pyx_tuple__128);
  Py_CLEAR(clear_module_state->__pyx_tuple__132);
  Py_CLEAR(clear_module_state->__pyx_tuple__135);
  Py_CLEAR(clear_module_state->__pyx_tuple__137);
  Py_CLEAR(clear_module_state->__pyx_tuple__139);
  Py_CLEAR(clear_module_state->__pyx_tuple__140);
  Py_CLEAR(clear_module_state->__pyx_tuple__142);
  Py_CLEAR(clear_module_state->__pyx_tuple__143);
  Py_CLEAR(clear_module_state->__pyx_tuple__145);
  Py_CLEAR(clear_module_state->__pyx_tuple__147);
  Py_CLEAR(clear_module_state->__pyx_tuple__152);
  Py_CLEAR(clear_module_state->__pyx_tuple__154);
  Py_CLEAR(clear_module_state->__pyx_tuple__155);
  Py_CLEAR(clear_module_state->__pyx_tuple__161);
  Py_CLEAR(clear_module_state->__pyx_tuple__163);
  Py_CLEAR(clear_module_state->__pyx_tuple__167);
  Py_CLEAR(clear_module_state->__pyx_tuple__170);
  Py_CLEAR(clear_module_state->__pyx_tuple__172);
  Py_CLEAR(clear_module_state->__pyx_tuple__177);
  Py_CLEAR(clear_module_state->__pyx_tuple__180);
  Py_CLEAR(clear_module_state->__pyx_tuple__186);
  Py_CLEAR(clear_module_state->__pyx_tuple__188);
  Py_CLEAR(clear_module_state->__pyx_tuple__192);
  Py_CLEAR(clear_module_state->__pyx_tuple__197);
  Py_CLEAR(clear_module_state->__pyx_tuple__202);
  Py_CLEAR(clear_module_state->__pyx_tuple__208);
  Py_CLEAR(clear_module_state->__pyx_tuple__210);
  Py_CLEAR(clear_module_state->__pyx_tuple__214);
  Py_CLEAR(clear_module_state->__pyx_tuple__216);
  Py_CLEAR(clear_module_state->__pyx_tuple__218);
  Py_CLEAR(clear_module_state->__pyx_tuple__223);
  Py_CLEAR(clear_module_state->__pyx_tuple__228);
  Py_CLEAR(clear_module_state->__pyx_tuple__230);
  Py_CLEAR(clear_module_state->__pyx_tuple__232);
  Py_CLEAR(clear_module_state->__pyx_tuple__235);
  Py_CLEAR(clear_module_state->__pyx_tuple__237);
  Py_CLEAR(clear_module_state->__pyx_tuple__239);
  Py_CLEAR(clear_module_state->__pyx_tuple__245);
  Py_CLEAR(clear_module_state->__pyx_tuple__249);
  Py_CLEAR(clear_module_state->__pyx_tuple__256);
  Py_CLEAR(clear_module_state->__pyx_tuple__258);
  Py_CLEAR(clear_module_state->__pyx_tuple__260);
  Py_CLEAR(clear_module_state->__pyx_tuple__264);
  Py_CLEAR(clear_module_state->__pyx_tuple__266);
  Py_CLEAR(clear_module_state->__pyx_tuple__268);
  Py_CLEAR(clear_module_state->__pyx_tuple__272);
  Py_CLEAR(clear_module_state->__pyx_tuple__274);
  Py_CLEAR(clear_module_state->__pyx_tuple__276);
  Py_CLEAR(clear_module_state->__pyx_tuple__282);
  Py_CLEAR(clear_module_state->__pyx_tuple__284);
  Py_CLEAR(clear_module_state->__pyx_tuple__286);
  Py_CLEAR(clear_module_state->__pyx_tuple__290);
  Py_CLEAR(clear_module_state->__pyx_tuple__293);
  Py_CLEAR(clear_module_state->__pyx_tuple__295);
  Py_CLEAR(clear_module_state->__pyx_tuple__297);
  Py_CLEAR(clear_module_state->__pyx_tuple__301);
  Py_CLEAR(clear_module_state->__pyx_tuple__305);
  Py_CLEAR(clear_module_state->__pyx_tuple__318);
  Py_CLEAR(clear_module_state->__pyx_tuple__320);
  Py_CLEAR(clear_module_state->__pyx_tuple__326);
  Py_CLEAR(clear_module_state->__pyx_codeobj__29);
  Py_CLEAR(clear_module_state->__pyx_codeobj__31);
  Py_CLEAR(clear_module_state->__pyx_codeobj__61);
  Py_CLEAR(clear_module_state->__pyx_codeobj__96);
  Py_CLEAR(clear_module_state->__pyx_codeobj__100);
  Py_CLEAR(clear_module_state->__pyx_codeobj__101);
  Py_CLEAR(clear_module_state->__pyx_codeobj__102);
  Py_CLEAR(clear_module_state->__pyx_codeobj__103);
  Py_CLEAR(clear_module_state->__pyx_codeobj__105);
  Py_CLEAR(clear_module_state->__pyx_codeobj__107);
  Py_CLEAR(clear_module_state->__pyx_codeobj__109);
  Py_CLEAR(clear_module_state->__pyx_codeobj__111);
  Py_CLEAR(clear_module_state->__pyx_codeobj__113);
  Py_CLEAR(clear_module_state->__pyx_codeobj__115);
  Py_CLEAR(clear_module_state->__pyx_codeobj__117);
  Py_CLEAR(clear_module_state->__pyx_codeobj__119);
  Py_CLEAR(clear_module_state->__pyx_codeobj__121);
  Py_CLEAR(clear_module_state->__pyx_codeobj__123);
  Py_CLEAR(clear_module_state->__pyx_codeobj__125);
  Py_CLEAR(clear_module_state->__pyx_codeobj__127);
  Py_CLEAR(clear_module_state->__pyx_codeobj__129);
  Py_CLEAR(clear_module_state->__pyx_codeobj__130);
  Py_CLEAR(clear_module_state->__pyx_codeobj__131);
  Py_CLEAR(clear_module_state->__pyx_codeobj__133);
  Py_CLEAR(clear_module_state->__pyx_codeobj__134);
  Py_CLEAR(clear_module_state->__pyx_codeobj__136);
  Py_CLEAR(clear_module_state->__pyx_codeobj__138);
  Py_CLEAR(clear_module_state->__pyx_codeobj__141);
  Py_CLEAR(clear_module_state->__pyx_codeobj__144);
  Py_CLEAR(clear_module_state->__pyx_codeobj__146);
  Py_CLEAR(clear_module_state->__pyx_codeobj__148);
  Py_CLEAR(clear_module_state->__pyx_codeobj__149);
  Py_CLEAR(clear_module_state->__pyx_codeobj__150);
  Py_CLEAR(clear_module_state->__pyx_codeobj__151);
  Py_CLEAR(clear_module_state->__pyx_codeobj__153);
  Py_CLEAR(clear_module_state->__pyx_codeobj__156);
  Py_CLEAR(clear_module_state->__pyx_codeobj__157);
  Py_CLEAR(clear_module_state->__pyx_codeobj__158);
  Py_CLEAR(clear_module_state->__pyx_codeobj__159);
  Py_CLEAR(clear_module_state->__pyx_codeobj__160);
  Py_CLEAR(clear_module_state->__pyx_codeobj__162);
  Py_CLEAR(clear_module_state->__pyx_codeobj__164);
  Py_CLEAR(clear_module_state->__pyx_codeobj__165);
  Py_CLEAR(clear_module_state->__pyx_codeobj__166);
  Py_CLEAR(clear_module_state->__pyx_codeobj__168);
  Py_CLEAR(clear_module_state->__pyx_codeobj__169);
  Py_CLEAR(clear_module_state->__pyx_codeobj__171);
  Py_CLEAR(clear_module_state->__pyx_codeobj__173);
  Py_CLEAR(clear_module_state->__pyx_codeobj__174);
  Py_CLEAR(clear_module_state->__pyx_codeobj__175);
  Py_CLEAR(clear_module_state->__pyx_codeobj__176);
  Py_CLEAR(clear_module_state->__pyx_codeobj__178);
  Py_CLEAR(clear_module_state->__pyx_codeobj__179);
  Py_CLEAR(clear_module_state->__pyx_codeobj__181);
  Py_CLEAR(clear_module_state->__pyx_codeobj__182);
  Py_CLEAR(clear_module_state->__pyx_codeobj__183);
  Py_CLEAR(clear_module_state->__pyx_codeobj__184);
  Py_CLEAR(clear_module_state->__pyx_codeobj__185);
  Py_CLEAR(clear_module_state->__pyx_codeobj__187);
  Py_CLEAR(clear_module_state->__pyx_codeobj__189);
  Py_CLEAR(clear_module_state->__pyx_codeobj__190);
  Py_CLEAR(clear_module_state->__pyx_codeobj__191);
  Py_CLEAR(clear_module_state->__pyx_codeobj__193);
  Py_CLEAR(clear_module_state->__pyx_codeobj__194);
  Py_CLEAR(clear_module_state->__pyx_codeobj__195);
  Py_CLEAR(clear_module_state->__pyx_codeobj__196);
  Py_CLEAR(clear_module_state->__pyx_codeobj__198);
  Py_CLEAR(clear_module_state->__pyx_codeobj__199);
  Py_CLEAR(clear_module_state->__pyx_codeobj__200);
  Py_CLEAR(clear_module_state->__pyx_codeobj__201);
  Py_CLEAR(clear_module_state->__pyx_codeobj__203);
  Py_CLEAR(clear_module_state->__pyx_codeobj__204);
  Py_CLEAR(clear_module_state->__pyx_codeobj__205);
  Py_CLEAR(clear_module_state->__pyx_codeobj__206);
  Py_CLEAR(clear_module_state->__pyx_codeobj__207);
  Py_CLEAR(clear_module_state->__pyx_codeobj__209);
  Py_CLEAR(clear_module_state->__pyx_codeobj__211);
  Py_CLEAR(clear_module_state->__pyx_codeobj__212);
  Py_CLEAR(clear_module_state->__pyx_codeobj__213);
  Py_CLEAR(clear_module_state->__pyx_codeobj__215);
  Py_CLEAR(clear_module_state->__pyx_codeobj__217);
  Py_CLEAR(clear_module_state->__pyx_codeobj__219);
  Py_CLEAR(clear_module_state->__pyx_codeobj__220);
  Py_CLEAR(clear_module_state->__pyx_codeobj__221);
  Py_CLEAR(clear_module_state->__pyx_codeobj__222);
  Py_CLEAR(clear_module_state->__pyx_codeobj__224);
  Py_CLEAR(clear_module_state->__pyx_codeobj__225);
  Py_CLEAR(clear_module_state->__pyx_codeobj__226);
  Py_CLEAR(clear_module_state->__pyx_codeobj__227);
  Py_CLEAR(clear_module_state->__pyx_codeobj__229);
  Py_CLEAR(clear_module_state->__pyx_codeobj__231);
  Py_CLEAR(clear_module_state->__pyx_codeobj__233);
  Py_CLEAR(clear_module_state->__pyx_codeobj__234);
  Py_CLEAR(clear_module_state->__pyx_codeobj__236);
  Py_CLEAR(clear_module_state->__pyx_codeobj__238);
  Py_CLEAR(clear_module_state->__pyx_codeobj__240);
  Py_CLEAR(clear_module_state->__pyx_codeobj__241);
  Py_CLEAR(clear_module_state->__pyx_codeobj__242);
  Py_CLEAR(clear_module_state->__pyx_codeobj__243);
  Py_CLEAR(clear_module_state->__pyx_codeobj__244);
  Py_CLEAR(clear_module_state->__pyx_codeobj__246);
  Py_CLEAR(clear_module_state->__pyx_codeobj__247);
  Py_CLEAR(clear_module_state->__pyx_codeobj__248);
  Py_CLEAR(clear_module_state->__pyx_codeobj__250);
  Py_CLEAR(clear_module_state->__pyx_codeobj__251);
  Py_CLEAR(clear_module_state->__pyx_codeobj__252);
  Py_CLEAR(clear_module_state->__pyx_codeobj__253);
  Py_CLEAR(clear_module_state->__pyx_codeobj__254);
  Py_CLEAR(clear_module_state->__pyx_codeobj__255);
  Py_CLEAR(clear_module_state->__pyx_codeobj__257);
  Py_CLEAR(clear_module_state->__pyx_codeobj__259);
  Py_CLEAR(clear_module_state->__pyx_codeobj__261);
  Py_CLEAR(clear_module_state->__pyx_codeobj__262);
  Py_CLEAR(clear_module_state->__pyx_codeobj__263);
  Py_CLEAR(clear_module_state->__pyx_codeobj__265);
  Py_CLEAR(clear_module_state->__pyx_codeobj__267);
  Py_CLEAR(clear_module_state->__pyx_codeobj__269);
  Py_CLEAR(clear_module_state->__pyx_codeobj__270);
  Py_CLEAR(clear_module_state->__pyx_codeobj__271);
  Py_CLEAR(clear_module_state->__pyx_codeobj__273);
  Py_CLEAR(clear_module_state->__pyx_codeobj__275);
  Py_CLEAR(clear_module_state->__pyx_codeobj__277);
  Py_CLEAR(clear_module_state->__pyx_codeobj__278);
  Py_CLEAR(clear_module_state->__pyx_codeobj__279);
  Py_CLEAR(clear_module_state->__pyx_codeobj__280);
  Py_CLEAR(clear_module_state->__pyx_codeobj__281);
  Py_CLEAR(clear_module_state->__pyx_codeobj__283);
  Py_CLEAR(clear_module_state->__pyx_codeobj__285);
  Py_CLEAR(clear_module_state->__pyx_codeobj__287);
  Py_CLEAR(clear_module_state->__pyx_codeobj__288);
  Py_CLEAR(clear_module_state->__pyx_codeobj__289);
  Py_CLEAR(clear_module_state->__pyx_codeobj__291);
  Py_CLEAR(clear_module_state->__pyx_codeobj__292);
  Py_CLEAR(clear_module_state->__pyx_codeobj__294);
  Py_CLEAR(clear_module_state->__pyx_codeobj__296);
  Py_CLEAR(clear_module_state->__pyx_codeobj__298);
  Py_CLEAR(clear_module_state->__pyx_codeobj__299);
  Py_CLEAR(clear_module_state->__pyx_codeobj__300);
  Py_CLEAR(clear_module_state->__pyx_codeobj__302);
  Py_CLEAR(clear_module_state->__pyx_codeobj__303);
  Py_CLEAR(clear_module_state->__pyx_codeobj__304);
  Py_CLEAR(clear_module_state->__pyx_codeobj__306);
  Py_CLEAR(clear_module_state->__pyx_codeobj__307);
  Py_CLEAR(clear_module_state->__pyx_codeobj__308);
  Py_CLEAR(clear_module_state->__pyx_codeobj__309);
  Py_CLEAR(clear_module_state->__pyx_codeobj__310);
  Py_CLEAR(clear_module_state->__pyx_codeobj__311);
  Py_CLEAR(clear_module_state->__pyx_codeobj__312);
  Py_CLEAR(clear_module_state->__pyx_codeobj__313);
  Py_CLEAR(clear_module_state->__pyx_codeobj__314);
  Py_CLEAR(clear_module_state->__pyx_codeobj__315);
  Py_CLEAR(clear_module_state->__pyx_codeobj__316);
  Py_CLEAR(clear_module_state->__pyx_codeobj__317);
  Py_CLEAR(clear_module_state->__pyx_codeobj__319);
  Py_CLEAR(clear_module_state->__pyx_codeobj__321);
  Py_CLEAR(clear_module_state->__pyx_codeobj__322);
  Py_CLEAR(clear_module_state->__pyx_codeobj__323);
  Py_CLEAR(clear_module_state->__pyx_codeobj__324);
  Py_CLEAR(clear_module_state->__pyx_codeobj__325);
  Py_CLEAR(clear_module_state->__pyx_codeobj__327);
  Py_CLEAR(clear_module_state->__pyx_codeobj__328);
  Py_CLEAR(clear_module_state->__pyx_codeobj__329);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_4cygl_5utils_RGBA);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_4cygl_5utils_Render_Target);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_4cygl_5utils_Named_Texture);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_4cygl_5utils_Sphere);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_UI);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_UI);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_UI_element);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_UI_element);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Slider);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Slider);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Switch);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Switch);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Selector);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Selector);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Text_Input);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Text_Input);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Slider_Text_Input);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Slider_Text_Input);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Button);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Button);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Separator);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Separator);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Info_Text);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Info_Text);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Color_Legend);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Color_Legend);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Thumb);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Thumb);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Icon);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Icon);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Hot_Key);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Hot_Key);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Seek_Bar);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Seek_Bar);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Timeline);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Timeline);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Base_Menu);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Base_Menu);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Movable_Menu);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Movable_Menu);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Stretching_Menu);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Stretching_Menu);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Growing_Menu);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Growing_Menu);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Scrolling_Menu);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Scrolling_Menu);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Container);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Container);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Timeline_Menu);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Synced_Value);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Synced_Value);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Input);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Input);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Draggable);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Draggable);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_FitBox);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_FitBox);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui_Vec2);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui_Vec2);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit__);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__);
  Py_VISIT(traverse_module_state->__pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit__);
  Py_VISIT(traverse_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm);
  Py_VISIT(traverse_module_state->__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm);
  Py_VISIT(traverse_module_state->__pyx_kp_u_02_0f_06_3f);
  Py_VISIT(traverse_module_state->__pyx_kp_u_0_2f);
  Py_VISIT(traverse_module_state->__pyx_kp_u_1_31_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
  Py_VISIT(traverse_module_state->__pyx_n_s_AttributeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu_collect_in_window);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu_extend);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu_insert);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu_remove);
  Py_VISIT(traverse_module_state->__pyx_n_s_Base_Menu_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_Button);
  Py_VISIT(traverse_module_state->__pyx_n_s_Button___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Button___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Button_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Button_handle_input);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Buttons);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Can_only_append_UI_elements_not);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Chars);
  Py_VISIT(traverse_module_state->__pyx_n_s_Color_Legend);
  Py_VISIT(traverse_module_state->__pyx_n_s_Color_Legend___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Color_Legend___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Color_Legend_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Color_Legend_precompute);
  Py_VISIT(traverse_module_state->__pyx_n_s_Container);
  Py_VISIT(traverse_module_state->__pyx_n_u_Container);
  Py_VISIT(traverse_module_state->__pyx_n_s_Container___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Container___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Container_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Container_draw_overlay);
  Py_VISIT(traverse_module_state->__pyx_n_s_Container_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Container_init);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Current_Input_Mouse_pos);
  Py_VISIT(traverse_module_state->__pyx_n_u_Darwin);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_Draggable);
  Py_VISIT(traverse_module_state->__pyx_n_s_Draggable___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Draggable___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Draggable_pre_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_FitBox);
  Py_VISIT(traverse_module_state->__pyx_n_s_FitBox___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_FitBox___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_kp_u_FitBox_design_org);
  Py_VISIT(traverse_module_state->__pyx_n_s_FitBox_mouse_over);
  Py_VISIT(traverse_module_state->__pyx_n_s_FitBox_mouse_over_margin);
  Py_VISIT(traverse_module_state->__pyx_n_s_Growing_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_Growing_Menu___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Growing_Menu___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Growing_Menu_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Growing_Menu_draw_overlay);
  Py_VISIT(traverse_module_state->__pyx_n_s_Growing_Menu_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Growing_Menu_precompute);
  Py_VISIT(traverse_module_state->__pyx_n_s_Growing_Menu_toggle_iconified);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Header_Positon_argument_needs_to);
  Py_VISIT(traverse_module_state->__pyx_n_s_Horizontally_Stretching_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_Horizontally_Stretching_Menu___r);
  Py_VISIT(traverse_module_state->__pyx_n_s_Horizontally_Stretching_Menu___s);
  Py_VISIT(traverse_module_state->__pyx_n_s_Horizontally_Stretching_Menu_dra);
  Py_VISIT(traverse_module_state->__pyx_n_s_Horizontally_Stretching_Menu_dra_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Horizontally_Stretching_Menu_han);
  Py_VISIT(traverse_module_state->__pyx_n_s_Hot_Key);
  Py_VISIT(traverse_module_state->__pyx_n_s_Hot_Key___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Hot_Key___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Hot_Key_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Hot_Key_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_Icon);
  Py_VISIT(traverse_module_state->__pyx_n_s_Icon___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Icon___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Icon_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Icon_draw_overlay);
  Py_VISIT(traverse_module_state->__pyx_n_s_Icon_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Indicator_values_are_required_to);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info_Text);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info_Text___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info_Text___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info_Text_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info_Text_precompute);
  Py_VISIT(traverse_module_state->__pyx_n_s_Input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Input___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Input___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Input_purge);
  Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Keys);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Mouse_delta);
  Py_VISIT(traverse_module_state->__pyx_n_s_Movable_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_Movable_Menu___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Movable_Menu___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_kp_u_None);
  Py_VISIT(traverse_module_state->__pyx_n_s_NotImplemented);
  Py_VISIT(traverse_module_state->__pyx_kp_u_OpenSans_Regular_ttf);
  Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_CFunc_float__lParenUI_elem);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Roboto_Regular_ttf);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Scroll);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Scrolling_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_Scrolling_Menu_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Scrolling_Menu___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Scrolling_Menu___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Scrolling_Menu_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Scrolling_Menu_draw_overlay);
  Py_VISIT(traverse_module_state->__pyx_n_s_Scrolling_Menu_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Scrolling_Menu_toggle_iconified);
  Py_VISIT(traverse_module_state->__pyx_n_s_Seek_Bar);
  Py_VISIT(traverse_module_state->__pyx_n_s_Seek_Bar___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Seek_Bar___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Seek_Bar_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Seek_Bar_draw_overlay);
  Py_VISIT(traverse_module_state->__pyx_n_s_Seek_Bar_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Seek_Bar_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_Selector);
  Py_VISIT(traverse_module_state->__pyx_n_s_Selector___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Selector___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Selector__on_change);
  Py_VISIT(traverse_module_state->__pyx_n_s_Selector_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Selector_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Selector_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_Separator);
  Py_VISIT(traverse_module_state->__pyx_n_s_Separator___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Separator___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Separator_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Separator_precompute);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider_Text_Input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider_Text_Input___reduce_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider_Text_Input___setstate_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_Slider_validate);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Slider_values_should_be_float_or);
  Py_VISIT(traverse_module_state->__pyx_n_s_Stretching_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_Stretching_Menu___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Stretching_Menu___setstate_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_Stretching_Menu_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Stretching_Menu_draw_overlay);
  Py_VISIT(traverse_module_state->__pyx_n_s_Stretching_Menu_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Switch);
  Py_VISIT(traverse_module_state->__pyx_n_s_Switch___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Switch___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Switch_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Switch_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Switch_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_Synced_Value);
  Py_VISIT(traverse_module_state->__pyx_n_s_Synced_Value___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Synced_Value___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Synced_value_s_is_not_part_of_se);
  Py_VISIT(traverse_module_state->__pyx_n_s_Text_Input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Text_Input___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Text_Input___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Text_Input_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Text_Input_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Text_Input_pre_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Text_Input_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_Thumb);
  Py_VISIT(traverse_module_state->__pyx_n_s_Thumb___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Thumb___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Thumb_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Thumb_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_Thumb_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu_extend);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu_insert);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu_remove);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_Menu_toggle_iconified);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_draw_label_default);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeline_refresh);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI);
  Py_VISIT(traverse_module_state->__pyx_kp_u_UI_Framebuffer_could_not_be_crea);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_add_font);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_collect_menus);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element_draw_overlay);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element_pre_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element_precompute);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_element_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_extend);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_remove);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_terminate);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_update_button);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_update_char);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_update_clipboard);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_update_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_update_mouse);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_update_scroll);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_update_window);
  Py_VISIT(traverse_module_state->__pyx_n_s_Unused_Input);
  Py_VISIT(traverse_module_state->__pyx_n_u_Unused_Input);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Vec2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Vec2___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Vec2___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s__330);
  Py_VISIT(traverse_module_state->__pyx_kp_u__34);
  Py_VISIT(traverse_module_state->__pyx_n_s__50);
  Py_VISIT(traverse_module_state->__pyx_kp_u__88);
  Py_VISIT(traverse_module_state->__pyx_kp_u__93);
  Py_VISIT(traverse_module_state->__pyx_n_s__97);
  Py_VISIT(traverse_module_state->__pyx_n_s_action);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_font);
  Py_VISIT(traverse_module_state->__pyx_n_s_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
  Py_VISIT(traverse_module_state->__pyx_n_s_arrest_axis);
  Py_VISIT(traverse_module_state->__pyx_n_s_as_tuple);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_n_s_attribute_context);
  Py_VISIT(traverse_module_state->__pyx_n_s_attribute_name);
  Py_VISIT(traverse_module_state->__pyx_n_u_backwards);
  Py_VISIT(traverse_module_state->__pyx_n_u_bottom);
  Py_VISIT(traverse_module_state->__pyx_n_s_button);
  Py_VISIT(traverse_module_state->__pyx_n_u_buttons);
  Py_VISIT(traverse_module_state->__pyx_n_s_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_catch_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_center);
  Py_VISIT(traverse_module_state->__pyx_n_s_centered);
  Py_VISIT(traverse_module_state->__pyx_n_s_cfunc_to_py);
  Py_VISIT(traverse_module_state->__pyx_n_s_char);
  Py_VISIT(traverse_module_state->__pyx_n_u_chars);
  Py_VISIT(traverse_module_state->__pyx_n_s_chr);
  Py_VISIT(traverse_module_state->__pyx_n_s_cinit___locals_default_selecti);
  Py_VISIT(traverse_module_state->__pyx_n_s_cinit___locals_default_selecti_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_cinit___locals_lambda);
  Py_VISIT(traverse_module_state->__pyx_n_s_cinit___locals_set_play);
  Py_VISIT(traverse_module_state->__pyx_n_s_class);
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_clear_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_click_cb);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_clipboard);
  Py_VISIT(traverse_module_state->__pyx_n_u_clipboard);
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_collapsed);
  Py_VISIT(traverse_module_state->__pyx_n_u_collapsed);
  Py_VISIT(traverse_module_state->__pyx_n_s_collect_in_window);
  Py_VISIT(traverse_module_state->__pyx_n_s_collect_menus);
  Py_VISIT(traverse_module_state->__pyx_n_s_collections);
  Py_VISIT(traverse_module_state->__pyx_kp_u_comptd_org);
  Py_VISIT(traverse_module_state->__pyx_n_s_configuration);
  Py_VISIT(traverse_module_state->__pyx_n_s_content_height);
  Py_VISIT(traverse_module_state->__pyx_n_s_contextlib);
  Py_VISIT(traverse_module_state->__pyx_n_s_contextmanager);
  Py_VISIT(traverse_module_state->__pyx_n_s_cysignals);
  Py_VISIT(traverse_module_state->__pyx_kp_u_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_default_selection_getter);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_dirname);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_display_format);
  Py_VISIT(traverse_module_state->__pyx_n_s_draw);
  Py_VISIT(traverse_module_state->__pyx_n_s_draw_data_callback);
  Py_VISIT(traverse_module_state->__pyx_n_s_draw_label_callback);
  Py_VISIT(traverse_module_state->__pyx_n_s_draw_label_default);
  Py_VISIT(traverse_module_state->__pyx_n_s_draw_overlay);
  Py_VISIT(traverse_module_state->__pyx_n_s_e);
  Py_VISIT(traverse_module_state->__pyx_n_s_elm);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
  Py_VISIT(traverse_module_state->__pyx_n_s_enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_eval);
  Py_VISIT(traverse_module_state->__pyx_n_s_exit);
  Py_VISIT(traverse_module_state->__pyx_n_s_extend);
  Py_VISIT(traverse_module_state->__pyx_n_s_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_font_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_font_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_format);
  Py_VISIT(traverse_module_state->__pyx_n_u_forwards);
  Py_VISIT(traverse_module_state->__pyx_n_s_frange);
  Py_VISIT(traverse_module_state->__pyx_n_s_function);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_get);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_all_font_paths);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_opensans_font_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_pupil_icons_font_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_roboto_font_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_getter);
  Py_VISIT(traverse_module_state->__pyx_n_s_h);
  Py_VISIT(traverse_module_state->__pyx_n_s_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_handle_start_reference);
  Py_VISIT(traverse_module_state->__pyx_kp_u_has_no_attribute);
  Py_VISIT(traverse_module_state->__pyx_kp_u_has_no_entry);
  Py_VISIT(traverse_module_state->__pyx_n_s_header_pos);
  Py_VISIT(traverse_module_state->__pyx_n_s_header_pos_id);
  Py_VISIT(traverse_module_state->__pyx_n_u_headline);
  Py_VISIT(traverse_module_state->__pyx_n_s_height);
  Py_VISIT(traverse_module_state->__pyx_n_u_hidden);
  Py_VISIT(traverse_module_state->__pyx_n_s_hotkey);
  Py_VISIT(traverse_module_state->__pyx_n_s_id);
  Py_VISIT(traverse_module_state->__pyx_n_s_idx);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_s_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_indicator_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_indicator_stop);
  Py_VISIT(traverse_module_state->__pyx_n_s_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_insert);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_kp_u_is_of_type);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_s_join);
  Py_VISIT(traverse_module_state->__pyx_n_s_key);
  Py_VISIT(traverse_module_state->__pyx_n_u_keys);
  Py_VISIT(traverse_module_state->__pyx_n_s_kwargs);
  Py_VISIT(traverse_module_state->__pyx_n_s_label);
  Py_VISIT(traverse_module_state->__pyx_n_u_label);
  Py_VISIT(traverse_module_state->__pyx_n_s_label_font);
  Py_VISIT(traverse_module_state->__pyx_n_s_label_getter);
  Py_VISIT(traverse_module_state->__pyx_n_s_label_line_height);
  Py_VISIT(traverse_module_state->__pyx_n_s_label_offset_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_label_offset_x);
  Py_VISIT(traverse_module_state->__pyx_n_s_label_offset_y);
  Py_VISIT(traverse_module_state->__pyx_n_s_labels);
  Py_VISIT(traverse_module_state->__pyx_n_u_left);
  Py_VISIT(traverse_module_state->__pyx_n_s_line_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_m);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_margin);
  Py_VISIT(traverse_module_state->__pyx_n_s_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_ts);
  Py_VISIT(traverse_module_state->__pyx_n_s_min);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_size);
  Py_VISIT(traverse_module_state->__pyx_n_u_min_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_ts);
  Py_VISIT(traverse_module_state->__pyx_n_s_mods);
  Py_VISIT(traverse_module_state->__pyx_n_s_mouse_over);
  Py_VISIT(traverse_module_state->__pyx_n_s_mouse_over_margin);
  Py_VISIT(traverse_module_state->__pyx_n_s_mx);
  Py_VISIT(traverse_module_state->__pyx_n_s_my);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_namedtuple);
  Py_VISIT(traverse_module_state->__pyx_n_s_nested);
  Py_VISIT(traverse_module_state->__pyx_n_s_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_value);
  Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_VISIT(traverse_module_state->__pyx_n_s_obj);
  Py_VISIT(traverse_module_state->__pyx_n_s_objs);
  Py_VISIT(traverse_module_state->__pyx_n_s_off_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_off_val);
  Py_VISIT(traverse_module_state->__pyx_n_s_on_change);
  Py_VISIT(traverse_module_state->__pyx_n_s_on_change_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_on_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_on_val);
  Py_VISIT(traverse_module_state->__pyx_n_u_opensans);
  Py_VISIT(traverse_module_state->__pyx_n_s_os);
  Py_VISIT(traverse_module_state->__pyx_n_s_outer_label);
  Py_VISIT(traverse_module_state->__pyx_n_s_padding);
  Py_VISIT(traverse_module_state->__pyx_n_s_parent);
  Py_VISIT(traverse_module_state->__pyx_n_s_parent_read_only);
  Py_VISIT(traverse_module_state->__pyx_n_s_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_platform);
  Py_VISIT(traverse_module_state->__pyx_n_s_play);
  Py_VISIT(traverse_module_state->__pyx_n_u_play);
  Py_VISIT(traverse_module_state->__pyx_n_u_playback_speed);
  Py_VISIT(traverse_module_state->__pyx_n_s_playback_time_setter);
  Py_VISIT(traverse_module_state->__pyx_n_s_pop);
  Py_VISIT(traverse_module_state->__pyx_n_s_pop_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_pos);
  Py_VISIT(traverse_module_state->__pyx_n_u_pos);
  Py_VISIT(traverse_module_state->__pyx_n_s_position);
  Py_VISIT(traverse_module_state->__pyx_n_s_pre_handle_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_precompute);
  Py_VISIT(traverse_module_state->__pyx_n_u_pupil_icons);
  Py_VISIT(traverse_module_state->__pyx_kp_u_pupil_icons_ttf);
  Py_VISIT(traverse_module_state->__pyx_n_s_purge);
  Py_VISIT(traverse_module_state->__pyx_n_s_push_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyglui_ui);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Base_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Movable_Menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_UI_element);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_recent_idx_ts_getter);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
  Py_VISIT(traverse_module_state->__pyx_n_s_refresh);
  Py_VISIT(traverse_module_state->__pyx_n_s_remove);
  Py_VISIT(traverse_module_state->__pyx_n_u_right);
  Py_VISIT(traverse_module_state->__pyx_n_u_roboto);
  Py_VISIT(traverse_module_state->__pyx_n_s_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_scale);
  Py_VISIT(traverse_module_state->__pyx_n_s_scancode);
  Py_VISIT(traverse_module_state->__pyx_n_u_scrollstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_seeking_cb);
  Py_VISIT(traverse_module_state->__pyx_n_s_selection);
  Py_VISIT(traverse_module_state->__pyx_n_s_selection_getter);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_n_s_send);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_align);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_blur);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_font);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_play);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_setter);
  Py_VISIT(traverse_module_state->__pyx_n_s_sig_on_off);
  Py_VISIT(traverse_module_state->__pyx_n_s_six);
  Py_VISIT(traverse_module_state->__pyx_n_s_size);
  Py_VISIT(traverse_module_state->__pyx_n_u_size);
  Py_VISIT(traverse_module_state->__pyx_kp_u_size_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_sort);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_kp_s_src_pyglui_custom_pxi);
  Py_VISIT(traverse_module_state->__pyx_kp_s_src_pyglui_helpers_pxi);
  Py_VISIT(traverse_module_state->__pyx_kp_s_src_pyglui_menus_pxi);
  Py_VISIT(traverse_module_state->__pyx_kp_s_src_pyglui_timelines_pxi);
  Py_VISIT(traverse_module_state->__pyx_kp_s_src_pyglui_ui_elements_pxi);
  Py_VISIT(traverse_module_state->__pyx_kp_s_src_pyglui_ui_pyx);
  Py_VISIT(traverse_module_state->__pyx_n_s_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_step);
  Py_VISIT(traverse_module_state->__pyx_n_s_stop);
  Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
  Py_VISIT(traverse_module_state->__pyx_n_u_submenus);
  Py_VISIT(traverse_module_state->__pyx_n_s_sum);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_n_s_sx);
  Py_VISIT(traverse_module_state->__pyx_n_s_sy);
  Py_VISIT(traverse_module_state->__pyx_n_s_sync);
  Py_VISIT(traverse_module_state->__pyx_n_s_sync_ctx);
  Py_VISIT(traverse_module_state->__pyx_n_s_system);
  Py_VISIT(traverse_module_state->__pyx_n_s_terminate);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_text);
  Py_VISIT(traverse_module_state->__pyx_n_s_text_bounds);
  Py_VISIT(traverse_module_state->__pyx_n_s_text_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_text_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_throw);
  Py_VISIT(traverse_module_state->__pyx_n_s_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_toggle_iconified);
  Py_VISIT(traverse_module_state->__pyx_n_s_tooltip);
  Py_VISIT(traverse_module_state->__pyx_n_u_top);
  Py_VISIT(traverse_module_state->__pyx_n_s_trigger_overlay_only);
  Py_VISIT(traverse_module_state->__pyx_n_u_trim_left_ts);
  Py_VISIT(traverse_module_state->__pyx_n_u_trim_right_ts);
  Py_VISIT(traverse_module_state->__pyx_n_s_typed_val);
  Py_VISIT(traverse_module_state->__pyx_n_u_uncollapsed_min_size);
  Py_VISIT(traverse_module_state->__pyx_n_u_uncollapsed_pos);
  Py_VISIT(traverse_module_state->__pyx_n_u_uncollapsed_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_unichr);
  Py_VISIT(traverse_module_state->__pyx_n_s_unused_Input);
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_button);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_char);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_clipboard);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_mouse);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_scroll);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_window);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
  Py_VISIT(traverse_module_state->__pyx_kp_u_utf_8);
  Py_VISIT(traverse_module_state->__pyx_n_s_val);
  Py_VISIT(traverse_module_state->__pyx_n_s_validate);
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_visible);
  Py_VISIT(traverse_module_state->__pyx_n_s_w);
  Py_VISIT(traverse_module_state->__pyx_n_s_width);
  Py_VISIT(traverse_module_state->__pyx_n_s_window);
  Py_VISIT(traverse_module_state->__pyx_n_s_window_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_wrap);
  Py_VISIT(traverse_module_state->__pyx_n_s_x);
  Py_VISIT(traverse_module_state->__pyx_kp_u_x_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_x_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_xpad);
  Py_VISIT(traverse_module_state->__pyx_n_s_y);
  Py_VISIT(traverse_module_state->__pyx_kp_u_y_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ypad);
  Py_VISIT(traverse_module_state->__pyx_n_s_zero_crossing);
  Py_VISIT(traverse_module_state->__pyx_float__0);
  Py_VISIT(traverse_module_state->__pyx_float__1);
  Py_VISIT(traverse_module_state->__pyx_float__3);
  Py_VISIT(traverse_module_state->__pyx_float__5);
  Py_VISIT(traverse_module_state->__pyx_float__8);
  Py_VISIT(traverse_module_state->__pyx_float__9);
  Py_VISIT(traverse_module_state->__pyx_float_0_);
  Py_VISIT(traverse_module_state->__pyx_float_1_);
  Py_VISIT(traverse_module_state->__pyx_float_2_);
  Py_VISIT(traverse_module_state->__pyx_float_3_);
  Py_VISIT(traverse_module_state->__pyx_float_5_);
  Py_VISIT(traverse_module_state->__pyx_float_8_);
  Py_VISIT(traverse_module_state->__pyx_float__77);
  Py_VISIT(traverse_module_state->__pyx_float_0_0);
  Py_VISIT(traverse_module_state->__pyx_float_0_3);
  Py_VISIT(traverse_module_state->__pyx_float_0_4);
  Py_VISIT(traverse_module_state->__pyx_float_0_5);
  Py_VISIT(traverse_module_state->__pyx_float_0_6);
  Py_VISIT(traverse_module_state->__pyx_float_0_8);
  Py_VISIT(traverse_module_state->__pyx_float_0_9);
  Py_VISIT(traverse_module_state->__pyx_float_1_0);
  Py_VISIT(traverse_module_state->__pyx_float_21_);
  Py_VISIT(traverse_module_state->__pyx_float_0_25);
  Py_VISIT(traverse_module_state->__pyx_float_0_75);
  Py_VISIT(traverse_module_state->__pyx_float_0_84);
  Py_VISIT(traverse_module_state->__pyx_float_10_0);
  Py_VISIT(traverse_module_state->__pyx_float_10_5);
  Py_VISIT(traverse_module_state->__pyx_float_130_);
  Py_VISIT(traverse_module_state->__pyx_float_18_0);
  Py_VISIT(traverse_module_state->__pyx_float_20_0);
  Py_VISIT(traverse_module_state->__pyx_float_38_0);
  Py_VISIT(traverse_module_state->__pyx_float_40_0);
  Py_VISIT(traverse_module_state->__pyx_float_44_0);
  Py_VISIT(traverse_module_state->__pyx_float_50_0);
  Py_VISIT(traverse_module_state->__pyx_float_65_0);
  Py_VISIT(traverse_module_state->__pyx_float_80_0);
  Py_VISIT(traverse_module_state->__pyx_float_300_0);
  Py_VISIT(traverse_module_state->__pyx_float__0000001);
  Py_VISIT(traverse_module_state->__pyx_float_neg_0_0);
  Py_VISIT(traverse_module_state->__pyx_float_neg_30_);
  Py_VISIT(traverse_module_state->__pyx_float_neg_50_);
  Py_VISIT(traverse_module_state->__pyx_float_neg_10_0);
  Py_VISIT(traverse_module_state->__pyx_float_neg_20_0);
  Py_VISIT(traverse_module_state->__pyx_float_neg_38_0);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_2);
  Py_VISIT(traverse_module_state->__pyx_int_3);
  Py_VISIT(traverse_module_state->__pyx_int_5);
  Py_VISIT(traverse_module_state->__pyx_int_10);
  Py_VISIT(traverse_module_state->__pyx_int_20);
  Py_VISIT(traverse_module_state->__pyx_int_30);
  Py_VISIT(traverse_module_state->__pyx_int_32);
  Py_VISIT(traverse_module_state->__pyx_int_40);
  Py_VISIT(traverse_module_state->__pyx_int_60);
  Py_VISIT(traverse_module_state->__pyx_int_65);
  Py_VISIT(traverse_module_state->__pyx_int_67);
  Py_VISIT(traverse_module_state->__pyx_int_75);
  Py_VISIT(traverse_module_state->__pyx_int_86);
  Py_VISIT(traverse_module_state->__pyx_int_88);
  Py_VISIT(traverse_module_state->__pyx_int_100);
  Py_VISIT(traverse_module_state->__pyx_int_130);
  Py_VISIT(traverse_module_state->__pyx_int_200);
  Py_VISIT(traverse_module_state->__pyx_int_256);
  Py_VISIT(traverse_module_state->__pyx_int_257);
  Py_VISIT(traverse_module_state->__pyx_int_259);
  Py_VISIT(traverse_module_state->__pyx_int_261);
  Py_VISIT(traverse_module_state->__pyx_int_262);
  Py_VISIT(traverse_module_state->__pyx_int_263);
  Py_VISIT(traverse_module_state->__pyx_int_268);
  Py_VISIT(traverse_module_state->__pyx_int_269);
  Py_VISIT(traverse_module_state->__pyx_int_57375);
  Py_VISIT(traverse_module_state->__pyx_int_57376);
  Py_VISIT(traverse_module_state->__pyx_int_57396);
  Py_VISIT(traverse_module_state->__pyx_int_57399);
  Py_VISIT(traverse_module_state->__pyx_int_57412);
  Py_VISIT(traverse_module_state->__pyx_int_57413);
  Py_VISIT(traverse_module_state->__pyx_int_64022378);
  Py_VISIT(traverse_module_state->__pyx_int_72070923);
  Py_VISIT(traverse_module_state->__pyx_int_126102751);
  Py_VISIT(traverse_module_state->__pyx_int_150088119);
  Py_VISIT(traverse_module_state->__pyx_int_180366278);
  Py_VISIT(traverse_module_state->__pyx_int_251175041);
  Py_VISIT(traverse_module_state->__pyx_int_neg_1);
  Py_VISIT(traverse_module_state->__pyx_int_neg_10);
  Py_VISIT(traverse_module_state->__pyx_int_neg_25);
  Py_VISIT(traverse_module_state->__pyx_k__2);
  Py_VISIT(traverse_module_state->__pyx_k__27);
  Py_VISIT(traverse_module_state->__pyx_k__67);
  Py_VISIT(traverse_module_state->__pyx_k__89);
  Py_VISIT(traverse_module_state->__pyx_k__90);
  Py_VISIT(traverse_module_state->__pyx_k__91);
  Py_VISIT(traverse_module_state->__pyx_codeobj_);
  Py_VISIT(traverse_module_state->__pyx_slice__8);
  Py_VISIT(traverse_module_state->__pyx_tuple__3);
  Py_VISIT(traverse_module_state->__pyx_tuple__5);
  Py_VISIT(traverse_module_state->__pyx_tuple__6);
  Py_VISIT(traverse_module_state->__pyx_tuple__7);
  Py_VISIT(traverse_module_state->__pyx_tuple__9);
  Py_VISIT(traverse_module_state->__pyx_slice__26);
  Py_VISIT(traverse_module_state->__pyx_tuple__10);
  Py_VISIT(traverse_module_state->__pyx_tuple__11);
  Py_VISIT(traverse_module_state->__pyx_tuple__12);
  Py_VISIT(traverse_module_state->__pyx_tuple__13);
  Py_VISIT(traverse_module_state->__pyx_tuple__14);
  Py_VISIT(traverse_module_state->__pyx_tuple__15);
  Py_VISIT(traverse_module_state->__pyx_tuple__16);
  Py_VISIT(traverse_module_state->__pyx_tuple__17);
  Py_VISIT(traverse_module_state->__pyx_tuple__18);
  Py_VISIT(traverse_module_state->__pyx_tuple__19);
  Py_VISIT(traverse_module_state->__pyx_tuple__20);
  Py_VISIT(traverse_module_state->__pyx_tuple__21);
  Py_VISIT(traverse_module_state->__pyx_tuple__22);
  Py_VISIT(traverse_module_state->__pyx_tuple__23);
  Py_VISIT(traverse_module_state->__pyx_tuple__24);
  Py_VISIT(traverse_module_state->__pyx_tuple__25);
  Py_VISIT(traverse_module_state->__pyx_tuple__28);
  Py_VISIT(traverse_module_state->__pyx_tuple__30);
  Py_VISIT(traverse_module_state->__pyx_tuple__32);
  Py_VISIT(traverse_module_state->__pyx_tuple__33);
  Py_VISIT(traverse_module_state->__pyx_tuple__35);
  Py_VISIT(traverse_module_state->__pyx_tuple__36);
  Py_VISIT(traverse_module_state->__pyx_tuple__37);
  Py_VISIT(traverse_module_state->__pyx_tuple__38);
  Py_VISIT(traverse_module_state->__pyx_tuple__39);
  Py_VISIT(traverse_module_state->__pyx_tuple__40);
  Py_VISIT(traverse_module_state->__pyx_tuple__41);
  Py_VISIT(traverse_module_state->__pyx_tuple__42);
  Py_VISIT(traverse_module_state->__pyx_tuple__43);
  Py_VISIT(traverse_module_state->__pyx_tuple__44);
  Py_VISIT(traverse_module_state->__pyx_tuple__45);
  Py_VISIT(traverse_module_state->__pyx_tuple__46);
  Py_VISIT(traverse_module_state->__pyx_tuple__47);
  Py_VISIT(traverse_module_state->__pyx_tuple__48);
  Py_VISIT(traverse_module_state->__pyx_tuple__49);
  Py_VISIT(traverse_module_state->__pyx_tuple__51);
  Py_VISIT(traverse_module_state->__pyx_tuple__52);
  Py_VISIT(traverse_module_state->__pyx_tuple__53);
  Py_VISIT(traverse_module_state->__pyx_tuple__54);
  Py_VISIT(traverse_module_state->__pyx_tuple__55);
  Py_VISIT(traverse_module_state->__pyx_tuple__56);
  Py_VISIT(traverse_module_state->__pyx_tuple__57);
  Py_VISIT(traverse_module_state->__pyx_tuple__58);
  Py_VISIT(traverse_module_state->__pyx_tuple__59);
  Py_VISIT(traverse_module_state->__pyx_tuple__60);
  Py_VISIT(traverse_module_state->__pyx_tuple__62);
  Py_VISIT(traverse_module_state->__pyx_tuple__63);
  Py_VISIT(traverse_module_state->__pyx_tuple__64);
  Py_VISIT(traverse_module_state->__pyx_tuple__65);
  Py_VISIT(traverse_module_state->__pyx_tuple__66);
  Py_VISIT(traverse_module_state->__pyx_tuple__68);
  Py_VISIT(traverse_module_state->__pyx_tuple__69);
  Py_VISIT(traverse_module_state->__pyx_tuple__70);
  Py_VISIT(traverse_module_state->__pyx_tuple__71);
  Py_VISIT(traverse_module_state->__pyx_tuple__72);
  Py_VISIT(traverse_module_state->__pyx_tuple__73);
  Py_VISIT(traverse_module_state->__pyx_tuple__74);
  Py_VISIT(traverse_module_state->__pyx_tuple__75);
  Py_VISIT(traverse_module_state->__pyx_tuple__76);
  Py_VISIT(traverse_module_state->__pyx_tuple__77);
  Py_VISIT(traverse_module_state->__pyx_tuple__78);
  Py_VISIT(traverse_module_state->__pyx_tuple__79);
  Py_VISIT(traverse_module_state->__pyx_tuple__80);
  Py_VISIT(traverse_module_state->__pyx_tuple__81);
  Py_VISIT(traverse_module_state->__pyx_tuple__82);
  Py_VISIT(traverse_module_state->__pyx_tuple__83);
  Py_VISIT(traverse_module_state->__pyx_tuple__84);
  Py_VISIT(traverse_module_state->__pyx_tuple__85);
  Py_VISIT(traverse_module_state->__pyx_tuple__86);
  Py_VISIT(traverse_module_state->__pyx_tuple__87);
  Py_VISIT(traverse_module_state->__pyx_tuple__92);
  Py_VISIT(traverse_module_state->__pyx_tuple__94);
  Py_VISIT(traverse_module_state->__pyx_tuple__95);
  Py_VISIT(traverse_module_state->__pyx_tuple__98);
  Py_VISIT(traverse_module_state->__pyx_tuple__99);
  Py_VISIT(traverse_module_state->__pyx_codeobj__4);
  Py_VISIT(traverse_module_state->__pyx_tuple__104);
  Py_VISIT(traverse_module_state->__pyx_tuple__106);
  Py_VISIT(traverse_module_state->__pyx_tuple__108);
  Py_VISIT(traverse_module_state->__pyx_tuple__110);
  Py_VISIT(traverse_module_state->__pyx_tuple__112);
  Py_VISIT(traverse_module_state->__pyx_tuple__114);
  Py_VISIT(traverse_module_state->__pyx_tuple__116);
  Py_VISIT(traverse_module_state->__pyx_tuple__118);
  Py_VISIT(traverse_module_state->__pyx_tuple__120);
  Py_VISIT(traverse_module_state->__pyx_tuple__122);
  Py_VISIT(traverse_module_state->__pyx_tuple__124);
  Py_VISIT(traverse_module_state->__pyx_tuple__126);
  Py_VISIT(traverse_module_state->__pyx_tuple__128);
  Py_VISIT(traverse_module_state->__pyx_tuple__132);
  Py_VISIT(traverse_module_state->__pyx_tuple__135);
  Py_VISIT(traverse_module_state->__pyx_tuple__137);
  Py_VISIT(traverse_module_state->__pyx_tuple__139);
  Py_VISIT(traverse_module_state->__pyx_tuple__140);
  Py_VISIT(traverse_module_state->__pyx_tuple__142);
  Py_VISIT(traverse_module_state->__pyx_tuple__143);
  Py_VISIT(traverse_module_state->__pyx_tuple__145);
  Py_VISIT(traverse_module_state->__pyx_tuple__147);
  Py_VISIT(traverse_module_state->__pyx_tuple__152);
  Py_VISIT(traverse_module_state->__pyx_tuple__154);
  Py_VISIT(traverse_module_state->__pyx_tuple__155);
  Py_VISIT(traverse_module_state->__pyx_tuple__161);
  Py_VISIT(traverse_module_state->__pyx_tuple__163);
  Py_VISIT(traverse_module_state->__pyx_tuple__167);
  Py_VISIT(traverse_module_state->__pyx_tuple__170);
  Py_VISIT(traverse_module_state->__pyx_tuple__172);
  Py_VISIT(traverse_module_state->__pyx_tuple__177);
  Py_VISIT(traverse_module_state->__pyx_tuple__180);
  Py_VISIT(traverse_module_state->__pyx_tuple__186);
  Py_VISIT(traverse_module_state->__pyx_tuple__188);
  Py_VISIT(traverse_module_state->__pyx_tuple__192);
  Py_VISIT(traverse_module_state->__pyx_tuple__197);
  Py_VISIT(traverse_module_state->__pyx_tuple__202);
  Py_VISIT(traverse_module_state->__pyx_tuple__208);
  Py_VISIT(traverse_module_state->__pyx_tuple__210);
  Py_VISIT(traverse_module_state->__pyx_tuple__214);
  Py_VISIT(traverse_module_state->__pyx_tuple__216);
  Py_VISIT(traverse_module_state->__pyx_tuple__218);
  Py_VISIT(traverse_module_state->__pyx_tuple__223);
  Py_VISIT(traverse_module_state->__pyx_tuple__228);
  Py_VISIT(traverse_module_state->__pyx_tuple__230);
  Py_VISIT(traverse_module_state->__pyx_tuple__232);
  Py_VISIT(traverse_module_state->__pyx_tuple__235);
  Py_VISIT(traverse_module_state->__pyx_tuple__237);
  Py_VISIT(traverse_module_state->__pyx_tuple__239);
  Py_VISIT(traverse_module_state->__pyx_tuple__245);
  Py_VISIT(traverse_module_state->__pyx_tuple__249);
  Py_VISIT(traverse_module_state->__pyx_tuple__256);
  Py_VISIT(traverse_module_state->__pyx_tuple__258);
  Py_VISIT(traverse_module_state->__pyx_tuple__260);
  Py_VISIT(traverse_module_state->__pyx_tuple__264);
  Py_VISIT(traverse_module_state->__pyx_tuple__266);
  Py_VISIT(traverse_module_state->__pyx_tuple__268);
  Py_VISIT(traverse_module_state->__pyx_tuple__272);
  Py_VISIT(traverse_module_state->__pyx_tuple__274);
  Py_VISIT(traverse_module_state->__pyx_tuple__276);
  Py_VISIT(traverse_module_state->__pyx_tuple__282);
  Py_VISIT(traverse_module_state->__pyx_tuple__284);
  Py_VISIT(traverse_module_state->__pyx_tuple__286);
  Py_VISIT(traverse_module_state->__pyx_tuple__290);
  Py_VISIT(traverse_module_state->__pyx_tuple__293);
  Py_VISIT(traverse_module_state->__pyx_tuple__295);
  Py_VISIT(traverse_module_state->__pyx_tuple__297);
  Py_VISIT(traverse_module_state->__pyx_tuple__301);
  Py_VISIT(traverse_module_state->__pyx_tuple__305);
  Py_VISIT(traverse_module_state->__pyx_tuple__318);
  Py_VISIT(traverse_module_state->__pyx_tuple__320);
  Py_VISIT(traverse_module_state->__pyx_tuple__326);
  Py_VISIT(traverse_module_state->__pyx_codeobj__29);
  Py_VISIT(traverse_module_state->__pyx_codeobj__31);
  Py_VISIT(traverse_module_state->__pyx_codeobj__61);
  Py_VISIT(traverse_module_state->__pyx_codeobj__96);
  Py_VISIT(traverse_module_state->__pyx_codeobj__100);
  Py_VISIT(traverse_module_state->__pyx_codeobj__101);
  Py_VISIT(traverse_module_state->__pyx_codeobj__102);
  Py_VISIT(traverse_module_state->__pyx_codeobj__103);
  Py_VISIT(traverse_module_state->__pyx_codeobj__105);
  Py_VISIT(traverse_module_state->__pyx_codeobj__107);
  Py_VISIT(traverse_module_state->__pyx_codeobj__109);
  Py_VISIT(traverse_module_state->__pyx_codeobj__111);
  Py_VISIT(traverse_module_state->__pyx_codeobj__113);
  Py_VISIT(traverse_module_state->__pyx_codeobj__115);
  Py_VISIT(traverse_module_state->__pyx_codeobj__117);
  Py_VISIT(traverse_module_state->__pyx_codeobj__119);
  Py_VISIT(traverse_module_state->__pyx_codeobj__121);
  Py_VISIT(traverse_module_state->__pyx_codeobj__123);
  Py_VISIT(traverse_module_state->__pyx_codeobj__125);
  Py_VISIT(traverse_module_state->__pyx_codeobj__127);
  Py_VISIT(traverse_module_state->__pyx_codeobj__129);
  Py_VISIT(traverse_module_state->__pyx_codeobj__130);
  Py_VISIT(traverse_module_state->__pyx_codeobj__131);
  Py_VISIT(traverse_module_state->__pyx_codeobj__133);
  Py_VISIT(traverse_module_state->__pyx_codeobj__134);
  Py_VISIT(traverse_module_state->__pyx_codeobj__136);
  Py_VISIT(traverse_module_state->__pyx_codeobj__138);
  Py_VISIT(traverse_module_state->__pyx_codeobj__141);
  Py_VISIT(traverse_module_state->__pyx_codeobj__144);
  Py_VISIT(traverse_module_state->__pyx_codeobj__146);
  Py_VISIT(traverse_module_state->__pyx_codeobj__148);
  Py_VISIT(traverse_module_state->__pyx_codeobj__149);
  Py_VISIT(traverse_module_state->__pyx_codeobj__150);
  Py_VISIT(traverse_module_state->__pyx_codeobj__151);
  Py_VISIT(traverse_module_state->__pyx_codeobj__153);
  Py_VISIT(traverse_module_state->__pyx_codeobj__156);
  Py_VISIT(traverse_module_state->__pyx_codeobj__157);
  Py_VISIT(traverse_module_state->__pyx_codeobj__158);
  Py_VISIT(traverse_module_state->__pyx_codeobj__159);
  Py_VISIT(traverse_module_state->__pyx_codeobj__160);
  Py_VISIT(traverse_module_state->__pyx_codeobj__162);
  Py_VISIT(traverse_module_state->__pyx_codeobj__164);
  Py_VISIT(traverse_module_state->__pyx_codeobj__165);
  Py_VISIT(traverse_module_state->__pyx_codeobj__166);
  Py_VISIT(traverse_module_state->__pyx_codeobj__168);
  Py_VISIT(traverse_module_state->__pyx_codeobj__169);
  Py_VISIT(traverse_module_state->__pyx_codeobj__171);
  Py_VISIT(traverse_module_state->__pyx_codeobj__173);
  Py_VISIT(traverse_module_state->__pyx_codeobj__174);
  Py_VISIT(traverse_module_state->__pyx_codeobj__175);
  Py_VISIT(traverse_module_state->__pyx_codeobj__176);
  Py_VISIT(traverse_module_state->__pyx_codeobj__178);
  Py_VISIT(traverse_module_state->__pyx_codeobj__179);
  Py_VISIT(traverse_module_state->__pyx_codeobj__181);
  Py_VISIT(traverse_module_state->__pyx_codeobj__182);
  Py_VISIT(traverse_module_state->__pyx_codeobj__183);
  Py_VISIT(traverse_module_state->__pyx_codeobj__184);
  Py_VISIT(traverse_module_state->__pyx_codeobj__185);
  Py_VISIT(traverse_module_state->__pyx_codeobj__187);
  Py_VISIT(traverse_module_state->__pyx_codeobj__189);
  Py_VISIT(traverse_module_state->__pyx_codeobj__190);
  Py_VISIT(traverse_module_state->__pyx_codeobj__191);
  Py_VISIT(traverse_module_state->__pyx_codeobj__193);
  Py_VISIT(traverse_module_state->__pyx_codeobj__194);
  Py_VISIT(traverse_module_state->__pyx_codeobj__195);
  Py_VISIT(traverse_module_state->__pyx_codeobj__196);
  Py_VISIT(traverse_module_state->__pyx_codeobj__198);
  Py_VISIT(traverse_module_state->__pyx_codeobj__199);
  Py_VISIT(traverse_module_state->__pyx_codeobj__200);
  Py_VISIT(traverse_module_state->__pyx_codeobj__201);
  Py_VISIT(traverse_module_state->__pyx_codeobj__203);
  Py_VISIT(traverse_module_state->__pyx_codeobj__204);
  Py_VISIT(traverse_module_state->__pyx_codeobj__205);
  Py_VISIT(traverse_module_state->__pyx_codeobj__206);
  Py_VISIT(traverse_module_state->__pyx_codeobj__207);
  Py_VISIT(traverse_module_state->__pyx_codeobj__209);
  Py_VISIT(traverse_module_state->__pyx_codeobj__211);
  Py_VISIT(traverse_module_state->__pyx_codeobj__212);
  Py_VISIT(traverse_module_state->__pyx_codeobj__213);
  Py_VISIT(traverse_module_state->__pyx_codeobj__215);
  Py_VISIT(traverse_module_state->__pyx_codeobj__217);
  Py_VISIT(traverse_module_state->__pyx_codeobj__219);
  Py_VISIT(traverse_module_state->__pyx_codeobj__220);
  Py_VISIT(traverse_module_state->__pyx_codeobj__221);
  Py_VISIT(traverse_module_state->__pyx_codeobj__222);
  Py_VISIT(traverse_module_state->__pyx_codeobj__224);
  Py_VISIT(traverse_module_state->__pyx_codeobj__225);
  Py_VISIT(traverse_module_state->__pyx_codeobj__226);
  Py_VISIT(traverse_module_state->__pyx_codeobj__227);
  Py_VISIT(traverse_module_state->__pyx_codeobj__229);
  Py_VISIT(traverse_module_state->__pyx_codeobj__231);
  Py_VISIT(traverse_module_state->__pyx_codeobj__233);
  Py_VISIT(traverse_module_state->__pyx_codeobj__234);
  Py_VISIT(traverse_module_state->__pyx_codeobj__236);
  Py_VISIT(traverse_module_state->__pyx_codeobj__238);
  Py_VISIT(traverse_module_state->__pyx_codeobj__240);
  Py_VISIT(traverse_module_state->__pyx_codeobj__241);
  Py_VISIT(traverse_module_state->__pyx_codeobj__242);
  Py_VISIT(traverse_module_state->__pyx_codeobj__243);
  Py_VISIT(traverse_module_state->__pyx_codeobj__244);
  Py_VISIT(traverse_module_state->__pyx_codeobj__246);
  Py_VISIT(traverse_module_state->__pyx_codeobj__247);
  Py_VISIT(traverse_module_state->__pyx_codeobj__248);
  Py_VISIT(traverse_module_state->__pyx_codeobj__250);
  Py_VISIT(traverse_module_state->__pyx_codeobj__251);
  Py_VISIT(traverse_module_state->__pyx_codeobj__252);
  Py_VISIT(traverse_module_state->__pyx_codeobj__253);
  Py_VISIT(traverse_module_state->__pyx_codeobj__254);
  Py_VISIT(traverse_module_state->__pyx_codeobj__255);
  Py_VISIT(traverse_module_state->__pyx_codeobj__257);
  Py_VISIT(traverse_module_state->__pyx_codeobj__259);
  Py_VISIT(traverse_module_state->__pyx_codeobj__261);
  Py_VISIT(traverse_module_state->__pyx_codeobj__262);
  Py_VISIT(traverse_module_state->__pyx_codeobj__263);
  Py_VISIT(traverse_module_state->__pyx_codeobj__265);
  Py_VISIT(traverse_module_state->__pyx_codeobj__267);
  Py_VISIT(traverse_module_state->__pyx_codeobj__269);
  Py_VISIT(traverse_module_state->__pyx_codeobj__270);
  Py_VISIT(traverse_module_state->__pyx_codeobj__271);
  Py_VISIT(traverse_module_state->__pyx_codeobj__273);
  Py_VISIT(traverse_module_state->__pyx_codeobj__275);
  Py_VISIT(traverse_module_state->__pyx_codeobj__277);
  Py_VISIT(traverse_module_state->__pyx_codeobj__278);
  Py_VISIT(traverse_module_state->__pyx_codeobj__279);
  Py_VISIT(traverse_module_state->__pyx_codeobj__280);
  Py_VISIT(traverse_module_state->__pyx_codeobj__281);
  Py_VISIT(traverse_module_state->__pyx_codeobj__283);
  Py_VISIT(traverse_module_state->__pyx_codeobj__285);
  Py_VISIT(traverse_module_state->__pyx_codeobj__287);
  Py_VISIT(traverse_module_state->__pyx_codeobj__288);
  Py_VISIT(traverse_module_state->__pyx_codeobj__289);
  Py_VISIT(traverse_module_state->__pyx_codeobj__291);
  Py_VISIT(traverse_module_state->__pyx_codeobj__292);
  Py_VISIT(traverse_module_state->__pyx_codeobj__294);
  Py_VISIT(traverse_module_state->__pyx_codeobj__296);
  Py_VISIT(traverse_module_state->__pyx_codeobj__298);
  Py_VISIT(traverse_module_state->__pyx_codeobj__299);
  Py_VISIT(traverse_module_state->__pyx_codeobj__300);
  Py_VISIT(traverse_module_state->__pyx_codeobj__302);
  Py_VISIT(traverse_module_state->__pyx_codeobj__303);
  Py_VISIT(traverse_module_state->__pyx_codeobj__304);
  Py_VISIT(traverse_module_state->__pyx_codeobj__306);
  Py_VISIT(traverse_module_state->__pyx_codeobj__307);
  Py_VISIT(traverse_module_state->__pyx_codeobj__308);
  Py_VISIT(traverse_module_state->__pyx_codeobj__309);
  Py_VISIT(traverse_module_state->__pyx_codeobj__310);
  Py_VISIT(traverse_module_state->__pyx_codeobj__311);
  Py_VISIT(traverse_module_state->__pyx_codeobj__312);
  Py_VISIT(traverse_module_state->__pyx_codeobj__313);
  Py_VISIT(traverse_module_state->__pyx_codeobj__314);
  Py_VISIT(traverse_module_state->__pyx_codeobj__315);
  Py_VISIT(traverse_module_state->__pyx_codeobj__316);
  Py_VISIT(traverse_module_state->__pyx_codeobj__317);
  Py_VISIT(traverse_module_state->__pyx_codeobj__319);
  Py_VISIT(traverse_module_state->__pyx_codeobj__321);
  Py_VISIT(traverse_module_state->__pyx_codeobj__322);
  Py_VISIT(traverse_module_state->__pyx_codeobj__323);
  Py_VISIT(traverse_module_state->__pyx_codeobj__324);
  Py_VISIT(traverse_module_state->__pyx_codeobj__325);
  Py_VISIT(traverse_module_state->__pyx_codeobj__327);
  Py_VISIT(traverse_module_state->__pyx_codeobj__328);
  Py_VISIT(traverse_module_state->__pyx_codeobj__329);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#if CYTHON_USE_MODULE_STATE
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
#define __pyx_ptype_6pyglui_4cygl_5utils_RGBA __pyx_mstate_global->__pyx_ptype_6pyglui_4cygl_5utils_RGBA
#define __pyx_ptype_6pyglui_4cygl_5utils_Render_Target __pyx_mstate_global->__pyx_ptype_6pyglui_4cygl_5utils_Render_Target
#define __pyx_ptype_6pyglui_4cygl_5utils_Named_Texture __pyx_mstate_global->__pyx_ptype_6pyglui_4cygl_5utils_Named_Texture
#define __pyx_ptype_6pyglui_4cygl_5utils_Sphere __pyx_mstate_global->__pyx_ptype_6pyglui_4cygl_5utils_Sphere
#define __pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context __pyx_mstate_global->__pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context
#define __pyx_ptype_6pyglui_2ui_UI __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_UI
#define __pyx_type_6pyglui_2ui_UI __pyx_mstate_global->__pyx_type_6pyglui_2ui_UI
#define __pyx_ptype_6pyglui_2ui_UI_element __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_UI_element
#define __pyx_type_6pyglui_2ui_UI_element __pyx_mstate_global->__pyx_type_6pyglui_2ui_UI_element
#define __pyx_ptype_6pyglui_2ui_Slider __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Slider
#define __pyx_type_6pyglui_2ui_Slider __pyx_mstate_global->__pyx_type_6pyglui_2ui_Slider
#define __pyx_ptype_6pyglui_2ui_Switch __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Switch
#define __pyx_type_6pyglui_2ui_Switch __pyx_mstate_global->__pyx_type_6pyglui_2ui_Switch
#define __pyx_ptype_6pyglui_2ui_Selector __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Selector
#define __pyx_type_6pyglui_2ui_Selector __pyx_mstate_global->__pyx_type_6pyglui_2ui_Selector
#define __pyx_ptype_6pyglui_2ui_Text_Input __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Text_Input
#define __pyx_type_6pyglui_2ui_Text_Input __pyx_mstate_global->__pyx_type_6pyglui_2ui_Text_Input
#define __pyx_ptype_6pyglui_2ui_Slider_Text_Input __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Slider_Text_Input
#define __pyx_type_6pyglui_2ui_Slider_Text_Input __pyx_mstate_global->__pyx_type_6pyglui_2ui_Slider_Text_Input
#define __pyx_ptype_6pyglui_2ui_Button __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Button
#define __pyx_type_6pyglui_2ui_Button __pyx_mstate_global->__pyx_type_6pyglui_2ui_Button
#define __pyx_ptype_6pyglui_2ui_Separator __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Separator
#define __pyx_type_6pyglui_2ui_Separator __pyx_mstate_global->__pyx_type_6pyglui_2ui_Separator
#define __pyx_ptype_6pyglui_2ui_Info_Text __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Info_Text
#define __pyx_type_6pyglui_2ui_Info_Text __pyx_mstate_global->__pyx_type_6pyglui_2ui_Info_Text
#define __pyx_ptype_6pyglui_2ui_Color_Legend __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Color_Legend
#define __pyx_type_6pyglui_2ui_Color_Legend __pyx_mstate_global->__pyx_type_6pyglui_2ui_Color_Legend
#define __pyx_ptype_6pyglui_2ui_Thumb __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Thumb
#define __pyx_type_6pyglui_2ui_Thumb __pyx_mstate_global->__pyx_type_6pyglui_2ui_Thumb
#define __pyx_ptype_6pyglui_2ui_Icon __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Icon
#define __pyx_type_6pyglui_2ui_Icon __pyx_mstate_global->__pyx_type_6pyglui_2ui_Icon
#define __pyx_ptype_6pyglui_2ui_Hot_Key __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Hot_Key
#define __pyx_type_6pyglui_2ui_Hot_Key __pyx_mstate_global->__pyx_type_6pyglui_2ui_Hot_Key
#define __pyx_ptype_6pyglui_2ui_Seek_Bar __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Seek_Bar
#define __pyx_type_6pyglui_2ui_Seek_Bar __pyx_mstate_global->__pyx_type_6pyglui_2ui_Seek_Bar
#define __pyx_ptype_6pyglui_2ui_Timeline __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Timeline
#define __pyx_type_6pyglui_2ui_Timeline __pyx_mstate_global->__pyx_type_6pyglui_2ui_Timeline
#define __pyx_ptype_6pyglui_2ui_Base_Menu __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Base_Menu
#define __pyx_type_6pyglui_2ui_Base_Menu __pyx_mstate_global->__pyx_type_6pyglui_2ui_Base_Menu
#define __pyx_ptype_6pyglui_2ui_Movable_Menu __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Movable_Menu
#define __pyx_type_6pyglui_2ui_Movable_Menu __pyx_mstate_global->__pyx_type_6pyglui_2ui_Movable_Menu
#define __pyx_ptype_6pyglui_2ui_Stretching_Menu __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Stretching_Menu
#define __pyx_type_6pyglui_2ui_Stretching_Menu __pyx_mstate_global->__pyx_type_6pyglui_2ui_Stretching_Menu
#define __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu
#define __pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu __pyx_mstate_global->__pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu
#define __pyx_ptype_6pyglui_2ui_Growing_Menu __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Growing_Menu
#define __pyx_type_6pyglui_2ui_Growing_Menu __pyx_mstate_global->__pyx_type_6pyglui_2ui_Growing_Menu
#define __pyx_ptype_6pyglui_2ui_Scrolling_Menu __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Scrolling_Menu
#define __pyx_type_6pyglui_2ui_Scrolling_Menu __pyx_mstate_global->__pyx_type_6pyglui_2ui_Scrolling_Menu
#define __pyx_ptype_6pyglui_2ui_Container __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Container
#define __pyx_type_6pyglui_2ui_Container __pyx_mstate_global->__pyx_type_6pyglui_2ui_Container
#define __pyx_ptype_6pyglui_2ui_Timeline_Menu __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Timeline_Menu
#define __pyx_type_6pyglui_2ui_Timeline_Menu __pyx_mstate_global->__pyx_type_6pyglui_2ui_Timeline_Menu
#define __pyx_ptype_6pyglui_2ui_Synced_Value __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Synced_Value
#define __pyx_type_6pyglui_2ui_Synced_Value __pyx_mstate_global->__pyx_type_6pyglui_2ui_Synced_Value
#define __pyx_ptype_6pyglui_2ui_Input __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Input
#define __pyx_type_6pyglui_2ui_Input __pyx_mstate_global->__pyx_type_6pyglui_2ui_Input
#define __pyx_ptype_6pyglui_2ui_Draggable __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Draggable
#define __pyx_type_6pyglui_2ui_Draggable __pyx_mstate_global->__pyx_type_6pyglui_2ui_Draggable
#define __pyx_ptype_6pyglui_2ui_FitBox __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_FitBox
#define __pyx_type_6pyglui_2ui_FitBox __pyx_mstate_global->__pyx_type_6pyglui_2ui_FitBox
#define __pyx_ptype_6pyglui_2ui_Vec2 __pyx_mstate_global->__pyx_ptype_6pyglui_2ui_Vec2
#define __pyx_type_6pyglui_2ui_Vec2 __pyx_mstate_global->__pyx_type_6pyglui_2ui_Vec2
#define __pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off __pyx_mstate_global->__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off
#define __pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off __pyx_mstate_global->__pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off
#define __pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange __pyx_mstate_global->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange
#define __pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange __pyx_mstate_global->__pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange
#define __pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__ __pyx_mstate_global->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__
#define __pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit__ __pyx_mstate_global->__pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit__
#define __pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__ __pyx_mstate_global->__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__
#define __pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit__ __pyx_mstate_global->__pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit__
#define __pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm __pyx_mstate_global->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm
#define __pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm __pyx_mstate_global->__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm
#define __pyx_kp_u_02_0f_06_3f __pyx_mstate_global->__pyx_kp_u_02_0f_06_3f
#define __pyx_kp_u_0_2f __pyx_mstate_global->__pyx_kp_u_0_2f
#define __pyx_kp_u_1_31_0 __pyx_mstate_global->__pyx_kp_u_1_31_0
#define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
#define __pyx_n_s_AttributeError __pyx_mstate_global->__pyx_n_s_AttributeError
#define __pyx_n_s_Base_Menu __pyx_mstate_global->__pyx_n_s_Base_Menu
#define __pyx_n_s_Base_Menu___reduce_cython __pyx_mstate_global->__pyx_n_s_Base_Menu___reduce_cython
#define __pyx_n_s_Base_Menu___setstate_cython __pyx_mstate_global->__pyx_n_s_Base_Menu___setstate_cython
#define __pyx_n_s_Base_Menu_append __pyx_mstate_global->__pyx_n_s_Base_Menu_append
#define __pyx_n_s_Base_Menu_collect_in_window __pyx_mstate_global->__pyx_n_s_Base_Menu_collect_in_window
#define __pyx_n_s_Base_Menu_extend __pyx_mstate_global->__pyx_n_s_Base_Menu_extend
#define __pyx_n_s_Base_Menu_insert __pyx_mstate_global->__pyx_n_s_Base_Menu_insert
#define __pyx_n_s_Base_Menu_remove __pyx_mstate_global->__pyx_n_s_Base_Menu_remove
#define __pyx_n_s_Base_Menu_sync __pyx_mstate_global->__pyx_n_s_Base_Menu_sync
#define __pyx_n_s_Button __pyx_mstate_global->__pyx_n_s_Button
#define __pyx_n_s_Button___reduce_cython __pyx_mstate_global->__pyx_n_s_Button___reduce_cython
#define __pyx_n_s_Button___setstate_cython __pyx_mstate_global->__pyx_n_s_Button___setstate_cython
#define __pyx_n_s_Button_draw __pyx_mstate_global->__pyx_n_s_Button_draw
#define __pyx_n_s_Button_handle_input __pyx_mstate_global->__pyx_n_s_Button_handle_input
#define __pyx_kp_u_Buttons __pyx_mstate_global->__pyx_kp_u_Buttons
#define __pyx_kp_u_Can_only_append_UI_elements_not __pyx_mstate_global->__pyx_kp_u_Can_only_append_UI_elements_not
#define __pyx_kp_u_Chars __pyx_mstate_global->__pyx_kp_u_Chars
#define __pyx_n_s_Color_Legend __pyx_mstate_global->__pyx_n_s_Color_Legend
#define __pyx_n_s_Color_Legend___reduce_cython __pyx_mstate_global->__pyx_n_s_Color_Legend___reduce_cython
#define __pyx_n_s_Color_Legend___setstate_cython __pyx_mstate_global->__pyx_n_s_Color_Legend___setstate_cython
#define __pyx_n_s_Color_Legend_draw __pyx_mstate_global->__pyx_n_s_Color_Legend_draw
#define __pyx_n_s_Color_Legend_precompute __pyx_mstate_global->__pyx_n_s_Color_Legend_precompute
#define __pyx_n_s_Container __pyx_mstate_global->__pyx_n_s_Container
#define __pyx_n_u_Container __pyx_mstate_global->__pyx_n_u_Container
#define __pyx_n_s_Container___reduce_cython __pyx_mstate_global->__pyx_n_s_Container___reduce_cython
#define __pyx_n_s_Container___setstate_cython __pyx_mstate_global->__pyx_n_s_Container___setstate_cython
#define __pyx_n_s_Container_draw __pyx_mstate_global->__pyx_n_s_Container_draw
#define __pyx_n_s_Container_draw_overlay __pyx_mstate_global->__pyx_n_s_Container_draw_overlay
#define __pyx_n_s_Container_handle_input __pyx_mstate_global->__pyx_n_s_Container_handle_input
#define __pyx_n_s_Container_init __pyx_mstate_global->__pyx_n_s_Container_init
#define __pyx_kp_u_Current_Input_Mouse_pos __pyx_mstate_global->__pyx_kp_u_Current_Input_Mouse_pos
#define __pyx_n_u_Darwin __pyx_mstate_global->__pyx_n_u_Darwin
#define __pyx_kp_u_Dict __pyx_mstate_global->__pyx_kp_u_Dict
#define __pyx_n_s_Draggable __pyx_mstate_global->__pyx_n_s_Draggable
#define __pyx_n_s_Draggable___reduce_cython __pyx_mstate_global->__pyx_n_s_Draggable___reduce_cython
#define __pyx_n_s_Draggable___setstate_cython __pyx_mstate_global->__pyx_n_s_Draggable___setstate_cython
#define __pyx_n_s_Draggable_pre_handle_input __pyx_mstate_global->__pyx_n_s_Draggable_pre_handle_input
#define __pyx_n_s_FitBox __pyx_mstate_global->__pyx_n_s_FitBox
#define __pyx_n_s_FitBox___reduce_cython __pyx_mstate_global->__pyx_n_s_FitBox___reduce_cython
#define __pyx_n_s_FitBox___setstate_cython __pyx_mstate_global->__pyx_n_s_FitBox___setstate_cython
#define __pyx_kp_u_FitBox_design_org __pyx_mstate_global->__pyx_kp_u_FitBox_design_org
#define __pyx_n_s_FitBox_mouse_over __pyx_mstate_global->__pyx_n_s_FitBox_mouse_over
#define __pyx_n_s_FitBox_mouse_over_margin __pyx_mstate_global->__pyx_n_s_FitBox_mouse_over_margin
#define __pyx_n_s_Growing_Menu __pyx_mstate_global->__pyx_n_s_Growing_Menu
#define __pyx_n_s_Growing_Menu___reduce_cython __pyx_mstate_global->__pyx_n_s_Growing_Menu___reduce_cython
#define __pyx_n_s_Growing_Menu___setstate_cython __pyx_mstate_global->__pyx_n_s_Growing_Menu___setstate_cython
#define __pyx_n_s_Growing_Menu_draw __pyx_mstate_global->__pyx_n_s_Growing_Menu_draw
#define __pyx_n_s_Growing_Menu_draw_overlay __pyx_mstate_global->__pyx_n_s_Growing_Menu_draw_overlay
#define __pyx_n_s_Growing_Menu_handle_input __pyx_mstate_global->__pyx_n_s_Growing_Menu_handle_input
#define __pyx_n_s_Growing_Menu_precompute __pyx_mstate_global->__pyx_n_s_Growing_Menu_precompute
#define __pyx_n_s_Growing_Menu_toggle_iconified __pyx_mstate_global->__pyx_n_s_Growing_Menu_toggle_iconified
#define __pyx_kp_u_Header_Positon_argument_needs_to __pyx_mstate_global->__pyx_kp_u_Header_Positon_argument_needs_to
#define __pyx_n_s_Horizontally_Stretching_Menu __pyx_mstate_global->__pyx_n_s_Horizontally_Stretching_Menu
#define __pyx_n_s_Horizontally_Stretching_Menu___r __pyx_mstate_global->__pyx_n_s_Horizontally_Stretching_Menu___r
#define __pyx_n_s_Horizontally_Stretching_Menu___s __pyx_mstate_global->__pyx_n_s_Horizontally_Stretching_Menu___s
#define __pyx_n_s_Horizontally_Stretching_Menu_dra __pyx_mstate_global->__pyx_n_s_Horizontally_Stretching_Menu_dra
#define __pyx_n_s_Horizontally_Stretching_Menu_dra_2 __pyx_mstate_global->__pyx_n_s_Horizontally_Stretching_Menu_dra_2
#define __pyx_n_s_Horizontally_Stretching_Menu_han __pyx_mstate_global->__pyx_n_s_Horizontally_Stretching_Menu_han
#define __pyx_n_s_Hot_Key __pyx_mstate_global->__pyx_n_s_Hot_Key
#define __pyx_n_s_Hot_Key___reduce_cython __pyx_mstate_global->__pyx_n_s_Hot_Key___reduce_cython
#define __pyx_n_s_Hot_Key___setstate_cython __pyx_mstate_global->__pyx_n_s_Hot_Key___setstate_cython
#define __pyx_n_s_Hot_Key_handle_input __pyx_mstate_global->__pyx_n_s_Hot_Key_handle_input
#define __pyx_n_s_Hot_Key_sync __pyx_mstate_global->__pyx_n_s_Hot_Key_sync
#define __pyx_n_s_Icon __pyx_mstate_global->__pyx_n_s_Icon
#define __pyx_n_s_Icon___reduce_cython __pyx_mstate_global->__pyx_n_s_Icon___reduce_cython
#define __pyx_n_s_Icon___setstate_cython __pyx_mstate_global->__pyx_n_s_Icon___setstate_cython
#define __pyx_n_s_Icon_draw __pyx_mstate_global->__pyx_n_s_Icon_draw
#define __pyx_n_s_Icon_draw_overlay __pyx_mstate_global->__pyx_n_s_Icon_draw_overlay
#define __pyx_n_s_Icon_handle_input __pyx_mstate_global->__pyx_n_s_Icon_handle_input
#define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2
#define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
#define __pyx_kp_u_Indicator_values_are_required_to __pyx_mstate_global->__pyx_kp_u_Indicator_values_are_required_to
#define __pyx_n_s_Info_Text __pyx_mstate_global->__pyx_n_s_Info_Text
#define __pyx_n_s_Info_Text___reduce_cython __pyx_mstate_global->__pyx_n_s_Info_Text___reduce_cython
#define __pyx_n_s_Info_Text___setstate_cython __pyx_mstate_global->__pyx_n_s_Info_Text___setstate_cython
#define __pyx_n_s_Info_Text_draw __pyx_mstate_global->__pyx_n_s_Info_Text_draw
#define __pyx_n_s_Info_Text_precompute __pyx_mstate_global->__pyx_n_s_Info_Text_precompute
#define __pyx_n_s_Input __pyx_mstate_global->__pyx_n_s_Input
#define __pyx_n_s_Input___reduce_cython __pyx_mstate_global->__pyx_n_s_Input___reduce_cython
#define __pyx_n_s_Input___setstate_cython __pyx_mstate_global->__pyx_n_s_Input___setstate_cython
#define __pyx_n_s_Input_purge __pyx_mstate_global->__pyx_n_s_Input_purge
#define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
#define __pyx_kp_u_Keys __pyx_mstate_global->__pyx_kp_u_Keys
#define __pyx_kp_u_Mouse_delta __pyx_mstate_global->__pyx_kp_u_Mouse_delta
#define __pyx_n_s_Movable_Menu __pyx_mstate_global->__pyx_n_s_Movable_Menu
#define __pyx_n_s_Movable_Menu___reduce_cython __pyx_mstate_global->__pyx_n_s_Movable_Menu___reduce_cython
#define __pyx_n_s_Movable_Menu___setstate_cython __pyx_mstate_global->__pyx_n_s_Movable_Menu___setstate_cython
#define __pyx_kp_u_None __pyx_mstate_global->__pyx_kp_u_None
#define __pyx_n_s_NotImplemented __pyx_mstate_global->__pyx_n_s_NotImplemented
#define __pyx_kp_u_OpenSans_Regular_ttf __pyx_mstate_global->__pyx_kp_u_OpenSans_Regular_ttf
#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
#define __pyx_n_s_Pyx_CFunc_float__lParenUI_elem __pyx_mstate_global->__pyx_n_s_Pyx_CFunc_float__lParenUI_elem
#define __pyx_kp_u_Roboto_Regular_ttf __pyx_mstate_global->__pyx_kp_u_Roboto_Regular_ttf
#define __pyx_kp_u_Scroll __pyx_mstate_global->__pyx_kp_u_Scroll
#define __pyx_kp_u_Scrolling_Menu __pyx_mstate_global->__pyx_kp_u_Scrolling_Menu
#define __pyx_n_s_Scrolling_Menu_2 __pyx_mstate_global->__pyx_n_s_Scrolling_Menu_2
#define __pyx_n_s_Scrolling_Menu___reduce_cython __pyx_mstate_global->__pyx_n_s_Scrolling_Menu___reduce_cython
#define __pyx_n_s_Scrolling_Menu___setstate_cython __pyx_mstate_global->__pyx_n_s_Scrolling_Menu___setstate_cython
#define __pyx_n_s_Scrolling_Menu_draw __pyx_mstate_global->__pyx_n_s_Scrolling_Menu_draw
#define __pyx_n_s_Scrolling_Menu_draw_overlay __pyx_mstate_global->__pyx_n_s_Scrolling_Menu_draw_overlay
#define __pyx_n_s_Scrolling_Menu_handle_input __pyx_mstate_global->__pyx_n_s_Scrolling_Menu_handle_input
#define __pyx_n_s_Scrolling_Menu_toggle_iconified __pyx_mstate_global->__pyx_n_s_Scrolling_Menu_toggle_iconified
#define __pyx_n_s_Seek_Bar __pyx_mstate_global->__pyx_n_s_Seek_Bar
#define __pyx_n_s_Seek_Bar___reduce_cython __pyx_mstate_global->__pyx_n_s_Seek_Bar___reduce_cython
#define __pyx_n_s_Seek_Bar___setstate_cython __pyx_mstate_global->__pyx_n_s_Seek_Bar___setstate_cython
#define __pyx_n_s_Seek_Bar_draw __pyx_mstate_global->__pyx_n_s_Seek_Bar_draw
#define __pyx_n_s_Seek_Bar_draw_overlay __pyx_mstate_global->__pyx_n_s_Seek_Bar_draw_overlay
#define __pyx_n_s_Seek_Bar_handle_input __pyx_mstate_global->__pyx_n_s_Seek_Bar_handle_input
#define __pyx_n_s_Seek_Bar_sync __pyx_mstate_global->__pyx_n_s_Seek_Bar_sync
#define __pyx_n_s_Selector __pyx_mstate_global->__pyx_n_s_Selector
#define __pyx_n_s_Selector___reduce_cython __pyx_mstate_global->__pyx_n_s_Selector___reduce_cython
#define __pyx_n_s_Selector___setstate_cython __pyx_mstate_global->__pyx_n_s_Selector___setstate_cython
#define __pyx_n_s_Selector__on_change __pyx_mstate_global->__pyx_n_s_Selector__on_change
#define __pyx_n_s_Selector_draw __pyx_mstate_global->__pyx_n_s_Selector_draw
#define __pyx_n_s_Selector_handle_input __pyx_mstate_global->__pyx_n_s_Selector_handle_input
#define __pyx_n_s_Selector_sync __pyx_mstate_global->__pyx_n_s_Selector_sync
#define __pyx_n_s_Separator __pyx_mstate_global->__pyx_n_s_Separator
#define __pyx_n_s_Separator___reduce_cython __pyx_mstate_global->__pyx_n_s_Separator___reduce_cython
#define __pyx_n_s_Separator___setstate_cython __pyx_mstate_global->__pyx_n_s_Separator___setstate_cython
#define __pyx_n_s_Separator_draw __pyx_mstate_global->__pyx_n_s_Separator_draw
#define __pyx_n_s_Separator_precompute __pyx_mstate_global->__pyx_n_s_Separator_precompute
#define __pyx_n_s_Slider __pyx_mstate_global->__pyx_n_s_Slider
#define __pyx_n_s_Slider_Text_Input __pyx_mstate_global->__pyx_n_s_Slider_Text_Input
#define __pyx_n_s_Slider_Text_Input___reduce_cytho __pyx_mstate_global->__pyx_n_s_Slider_Text_Input___reduce_cytho
#define __pyx_n_s_Slider_Text_Input___setstate_cyt __pyx_mstate_global->__pyx_n_s_Slider_Text_Input___setstate_cyt
#define __pyx_n_s_Slider___reduce_cython __pyx_mstate_global->__pyx_n_s_Slider___reduce_cython
#define __pyx_n_s_Slider___setstate_cython __pyx_mstate_global->__pyx_n_s_Slider___setstate_cython
#define __pyx_n_s_Slider_draw __pyx_mstate_global->__pyx_n_s_Slider_draw
#define __pyx_n_s_Slider_handle_input __pyx_mstate_global->__pyx_n_s_Slider_handle_input
#define __pyx_n_s_Slider_sync __pyx_mstate_global->__pyx_n_s_Slider_sync
#define __pyx_n_s_Slider_validate __pyx_mstate_global->__pyx_n_s_Slider_validate
#define __pyx_kp_u_Slider_values_should_be_float_or __pyx_mstate_global->__pyx_kp_u_Slider_values_should_be_float_or
#define __pyx_n_s_Stretching_Menu __pyx_mstate_global->__pyx_n_s_Stretching_Menu
#define __pyx_n_s_Stretching_Menu___reduce_cython __pyx_mstate_global->__pyx_n_s_Stretching_Menu___reduce_cython
#define __pyx_n_s_Stretching_Menu___setstate_cytho __pyx_mstate_global->__pyx_n_s_Stretching_Menu___setstate_cytho
#define __pyx_n_s_Stretching_Menu_draw __pyx_mstate_global->__pyx_n_s_Stretching_Menu_draw
#define __pyx_n_s_Stretching_Menu_draw_overlay __pyx_mstate_global->__pyx_n_s_Stretching_Menu_draw_overlay
#define __pyx_n_s_Stretching_Menu_handle_input __pyx_mstate_global->__pyx_n_s_Stretching_Menu_handle_input
#define __pyx_n_s_Switch __pyx_mstate_global->__pyx_n_s_Switch
#define __pyx_n_s_Switch___reduce_cython __pyx_mstate_global->__pyx_n_s_Switch___reduce_cython
#define __pyx_n_s_Switch___setstate_cython __pyx_mstate_global->__pyx_n_s_Switch___setstate_cython
#define __pyx_n_s_Switch_draw __pyx_mstate_global->__pyx_n_s_Switch_draw
#define __pyx_n_s_Switch_handle_input __pyx_mstate_global->__pyx_n_s_Switch_handle_input
#define __pyx_n_s_Switch_sync __pyx_mstate_global->__pyx_n_s_Switch_sync
#define __pyx_n_s_Synced_Value __pyx_mstate_global->__pyx_n_s_Synced_Value
#define __pyx_n_s_Synced_Value___reduce_cython __pyx_mstate_global->__pyx_n_s_Synced_Value___reduce_cython
#define __pyx_n_s_Synced_Value___setstate_cython __pyx_mstate_global->__pyx_n_s_Synced_Value___setstate_cython
#define __pyx_kp_u_Synced_value_s_is_not_part_of_se __pyx_mstate_global->__pyx_kp_u_Synced_value_s_is_not_part_of_se
#define __pyx_n_s_Text_Input __pyx_mstate_global->__pyx_n_s_Text_Input
#define __pyx_n_s_Text_Input___reduce_cython __pyx_mstate_global->__pyx_n_s_Text_Input___reduce_cython
#define __pyx_n_s_Text_Input___setstate_cython __pyx_mstate_global->__pyx_n_s_Text_Input___setstate_cython
#define __pyx_n_s_Text_Input_draw __pyx_mstate_global->__pyx_n_s_Text_Input_draw
#define __pyx_n_s_Text_Input_handle_input __pyx_mstate_global->__pyx_n_s_Text_Input_handle_input
#define __pyx_n_s_Text_Input_pre_handle_input __pyx_mstate_global->__pyx_n_s_Text_Input_pre_handle_input
#define __pyx_n_s_Text_Input_sync __pyx_mstate_global->__pyx_n_s_Text_Input_sync
#define __pyx_n_s_Thumb __pyx_mstate_global->__pyx_n_s_Thumb
#define __pyx_n_s_Thumb___reduce_cython __pyx_mstate_global->__pyx_n_s_Thumb___reduce_cython
#define __pyx_n_s_Thumb___setstate_cython __pyx_mstate_global->__pyx_n_s_Thumb___setstate_cython
#define __pyx_n_s_Thumb_draw __pyx_mstate_global->__pyx_n_s_Thumb_draw
#define __pyx_n_s_Thumb_handle_input __pyx_mstate_global->__pyx_n_s_Thumb_handle_input
#define __pyx_n_s_Thumb_sync __pyx_mstate_global->__pyx_n_s_Thumb_sync
#define __pyx_n_s_Timeline __pyx_mstate_global->__pyx_n_s_Timeline
#define __pyx_n_s_Timeline_Menu __pyx_mstate_global->__pyx_n_s_Timeline_Menu
#define __pyx_n_s_Timeline_Menu___reduce_cython __pyx_mstate_global->__pyx_n_s_Timeline_Menu___reduce_cython
#define __pyx_n_s_Timeline_Menu___setstate_cython __pyx_mstate_global->__pyx_n_s_Timeline_Menu___setstate_cython
#define __pyx_n_s_Timeline_Menu_append __pyx_mstate_global->__pyx_n_s_Timeline_Menu_append
#define __pyx_n_s_Timeline_Menu_draw __pyx_mstate_global->__pyx_n_s_Timeline_Menu_draw
#define __pyx_n_s_Timeline_Menu_extend __pyx_mstate_global->__pyx_n_s_Timeline_Menu_extend
#define __pyx_n_s_Timeline_Menu_insert __pyx_mstate_global->__pyx_n_s_Timeline_Menu_insert
#define __pyx_n_s_Timeline_Menu_remove __pyx_mstate_global->__pyx_n_s_Timeline_Menu_remove
#define __pyx_n_s_Timeline_Menu_toggle_iconified __pyx_mstate_global->__pyx_n_s_Timeline_Menu_toggle_iconified
#define __pyx_n_s_Timeline___reduce_cython __pyx_mstate_global->__pyx_n_s_Timeline___reduce_cython
#define __pyx_n_s_Timeline___setstate_cython __pyx_mstate_global->__pyx_n_s_Timeline___setstate_cython
#define __pyx_n_s_Timeline_draw __pyx_mstate_global->__pyx_n_s_Timeline_draw
#define __pyx_n_s_Timeline_draw_label_default __pyx_mstate_global->__pyx_n_s_Timeline_draw_label_default
#define __pyx_n_s_Timeline_refresh __pyx_mstate_global->__pyx_n_s_Timeline_refresh
#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
#define __pyx_n_s_UI __pyx_mstate_global->__pyx_n_s_UI
#define __pyx_kp_u_UI_Framebuffer_could_not_be_crea __pyx_mstate_global->__pyx_kp_u_UI_Framebuffer_could_not_be_crea
#define __pyx_n_s_UI___reduce_cython __pyx_mstate_global->__pyx_n_s_UI___reduce_cython
#define __pyx_n_s_UI___setstate_cython __pyx_mstate_global->__pyx_n_s_UI___setstate_cython
#define __pyx_n_s_UI_add_font __pyx_mstate_global->__pyx_n_s_UI_add_font
#define __pyx_n_s_UI_append __pyx_mstate_global->__pyx_n_s_UI_append
#define __pyx_n_s_UI_collect_menus __pyx_mstate_global->__pyx_n_s_UI_collect_menus
#define __pyx_n_s_UI_element __pyx_mstate_global->__pyx_n_s_UI_element
#define __pyx_n_s_UI_element___reduce_cython __pyx_mstate_global->__pyx_n_s_UI_element___reduce_cython
#define __pyx_n_s_UI_element___setstate_cython __pyx_mstate_global->__pyx_n_s_UI_element___setstate_cython
#define __pyx_n_s_UI_element_draw __pyx_mstate_global->__pyx_n_s_UI_element_draw
#define __pyx_n_s_UI_element_draw_overlay __pyx_mstate_global->__pyx_n_s_UI_element_draw_overlay
#define __pyx_n_s_UI_element_handle_input __pyx_mstate_global->__pyx_n_s_UI_element_handle_input
#define __pyx_n_s_UI_element_pre_handle_input __pyx_mstate_global->__pyx_n_s_UI_element_pre_handle_input
#define __pyx_n_s_UI_element_precompute __pyx_mstate_global->__pyx_n_s_UI_element_precompute
#define __pyx_n_s_UI_element_sync __pyx_mstate_global->__pyx_n_s_UI_element_sync
#define __pyx_n_s_UI_extend __pyx_mstate_global->__pyx_n_s_UI_extend
#define __pyx_n_s_UI_remove __pyx_mstate_global->__pyx_n_s_UI_remove
#define __pyx_n_s_UI_terminate __pyx_mstate_global->__pyx_n_s_UI_terminate
#define __pyx_n_s_UI_update __pyx_mstate_global->__pyx_n_s_UI_update
#define __pyx_n_s_UI_update_button __pyx_mstate_global->__pyx_n_s_UI_update_button
#define __pyx_n_s_UI_update_char __pyx_mstate_global->__pyx_n_s_UI_update_char
#define __pyx_n_s_UI_update_clipboard __pyx_mstate_global->__pyx_n_s_UI_update_clipboard
#define __pyx_n_s_UI_update_key __pyx_mstate_global->__pyx_n_s_UI_update_key
#define __pyx_n_s_UI_update_mouse __pyx_mstate_global->__pyx_n_s_UI_update_mouse
#define __pyx_n_s_UI_update_scroll __pyx_mstate_global->__pyx_n_s_UI_update_scroll
#define __pyx_n_s_UI_update_window __pyx_mstate_global->__pyx_n_s_UI_update_window
#define __pyx_n_s_Unused_Input __pyx_mstate_global->__pyx_n_s_Unused_Input
#define __pyx_n_u_Unused_Input __pyx_mstate_global->__pyx_n_u_Unused_Input
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_Vec2 __pyx_mstate_global->__pyx_n_s_Vec2
#define __pyx_n_s_Vec2___reduce_cython __pyx_mstate_global->__pyx_n_s_Vec2___reduce_cython
#define __pyx_n_s_Vec2___setstate_cython __pyx_mstate_global->__pyx_n_s_Vec2___setstate_cython
#define __pyx_n_s__330 __pyx_mstate_global->__pyx_n_s__330
#define __pyx_kp_u__34 __pyx_mstate_global->__pyx_kp_u__34
#define __pyx_n_s__50 __pyx_mstate_global->__pyx_n_s__50
#define __pyx_kp_u__88 __pyx_mstate_global->__pyx_kp_u__88
#define __pyx_kp_u__93 __pyx_mstate_global->__pyx_kp_u__93
#define __pyx_n_s__97 __pyx_mstate_global->__pyx_n_s__97
#define __pyx_n_s_action __pyx_mstate_global->__pyx_n_s_action
#define __pyx_n_s_add_font __pyx_mstate_global->__pyx_n_s_add_font
#define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append
#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
#define __pyx_n_s_arrest_axis __pyx_mstate_global->__pyx_n_s_arrest_axis
#define __pyx_n_s_as_tuple __pyx_mstate_global->__pyx_n_s_as_tuple
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_n_s_attribute_context __pyx_mstate_global->__pyx_n_s_attribute_context
#define __pyx_n_s_attribute_name __pyx_mstate_global->__pyx_n_s_attribute_name
#define __pyx_n_u_backwards __pyx_mstate_global->__pyx_n_u_backwards
#define __pyx_n_u_bottom __pyx_mstate_global->__pyx_n_u_bottom
#define __pyx_n_s_button __pyx_mstate_global->__pyx_n_s_button
#define __pyx_n_u_buttons __pyx_mstate_global->__pyx_n_u_buttons
#define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
#define __pyx_n_s_catch_input __pyx_mstate_global->__pyx_n_s_catch_input
#define __pyx_n_s_center __pyx_mstate_global->__pyx_n_s_center
#define __pyx_n_s_centered __pyx_mstate_global->__pyx_n_s_centered
#define __pyx_n_s_cfunc_to_py __pyx_mstate_global->__pyx_n_s_cfunc_to_py
#define __pyx_n_s_char __pyx_mstate_global->__pyx_n_s_char
#define __pyx_n_u_chars __pyx_mstate_global->__pyx_n_u_chars
#define __pyx_n_s_chr __pyx_mstate_global->__pyx_n_s_chr
#define __pyx_n_s_cinit___locals_default_selecti __pyx_mstate_global->__pyx_n_s_cinit___locals_default_selecti
#define __pyx_n_s_cinit___locals_default_selecti_2 __pyx_mstate_global->__pyx_n_s_cinit___locals_default_selecti_2
#define __pyx_n_s_cinit___locals_lambda __pyx_mstate_global->__pyx_n_s_cinit___locals_lambda
#define __pyx_n_s_cinit___locals_set_play __pyx_mstate_global->__pyx_n_s_cinit___locals_set_play
#define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class
#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
#define __pyx_n_s_clear_state __pyx_mstate_global->__pyx_n_s_clear_state
#define __pyx_n_s_click_cb __pyx_mstate_global->__pyx_n_s_click_cb
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_clipboard __pyx_mstate_global->__pyx_n_s_clipboard
#define __pyx_n_u_clipboard __pyx_mstate_global->__pyx_n_u_clipboard
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
#define __pyx_n_s_collapsed __pyx_mstate_global->__pyx_n_s_collapsed
#define __pyx_n_u_collapsed __pyx_mstate_global->__pyx_n_u_collapsed
#define __pyx_n_s_collect_in_window __pyx_mstate_global->__pyx_n_s_collect_in_window
#define __pyx_n_s_collect_menus __pyx_mstate_global->__pyx_n_s_collect_menus
#define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
#define __pyx_kp_u_comptd_org __pyx_mstate_global->__pyx_kp_u_comptd_org
#define __pyx_n_s_configuration __pyx_mstate_global->__pyx_n_s_configuration
#define __pyx_n_s_content_height __pyx_mstate_global->__pyx_n_s_content_height
#define __pyx_n_s_contextlib __pyx_mstate_global->__pyx_n_s_contextlib
#define __pyx_n_s_contextmanager __pyx_mstate_global->__pyx_n_s_contextmanager
#define __pyx_n_s_cysignals __pyx_mstate_global->__pyx_n_s_cysignals
#define __pyx_kp_u_d __pyx_mstate_global->__pyx_kp_u_d
#define __pyx_n_s_decode __pyx_mstate_global->__pyx_n_s_decode
#define __pyx_n_s_default_selection_getter __pyx_mstate_global->__pyx_n_s_default_selection_getter
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
#define __pyx_n_s_dirname __pyx_mstate_global->__pyx_n_s_dirname
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_display_format __pyx_mstate_global->__pyx_n_s_display_format
#define __pyx_n_s_draw __pyx_mstate_global->__pyx_n_s_draw
#define __pyx_n_s_draw_data_callback __pyx_mstate_global->__pyx_n_s_draw_data_callback
#define __pyx_n_s_draw_label_callback __pyx_mstate_global->__pyx_n_s_draw_label_callback
#define __pyx_n_s_draw_label_default __pyx_mstate_global->__pyx_n_s_draw_label_default
#define __pyx_n_s_draw_overlay __pyx_mstate_global->__pyx_n_s_draw_overlay
#define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e
#define __pyx_n_s_elm __pyx_mstate_global->__pyx_n_s_elm
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter
#define __pyx_n_s_eval __pyx_mstate_global->__pyx_n_s_eval
#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit
#define __pyx_n_s_extend __pyx_mstate_global->__pyx_n_s_extend
#define __pyx_n_s_file __pyx_mstate_global->__pyx_n_s_file
#define __pyx_n_s_font_name __pyx_mstate_global->__pyx_n_s_font_name
#define __pyx_n_s_font_path __pyx_mstate_global->__pyx_n_s_font_path
#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
#define __pyx_n_u_forwards __pyx_mstate_global->__pyx_n_u_forwards
#define __pyx_n_s_frange __pyx_mstate_global->__pyx_n_s_frange
#define __pyx_n_s_function __pyx_mstate_global->__pyx_n_s_function
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
#define __pyx_n_s_get_all_font_paths __pyx_mstate_global->__pyx_n_s_get_all_font_paths
#define __pyx_n_s_get_opensans_font_path __pyx_mstate_global->__pyx_n_s_get_opensans_font_path
#define __pyx_n_s_get_pupil_icons_font_path __pyx_mstate_global->__pyx_n_s_get_pupil_icons_font_path
#define __pyx_n_s_get_roboto_font_path __pyx_mstate_global->__pyx_n_s_get_roboto_font_path
#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
#define __pyx_n_s_getter __pyx_mstate_global->__pyx_n_s_getter
#define __pyx_n_s_h __pyx_mstate_global->__pyx_n_s_h
#define __pyx_n_s_handle_input __pyx_mstate_global->__pyx_n_s_handle_input
#define __pyx_n_s_handle_start_reference __pyx_mstate_global->__pyx_n_s_handle_start_reference
#define __pyx_kp_u_has_no_attribute __pyx_mstate_global->__pyx_kp_u_has_no_attribute
#define __pyx_kp_u_has_no_entry __pyx_mstate_global->__pyx_kp_u_has_no_entry
#define __pyx_n_s_header_pos __pyx_mstate_global->__pyx_n_s_header_pos
#define __pyx_n_s_header_pos_id __pyx_mstate_global->__pyx_n_s_header_pos_id
#define __pyx_n_u_headline __pyx_mstate_global->__pyx_n_u_headline
#define __pyx_n_s_height __pyx_mstate_global->__pyx_n_s_height
#define __pyx_n_u_hidden __pyx_mstate_global->__pyx_n_u_hidden
#define __pyx_n_s_hotkey __pyx_mstate_global->__pyx_n_s_hotkey
#define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
#define __pyx_n_s_idx __pyx_mstate_global->__pyx_n_s_idx
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
#define __pyx_n_s_indicator_start __pyx_mstate_global->__pyx_n_s_indicator_start
#define __pyx_n_s_indicator_stop __pyx_mstate_global->__pyx_n_s_indicator_stop
#define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_insert __pyx_mstate_global->__pyx_n_s_insert
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_kp_u_is_of_type __pyx_mstate_global->__pyx_kp_u_is_of_type
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join
#define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key
#define __pyx_n_u_keys __pyx_mstate_global->__pyx_n_u_keys
#define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs
#define __pyx_n_s_label __pyx_mstate_global->__pyx_n_s_label
#define __pyx_n_u_label __pyx_mstate_global->__pyx_n_u_label
#define __pyx_n_s_label_font __pyx_mstate_global->__pyx_n_s_label_font
#define __pyx_n_s_label_getter __pyx_mstate_global->__pyx_n_s_label_getter
#define __pyx_n_s_label_line_height __pyx_mstate_global->__pyx_n_s_label_line_height
#define __pyx_n_s_label_offset_size __pyx_mstate_global->__pyx_n_s_label_offset_size
#define __pyx_n_s_label_offset_x __pyx_mstate_global->__pyx_n_s_label_offset_x
#define __pyx_n_s_label_offset_y __pyx_mstate_global->__pyx_n_s_label_offset_y
#define __pyx_n_s_labels __pyx_mstate_global->__pyx_n_s_labels
#define __pyx_n_u_left __pyx_mstate_global->__pyx_n_u_left
#define __pyx_n_s_line_color __pyx_mstate_global->__pyx_n_s_line_color
#define __pyx_n_s_m __pyx_mstate_global->__pyx_n_s_m
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_margin __pyx_mstate_global->__pyx_n_s_margin
#define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max
#define __pyx_n_s_max_ts __pyx_mstate_global->__pyx_n_s_max_ts
#define __pyx_n_s_min __pyx_mstate_global->__pyx_n_s_min
#define __pyx_n_s_min_size __pyx_mstate_global->__pyx_n_s_min_size
#define __pyx_n_u_min_size __pyx_mstate_global->__pyx_n_u_min_size
#define __pyx_n_s_min_ts __pyx_mstate_global->__pyx_n_s_min_ts
#define __pyx_n_s_mods __pyx_mstate_global->__pyx_n_s_mods
#define __pyx_n_s_mouse_over __pyx_mstate_global->__pyx_n_s_mouse_over
#define __pyx_n_s_mouse_over_margin __pyx_mstate_global->__pyx_n_s_mouse_over_margin
#define __pyx_n_s_mx __pyx_mstate_global->__pyx_n_s_mx
#define __pyx_n_s_my __pyx_mstate_global->__pyx_n_s_my
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_namedtuple __pyx_mstate_global->__pyx_n_s_namedtuple
#define __pyx_n_s_nested __pyx_mstate_global->__pyx_n_s_nested
#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
#define __pyx_n_s_new_input __pyx_mstate_global->__pyx_n_s_new_input
#define __pyx_n_s_new_value __pyx_mstate_global->__pyx_n_s_new_value
#define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
#define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj
#define __pyx_n_s_objs __pyx_mstate_global->__pyx_n_s_objs
#define __pyx_n_s_off_color __pyx_mstate_global->__pyx_n_s_off_color
#define __pyx_n_s_off_val __pyx_mstate_global->__pyx_n_s_off_val
#define __pyx_n_s_on_change __pyx_mstate_global->__pyx_n_s_on_change
#define __pyx_n_s_on_change_2 __pyx_mstate_global->__pyx_n_s_on_change_2
#define __pyx_n_s_on_color __pyx_mstate_global->__pyx_n_s_on_color
#define __pyx_n_s_on_val __pyx_mstate_global->__pyx_n_s_on_val
#define __pyx_n_u_opensans __pyx_mstate_global->__pyx_n_u_opensans
#define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
#define __pyx_n_s_outer_label __pyx_mstate_global->__pyx_n_s_outer_label
#define __pyx_n_s_padding __pyx_mstate_global->__pyx_n_s_padding
#define __pyx_n_s_parent __pyx_mstate_global->__pyx_n_s_parent
#define __pyx_n_s_parent_read_only __pyx_mstate_global->__pyx_n_s_parent_read_only
#define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path
#define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
#define __pyx_n_s_platform __pyx_mstate_global->__pyx_n_s_platform
#define __pyx_n_s_play __pyx_mstate_global->__pyx_n_s_play
#define __pyx_n_u_play __pyx_mstate_global->__pyx_n_u_play
#define __pyx_n_u_playback_speed __pyx_mstate_global->__pyx_n_u_playback_speed
#define __pyx_n_s_playback_time_setter __pyx_mstate_global->__pyx_n_s_playback_time_setter
#define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop
#define __pyx_n_s_pop_state __pyx_mstate_global->__pyx_n_s_pop_state
#define __pyx_n_s_pos __pyx_mstate_global->__pyx_n_s_pos
#define __pyx_n_u_pos __pyx_mstate_global->__pyx_n_u_pos
#define __pyx_n_s_position __pyx_mstate_global->__pyx_n_s_position
#define __pyx_n_s_pre_handle_input __pyx_mstate_global->__pyx_n_s_pre_handle_input
#define __pyx_n_s_precompute __pyx_mstate_global->__pyx_n_s_precompute
#define __pyx_n_u_pupil_icons __pyx_mstate_global->__pyx_n_u_pupil_icons
#define __pyx_kp_u_pupil_icons_ttf __pyx_mstate_global->__pyx_kp_u_pupil_icons_ttf
#define __pyx_n_s_purge __pyx_mstate_global->__pyx_n_s_purge
#define __pyx_n_s_push_state __pyx_mstate_global->__pyx_n_s_push_state
#define __pyx_n_s_pyglui_ui __pyx_mstate_global->__pyx_n_s_pyglui_ui
#define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
#define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
#define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
#define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
#define __pyx_n_s_pyx_unpickle_Base_Menu __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Base_Menu
#define __pyx_n_s_pyx_unpickle_Movable_Menu __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Movable_Menu
#define __pyx_n_s_pyx_unpickle_UI_element __pyx_mstate_global->__pyx_n_s_pyx_unpickle_UI_element
#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_recent_idx_ts_getter __pyx_mstate_global->__pyx_n_s_recent_idx_ts_getter
#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
#define __pyx_n_s_refresh __pyx_mstate_global->__pyx_n_s_refresh
#define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove
#define __pyx_n_u_right __pyx_mstate_global->__pyx_n_u_right
#define __pyx_n_u_roboto __pyx_mstate_global->__pyx_n_u_roboto
#define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s
#define __pyx_n_s_scale __pyx_mstate_global->__pyx_n_s_scale
#define __pyx_n_s_scancode __pyx_mstate_global->__pyx_n_s_scancode
#define __pyx_n_u_scrollstate __pyx_mstate_global->__pyx_n_u_scrollstate
#define __pyx_n_s_seeking_cb __pyx_mstate_global->__pyx_n_s_seeking_cb
#define __pyx_n_s_selection __pyx_mstate_global->__pyx_n_s_selection
#define __pyx_n_s_selection_getter __pyx_mstate_global->__pyx_n_s_selection_getter
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send
#define __pyx_n_s_set_align __pyx_mstate_global->__pyx_n_s_set_align
#define __pyx_n_s_set_blur __pyx_mstate_global->__pyx_n_s_set_blur
#define __pyx_n_s_set_font __pyx_mstate_global->__pyx_n_s_set_font
#define __pyx_n_s_set_play __pyx_mstate_global->__pyx_n_s_set_play
#define __pyx_n_s_set_size __pyx_mstate_global->__pyx_n_s_set_size
#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
#define __pyx_n_s_setter __pyx_mstate_global->__pyx_n_s_setter
#define __pyx_n_s_sig_on_off __pyx_mstate_global->__pyx_n_s_sig_on_off
#define __pyx_n_s_six __pyx_mstate_global->__pyx_n_s_six
#define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
#define __pyx_n_u_size __pyx_mstate_global->__pyx_n_u_size
#define __pyx_kp_u_size_2 __pyx_mstate_global->__pyx_kp_u_size_2
#define __pyx_n_s_sort __pyx_mstate_global->__pyx_n_s_sort
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_kp_s_src_pyglui_custom_pxi __pyx_mstate_global->__pyx_kp_s_src_pyglui_custom_pxi
#define __pyx_kp_s_src_pyglui_helpers_pxi __pyx_mstate_global->__pyx_kp_s_src_pyglui_helpers_pxi
#define __pyx_kp_s_src_pyglui_menus_pxi __pyx_mstate_global->__pyx_kp_s_src_pyglui_menus_pxi
#define __pyx_kp_s_src_pyglui_timelines_pxi __pyx_mstate_global->__pyx_kp_s_src_pyglui_timelines_pxi
#define __pyx_kp_s_src_pyglui_ui_elements_pxi __pyx_mstate_global->__pyx_kp_s_src_pyglui_ui_elements_pxi
#define __pyx_kp_s_src_pyglui_ui_pyx __pyx_mstate_global->__pyx_kp_s_src_pyglui_ui_pyx
#define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
#define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
#define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
#define __pyx_n_u_submenus __pyx_mstate_global->__pyx_n_u_submenus
#define __pyx_n_s_sum __pyx_mstate_global->__pyx_n_s_sum
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_n_s_sx __pyx_mstate_global->__pyx_n_s_sx
#define __pyx_n_s_sy __pyx_mstate_global->__pyx_n_s_sy
#define __pyx_n_s_sync __pyx_mstate_global->__pyx_n_s_sync
#define __pyx_n_s_sync_ctx __pyx_mstate_global->__pyx_n_s_sync_ctx
#define __pyx_n_s_system __pyx_mstate_global->__pyx_n_s_system
#define __pyx_n_s_terminate __pyx_mstate_global->__pyx_n_s_terminate
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_text __pyx_mstate_global->__pyx_n_s_text
#define __pyx_n_s_text_bounds __pyx_mstate_global->__pyx_n_s_text_bounds
#define __pyx_n_s_text_color __pyx_mstate_global->__pyx_n_s_text_color
#define __pyx_n_s_text_size __pyx_mstate_global->__pyx_n_s_text_size
#define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw
#define __pyx_n_s_time __pyx_mstate_global->__pyx_n_s_time
#define __pyx_n_s_to_str __pyx_mstate_global->__pyx_n_s_to_str
#define __pyx_n_s_toggle_iconified __pyx_mstate_global->__pyx_n_s_toggle_iconified
#define __pyx_n_s_tooltip __pyx_mstate_global->__pyx_n_s_tooltip
#define __pyx_n_u_top __pyx_mstate_global->__pyx_n_u_top
#define __pyx_n_s_trigger_overlay_only __pyx_mstate_global->__pyx_n_s_trigger_overlay_only
#define __pyx_n_u_trim_left_ts __pyx_mstate_global->__pyx_n_u_trim_left_ts
#define __pyx_n_u_trim_right_ts __pyx_mstate_global->__pyx_n_u_trim_right_ts
#define __pyx_n_s_typed_val __pyx_mstate_global->__pyx_n_s_typed_val
#define __pyx_n_u_uncollapsed_min_size __pyx_mstate_global->__pyx_n_u_uncollapsed_min_size
#define __pyx_n_u_uncollapsed_pos __pyx_mstate_global->__pyx_n_u_uncollapsed_pos
#define __pyx_n_u_uncollapsed_size __pyx_mstate_global->__pyx_n_u_uncollapsed_size
#define __pyx_n_s_unichr __pyx_mstate_global->__pyx_n_s_unichr
#define __pyx_n_s_unused_Input __pyx_mstate_global->__pyx_n_s_unused_Input
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
#define __pyx_n_s_update_button __pyx_mstate_global->__pyx_n_s_update_button
#define __pyx_n_s_update_char __pyx_mstate_global->__pyx_n_s_update_char
#define __pyx_n_s_update_clipboard __pyx_mstate_global->__pyx_n_s_update_clipboard
#define __pyx_n_s_update_key __pyx_mstate_global->__pyx_n_s_update_key
#define __pyx_n_s_update_mouse __pyx_mstate_global->__pyx_n_s_update_mouse
#define __pyx_n_s_update_scroll __pyx_mstate_global->__pyx_n_s_update_scroll
#define __pyx_n_s_update_window __pyx_mstate_global->__pyx_n_s_update_window
#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
#define __pyx_kp_u_utf_8 __pyx_mstate_global->__pyx_kp_u_utf_8
#define __pyx_n_s_val __pyx_mstate_global->__pyx_n_s_val
#define __pyx_n_s_validate __pyx_mstate_global->__pyx_n_s_validate
#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
#define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version
#define __pyx_n_s_visible __pyx_mstate_global->__pyx_n_s_visible
#define __pyx_n_s_w __pyx_mstate_global->__pyx_n_s_w
#define __pyx_n_s_width __pyx_mstate_global->__pyx_n_s_width
#define __pyx_n_s_window __pyx_mstate_global->__pyx_n_s_window
#define __pyx_n_s_window_size __pyx_mstate_global->__pyx_n_s_window_size
#define __pyx_n_s_wrap __pyx_mstate_global->__pyx_n_s_wrap
#define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
#define __pyx_kp_u_x_2 __pyx_mstate_global->__pyx_kp_u_x_2
#define __pyx_kp_u_x_3 __pyx_mstate_global->__pyx_kp_u_x_3
#define __pyx_n_s_xpad __pyx_mstate_global->__pyx_n_s_xpad
#define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y
#define __pyx_kp_u_y_2 __pyx_mstate_global->__pyx_kp_u_y_2
#define __pyx_n_s_ypad __pyx_mstate_global->__pyx_n_s_ypad
#define __pyx_n_s_zero_crossing __pyx_mstate_global->__pyx_n_s_zero_crossing
#define __pyx_float__0 __pyx_mstate_global->__pyx_float__0
#define __pyx_float__1 __pyx_mstate_global->__pyx_float__1
#define __pyx_float__3 __pyx_mstate_global->__pyx_float__3
#define __pyx_float__5 __pyx_mstate_global->__pyx_float__5
#define __pyx_float__8 __pyx_mstate_global->__pyx_float__8
#define __pyx_float__9 __pyx_mstate_global->__pyx_float__9
#define __pyx_float_0_ __pyx_mstate_global->__pyx_float_0_
#define __pyx_float_1_ __pyx_mstate_global->__pyx_float_1_
#define __pyx_float_2_ __pyx_mstate_global->__pyx_float_2_
#define __pyx_float_3_ __pyx_mstate_global->__pyx_float_3_
#define __pyx_float_5_ __pyx_mstate_global->__pyx_float_5_
#define __pyx_float_8_ __pyx_mstate_global->__pyx_float_8_
#define __pyx_float__77 __pyx_mstate_global->__pyx_float__77
#define __pyx_float_0_0 __pyx_mstate_global->__pyx_float_0_0
#define __pyx_float_0_3 __pyx_mstate_global->__pyx_float_0_3
#define __pyx_float_0_4 __pyx_mstate_global->__pyx_float_0_4
#define __pyx_float_0_5 __pyx_mstate_global->__pyx_float_0_5
#define __pyx_float_0_6 __pyx_mstate_global->__pyx_float_0_6
#define __pyx_float_0_8 __pyx_mstate_global->__pyx_float_0_8
#define __pyx_float_0_9 __pyx_mstate_global->__pyx_float_0_9
#define __pyx_float_1_0 __pyx_mstate_global->__pyx_float_1_0
#define __pyx_float_21_ __pyx_mstate_global->__pyx_float_21_
#define __pyx_float_0_25 __pyx_mstate_global->__pyx_float_0_25
#define __pyx_float_0_75 __pyx_mstate_global->__pyx_float_0_75
#define __pyx_float_0_84 __pyx_mstate_global->__pyx_float_0_84
#define __pyx_float_10_0 __pyx_mstate_global->__pyx_float_10_0
#define __pyx_float_10_5 __pyx_mstate_global->__pyx_float_10_5
#define __pyx_float_130_ __pyx_mstate_global->__pyx_float_130_
#define __pyx_float_18_0 __pyx_mstate_global->__pyx_float_18_0
#define __pyx_float_20_0 __pyx_mstate_global->__pyx_float_20_0
#define __pyx_float_38_0 __pyx_mstate_global->__pyx_float_38_0
#define __pyx_float_40_0 __pyx_mstate_global->__pyx_float_40_0
#define __pyx_float_44_0 __pyx_mstate_global->__pyx_float_44_0
#define __pyx_float_50_0 __pyx_mstate_global->__pyx_float_50_0
#define __pyx_float_65_0 __pyx_mstate_global->__pyx_float_65_0
#define __pyx_float_80_0 __pyx_mstate_global->__pyx_float_80_0
#define __pyx_float_300_0 __pyx_mstate_global->__pyx_float_300_0
#define __pyx_float__0000001 __pyx_mstate_global->__pyx_float__0000001
#define __pyx_float_neg_0_0 __pyx_mstate_global->__pyx_float_neg_0_0
#define __pyx_float_neg_30_ __pyx_mstate_global->__pyx_float_neg_30_
#define __pyx_float_neg_50_ __pyx_mstate_global->__pyx_float_neg_50_
#define __pyx_float_neg_10_0 __pyx_mstate_global->__pyx_float_neg_10_0
#define __pyx_float_neg_20_0 __pyx_mstate_global->__pyx_float_neg_20_0
#define __pyx_float_neg_38_0 __pyx_mstate_global->__pyx_float_neg_38_0
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
#define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
#define __pyx_int_5 __pyx_mstate_global->__pyx_int_5
#define __pyx_int_10 __pyx_mstate_global->__pyx_int_10
#define __pyx_int_20 __pyx_mstate_global->__pyx_int_20
#define __pyx_int_30 __pyx_mstate_global->__pyx_int_30
#define __pyx_int_32 __pyx_mstate_global->__pyx_int_32
#define __pyx_int_40 __pyx_mstate_global->__pyx_int_40
#define __pyx_int_60 __pyx_mstate_global->__pyx_int_60
#define __pyx_int_65 __pyx_mstate_global->__pyx_int_65
#define __pyx_int_67 __pyx_mstate_global->__pyx_int_67
#define __pyx_int_75 __pyx_mstate_global->__pyx_int_75
#define __pyx_int_86 __pyx_mstate_global->__pyx_int_86
#define __pyx_int_88 __pyx_mstate_global->__pyx_int_88
#define __pyx_int_100 __pyx_mstate_global->__pyx_int_100
#define __pyx_int_130 __pyx_mstate_global->__pyx_int_130
#define __pyx_int_200 __pyx_mstate_global->__pyx_int_200
#define __pyx_int_256 __pyx_mstate_global->__pyx_int_256
#define __pyx_int_257 __pyx_mstate_global->__pyx_int_257
#define __pyx_int_259 __pyx_mstate_global->__pyx_int_259
#define __pyx_int_261 __pyx_mstate_global->__pyx_int_261
#define __pyx_int_262 __pyx_mstate_global->__pyx_int_262
#define __pyx_int_263 __pyx_mstate_global->__pyx_int_263
#define __pyx_int_268 __pyx_mstate_global->__pyx_int_268
#define __pyx_int_269 __pyx_mstate_global->__pyx_int_269
#define __pyx_int_57375 __pyx_mstate_global->__pyx_int_57375
#define __pyx_int_57376 __pyx_mstate_global->__pyx_int_57376
#define __pyx_int_57396 __pyx_mstate_global->__pyx_int_57396
#define __pyx_int_57399 __pyx_mstate_global->__pyx_int_57399
#define __pyx_int_57412 __pyx_mstate_global->__pyx_int_57412
#define __pyx_int_57413 __pyx_mstate_global->__pyx_int_57413
#define __pyx_int_64022378 __pyx_mstate_global->__pyx_int_64022378
#define __pyx_int_72070923 __pyx_mstate_global->__pyx_int_72070923
#define __pyx_int_126102751 __pyx_mstate_global->__pyx_int_126102751
#define __pyx_int_150088119 __pyx_mstate_global->__pyx_int_150088119
#define __pyx_int_180366278 __pyx_mstate_global->__pyx_int_180366278
#define __pyx_int_251175041 __pyx_mstate_global->__pyx_int_251175041
#define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
#define __pyx_int_neg_10 __pyx_mstate_global->__pyx_int_neg_10
#define __pyx_int_neg_25 __pyx_mstate_global->__pyx_int_neg_25
#define __pyx_k__2 __pyx_mstate_global->__pyx_k__2
#define __pyx_k__27 __pyx_mstate_global->__pyx_k__27
#define __pyx_k__67 __pyx_mstate_global->__pyx_k__67
#define __pyx_k__89 __pyx_mstate_global->__pyx_k__89
#define __pyx_k__90 __pyx_mstate_global->__pyx_k__90
#define __pyx_k__91 __pyx_mstate_global->__pyx_k__91
#define __pyx_codeobj_ __pyx_mstate_global->__pyx_codeobj_
#define __pyx_slice__8 __pyx_mstate_global->__pyx_slice__8
#define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3
#define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5
#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6
#define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7
#define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
#define __pyx_slice__26 __pyx_mstate_global->__pyx_slice__26
#define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
#define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
#define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12
#define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
#define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
#define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
#define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
#define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
#define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18
#define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
#define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
#define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
#define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
#define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
#define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
#define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
#define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33
#define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35
#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
#define __pyx_tuple__37 __pyx_mstate_global->__pyx_tuple__37
#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
#define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39
#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40
#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
#define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43
#define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44
#define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45
#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
#define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47
#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48
#define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49
#define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51
#define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52
#define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53
#define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
#define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55
#define __pyx_tuple__56 __pyx_mstate_global->__pyx_tuple__56
#define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57
#define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59
#define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60
#define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62
#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
#define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64
#define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
#define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66
#define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68
#define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69
#define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70
#define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71
#define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72
#define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73
#define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74
#define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75
#define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76
#define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
#define __pyx_tuple__78 __pyx_mstate_global->__pyx_tuple__78
#define __pyx_tuple__79 __pyx_mstate_global->__pyx_tuple__79
#define __pyx_tuple__80 __pyx_mstate_global->__pyx_tuple__80
#define __pyx_tuple__81 __pyx_mstate_global->__pyx_tuple__81
#define __pyx_tuple__82 __pyx_mstate_global->__pyx_tuple__82
#define __pyx_tuple__83 __pyx_mstate_global->__pyx_tuple__83
#define __pyx_tuple__84 __pyx_mstate_global->__pyx_tuple__84
#define __pyx_tuple__85 __pyx_mstate_global->__pyx_tuple__85
#define __pyx_tuple__86 __pyx_mstate_global->__pyx_tuple__86
#define __pyx_tuple__87 __pyx_mstate_global->__pyx_tuple__87
#define __pyx_tuple__92 __pyx_mstate_global->__pyx_tuple__92
#define __pyx_tuple__94 __pyx_mstate_global->__pyx_tuple__94
#define __pyx_tuple__95 __pyx_mstate_global->__pyx_tuple__95
#define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98
#define __pyx_tuple__99 __pyx_mstate_global->__pyx_tuple__99
#define __pyx_codeobj__4 __pyx_mstate_global->__pyx_codeobj__4
#define __pyx_tuple__104 __pyx_mstate_global->__pyx_tuple__104
#define __pyx_tuple__106 __pyx_mstate_global->__pyx_tuple__106
#define __pyx_tuple__108 __pyx_mstate_global->__pyx_tuple__108
#define __pyx_tuple__110 __pyx_mstate_global->__pyx_tuple__110
#define __pyx_tuple__112 __pyx_mstate_global->__pyx_tuple__112
#define __pyx_tuple__114 __pyx_mstate_global->__pyx_tuple__114
#define __pyx_tuple__116 __pyx_mstate_global->__pyx_tuple__116
#define __pyx_tuple__118 __pyx_mstate_global->__pyx_tuple__118
#define __pyx_tuple__120 __pyx_mstate_global->__pyx_tuple__120
#define __pyx_tuple__122 __pyx_mstate_global->__pyx_tuple__122
#define __pyx_tuple__124 __pyx_mstate_global->__pyx_tuple__124
#define __pyx_tuple__126 __pyx_mstate_global->__pyx_tuple__126
#define __pyx_tuple__128 __pyx_mstate_global->__pyx_tuple__128
#define __pyx_tuple__132 __pyx_mstate_global->__pyx_tuple__132
#define __pyx_tuple__135 __pyx_mstate_global->__pyx_tuple__135
#define __pyx_tuple__137 __pyx_mstate_global->__pyx_tuple__137
#define __pyx_tuple__139 __pyx_mstate_global->__pyx_tuple__139
#define __pyx_tuple__140 __pyx_mstate_global->__pyx_tuple__140
#define __pyx_tuple__142 __pyx_mstate_global->__pyx_tuple__142
#define __pyx_tuple__143 __pyx_mstate_global->__pyx_tuple__143
#define __pyx_tuple__145 __pyx_mstate_global->__pyx_tuple__145
#define __pyx_tuple__147 __pyx_mstate_global->__pyx_tuple__147
#define __pyx_tuple__152 __pyx_mstate_global->__pyx_tuple__152
#define __pyx_tuple__154 __pyx_mstate_global->__pyx_tuple__154
#define __pyx_tuple__155 __pyx_mstate_global->__pyx_tuple__155
#define __pyx_tuple__161 __pyx_mstate_global->__pyx_tuple__161
#define __pyx_tuple__163 __pyx_mstate_global->__pyx_tuple__163
#define __pyx_tuple__167 __pyx_mstate_global->__pyx_tuple__167
#define __pyx_tuple__170 __pyx_mstate_global->__pyx_tuple__170
#define __pyx_tuple__172 __pyx_mstate_global->__pyx_tuple__172
#define __pyx_tuple__177 __pyx_mstate_global->__pyx_tuple__177
#define __pyx_tuple__180 __pyx_mstate_global->__pyx_tuple__180
#define __pyx_tuple__186 __pyx_mstate_global->__pyx_tuple__186
#define __pyx_tuple__188 __pyx_mstate_global->__pyx_tuple__188
#define __pyx_tuple__192 __pyx_mstate_global->__pyx_tuple__192
#define __pyx_tuple__197 __pyx_mstate_global->__pyx_tuple__197
#define __pyx_tuple__202 __pyx_mstate_global->__pyx_tuple__202
#define __pyx_tuple__208 __pyx_mstate_global->__pyx_tuple__208
#define __pyx_tuple__210 __pyx_mstate_global->__pyx_tuple__210
#define __pyx_tuple__214 __pyx_mstate_global->__pyx_tuple__214
#define __pyx_tuple__216 __pyx_mstate_global->__pyx_tuple__216
#define __pyx_tuple__218 __pyx_mstate_global->__pyx_tuple__218
#define __pyx_tuple__223 __pyx_mstate_global->__pyx_tuple__223
#define __pyx_tuple__228 __pyx_mstate_global->__pyx_tuple__228
#define __pyx_tuple__230 __pyx_mstate_global->__pyx_tuple__230
#define __pyx_tuple__232 __pyx_mstate_global->__pyx_tuple__232
#define __pyx_tuple__235 __pyx_mstate_global->__pyx_tuple__235
#define __pyx_tuple__237 __pyx_mstate_global->__pyx_tuple__237
#define __pyx_tuple__239 __pyx_mstate_global->__pyx_tuple__239
#define __pyx_tuple__245 __pyx_mstate_global->__pyx_tuple__245
#define __pyx_tuple__249 __pyx_mstate_global->__pyx_tuple__249
#define __pyx_tuple__256 __pyx_mstate_global->__pyx_tuple__256
#define __pyx_tuple__258 __pyx_mstate_global->__pyx_tuple__258
#define __pyx_tuple__260 __pyx_mstate_global->__pyx_tuple__260
#define __pyx_tuple__264 __pyx_mstate_global->__pyx_tuple__264
#define __pyx_tuple__266 __pyx_mstate_global->__pyx_tuple__266
#define __pyx_tuple__268 __pyx_mstate_global->__pyx_tuple__268
#define __pyx_tuple__272 __pyx_mstate_global->__pyx_tuple__272
#define __pyx_tuple__274 __pyx_mstate_global->__pyx_tuple__274
#define __pyx_tuple__276 __pyx_mstate_global->__pyx_tuple__276
#define __pyx_tuple__282 __pyx_mstate_global->__pyx_tuple__282
#define __pyx_tuple__284 __pyx_mstate_global->__pyx_tuple__284
#define __pyx_tuple__286 __pyx_mstate_global->__pyx_tuple__286
#define __pyx_tuple__290 __pyx_mstate_global->__pyx_tuple__290
#define __pyx_tuple__293 __pyx_mstate_global->__pyx_tuple__293
#define __pyx_tuple__295 __pyx_mstate_global->__pyx_tuple__295
#define __pyx_tuple__297 __pyx_mstate_global->__pyx_tuple__297
#define __pyx_tuple__301 __pyx_mstate_global->__pyx_tuple__301
#define __pyx_tuple__305 __pyx_mstate_global->__pyx_tuple__305
#define __pyx_tuple__318 __pyx_mstate_global->__pyx_tuple__318
#define __pyx_tuple__320 __pyx_mstate_global->__pyx_tuple__320
#define __pyx_tuple__326 __pyx_mstate_global->__pyx_tuple__326
#define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
#define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
#define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61
#define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96
#define __pyx_codeobj__100 __pyx_mstate_global->__pyx_codeobj__100
#define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101
#define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102
#define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103
#define __pyx_codeobj__105 __pyx_mstate_global->__pyx_codeobj__105
#define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107
#define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109
#define __pyx_codeobj__111 __pyx_mstate_global->__pyx_codeobj__111
#define __pyx_codeobj__113 __pyx_mstate_global->__pyx_codeobj__113
#define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115
#define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117
#define __pyx_codeobj__119 __pyx_mstate_global->__pyx_codeobj__119
#define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121
#define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123
#define __pyx_codeobj__125 __pyx_mstate_global->__pyx_codeobj__125
#define __pyx_codeobj__127 __pyx_mstate_global->__pyx_codeobj__127
#define __pyx_codeobj__129 __pyx_mstate_global->__pyx_codeobj__129
#define __pyx_codeobj__130 __pyx_mstate_global->__pyx_codeobj__130
#define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131
#define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133
#define __pyx_codeobj__134 __pyx_mstate_global->__pyx_codeobj__134
#define __pyx_codeobj__136 __pyx_mstate_global->__pyx_codeobj__136
#define __pyx_codeobj__138 __pyx_mstate_global->__pyx_codeobj__138
#define __pyx_codeobj__141 __pyx_mstate_global->__pyx_codeobj__141
#define __pyx_codeobj__144 __pyx_mstate_global->__pyx_codeobj__144
#define __pyx_codeobj__146 __pyx_mstate_global->__pyx_codeobj__146
#define __pyx_codeobj__148 __pyx_mstate_global->__pyx_codeobj__148
#define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149
#define __pyx_codeobj__150 __pyx_mstate_global->__pyx_codeobj__150
#define __pyx_codeobj__151 __pyx_mstate_global->__pyx_codeobj__151
#define __pyx_codeobj__153 __pyx_mstate_global->__pyx_codeobj__153
#define __pyx_codeobj__156 __pyx_mstate_global->__pyx_codeobj__156
#define __pyx_codeobj__157 __pyx_mstate_global->__pyx_codeobj__157
#define __pyx_codeobj__158 __pyx_mstate_global->__pyx_codeobj__158
#define __pyx_codeobj__159 __pyx_mstate_global->__pyx_codeobj__159
#define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160
#define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162
#define __pyx_codeobj__164 __pyx_mstate_global->__pyx_codeobj__164
#define __pyx_codeobj__165 __pyx_mstate_global->__pyx_codeobj__165
#define __pyx_codeobj__166 __pyx_mstate_global->__pyx_codeobj__166
#define __pyx_codeobj__168 __pyx_mstate_global->__pyx_codeobj__168
#define __pyx_codeobj__169 __pyx_mstate_global->__pyx_codeobj__169
#define __pyx_codeobj__171 __pyx_mstate_global->__pyx_codeobj__171
#define __pyx_codeobj__173 __pyx_mstate_global->__pyx_codeobj__173
#define __pyx_codeobj__174 __pyx_mstate_global->__pyx_codeobj__174
#define __pyx_codeobj__175 __pyx_mstate_global->__pyx_codeobj__175
#define __pyx_codeobj__176 __pyx_mstate_global->__pyx_codeobj__176
#define __pyx_codeobj__178 __pyx_mstate_global->__pyx_codeobj__178
#define __pyx_codeobj__179 __pyx_mstate_global->__pyx_codeobj__179
#define __pyx_codeobj__181 __pyx_mstate_global->__pyx_codeobj__181
#define __pyx_codeobj__182 __pyx_mstate_global->__pyx_codeobj__182
#define __pyx_codeobj__183 __pyx_mstate_global->__pyx_codeobj__183
#define __pyx_codeobj__184 __pyx_mstate_global->__pyx_codeobj__184
#define __pyx_codeobj__185 __pyx_mstate_global->__pyx_codeobj__185
#define __pyx_codeobj__187 __pyx_mstate_global->__pyx_codeobj__187
#define __pyx_codeobj__189 __pyx_mstate_global->__pyx_codeobj__189
#define __pyx_codeobj__190 __pyx_mstate_global->__pyx_codeobj__190
#define __pyx_codeobj__191 __pyx_mstate_global->__pyx_codeobj__191
#define __pyx_codeobj__193 __pyx_mstate_global->__pyx_codeobj__193
#define __pyx_codeobj__194 __pyx_mstate_global->__pyx_codeobj__194
#define __pyx_codeobj__195 __pyx_mstate_global->__pyx_codeobj__195
#define __pyx_codeobj__196 __pyx_mstate_global->__pyx_codeobj__196
#define __pyx_codeobj__198 __pyx_mstate_global->__pyx_codeobj__198
#define __pyx_codeobj__199 __pyx_mstate_global->__pyx_codeobj__199
#define __pyx_codeobj__200 __pyx_mstate_global->__pyx_codeobj__200
#define __pyx_codeobj__201 __pyx_mstate_global->__pyx_codeobj__201
#define __pyx_codeobj__203 __pyx_mstate_global->__pyx_codeobj__203
#define __pyx_codeobj__204 __pyx_mstate_global->__pyx_codeobj__204
#define __pyx_codeobj__205 __pyx_mstate_global->__pyx_codeobj__205
#define __pyx_codeobj__206 __pyx_mstate_global->__pyx_codeobj__206
#define __pyx_codeobj__207 __pyx_mstate_global->__pyx_codeobj__207
#define __pyx_codeobj__209 __pyx_mstate_global->__pyx_codeobj__209
#define __pyx_codeobj__211 __pyx_mstate_global->__pyx_codeobj__211
#define __pyx_codeobj__212 __pyx_mstate_global->__pyx_codeobj__212
#define __pyx_codeobj__213 __pyx_mstate_global->__pyx_codeobj__213
#define __pyx_codeobj__215 __pyx_mstate_global->__pyx_codeobj__215
#define __pyx_codeobj__217 __pyx_mstate_global->__pyx_codeobj__217
#define __pyx_codeobj__219 __pyx_mstate_global->__pyx_codeobj__219
#define __pyx_codeobj__220 __pyx_mstate_global->__pyx_codeobj__220
#define __pyx_codeobj__221 __pyx_mstate_global->__pyx_codeobj__221
#define __pyx_codeobj__222 __pyx_mstate_global->__pyx_codeobj__222
#define __pyx_codeobj__224 __pyx_mstate_global->__pyx_codeobj__224
#define __pyx_codeobj__225 __pyx_mstate_global->__pyx_codeobj__225
#define __pyx_codeobj__226 __pyx_mstate_global->__pyx_codeobj__226
#define __pyx_codeobj__227 __pyx_mstate_global->__pyx_codeobj__227
#define __pyx_codeobj__229 __pyx_mstate_global->__pyx_codeobj__229
#define __pyx_codeobj__231 __pyx_mstate_global->__pyx_codeobj__231
#define __pyx_codeobj__233 __pyx_mstate_global->__pyx_codeobj__233
#define __pyx_codeobj__234 __pyx_mstate_global->__pyx_codeobj__234
#define __pyx_codeobj__236 __pyx_mstate_global->__pyx_codeobj__236
#define __pyx_codeobj__238 __pyx_mstate_global->__pyx_codeobj__238
#define __pyx_codeobj__240 __pyx_mstate_global->__pyx_codeobj__240
#define __pyx_codeobj__241 __pyx_mstate_global->__pyx_codeobj__241
#define __pyx_codeobj__242 __pyx_mstate_global->__pyx_codeobj__242
#define __pyx_codeobj__243 __pyx_mstate_global->__pyx_codeobj__243
#define __pyx_codeobj__244 __pyx_mstate_global->__pyx_codeobj__244
#define __pyx_codeobj__246 __pyx_mstate_global->__pyx_codeobj__246
#define __pyx_codeobj__247 __pyx_mstate_global->__pyx_codeobj__247
#define __pyx_codeobj__248 __pyx_mstate_global->__pyx_codeobj__248
#define __pyx_codeobj__250 __pyx_mstate_global->__pyx_codeobj__250
#define __pyx_codeobj__251 __pyx_mstate_global->__pyx_codeobj__251
#define __pyx_codeobj__252 __pyx_mstate_global->__pyx_codeobj__252
#define __pyx_codeobj__253 __pyx_mstate_global->__pyx_codeobj__253
#define __pyx_codeobj__254 __pyx_mstate_global->__pyx_codeobj__254
#define __pyx_codeobj__255 __pyx_mstate_global->__pyx_codeobj__255
#define __pyx_codeobj__257 __pyx_mstate_global->__pyx_codeobj__257
#define __pyx_codeobj__259 __pyx_mstate_global->__pyx_codeobj__259
#define __pyx_codeobj__261 __pyx_mstate_global->__pyx_codeobj__261
#define __pyx_codeobj__262 __pyx_mstate_global->__pyx_codeobj__262
#define __pyx_codeobj__263 __pyx_mstate_global->__pyx_codeobj__263
#define __pyx_codeobj__265 __pyx_mstate_global->__pyx_codeobj__265
#define __pyx_codeobj__267 __pyx_mstate_global->__pyx_codeobj__267
#define __pyx_codeobj__269 __pyx_mstate_global->__pyx_codeobj__269
#define __pyx_codeobj__270 __pyx_mstate_global->__pyx_codeobj__270
#define __pyx_codeobj__271 __pyx_mstate_global->__pyx_codeobj__271
#define __pyx_codeobj__273 __pyx_mstate_global->__pyx_codeobj__273
#define __pyx_codeobj__275 __pyx_mstate_global->__pyx_codeobj__275
#define __pyx_codeobj__277 __pyx_mstate_global->__pyx_codeobj__277
#define __pyx_codeobj__278 __pyx_mstate_global->__pyx_codeobj__278
#define __pyx_codeobj__279 __pyx_mstate_global->__pyx_codeobj__279
#define __pyx_codeobj__280 __pyx_mstate_global->__pyx_codeobj__280
#define __pyx_codeobj__281 __pyx_mstate_global->__pyx_codeobj__281
#define __pyx_codeobj__283 __pyx_mstate_global->__pyx_codeobj__283
#define __pyx_codeobj__285 __pyx_mstate_global->__pyx_codeobj__285
#define __pyx_codeobj__287 __pyx_mstate_global->__pyx_codeobj__287
#define __pyx_codeobj__288 __pyx_mstate_global->__pyx_codeobj__288
#define __pyx_codeobj__289 __pyx_mstate_global->__pyx_codeobj__289
#define __pyx_codeobj__291 __pyx_mstate_global->__pyx_codeobj__291
#define __pyx_codeobj__292 __pyx_mstate_global->__pyx_codeobj__292
#define __pyx_codeobj__294 __pyx_mstate_global->__pyx_codeobj__294
#define __pyx_codeobj__296 __pyx_mstate_global->__pyx_codeobj__296
#define __pyx_codeobj__298 __pyx_mstate_global->__pyx_codeobj__298
#define __pyx_codeobj__299 __pyx_mstate_global->__pyx_codeobj__299
#define __pyx_codeobj__300 __pyx_mstate_global->__pyx_codeobj__300
#define __pyx_codeobj__302 __pyx_mstate_global->__pyx_codeobj__302
#define __pyx_codeobj__303 __pyx_mstate_global->__pyx_codeobj__303
#define __pyx_codeobj__304 __pyx_mstate_global->__pyx_codeobj__304
#define __pyx_codeobj__306 __pyx_mstate_global->__pyx_codeobj__306
#define __pyx_codeobj__307 __pyx_mstate_global->__pyx_codeobj__307
#define __pyx_codeobj__308 __pyx_mstate_global->__pyx_codeobj__308
#define __pyx_codeobj__309 __pyx_mstate_global->__pyx_codeobj__309
#define __pyx_codeobj__310 __pyx_mstate_global->__pyx_codeobj__310
#define __pyx_codeobj__311 __pyx_mstate_global->__pyx_codeobj__311
#define __pyx_codeobj__312 __pyx_mstate_global->__pyx_codeobj__312
#define __pyx_codeobj__313 __pyx_mstate_global->__pyx_codeobj__313
#define __pyx_codeobj__314 __pyx_mstate_global->__pyx_codeobj__314
#define __pyx_codeobj__315 __pyx_mstate_global->__pyx_codeobj__315
#define __pyx_codeobj__316 __pyx_mstate_global->__pyx_codeobj__316
#define __pyx_codeobj__317 __pyx_mstate_global->__pyx_codeobj__317
#define __pyx_codeobj__319 __pyx_mstate_global->__pyx_codeobj__319
#define __pyx_codeobj__321 __pyx_mstate_global->__pyx_codeobj__321
#define __pyx_codeobj__322 __pyx_mstate_global->__pyx_codeobj__322
#define __pyx_codeobj__323 __pyx_mstate_global->__pyx_codeobj__323
#define __pyx_codeobj__324 __pyx_mstate_global->__pyx_codeobj__324
#define __pyx_codeobj__325 __pyx_mstate_global->__pyx_codeobj__325
#define __pyx_codeobj__327 __pyx_mstate_global->__pyx_codeobj__327
#define __pyx_codeobj__328 __pyx_mstate_global->__pyx_codeobj__328
#define __pyx_codeobj__329 __pyx_mstate_global->__pyx_codeobj__329
#endif
/* #### Code section: module_code ### */
static PyObject *__pyx_gb_6pyglui_2ui_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyglui/ui.pyx":8
 *     from cysignals.signals cimport sig_off, sig_on
 * 
 *     @contextmanager             # <<<<<<<<<<<<<<
 *     def sig_on_off():
 *         sig_on()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_1sig_on_off(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_1sig_on_off = {"sig_on_off", (PyCFunction)__pyx_pw_6pyglui_2ui_1sig_on_off, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_1sig_on_off(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sig_on_off (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_sig_on_off(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_sig_on_off(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sig_on_off", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off *)__pyx_tp_new_6pyglui_2ui___pyx_scope_struct__sig_on_off(__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pyglui_2ui_2generator, __pyx_codeobj_, (PyObject *) __pyx_cur_scope, __pyx_n_s_sig_on_off, __pyx_n_s_sig_on_off, __pyx_n_s_pyglui_ui); if (unlikely(!gen)) __PYX_ERR(0, 8, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.sig_on_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pyglui_2ui_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  int __pyx_t_2;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sig_on_off", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8, __pyx_L1_error)

  /* "pyglui/ui.pyx":10
 *     @contextmanager
 *     def sig_on_off():
 *         sig_on()             # <<<<<<<<<<<<<<
 *         try:
 *             yield
 */
  __pyx_t_1 = sig_on(); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(0, 10, __pyx_L1_error)

  /* "pyglui/ui.pyx":11
 *     def sig_on_off():
 *         sig_on()
 *         try:             # <<<<<<<<<<<<<<
 *             yield
 *         finally:
 */
  /*try:*/ {

    /* "pyglui/ui.pyx":12
 *         sig_on()
 *         try:
 *             yield             # <<<<<<<<<<<<<<
 *         finally:
 *             sig_off()
 */
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L7_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 12, __pyx_L5_error)
  }

  /* "pyglui/ui.pyx":14
 *             yield
 *         finally:
 *             sig_off()             # <<<<<<<<<<<<<<
 * ELSE:
 *     @contextmanager
 */
  /*finally:*/ {
    /*normal exit:*/{
      sig_off();
      goto __pyx_L6;
    }
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_assign
      __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0)) __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __pyx_t_1 = __pyx_lineno; __pyx_t_2 = __pyx_clineno; __pyx_t_3 = __pyx_filename;
      {
        sig_off();
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0;
      __pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_2; __pyx_filename = __pyx_t_3;
      goto __pyx_L1_error;
    }
    __pyx_L6:;
  }

  /* "pyglui/ui.pyx":8
 *     from cysignals.signals cimport sig_off, sig_on
 * 
 *     @contextmanager             # <<<<<<<<<<<<<<
 *     def sig_on_off():
 *         sig_on()
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_AddTraceback("sig_on_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":2
 * 
 * cdef inline push_view(Vec2 size):             # <<<<<<<<<<<<<<
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPushMatrix()
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_push_view(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("push_view", 0);

  /* "src/pyglui/gldraw.pxi":3
 * 
 * cdef inline push_view(Vec2 size):
 *     gl.glMatrixMode(gl.GL_PROJECTION)             # <<<<<<<<<<<<<<
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()
 */
  glMatrixMode(GL_PROJECTION);

  /* "src/pyglui/gldraw.pxi":4
 * cdef inline push_view(Vec2 size):
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *     gl.glLoadIdentity()
 *     gl.glOrtho(0, size.x, size.y, 0, -1, 1)
 */
  glPushMatrix();

  /* "src/pyglui/gldraw.pxi":5
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()             # <<<<<<<<<<<<<<
 *     gl.glOrtho(0, size.x, size.y, 0, -1, 1)
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 */
  glLoadIdentity();

  /* "src/pyglui/gldraw.pxi":6
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()
 *     gl.glOrtho(0, size.x, size.y, 0, -1, 1)             # <<<<<<<<<<<<<<
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPushMatrix()
 */
  glOrtho(0.0, __pyx_v_size->x, __pyx_v_size->y, 0.0, -1.0, 1.0);

  /* "src/pyglui/gldraw.pxi":7
 *     gl.glLoadIdentity()
 *     gl.glOrtho(0, size.x, size.y, 0, -1, 1)
 *     gl.glMatrixMode(gl.GL_MODELVIEW)             # <<<<<<<<<<<<<<
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()
 */
  glMatrixMode(GL_MODELVIEW);

  /* "src/pyglui/gldraw.pxi":8
 *     gl.glOrtho(0, size.x, size.y, 0, -1, 1)
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *     gl.glLoadIdentity()
 * 
 */
  glPushMatrix();

  /* "src/pyglui/gldraw.pxi":9
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()             # <<<<<<<<<<<<<<
 * 
 * cdef inline pop_view():
 */
  glLoadIdentity();

  /* "src/pyglui/gldraw.pxi":2
 * 
 * cdef inline push_view(Vec2 size):             # <<<<<<<<<<<<<<
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPushMatrix()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":11
 *     gl.glLoadIdentity()
 * 
 * cdef inline pop_view():             # <<<<<<<<<<<<<<
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPopMatrix()
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_pop_view(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop_view", 0);

  /* "src/pyglui/gldraw.pxi":12
 * 
 * cdef inline pop_view():
 *     gl.glMatrixMode(gl.GL_PROJECTION)             # <<<<<<<<<<<<<<
 *     gl.glPopMatrix()
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 */
  glMatrixMode(GL_PROJECTION);

  /* "src/pyglui/gldraw.pxi":13
 * cdef inline pop_view():
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPopMatrix()             # <<<<<<<<<<<<<<
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPopMatrix()
 */
  glPopMatrix();

  /* "src/pyglui/gldraw.pxi":14
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPopMatrix()
 *     gl.glMatrixMode(gl.GL_MODELVIEW)             # <<<<<<<<<<<<<<
 *     gl.glPopMatrix()
 * 
 */
  glMatrixMode(GL_MODELVIEW);

  /* "src/pyglui/gldraw.pxi":15
 *     gl.glPopMatrix()
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 * cdef inline rect(Vec2 org, Vec2 size, RGBA color):
 */
  glPopMatrix();

  /* "src/pyglui/gldraw.pxi":11
 *     gl.glLoadIdentity()
 * 
 * cdef inline pop_view():             # <<<<<<<<<<<<<<
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPopMatrix()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":17
 *     gl.glPopMatrix()
 * 
 * cdef inline rect(Vec2 org, Vec2 size, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glBegin(gl.GL_POLYGON)
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_rect(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rect", 0);

  /* "src/pyglui/gldraw.pxi":18
 * 
 * cdef inline rect(Vec2 org, Vec2 size, RGBA color):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_POLYGON)
 *     gl.glVertex3f(org.x,org.y,0.0)
 */
  glColor4f(__pyx_v_color->r, __pyx_v_color->g, __pyx_v_color->b, __pyx_v_color->a);

  /* "src/pyglui/gldraw.pxi":19
 * cdef inline rect(Vec2 org, Vec2 size, RGBA color):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glBegin(gl.GL_POLYGON)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x,org.y,0.0)
 *     gl.glVertex3f(org.x,org.y+size.y,0.0)
 */
  glBegin(GL_POLYGON);

  /* "src/pyglui/gldraw.pxi":20
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glBegin(gl.GL_POLYGON)
 *     gl.glVertex3f(org.x,org.y,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x,org.y+size.y,0.0)
 *     gl.glVertex3f(org.x+size.x,org.y+size.y,0.0)
 */
  glVertex3f(__pyx_v_org->x, __pyx_v_org->y, 0.0);

  /* "src/pyglui/gldraw.pxi":21
 *     gl.glBegin(gl.GL_POLYGON)
 *     gl.glVertex3f(org.x,org.y,0.0)
 *     gl.glVertex3f(org.x,org.y+size.y,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x+size.x,org.y+size.y,0.0)
 *     gl.glVertex3f(org.x+size.x,org.y,0.0)
 */
  glVertex3f(__pyx_v_org->x, (__pyx_v_org->y + __pyx_v_size->y), 0.0);

  /* "src/pyglui/gldraw.pxi":22
 *     gl.glVertex3f(org.x,org.y,0.0)
 *     gl.glVertex3f(org.x,org.y+size.y,0.0)
 *     gl.glVertex3f(org.x+size.x,org.y+size.y,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x+size.x,org.y,0.0)
 *     gl.glEnd()
 */
  glVertex3f((__pyx_v_org->x + __pyx_v_size->x), (__pyx_v_org->y + __pyx_v_size->y), 0.0);

  /* "src/pyglui/gldraw.pxi":23
 *     gl.glVertex3f(org.x,org.y+size.y,0.0)
 *     gl.glVertex3f(org.x+size.x,org.y+size.y,0.0)
 *     gl.glVertex3f(org.x+size.x,org.y,0.0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f((__pyx_v_org->x + __pyx_v_size->x), __pyx_v_org->y, 0.0);

  /* "src/pyglui/gldraw.pxi":24
 *     gl.glVertex3f(org.x+size.x,org.y+size.y,0.0)
 *     gl.glVertex3f(org.x+size.x,org.y,0.0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline rect_outline(Vec2 org, Vec2 size, float line_width, RGBA color):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":17
 *     gl.glPopMatrix()
 * 
 * cdef inline rect(Vec2 org, Vec2 size, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glBegin(gl.GL_POLYGON)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":26
 *     gl.glEnd()
 * 
 * cdef inline rect_outline(Vec2 org, Vec2 size, float line_width, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(line_width)
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_rect_outline(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, float __pyx_v_line_width, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rect_outline", 0);

  /* "src/pyglui/gldraw.pxi":27
 * 
 * cdef inline rect_outline(Vec2 org, Vec2 size, float line_width, RGBA color):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)             # <<<<<<<<<<<<<<
 *     gl.glLineWidth(line_width)
 *     gl.glBegin(gl.GL_LINE_LOOP)
 */
  glColor4f(__pyx_v_color->r, __pyx_v_color->g, __pyx_v_color->b, __pyx_v_color->a);

  /* "src/pyglui/gldraw.pxi":28
 * cdef inline rect_outline(Vec2 org, Vec2 size, float line_width, RGBA color):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(line_width)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x - line_width, org.y - line_width,0.0)
 */
  glLineWidth(__pyx_v_line_width);

  /* "src/pyglui/gldraw.pxi":29
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(line_width)
 *     gl.glBegin(gl.GL_LINE_LOOP)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x - line_width, org.y - line_width,0.0)
 *     gl.glVertex3f(org.x - line_width,org.y+size.y + line_width,0.0)
 */
  glBegin(GL_LINE_LOOP);

  /* "src/pyglui/gldraw.pxi":30
 *     gl.glLineWidth(line_width)
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x - line_width, org.y - line_width,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x - line_width,org.y+size.y + line_width,0.0)
 *     gl.glVertex3f(org.x+size.x + line_width,org.y+size.y + line_width,0.0)
 */
  glVertex3f((__pyx_v_org->x - __pyx_v_line_width), (__pyx_v_org->y - __pyx_v_line_width), 0.0);

  /* "src/pyglui/gldraw.pxi":31
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x - line_width, org.y - line_width,0.0)
 *     gl.glVertex3f(org.x - line_width,org.y+size.y + line_width,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x+size.x + line_width,org.y+size.y + line_width,0.0)
 *     gl.glVertex3f(org.x+size.x + line_width,org.y - line_width,0.0)
 */
  glVertex3f((__pyx_v_org->x - __pyx_v_line_width), ((__pyx_v_org->y + __pyx_v_size->y) + __pyx_v_line_width), 0.0);

  /* "src/pyglui/gldraw.pxi":32
 *     gl.glVertex3f(org.x - line_width, org.y - line_width,0.0)
 *     gl.glVertex3f(org.x - line_width,org.y+size.y + line_width,0.0)
 *     gl.glVertex3f(org.x+size.x + line_width,org.y+size.y + line_width,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x+size.x + line_width,org.y - line_width,0.0)
 *     gl.glEnd()
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) + __pyx_v_line_width), ((__pyx_v_org->y + __pyx_v_size->y) + __pyx_v_line_width), 0.0);

  /* "src/pyglui/gldraw.pxi":33
 *     gl.glVertex3f(org.x - line_width,org.y+size.y + line_width,0.0)
 *     gl.glVertex3f(org.x+size.x + line_width,org.y+size.y + line_width,0.0)
 *     gl.glVertex3f(org.x+size.x + line_width,org.y - line_width,0.0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) + __pyx_v_line_width), (__pyx_v_org->y - __pyx_v_line_width), 0.0);

  /* "src/pyglui/gldraw.pxi":34
 *     gl.glVertex3f(org.x+size.x + line_width,org.y+size.y + line_width,0.0)
 *     gl.glVertex3f(org.x+size.x + line_width,org.y - line_width,0.0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline rect_corners(Vec2 org, Vec2 end, RGBA color):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":26
 *     gl.glEnd()
 * 
 * cdef inline rect_outline(Vec2 org, Vec2 size, float line_width, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(line_width)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":36
 *     gl.glEnd()
 * 
 * cdef inline rect_corners(Vec2 org, Vec2 end, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glBegin(gl.GL_POLYGON)
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_rect_corners(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_end, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rect_corners", 0);

  /* "src/pyglui/gldraw.pxi":37
 * 
 * cdef inline rect_corners(Vec2 org, Vec2 end, RGBA color):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_POLYGON)
 *     gl.glVertex3f(org.x,org.y,0.0)
 */
  glColor4f(__pyx_v_color->r, __pyx_v_color->g, __pyx_v_color->b, __pyx_v_color->a);

  /* "src/pyglui/gldraw.pxi":38
 * cdef inline rect_corners(Vec2 org, Vec2 end, RGBA color):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glBegin(gl.GL_POLYGON)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x,org.y,0.0)
 *     gl.glVertex3f(org.x,end.y,0.0)
 */
  glBegin(GL_POLYGON);

  /* "src/pyglui/gldraw.pxi":39
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glBegin(gl.GL_POLYGON)
 *     gl.glVertex3f(org.x,org.y,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x,end.y,0.0)
 *     gl.glVertex3f(end.x,end.y,0.0)
 */
  glVertex3f(__pyx_v_org->x, __pyx_v_org->y, 0.0);

  /* "src/pyglui/gldraw.pxi":40
 *     gl.glBegin(gl.GL_POLYGON)
 *     gl.glVertex3f(org.x,org.y,0.0)
 *     gl.glVertex3f(org.x,end.y,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(end.x,end.y,0.0)
 *     gl.glVertex3f(end.x,org.y,0.0)
 */
  glVertex3f(__pyx_v_org->x, __pyx_v_end->y, 0.0);

  /* "src/pyglui/gldraw.pxi":41
 *     gl.glVertex3f(org.x,org.y,0.0)
 *     gl.glVertex3f(org.x,end.y,0.0)
 *     gl.glVertex3f(end.x,end.y,0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(end.x,org.y,0.0)
 *     gl.glEnd()
 */
  glVertex3f(__pyx_v_end->x, __pyx_v_end->y, 0.0);

  /* "src/pyglui/gldraw.pxi":42
 *     gl.glVertex3f(org.x,end.y,0.0)
 *     gl.glVertex3f(end.x,end.y,0.0)
 *     gl.glVertex3f(end.x,org.y,0.0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f(__pyx_v_end->x, __pyx_v_org->y, 0.0);

  /* "src/pyglui/gldraw.pxi":43
 *     gl.glVertex3f(end.x,end.y,0.0)
 *     gl.glVertex3f(end.x,org.y,0.0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline tripple_h(Vec2 org, Vec2 size, RGBA color=RGBA(1.,1.,1.,.5)):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":36
 *     gl.glEnd()
 * 
 * cdef inline rect_corners(Vec2 org, Vec2 end, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glBegin(gl.GL_POLYGON)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":45
 *     gl.glEnd()
 * 
 * cdef inline tripple_h(Vec2 org, Vec2 size, RGBA color=RGBA(1.,1.,1.,.5)):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.6*ui_scale)
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_tripple_h(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, struct __pyx_opt_args_6pyglui_2ui_tripple_h *__pyx_optional_args) {
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color = __pyx_k__2;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tripple_h", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_color = __pyx_optional_args->color;
    }
  }

  /* "src/pyglui/gldraw.pxi":46
 * 
 * cdef inline tripple_h(Vec2 org, Vec2 size, RGBA color=RGBA(1.,1.,1.,.5)):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)             # <<<<<<<<<<<<<<
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)
 */
  glColor4f(__pyx_v_color->r, __pyx_v_color->g, __pyx_v_color->b, __pyx_v_color->a);

  /* "src/pyglui/gldraw.pxi":47
 * cdef inline tripple_h(Vec2 org, Vec2 size, RGBA color=RGBA(1.,1.,1.,.5)):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.6*ui_scale)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 3*ui_scale         ,org.y+5*ui_scale,0)
 */
  glLineWidth((1.6 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/gldraw.pxi":48
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + 3*ui_scale         ,org.y+5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x- 3*ui_scale ,org.y+ 5*ui_scale,0)
 */
  glBegin(GL_LINES);

  /* "src/pyglui/gldraw.pxi":49
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 3*ui_scale         ,org.y+5*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x- 3*ui_scale ,org.y+ 5*ui_scale,0)
 * 
 */
  glVertex3f((__pyx_v_org->x + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":50
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 3*ui_scale         ,org.y+5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x- 3*ui_scale ,org.y+ 5*ui_scale,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glVertex3f(org.x + 3   *ui_scale      ,org.y+size.y/2,0)
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":52
 *     gl.glVertex3f(org.x + size.x- 3*ui_scale ,org.y+ 5*ui_scale,0)
 * 
 *     gl.glVertex3f(org.x + 3   *ui_scale      ,org.y+size.y/2,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x -3 *ui_scale,org.y+size.y/2,0)
 * 
 */
  glVertex3f((__pyx_v_org->x + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (__pyx_v_size->y / 2.0)), 0.0);

  /* "src/pyglui/gldraw.pxi":53
 * 
 *     gl.glVertex3f(org.x + 3   *ui_scale      ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x -3 *ui_scale,org.y+size.y/2,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+size.y-5*ui_scale,0)
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (__pyx_v_size->y / 2.0)), 0.0);

  /* "src/pyglui/gldraw.pxi":55
 *     gl.glVertex3f(org.x + size.x -3 *ui_scale,org.y+size.y/2,0)
 * 
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+size.y-5*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x -3*ui_scale ,org.y+size.y-5*ui_scale,0)
 * 
 */
  glVertex3f((__pyx_v_org->x + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), ((__pyx_v_org->y + __pyx_v_size->y) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":56
 * 
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+size.y-5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -3*ui_scale ,org.y+size.y-5*ui_scale,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glEnd()
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), ((__pyx_v_org->y + __pyx_v_size->y) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":58
 *     gl.glVertex3f(org.x + size.x -3*ui_scale ,org.y+size.y-5*ui_scale,0)
 * 
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline tripple_d(Vec2 org, Vec2 size):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":45
 *     gl.glEnd()
 * 
 * cdef inline tripple_h(Vec2 org, Vec2 size, RGBA color=RGBA(1.,1.,1.,.5)):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.6*ui_scale)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":60
 *     gl.glEnd()
 * 
 * cdef inline tripple_d(Vec2 org, Vec2 size):             # <<<<<<<<<<<<<<
 *     cdef Vec2 o = org,s=size-Vec2(9*ui_scale,9*ui_scale)
 *     gl.glColor4f(1,1,1,.5)
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_tripple_d(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size) {
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_o = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tripple_d", 0);

  /* "src/pyglui/gldraw.pxi":61
 * 
 * cdef inline tripple_d(Vec2 org, Vec2 size):
 *     cdef Vec2 o = org,s=size-Vec2(9*ui_scale,9*ui_scale)             # <<<<<<<<<<<<<<
 *     gl.glColor4f(1,1,1,.5)
 *     gl.glLineWidth(1.6*ui_scale)
 */
  __Pyx_INCREF((PyObject *)__pyx_v_org);
  __pyx_v_o = __pyx_v_org;
  __pyx_t_1 = PyFloat_FromDouble((9.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((9.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Subtract(((PyObject *)__pyx_v_size), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(4, 61, __pyx_L1_error)
  __pyx_v_s = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/gldraw.pxi":62
 * cdef inline tripple_d(Vec2 org, Vec2 size):
 *     cdef Vec2 o = org,s=size-Vec2(9*ui_scale,9*ui_scale)
 *     gl.glColor4f(1,1,1,.5)             # <<<<<<<<<<<<<<
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)
 */
  glColor4f(1.0, 1.0, 1.0, .5);

  /* "src/pyglui/gldraw.pxi":63
 *     cdef Vec2 o = org,s=size-Vec2(9*ui_scale,9*ui_scale)
 *     gl.glColor4f(1,1,1,.5)
 *     gl.glLineWidth(1.6*ui_scale)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_LINES)
 * 
 */
  glLineWidth((1.6 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/gldraw.pxi":64
 *     gl.glColor4f(1,1,1,.5)
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  glBegin(GL_LINES);

  /* "src/pyglui/gldraw.pxi":67
 * 
 * 
 *     gl.glVertex3f(o.x,o.y+s.y,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(o.x + s.x,o.y,0)
 * 
 */
  glVertex3f(__pyx_v_o->x, (__pyx_v_o->y + __pyx_v_s->y), 0.0);

  /* "src/pyglui/gldraw.pxi":68
 * 
 *     gl.glVertex3f(o.x,o.y+s.y,0)
 *     gl.glVertex3f(o.x + s.x,o.y,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glVertex3f(o.x + s.x*.0,o.y+s.y*.33,0)
 */
  glVertex3f((__pyx_v_o->x + __pyx_v_s->x), __pyx_v_o->y, 0.0);

  /* "src/pyglui/gldraw.pxi":70
 *     gl.glVertex3f(o.x + s.x,o.y,0)
 * 
 *     gl.glVertex3f(o.x + s.x*.0,o.y+s.y*.33,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(o.x + s.x*.33,o.y+s.y*0,0)
 * 
 */
  glVertex3f((__pyx_v_o->x + (__pyx_v_s->x * .0)), (__pyx_v_o->y + (__pyx_v_s->y * .33)), 0.0);

  /* "src/pyglui/gldraw.pxi":71
 * 
 *     gl.glVertex3f(o.x + s.x*.0,o.y+s.y*.33,0)
 *     gl.glVertex3f(o.x + s.x*.33,o.y+s.y*0,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glVertex3f(o.x + s.x*.66,o.y+s.y*1.,0)
 */
  glVertex3f((__pyx_v_o->x + (__pyx_v_s->x * .33)), (__pyx_v_o->y + (__pyx_v_s->y * 0.0)), 0.0);

  /* "src/pyglui/gldraw.pxi":73
 *     gl.glVertex3f(o.x + s.x*.33,o.y+s.y*0,0)
 * 
 *     gl.glVertex3f(o.x + s.x*.66,o.y+s.y*1.,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(o.x + s.x*1.,o.y+s.y*.66,0)
 * 
 */
  glVertex3f((__pyx_v_o->x + (__pyx_v_s->x * .66)), (__pyx_v_o->y + (__pyx_v_s->y * 1.)), 0.0);

  /* "src/pyglui/gldraw.pxi":74
 * 
 *     gl.glVertex3f(o.x + s.x*.66,o.y+s.y*1.,0)
 *     gl.glVertex3f(o.x + s.x*1.,o.y+s.y*.66,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glEnd()
 */
  glVertex3f((__pyx_v_o->x + (__pyx_v_s->x * 1.)), (__pyx_v_o->y + (__pyx_v_s->y * .66)), 0.0);

  /* "src/pyglui/gldraw.pxi":76
 *     gl.glVertex3f(o.x + s.x*1.,o.y+s.y*.66,0)
 * 
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline triangle_h(Vec2 org, Vec2 size, RGBA color):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":60
 *     gl.glEnd()
 * 
 * cdef inline tripple_d(Vec2 org, Vec2 size):             # <<<<<<<<<<<<<<
 *     cdef Vec2 o = org,s=size-Vec2(9*ui_scale,9*ui_scale)
 *     gl.glColor4f(1,1,1,.5)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.tripple_d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_o);
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":78
 *     gl.glEnd()
 * 
 * cdef inline triangle_h(Vec2 org, Vec2 size, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r,color.g,color.b,color.a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_triangle_h(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triangle_h", 0);

  /* "src/pyglui/gldraw.pxi":79
 * 
 * cdef inline triangle_h(Vec2 org, Vec2 size, RGBA color):
 *     gl.glColor4f(color.r,color.g,color.b,color.a)             # <<<<<<<<<<<<<<
 * 
 *     gl.glLineWidth(1.6*ui_scale)
 */
  glColor4f(__pyx_v_color->r, __pyx_v_color->g, __pyx_v_color->b, __pyx_v_color->a);

  /* "src/pyglui/gldraw.pxi":81
 *     gl.glColor4f(color.r,color.g,color.b,color.a)
 * 
 *     gl.glLineWidth(1.6*ui_scale)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+5*ui_scale,0)
 */
  glLineWidth((1.6 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/gldraw.pxi":82
 * 
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x- 3*ui_scale ,org.y+ 5*ui_scale,0)
 */
  glBegin(GL_LINES);

  /* "src/pyglui/gldraw.pxi":83
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+5*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x- 3*ui_scale ,org.y+ 5*ui_scale,0)
 *     gl.glEnd()
 */
  glVertex3f((__pyx_v_org->x + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":84
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x- 3*ui_scale ,org.y+ 5*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":85
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x- 3*ui_scale ,org.y+ 5*ui_scale,0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 *     #gl.glBegin(gl.GL_POLYGON)
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":93
 *     #gl.glEnd()
 * 
 *     gl.glBegin(gl.GL_LINE_LOOP)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2. ,org.y+size.y-5*ui_scale,0)
 */
  glBegin(GL_LINE_LOOP);

  /* "src/pyglui/gldraw.pxi":94
 * 
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+size.y/2,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x/2. ,org.y+size.y-5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -3*ui_scale ,org.y+size.y/2,0)
 */
  glVertex3f((__pyx_v_org->x + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (__pyx_v_size->y / 2.0)), 0.0);

  /* "src/pyglui/gldraw.pxi":95
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2. ,org.y+size.y-5*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x -3*ui_scale ,org.y+size.y/2,0)
 *     gl.glEnd()
 */
  glVertex3f((__pyx_v_org->x + (((double)__pyx_v_size->x) / 2.)), ((__pyx_v_org->y + __pyx_v_size->y) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":96
 *     gl.glVertex3f(org.x + 3 *ui_scale        ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2. ,org.y+size.y-5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -3*ui_scale ,org.y+size.y/2,0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (__pyx_v_size->y / 2.0)), 0.0);

  /* "src/pyglui/gldraw.pxi":97
 *     gl.glVertex3f(org.x + size.x/2. ,org.y+size.y-5*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -3*ui_scale ,org.y+size.y/2,0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline tripple_v(Vec2 org, Vec2 size):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":78
 *     gl.glEnd()
 * 
 * cdef inline triangle_h(Vec2 org, Vec2 size, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r,color.g,color.b,color.a)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":99
 *     gl.glEnd()
 * 
 * cdef inline tripple_v(Vec2 org, Vec2 size):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(1,1,1,.5)
 *     gl.glLineWidth(1.6*ui_scale)
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_tripple_v(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tripple_v", 0);

  /* "src/pyglui/gldraw.pxi":100
 * 
 * cdef inline tripple_v(Vec2 org, Vec2 size):
 *     gl.glColor4f(1,1,1,.5)             # <<<<<<<<<<<<<<
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)
 */
  glColor4f(1.0, 1.0, 1.0, .5);

  /* "src/pyglui/gldraw.pxi":101
 * cdef inline tripple_v(Vec2 org, Vec2 size):
 *     gl.glColor4f(1,1,1,.5)
 *     gl.glLineWidth(1.6*ui_scale)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 5*ui_scale         ,org.y+3*ui_scale,0)
 */
  glLineWidth((1.6 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/gldraw.pxi":102
 *     gl.glColor4f(1,1,1,.5)
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + 5*ui_scale         ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + 5*ui_scale         ,org.y+size.y-3*ui_scale,0)
 */
  glBegin(GL_LINES);

  /* "src/pyglui/gldraw.pxi":103
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 5*ui_scale         ,org.y+3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + 5*ui_scale         ,org.y+size.y-3*ui_scale,0)
 * 
 */
  glVertex3f((__pyx_v_org->x + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":104
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 5*ui_scale         ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + 5*ui_scale         ,org.y+size.y-3*ui_scale,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)
 */
  glVertex3f((__pyx_v_org->x + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), ((__pyx_v_org->y + __pyx_v_size->y) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":106
 *     gl.glVertex3f(org.x + 5*ui_scale         ,org.y+size.y-3*ui_scale,0)
 * 
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x/2 ,org.y+size.y-3*ui_scale,0)
 * 
 */
  glVertex3f((__pyx_v_org->x + (__pyx_v_size->x / 2.0)), (__pyx_v_org->y + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":107
 * 
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x/2 ,org.y+size.y-3*ui_scale,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+3*ui_scale,0)
 */
  glVertex3f((__pyx_v_org->x + (__pyx_v_size->x / 2.0)), ((__pyx_v_org->y + __pyx_v_size->y) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":109
 *     gl.glVertex3f(org.x + size.x/2 ,org.y+size.y-3*ui_scale,0)
 * 
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y-3*ui_scale,0)
 * 
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":110
 * 
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y-3*ui_scale,0)             # <<<<<<<<<<<<<<
 * 
 *     gl.glEnd()
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), ((__pyx_v_org->y + __pyx_v_size->y) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":112
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y-3*ui_scale,0)
 * 
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline triangle_right(Vec2 org, Vec2 size):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":99
 *     gl.glEnd()
 * 
 * cdef inline tripple_v(Vec2 org, Vec2 size):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(1,1,1,.5)
 *     gl.glLineWidth(1.6*ui_scale)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":114
 *     gl.glEnd()
 * 
 * cdef inline triangle_right(Vec2 org, Vec2 size):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(1,1,1,.5)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_triangle_right(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triangle_right", 0);

  /* "src/pyglui/gldraw.pxi":115
 * 
 * cdef inline triangle_right(Vec2 org, Vec2 size):
 *     gl.glColor4f(1,1,1,.5)             # <<<<<<<<<<<<<<
 * 
 *     gl.glLineWidth(1.6*ui_scale)
 */
  glColor4f(1.0, 1.0, 1.0, .5);

  /* "src/pyglui/gldraw.pxi":117
 *     gl.glColor4f(1,1,1,.5)
 * 
 *     gl.glLineWidth(1.6*ui_scale)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+3*ui_scale,0)
 */
  glLineWidth((1.6 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/gldraw.pxi":118
 * 
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y-3*ui_scale,0)
 */
  glBegin(GL_LINES);

  /* "src/pyglui/gldraw.pxi":119
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y-3*ui_scale,0)
 *     gl.glEnd()
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":120
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y-3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), ((__pyx_v_org->y + __pyx_v_size->y) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":121
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y-3*ui_scale,0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":124
 * 
 * 
 *     gl.glBegin(gl.GL_LINE_LOOP)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + 5*ui_scale          ,org.y+size.y/2,0)
 */
  glBegin(GL_LINE_LOOP);

  /* "src/pyglui/gldraw.pxi":125
 * 
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + 5*ui_scale          ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+size.y-3*ui_scale,0)
 */
  glVertex3f((__pyx_v_org->x + (__pyx_v_size->x / 2.0)), (__pyx_v_org->y + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":126
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + 5*ui_scale          ,org.y+size.y/2,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+size.y-3*ui_scale,0)
 *     gl.glEnd()
 */
  glVertex3f((__pyx_v_org->x + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (__pyx_v_size->y / 2.0)), 0.0);

  /* "src/pyglui/gldraw.pxi":127
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + 5*ui_scale          ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+size.y-3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f((__pyx_v_org->x + (__pyx_v_size->x / 2.0)), ((__pyx_v_org->y + __pyx_v_size->y) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":128
 *     gl.glVertex3f(org.x + 5*ui_scale          ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+size.y-3*ui_scale,0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline triangle_left(Vec2 org, Vec2 size):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":114
 *     gl.glEnd()
 * 
 * cdef inline triangle_right(Vec2 org, Vec2 size):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(1,1,1,.5)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":130
 *     gl.glEnd()
 * 
 * cdef inline triangle_left(Vec2 org, Vec2 size):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(1,1,1,.5)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_triangle_left(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triangle_left", 0);

  /* "src/pyglui/gldraw.pxi":131
 * 
 * cdef inline triangle_left(Vec2 org, Vec2 size):
 *     gl.glColor4f(1,1,1,.5)             # <<<<<<<<<<<<<<
 * 
 *     gl.glLineWidth(1.6*ui_scale)
 */
  glColor4f(1.0, 1.0, 1.0, .5);

  /* "src/pyglui/gldraw.pxi":133
 *     gl.glColor4f(1,1,1,.5)
 * 
 *     gl.glLineWidth(1.6*ui_scale)             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+3*ui_scale,0)
 */
  glLineWidth((1.6 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/gldraw.pxi":134
 * 
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+size.y-3*ui_scale,0)
 */
  glBegin(GL_LINES);

  /* "src/pyglui/gldraw.pxi":135
 *     gl.glLineWidth(1.6*ui_scale)
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+size.y-3*ui_scale,0)
 *     gl.glEnd()
 */
  glVertex3f((__pyx_v_org->x + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":136
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+size.y-3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f((__pyx_v_org->x + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), ((__pyx_v_org->y + __pyx_v_size->y) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":137
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + 5 *ui_scale        ,org.y+size.y-3*ui_scale,0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":140
 * 
 * 
 *     gl.glBegin(gl.GL_LINE_LOOP)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y/2,0)
 */
  glBegin(GL_LINE_LOOP);

  /* "src/pyglui/gldraw.pxi":141
 * 
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2 ,org.y+size.y-3*ui_scale,0)
 */
  glVertex3f((__pyx_v_org->x + (__pyx_v_size->x / 2.0)), (__pyx_v_org->y + (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":142
 *     gl.glBegin(gl.GL_LINE_LOOP)
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y/2,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x + size.x/2 ,org.y+size.y-3*ui_scale,0)
 *     gl.glEnd()
 */
  glVertex3f(((__pyx_v_org->x + __pyx_v_size->x) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_org->y + (__pyx_v_size->y / 2.0)), 0.0);

  /* "src/pyglui/gldraw.pxi":143
 *     gl.glVertex3f(org.x + size.x/2  ,org.y+3*ui_scale,0)
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2 ,org.y+size.y-3*ui_scale,0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f((__pyx_v_org->x + (__pyx_v_size->x / 2.0)), ((__pyx_v_org->y + __pyx_v_size->y) - (3.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/gldraw.pxi":144
 *     gl.glVertex3f(org.x + size.x -5*ui_scale ,org.y+size.y/2,0)
 *     gl.glVertex3f(org.x + size.x/2 ,org.y+size.y-3*ui_scale,0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline line(Vec2 org, Vec2 end, RGBA color):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":130
 *     gl.glEnd()
 * 
 * cdef inline triangle_left(Vec2 org, Vec2 size):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(1,1,1,.5)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":146
 *     gl.glEnd()
 * 
 * cdef inline line(Vec2 org, Vec2 end, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.5*ui_scale) #thinner lines sometimes dont show on certain hardware.
 */

static CYTHON_INLINE PyObject *__pyx_f_6pyglui_2ui_line(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_org, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_end, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("line", 0);

  /* "src/pyglui/gldraw.pxi":147
 * 
 * cdef inline line(Vec2 org, Vec2 end, RGBA color):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)             # <<<<<<<<<<<<<<
 *     gl.glLineWidth(1.5*ui_scale) #thinner lines sometimes dont show on certain hardware.
 *     gl.glBegin(gl.GL_LINES)
 */
  glColor4f(__pyx_v_color->r, __pyx_v_color->g, __pyx_v_color->b, __pyx_v_color->a);

  /* "src/pyglui/gldraw.pxi":148
 * cdef inline line(Vec2 org, Vec2 end, RGBA color):
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.5*ui_scale) #thinner lines sometimes dont show on certain hardware.             # <<<<<<<<<<<<<<
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x, org.y,0)
 */
  glLineWidth((1.5 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/gldraw.pxi":149
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.5*ui_scale) #thinner lines sometimes dont show on certain hardware.
 *     gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(org.x, org.y,0)
 *     gl.glVertex3f(end.x, end.y,0)
 */
  glBegin(GL_LINES);

  /* "src/pyglui/gldraw.pxi":150
 *     gl.glLineWidth(1.5*ui_scale) #thinner lines sometimes dont show on certain hardware.
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x, org.y,0)             # <<<<<<<<<<<<<<
 *     gl.glVertex3f(end.x, end.y,0)
 *     gl.glEnd()
 */
  glVertex3f(__pyx_v_org->x, __pyx_v_org->y, 0.0);

  /* "src/pyglui/gldraw.pxi":151
 *     gl.glBegin(gl.GL_LINES)
 *     gl.glVertex3f(org.x, org.y,0)
 *     gl.glVertex3f(end.x, end.y,0)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex3f(__pyx_v_end->x, __pyx_v_end->y, 0.0);

  /* "src/pyglui/gldraw.pxi":152
 *     gl.glVertex3f(org.x, org.y,0)
 *     gl.glVertex3f(end.x, end.y,0)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * cdef inline FitBox draw_seek_handle(FitBox handle, RGBA color):
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":146
 *     gl.glEnd()
 * 
 * cdef inline line(Vec2 org, Vec2 end, RGBA color):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.5*ui_scale) #thinner lines sometimes dont show on certain hardware.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":154
 *     gl.glEnd()
 * 
 * cdef inline FitBox draw_seek_handle(FitBox handle, RGBA color):             # <<<<<<<<<<<<<<
 *     ''' Draw the seek handle and return FitBox that corresponds to the draggable area
 *     '''
 */

static CYTHON_INLINE struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_f_6pyglui_2ui_draw_seek_handle(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_handle, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_drag = 0;
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_seek_handle", 0);

  /* "src/pyglui/gldraw.pxi":157
 *     ''' Draw the seek handle and return FitBox that corresponds to the draggable area
 *     '''
 *     rect(handle.org, handle.size, color)             # <<<<<<<<<<<<<<
 *     cdef FitBox drag = handle.computed_copy()
 *     drag.org.x -= 10 * drag.size.x
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_handle->org);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_v_handle->size);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_6pyglui_2ui_rect(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), __pyx_v_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/gldraw.pxi":158
 *     '''
 *     rect(handle.org, handle.size, color)
 *     cdef FitBox drag = handle.computed_copy()             # <<<<<<<<<<<<<<
 *     drag.org.x -= 10 * drag.size.x
 *     drag.size.x *= 21
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_handle->__pyx_vtab)->computed_copy(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(4, 158, __pyx_L1_error)
  __pyx_v_drag = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/gldraw.pxi":159
 *     rect(handle.org, handle.size, color)
 *     cdef FitBox drag = handle.computed_copy()
 *     drag.org.x -= 10 * drag.size.x             # <<<<<<<<<<<<<<
 *     drag.size.x *= 21
 *     drag.size.y += 20 * ui_scale
 */
  __Pyx_INCREF((PyObject *)__pyx_v_drag->org);
  __pyx_t_4 = __pyx_v_drag->org;
  __pyx_t_4->x = (__pyx_t_4->x - (10.0 * __pyx_v_drag->size->x));
  __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/gldraw.pxi":160
 *     cdef FitBox drag = handle.computed_copy()
 *     drag.org.x -= 10 * drag.size.x
 *     drag.size.x *= 21             # <<<<<<<<<<<<<<
 *     drag.size.y += 20 * ui_scale
 *     return drag
 */
  __Pyx_INCREF((PyObject *)__pyx_v_drag->size);
  __pyx_t_4 = __pyx_v_drag->size;
  __pyx_t_4->x = (__pyx_t_4->x * 21.0);
  __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/gldraw.pxi":161
 *     drag.org.x -= 10 * drag.size.x
 *     drag.size.x *= 21
 *     drag.size.y += 20 * ui_scale             # <<<<<<<<<<<<<<
 *     return drag
 * 
 */
  __Pyx_INCREF((PyObject *)__pyx_v_drag->size);
  __pyx_t_4 = __pyx_v_drag->size;
  __pyx_t_4->y = (__pyx_t_4->y + (20.0 * __pyx_v_6pyglui_2ui_ui_scale));
  __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/gldraw.pxi":162
 *     drag.size.x *= 21
 *     drag.size.y += 20 * ui_scale
 *     return drag             # <<<<<<<<<<<<<<
 * 
 * cdef inline FitBox draw_trim_handle(FitBox handle, float opening, RGBA color):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_drag);
  __pyx_r = __pyx_v_drag;
  goto __pyx_L0;

  /* "src/pyglui/gldraw.pxi":154
 *     gl.glEnd()
 * 
 * cdef inline FitBox draw_seek_handle(FitBox handle, RGBA color):             # <<<<<<<<<<<<<<
 *     ''' Draw the seek handle and return FitBox that corresponds to the draggable area
 *     '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF((PyObject *)__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.draw_seek_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_drag);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":164
 *     return drag
 * 
 * cdef inline FitBox draw_trim_handle(FitBox handle, float opening, RGBA color):             # <<<<<<<<<<<<<<
 *     ''' Draw a handle and return FitBox that corresponds draggable area
 *     '''
 */

static CYTHON_INLINE struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_f_6pyglui_2ui_draw_trim_handle(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_handle, float __pyx_v_opening, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color) {
  PyObject *__pyx_v_location = 0;
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_drag = 0;
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_progress __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_trim_handle", 0);

  /* "src/pyglui/gldraw.pxi":170
 *     # cdef Vec2 line_org = Vec2(0., handle.org.y + handle.size.y / 2 - line_size.y / 2)
 *     cdef tuple location
 *     if opening == 0.25:  # left handle             # <<<<<<<<<<<<<<
 *         location = handle.org.x + handle.size.x, handle.org.y + handle.size.y / 2
 *         # line_org.x = handle.org.x + handle.size.x - line_size.x
 */
  __pyx_t_1 = (__pyx_v_opening == 0.25);
  if (__pyx_t_1) {

    /* "src/pyglui/gldraw.pxi":171
 *     cdef tuple location
 *     if opening == 0.25:  # left handle
 *         location = handle.org.x + handle.size.x, handle.org.y + handle.size.y / 2             # <<<<<<<<<<<<<<
 *         # line_org.x = handle.org.x + handle.size.x - line_size.x
 *     elif opening == 0.75:  # right handle
 */
    __pyx_t_2 = PyFloat_FromDouble((__pyx_v_handle->org->x + __pyx_v_handle->size->x)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyFloat_FromDouble((__pyx_v_handle->org->y + (__pyx_v_handle->size->y / 2.0))); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_v_location = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/gldraw.pxi":170
 *     # cdef Vec2 line_org = Vec2(0., handle.org.y + handle.size.y / 2 - line_size.y / 2)
 *     cdef tuple location
 *     if opening == 0.25:  # left handle             # <<<<<<<<<<<<<<
 *         location = handle.org.x + handle.size.x, handle.org.y + handle.size.y / 2
 *         # line_org.x = handle.org.x + handle.size.x - line_size.x
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/gldraw.pxi":173
 *         location = handle.org.x + handle.size.x, handle.org.y + handle.size.y / 2
 *         # line_org.x = handle.org.x + handle.size.x - line_size.x
 *     elif opening == 0.75:  # right handle             # <<<<<<<<<<<<<<
 *         location = handle.org.x, handle.org.y + handle.size.y / 2
 *         # line_org.x = h andle.org.x
 */
  __pyx_t_1 = (__pyx_v_opening == 0.75);
  if (__pyx_t_1) {

    /* "src/pyglui/gldraw.pxi":174
 *         # line_org.x = handle.org.x + handle.size.x - line_size.x
 *     elif opening == 0.75:  # right handle
 *         location = handle.org.x, handle.org.y + handle.size.y / 2             # <<<<<<<<<<<<<<
 *         # line_org.x = h andle.org.x
 *     else:
 */
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_handle->org->x); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyFloat_FromDouble((__pyx_v_handle->org->y + (__pyx_v_handle->size->y / 2.0))); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_v_location = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/gldraw.pxi":173
 *         location = handle.org.x + handle.size.x, handle.org.y + handle.size.y / 2
 *         # line_org.x = handle.org.x + handle.size.x - line_size.x
 *     elif opening == 0.75:  # right handle             # <<<<<<<<<<<<<<
 *         location = handle.org.x, handle.org.y + handle.size.y / 2
 *         # line_org.x = h andle.org.x
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/gldraw.pxi":177
 *         # line_org.x = h andle.org.x
 *     else:
 *         location = handle.center             # <<<<<<<<<<<<<<
 *     utils.draw_progress(location, (opening + 0.25) % 1., (opening - 0.25) % 1.,
 *                         inner_radius=0., outer_radius=handle.size.y + ui_scale, color=color,
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_handle), __pyx_n_s_center); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(4, 177, __pyx_L1_error)
    __pyx_v_location = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/gldraw.pxi":178
 *     else:
 *         location = handle.center
 *     utils.draw_progress(location, (opening + 0.25) % 1., (opening - 0.25) % 1.,             # <<<<<<<<<<<<<<
 *                         inner_radius=0., outer_radius=handle.size.y + ui_scale, color=color,
 *                         sharpness=0.9)
 */
  __pyx_t_5.__pyx_n = 4;
  __pyx_t_5.inner_radius = 0.;
  __pyx_t_5.outer_radius = (__pyx_v_handle->size->y + __pyx_v_6pyglui_2ui_ui_scale);
  __pyx_t_5.color = __pyx_v_color;
  __pyx_t_5.sharpness = 0.9;
  __pyx_t_2 = __pyx_f_6pyglui_4cygl_5utils_draw_progress(__pyx_v_location, __Pyx_mod_double((__pyx_v_opening + 0.25), 1.), __Pyx_mod_double((__pyx_v_opening - 0.25), 1.), 0, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/gldraw.pxi":181
 *                         inner_radius=0., outer_radius=handle.size.y + ui_scale, color=color,
 *                         sharpness=0.9)
 *     cdef FitBox drag = handle.computed_copy()             # <<<<<<<<<<<<<<
 *     drag.org = Vec2(location[0] - drag.size.x, location[1] - drag.size.y)
 *     drag.size *= 2
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_handle->__pyx_vtab)->computed_copy(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(4, 181, __pyx_L1_error)
  __pyx_v_drag = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/gldraw.pxi":182
 *                         sharpness=0.9)
 *     cdef FitBox drag = handle.computed_copy()
 *     drag.org = Vec2(location[0] - drag.size.x, location[1] - drag.size.y)             # <<<<<<<<<<<<<<
 *     drag.size *= 2
 *     return drag
 */
  if (unlikely(__pyx_v_location == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(4, 182, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_location, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_drag->size->x); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_v_location == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(4, 182, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_location, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_drag->size->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
  __pyx_t_4 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF((PyObject *)__pyx_v_drag->org);
  __Pyx_DECREF((PyObject *)__pyx_v_drag->org);
  __pyx_v_drag->org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "src/pyglui/gldraw.pxi":183
 *     cdef FitBox drag = handle.computed_copy()
 *     drag.org = Vec2(location[0] - drag.size.x, location[1] - drag.size.y)
 *     drag.size *= 2             # <<<<<<<<<<<<<<
 *     return drag
 * 
 */
  __pyx_t_6 = PyNumber_InPlaceMultiply(((PyObject *)__pyx_v_drag->size), __pyx_int_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(4, 183, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF((PyObject *)__pyx_v_drag->size);
  __Pyx_DECREF((PyObject *)__pyx_v_drag->size);
  __pyx_v_drag->size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "src/pyglui/gldraw.pxi":184
 *     drag.org = Vec2(location[0] - drag.size.x, location[1] - drag.size.y)
 *     drag.size *= 2
 *     return drag             # <<<<<<<<<<<<<<
 * 
 * cdef inline FitBox draw_handle_top_right(Vec2 tip_loc, Vec2 handle_size, RGBA color):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_drag);
  __pyx_r = __pyx_v_drag;
  goto __pyx_L0;

  /* "src/pyglui/gldraw.pxi":164
 *     return drag
 * 
 * cdef inline FitBox draw_trim_handle(FitBox handle, float opening, RGBA color):             # <<<<<<<<<<<<<<
 *     ''' Draw a handle and return FitBox that corresponds draggable area
 *     '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.draw_trim_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XDECREF((PyObject *)__pyx_v_drag);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":186
 *     return drag
 * 
 * cdef inline FitBox draw_handle_top_right(Vec2 tip_loc, Vec2 handle_size, RGBA color):             # <<<<<<<<<<<<<<
 *     ''' Draw a handle and return FitBox that corresponds draggable area
 *     '''
 */

static CYTHON_INLINE struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_f_6pyglui_2ui_draw_handle_top_right(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_tip_loc, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_handle_size, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color) {
  float __pyx_v_tip_length;
  float __pyx_v_half_line_width;
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_handle_top_right", 0);

  /* "src/pyglui/gldraw.pxi":189
 *     ''' Draw a handle and return FitBox that corresponds draggable area
 *     '''
 *     cdef float tip_length = 10.*ui_scale             # <<<<<<<<<<<<<<
 *     cdef float half_line_width = 2. * ui_scale
 * 
 */
  __pyx_v_tip_length = (10. * __pyx_v_6pyglui_2ui_ui_scale);

  /* "src/pyglui/gldraw.pxi":190
 *     '''
 *     cdef float tip_length = 10.*ui_scale
 *     cdef float half_line_width = 2. * ui_scale             # <<<<<<<<<<<<<<
 * 
 *     rect_corners(Vec2(tip_loc.x - half_line_width, tip_loc.y),
 */
  __pyx_v_half_line_width = (2. * __pyx_v_6pyglui_2ui_ui_scale);

  /* "src/pyglui/gldraw.pxi":192
 *     cdef float half_line_width = 2. * ui_scale
 * 
 *     rect_corners(Vec2(tip_loc.x - half_line_width, tip_loc.y),             # <<<<<<<<<<<<<<
 *                  Vec2(tip_loc.x + half_line_width, tip_loc.y - tip_length), color)
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_tip_loc->x - __pyx_v_half_line_width)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_tip_loc->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/gldraw.pxi":193
 * 
 *     rect_corners(Vec2(tip_loc.x - half_line_width, tip_loc.y),
 *                  Vec2(tip_loc.x + half_line_width, tip_loc.y - tip_length), color)             # <<<<<<<<<<<<<<
 * 
 *     rect_corners(Vec2(tip_loc.x - half_line_width + handle_size.x, tip_loc.y - tip_length),
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_tip_loc->x + __pyx_v_half_line_width)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_tip_loc->y - __pyx_v_tip_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/gldraw.pxi":192
 *     cdef float half_line_width = 2. * ui_scale
 * 
 *     rect_corners(Vec2(tip_loc.x - half_line_width, tip_loc.y),             # <<<<<<<<<<<<<<
 *                  Vec2(tip_loc.x + half_line_width, tip_loc.y - tip_length), color)
 * 
 */
  __pyx_t_4 = __pyx_f_6pyglui_2ui_rect_corners(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), __pyx_v_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/gldraw.pxi":195
 *                  Vec2(tip_loc.x + half_line_width, tip_loc.y - tip_length), color)
 * 
 *     rect_corners(Vec2(tip_loc.x - half_line_width + handle_size.x, tip_loc.y - tip_length),             # <<<<<<<<<<<<<<
 *                  Vec2(tip_loc.x - half_line_width, tip_loc.y - tip_length - handle_size.y), color)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_tip_loc->x - __pyx_v_half_line_width) + __pyx_v_handle_size->x)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_tip_loc->y - __pyx_v_tip_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/gldraw.pxi":196
 * 
 *     rect_corners(Vec2(tip_loc.x - half_line_width + handle_size.x, tip_loc.y - tip_length),
 *                  Vec2(tip_loc.x - half_line_width, tip_loc.y - tip_length - handle_size.y), color)             # <<<<<<<<<<<<<<
 * 
 *     return FitBox(Vec2(tip_loc.x - half_line_width, tip_loc.y - tip_length - handle_size.y) / ui_scale, handle_size / ui_scale)
 */
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_tip_loc->x - __pyx_v_half_line_width)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_tip_loc->y - __pyx_v_tip_length) - __pyx_v_handle_size->y)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/gldraw.pxi":195
 *                  Vec2(tip_loc.x + half_line_width, tip_loc.y - tip_length), color)
 * 
 *     rect_corners(Vec2(tip_loc.x - half_line_width + handle_size.x, tip_loc.y - tip_length),             # <<<<<<<<<<<<<<
 *                  Vec2(tip_loc.x - half_line_width, tip_loc.y - tip_length - handle_size.y), color)
 * 
 */
  __pyx_t_3 = __pyx_f_6pyglui_2ui_rect_corners(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_4), __pyx_v_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/gldraw.pxi":198
 *                  Vec2(tip_loc.x - half_line_width, tip_loc.y - tip_length - handle_size.y), color)
 * 
 *     return FitBox(Vec2(tip_loc.x - half_line_width, tip_loc.y - tip_length - handle_size.y) / ui_scale, handle_size / ui_scale)             # <<<<<<<<<<<<<<
 * 
 * ### OpenGL funtions for rendering to texture.
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_tip_loc->x - __pyx_v_half_line_width)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_tip_loc->y - __pyx_v_tip_length) - __pyx_v_handle_size->y)); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyNumber_Divide(((PyObject *)__pyx_v_handle_size), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "src/pyglui/gldraw.pxi":186
 *     return drag
 * 
 * cdef inline FitBox draw_handle_top_right(Vec2 tip_loc, Vec2 handle_size, RGBA color):             # <<<<<<<<<<<<<<
 *     ''' Draw a handle and return FitBox that corresponds draggable area
 *     '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.draw_handle_top_right", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":207
 *     gl.GLuint tex_id
 * 
 * cdef fbo_tex_id create_ui_texture(Vec2 tex_size):             # <<<<<<<<<<<<<<
 *     cdef fbo_tex_id ui_layer
 *     ui_layer.fbo_id = 0
 */

static __pyx_t_6pyglui_2ui_fbo_tex_id __pyx_f_6pyglui_2ui_create_ui_texture(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_tex_size) {
  __pyx_t_6pyglui_2ui_fbo_tex_id __pyx_v_ui_layer;
  __pyx_t_6pyglui_2ui_fbo_tex_id __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ui_texture", 0);

  /* "src/pyglui/gldraw.pxi":209
 * cdef fbo_tex_id create_ui_texture(Vec2 tex_size):
 *     cdef fbo_tex_id ui_layer
 *     ui_layer.fbo_id = 0             # <<<<<<<<<<<<<<
 *     ui_layer.tex_id = 0
 * 
 */
  __pyx_v_ui_layer.fbo_id = 0;

  /* "src/pyglui/gldraw.pxi":210
 *     cdef fbo_tex_id ui_layer
 *     ui_layer.fbo_id = 0
 *     ui_layer.tex_id = 0             # <<<<<<<<<<<<<<
 * 
 *     # create Framebufer Object
 */
  __pyx_v_ui_layer.tex_id = 0;

  /* "src/pyglui/gldraw.pxi":214
 *     # create Framebufer Object
 *     #requires gl ext or opengl > 3.0
 *     gl.glGenFramebuffers(1, &ui_layer.fbo_id)             # <<<<<<<<<<<<<<
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, ui_layer.fbo_id)
 * 
 */
  glGenFramebuffers(1, (&__pyx_v_ui_layer.fbo_id));

  /* "src/pyglui/gldraw.pxi":215
 *     #requires gl ext or opengl > 3.0
 *     gl.glGenFramebuffers(1, &ui_layer.fbo_id)
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, ui_layer.fbo_id)             # <<<<<<<<<<<<<<
 * 
 *     #create texture object
 */
  glBindFramebuffer(GL_FRAMEBUFFER, __pyx_v_ui_layer.fbo_id);

  /* "src/pyglui/gldraw.pxi":218
 * 
 *     #create texture object
 *     gl.glGenTextures(1, &ui_layer.tex_id)             # <<<<<<<<<<<<<<
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)
 *     # configure Texture
 */
  glGenTextures(1, (&__pyx_v_ui_layer.tex_id));

  /* "src/pyglui/gldraw.pxi":219
 *     #create texture object
 *     gl.glGenTextures(1, &ui_layer.tex_id)
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)             # <<<<<<<<<<<<<<
 *     # configure Texture
 *     gl.glTexImage2D(gl.GL_TEXTURE_2D, 0,gl.GL_RGBA, int(tex_size.x),
 */
  glBindTexture(GL_TEXTURE_2D, __pyx_v_ui_layer.tex_id);

  /* "src/pyglui/gldraw.pxi":221
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)
 *     # configure Texture
 *     gl.glTexImage2D(gl.GL_TEXTURE_2D, 0,gl.GL_RGBA, int(tex_size.x),             # <<<<<<<<<<<<<<
 *                     int(tex_size.y), 0,gl.GL_RGBA, gl.GL_UNSIGNED_BYTE,
 *                     NULL)
 */
  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ((GLsizei)__pyx_v_tex_size->x), ((GLsizei)__pyx_v_tex_size->y), 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);

  /* "src/pyglui/gldraw.pxi":225
 *                     NULL)
 *     #set filtering
 *     gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_NEAREST)             # <<<<<<<<<<<<<<
 *     gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_NEAREST)
 * 
 */
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

  /* "src/pyglui/gldraw.pxi":226
 *     #set filtering
 *     gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_NEAREST)
 *     gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_NEAREST)             # <<<<<<<<<<<<<<
 * 
 *     #attach texture to fbo
 */
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

  /* "src/pyglui/gldraw.pxi":229
 * 
 *     #attach texture to fbo
 *     gl.glFramebufferTexture2D(gl.GL_FRAMEBUFFER, gl.GL_COLOR_ATTACHMENT0,             # <<<<<<<<<<<<<<
 *                                 gl.GL_TEXTURE_2D, ui_layer.tex_id, 0)
 * 
 */
  glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, __pyx_v_ui_layer.tex_id, 0);

  /* "src/pyglui/gldraw.pxi":232
 *                                 gl.GL_TEXTURE_2D, ui_layer.tex_id, 0)
 * 
 *     if gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER) != gl.GL_FRAMEBUFFER_COMPLETE:             # <<<<<<<<<<<<<<
 *         raise Exception("UI Framebuffer could not be created.")
 * 
 */
  __pyx_t_1 = (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE);
  if (unlikely(__pyx_t_1)) {

    /* "src/pyglui/gldraw.pxi":233
 * 
 *     if gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER) != gl.GL_FRAMEBUFFER_COMPLETE:
 *         raise Exception("UI Framebuffer could not be created.")             # <<<<<<<<<<<<<<
 * 
 *     #unbind fbo and texture
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(4, 233, __pyx_L1_error)

    /* "src/pyglui/gldraw.pxi":232
 *                                 gl.GL_TEXTURE_2D, ui_layer.tex_id, 0)
 * 
 *     if gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER) != gl.GL_FRAMEBUFFER_COMPLETE:             # <<<<<<<<<<<<<<
 *         raise Exception("UI Framebuffer could not be created.")
 * 
 */
  }

  /* "src/pyglui/gldraw.pxi":236
 * 
 *     #unbind fbo and texture
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, 0)             # <<<<<<<<<<<<<<
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, 0)
 * 
 */
  glBindTexture(GL_TEXTURE_2D, 0);

  /* "src/pyglui/gldraw.pxi":237
 *     #unbind fbo and texture
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, 0)
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, 0)             # <<<<<<<<<<<<<<
 * 
 *     return ui_layer
 */
  glBindFramebuffer(GL_FRAMEBUFFER, 0);

  /* "src/pyglui/gldraw.pxi":239
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, 0)
 * 
 *     return ui_layer             # <<<<<<<<<<<<<<
 * 
 * cdef destroy_ui_texture(fbo_tex_id ui_layer):
 */
  __pyx_r = __pyx_v_ui_layer;
  goto __pyx_L0;

  /* "src/pyglui/gldraw.pxi":207
 *     gl.GLuint tex_id
 * 
 * cdef fbo_tex_id create_ui_texture(Vec2 tex_size):             # <<<<<<<<<<<<<<
 *     cdef fbo_tex_id ui_layer
 *     ui_layer.fbo_id = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("pyglui.ui.create_ui_texture", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":241
 *     return ui_layer
 * 
 * cdef destroy_ui_texture(fbo_tex_id ui_layer):             # <<<<<<<<<<<<<<
 *     gl.glDeleteTextures(1,&ui_layer.tex_id)
 *     gl.glDeleteFramebuffers(1,&ui_layer.fbo_id)
 */

static PyObject *__pyx_f_6pyglui_2ui_destroy_ui_texture(__pyx_t_6pyglui_2ui_fbo_tex_id __pyx_v_ui_layer) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy_ui_texture", 0);

  /* "src/pyglui/gldraw.pxi":242
 * 
 * cdef destroy_ui_texture(fbo_tex_id ui_layer):
 *     gl.glDeleteTextures(1,&ui_layer.tex_id)             # <<<<<<<<<<<<<<
 *     gl.glDeleteFramebuffers(1,&ui_layer.fbo_id)
 * 
 */
  glDeleteTextures(1, (&__pyx_v_ui_layer.tex_id));

  /* "src/pyglui/gldraw.pxi":243
 * cdef destroy_ui_texture(fbo_tex_id ui_layer):
 *     gl.glDeleteTextures(1,&ui_layer.tex_id)
 *     gl.glDeleteFramebuffers(1,&ui_layer.fbo_id)             # <<<<<<<<<<<<<<
 * 
 * cdef resize_ui_texture(fbo_tex_id ui_layer, Vec2 tex_size):
 */
  glDeleteFramebuffers(1, (&__pyx_v_ui_layer.fbo_id));

  /* "src/pyglui/gldraw.pxi":241
 *     return ui_layer
 * 
 * cdef destroy_ui_texture(fbo_tex_id ui_layer):             # <<<<<<<<<<<<<<
 *     gl.glDeleteTextures(1,&ui_layer.tex_id)
 *     gl.glDeleteFramebuffers(1,&ui_layer.fbo_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":245
 *     gl.glDeleteFramebuffers(1,&ui_layer.fbo_id)
 * 
 * cdef resize_ui_texture(fbo_tex_id ui_layer, Vec2 tex_size):             # <<<<<<<<<<<<<<
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)
 *     gl.glTexImage2D(gl.GL_TEXTURE_2D, 0,gl.GL_RGBA, int(tex_size.x),
 */

static PyObject *__pyx_f_6pyglui_2ui_resize_ui_texture(__pyx_t_6pyglui_2ui_fbo_tex_id __pyx_v_ui_layer, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_tex_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resize_ui_texture", 0);

  /* "src/pyglui/gldraw.pxi":246
 * 
 * cdef resize_ui_texture(fbo_tex_id ui_layer, Vec2 tex_size):
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)             # <<<<<<<<<<<<<<
 *     gl.glTexImage2D(gl.GL_TEXTURE_2D, 0,gl.GL_RGBA, int(tex_size.x),
 *                     int(tex_size.y), 0,gl.GL_RGBA, gl.GL_UNSIGNED_BYTE,
 */
  glBindTexture(GL_TEXTURE_2D, __pyx_v_ui_layer.tex_id);

  /* "src/pyglui/gldraw.pxi":247
 * cdef resize_ui_texture(fbo_tex_id ui_layer, Vec2 tex_size):
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)
 *     gl.glTexImage2D(gl.GL_TEXTURE_2D, 0,gl.GL_RGBA, int(tex_size.x),             # <<<<<<<<<<<<<<
 *                     int(tex_size.y), 0,gl.GL_RGBA, gl.GL_UNSIGNED_BYTE,
 *                     NULL)
 */
  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ((GLsizei)__pyx_v_tex_size->x), ((GLsizei)__pyx_v_tex_size->y), 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);

  /* "src/pyglui/gldraw.pxi":250
 *                     int(tex_size.y), 0,gl.GL_RGBA, gl.GL_UNSIGNED_BYTE,
 *                     NULL)
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, 0)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  glBindTexture(GL_TEXTURE_2D, 0);

  /* "src/pyglui/gldraw.pxi":245
 *     gl.glDeleteFramebuffers(1,&ui_layer.fbo_id)
 * 
 * cdef resize_ui_texture(fbo_tex_id ui_layer, Vec2 tex_size):             # <<<<<<<<<<<<<<
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)
 *     gl.glTexImage2D(gl.GL_TEXTURE_2D, 0,gl.GL_RGBA, int(tex_size.x),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":253
 * 
 * 
 * cdef render_to_ui_texture(fbo_tex_id ui_layer):             # <<<<<<<<<<<<<<
 *     # set fbo as render target
 *     # blending method after:
 */

static PyObject *__pyx_f_6pyglui_2ui_render_to_ui_texture(__pyx_t_6pyglui_2ui_fbo_tex_id __pyx_v_ui_layer) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render_to_ui_texture", 0);

  /* "src/pyglui/gldraw.pxi":257
 *     # blending method after:
 *     # http://stackoverflow.com/questions/24346585/opengl-render-to-texture-with-partial-transparancy-translucency-and-then-rende/24380226#24380226
 *     gl.glBlendFuncSeparate(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA,             # <<<<<<<<<<<<<<
 *                                 gl.GL_ONE_MINUS_DST_ALPHA, gl.GL_ONE)
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, ui_layer.fbo_id)
 */
  glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_ONE);

  /* "src/pyglui/gldraw.pxi":259
 *     gl.glBlendFuncSeparate(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA,
 *                                 gl.GL_ONE_MINUS_DST_ALPHA, gl.GL_ONE)
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, ui_layer.fbo_id)             # <<<<<<<<<<<<<<
 *     gl.glClearColor(0.,0.,0.,0.)
 *     gl.glClear(gl.GL_COLOR_BUFFER_BIT)
 */
  glBindFramebuffer(GL_FRAMEBUFFER, __pyx_v_ui_layer.fbo_id);

  /* "src/pyglui/gldraw.pxi":260
 *                                 gl.GL_ONE_MINUS_DST_ALPHA, gl.GL_ONE)
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, ui_layer.fbo_id)
 *     gl.glClearColor(0.,0.,0.,0.)             # <<<<<<<<<<<<<<
 *     gl.glClear(gl.GL_COLOR_BUFFER_BIT)
 * 
 */
  glClearColor(0., 0., 0., 0.);

  /* "src/pyglui/gldraw.pxi":261
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, ui_layer.fbo_id)
 *     gl.glClearColor(0.,0.,0.,0.)
 *     gl.glClear(gl.GL_COLOR_BUFFER_BIT)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  glClear(GL_COLOR_BUFFER_BIT);

  /* "src/pyglui/gldraw.pxi":253
 * 
 * 
 * cdef render_to_ui_texture(fbo_tex_id ui_layer):             # <<<<<<<<<<<<<<
 *     # set fbo as render target
 *     # blending method after:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":264
 * 
 * 
 * cdef render_to_screen():             # <<<<<<<<<<<<<<
 *     # set rendertarget 0
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, 0)
 */

static PyObject *__pyx_f_6pyglui_2ui_render_to_screen(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render_to_screen", 0);

  /* "src/pyglui/gldraw.pxi":266
 * cdef render_to_screen():
 *     # set rendertarget 0
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, 0)             # <<<<<<<<<<<<<<
 *     gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
 * 
 */
  glBindFramebuffer(GL_FRAMEBUFFER, 0);

  /* "src/pyglui/gldraw.pxi":267
 *     # set rendertarget 0
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, 0)
 *     gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)             # <<<<<<<<<<<<<<
 * 
 * cdef draw_ui_texture(fbo_tex_id ui_layer):
 */
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

  /* "src/pyglui/gldraw.pxi":264
 * 
 * 
 * cdef render_to_screen():             # <<<<<<<<<<<<<<
 *     # set rendertarget 0
 *     gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, 0)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/gldraw.pxi":269
 *     gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
 * 
 * cdef draw_ui_texture(fbo_tex_id ui_layer):             # <<<<<<<<<<<<<<
 *     # render texture
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_draw_ui_texture(__pyx_t_6pyglui_2ui_fbo_tex_id __pyx_v_ui_layer) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_ui_texture", 0);

  /* "src/pyglui/gldraw.pxi":273
 * 
 *     # set blending
 *     gl.glBlendFunc(gl.GL_ONE, gl.GL_ONE_MINUS_SRC_ALPHA)             # <<<<<<<<<<<<<<
 * 
 *     # bind texture and use.
 */
  glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

  /* "src/pyglui/gldraw.pxi":276
 * 
 *     # bind texture and use.
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)             # <<<<<<<<<<<<<<
 *     gl.glEnable(gl.GL_TEXTURE_2D)
 * 
 */
  glBindTexture(GL_TEXTURE_2D, __pyx_v_ui_layer.tex_id);

  /* "src/pyglui/gldraw.pxi":277
 *     # bind texture and use.
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, ui_layer.tex_id)
 *     gl.glEnable(gl.GL_TEXTURE_2D)             # <<<<<<<<<<<<<<
 * 
 *     #set up coord system
 */
  glEnable(GL_TEXTURE_2D);

  /* "src/pyglui/gldraw.pxi":280
 * 
 *     #set up coord system
 *     gl.glMatrixMode(gl.GL_PROJECTION)             # <<<<<<<<<<<<<<
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()
 */
  glMatrixMode(GL_PROJECTION);

  /* "src/pyglui/gldraw.pxi":281
 *     #set up coord system
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *     gl.glLoadIdentity()
 *     gl.glOrtho(0, 1, 1, 0, -1, 1)
 */
  glPushMatrix();

  /* "src/pyglui/gldraw.pxi":282
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()             # <<<<<<<<<<<<<<
 *     gl.glOrtho(0, 1, 1, 0, -1, 1)
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 */
  glLoadIdentity();

  /* "src/pyglui/gldraw.pxi":283
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()
 *     gl.glOrtho(0, 1, 1, 0, -1, 1)             # <<<<<<<<<<<<<<
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPushMatrix()
 */
  glOrtho(0.0, 1.0, 1.0, 0.0, -1.0, 1.0);

  /* "src/pyglui/gldraw.pxi":284
 *     gl.glLoadIdentity()
 *     gl.glOrtho(0, 1, 1, 0, -1, 1)
 *     gl.glMatrixMode(gl.GL_MODELVIEW)             # <<<<<<<<<<<<<<
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()
 */
  glMatrixMode(GL_MODELVIEW);

  /* "src/pyglui/gldraw.pxi":285
 *     gl.glOrtho(0, 1, 1, 0, -1, 1)
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *     gl.glLoadIdentity()
 * 
 */
  glPushMatrix();

  /* "src/pyglui/gldraw.pxi":286
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPushMatrix()
 *     gl.glLoadIdentity()             # <<<<<<<<<<<<<<
 * 
 *     gl.glColor4f(1.0,1.0,1.0,1.0)
 */
  glLoadIdentity();

  /* "src/pyglui/gldraw.pxi":288
 *     gl.glLoadIdentity()
 * 
 *     gl.glColor4f(1.0,1.0,1.0,1.0)             # <<<<<<<<<<<<<<
 *     # Draw textured Quad.
 *     gl.glBegin(gl.GL_QUADS)
 */
  glColor4f(1.0, 1.0, 1.0, 1.0);

  /* "src/pyglui/gldraw.pxi":290
 *     gl.glColor4f(1.0,1.0,1.0,1.0)
 *     # Draw textured Quad.
 *     gl.glBegin(gl.GL_QUADS)             # <<<<<<<<<<<<<<
 *     gl.glTexCoord2f(0.0, 1.0)
 *     gl.glVertex2f(0,0)
 */
  glBegin(GL_QUADS);

  /* "src/pyglui/gldraw.pxi":291
 *     # Draw textured Quad.
 *     gl.glBegin(gl.GL_QUADS)
 *     gl.glTexCoord2f(0.0, 1.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex2f(0,0)
 *     gl.glTexCoord2f(1.0, 1.0)
 */
  glTexCoord2f(0.0, 1.0);

  /* "src/pyglui/gldraw.pxi":292
 *     gl.glBegin(gl.GL_QUADS)
 *     gl.glTexCoord2f(0.0, 1.0)
 *     gl.glVertex2f(0,0)             # <<<<<<<<<<<<<<
 *     gl.glTexCoord2f(1.0, 1.0)
 *     gl.glVertex2f(1,0)
 */
  glVertex2f(0.0, 0.0);

  /* "src/pyglui/gldraw.pxi":293
 *     gl.glTexCoord2f(0.0, 1.0)
 *     gl.glVertex2f(0,0)
 *     gl.glTexCoord2f(1.0, 1.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex2f(1,0)
 *     gl.glTexCoord2f(1.0, 0.0)
 */
  glTexCoord2f(1.0, 1.0);

  /* "src/pyglui/gldraw.pxi":294
 *     gl.glVertex2f(0,0)
 *     gl.glTexCoord2f(1.0, 1.0)
 *     gl.glVertex2f(1,0)             # <<<<<<<<<<<<<<
 *     gl.glTexCoord2f(1.0, 0.0)
 *     gl.glVertex2f(1,1)
 */
  glVertex2f(1.0, 0.0);

  /* "src/pyglui/gldraw.pxi":295
 *     gl.glTexCoord2f(1.0, 1.0)
 *     gl.glVertex2f(1,0)
 *     gl.glTexCoord2f(1.0, 0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex2f(1,1)
 *     gl.glTexCoord2f(0.0, 0.0)
 */
  glTexCoord2f(1.0, 0.0);

  /* "src/pyglui/gldraw.pxi":296
 *     gl.glVertex2f(1,0)
 *     gl.glTexCoord2f(1.0, 0.0)
 *     gl.glVertex2f(1,1)             # <<<<<<<<<<<<<<
 *     gl.glTexCoord2f(0.0, 0.0)
 *     gl.glVertex2f(0,1)
 */
  glVertex2f(1.0, 1.0);

  /* "src/pyglui/gldraw.pxi":297
 *     gl.glTexCoord2f(1.0, 0.0)
 *     gl.glVertex2f(1,1)
 *     gl.glTexCoord2f(0.0, 0.0)             # <<<<<<<<<<<<<<
 *     gl.glVertex2f(0,1)
 *     gl.glEnd()
 */
  glTexCoord2f(0.0, 0.0);

  /* "src/pyglui/gldraw.pxi":298
 *     gl.glVertex2f(1,1)
 *     gl.glTexCoord2f(0.0, 0.0)
 *     gl.glVertex2f(0,1)             # <<<<<<<<<<<<<<
 *     gl.glEnd()
 * 
 */
  glVertex2f(0.0, 1.0);

  /* "src/pyglui/gldraw.pxi":299
 *     gl.glTexCoord2f(0.0, 0.0)
 *     gl.glVertex2f(0,1)
 *     gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 *     #pop coord systems
 */
  glEnd();

  /* "src/pyglui/gldraw.pxi":302
 * 
 *     #pop coord systems
 *     gl.glMatrixMode(gl.GL_PROJECTION)             # <<<<<<<<<<<<<<
 *     gl.glPopMatrix()
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 */
  glMatrixMode(GL_PROJECTION);

  /* "src/pyglui/gldraw.pxi":303
 *     #pop coord systems
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPopMatrix()             # <<<<<<<<<<<<<<
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPopMatrix()
 */
  glPopMatrix();

  /* "src/pyglui/gldraw.pxi":304
 *     gl.glMatrixMode(gl.GL_PROJECTION)
 *     gl.glPopMatrix()
 *     gl.glMatrixMode(gl.GL_MODELVIEW)             # <<<<<<<<<<<<<<
 *     gl.glPopMatrix()
 * 
 */
  glMatrixMode(GL_MODELVIEW);

  /* "src/pyglui/gldraw.pxi":305
 *     gl.glPopMatrix()
 *     gl.glMatrixMode(gl.GL_MODELVIEW)
 *     gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, 0)
 */
  glPopMatrix();

  /* "src/pyglui/gldraw.pxi":307
 *     gl.glPopMatrix()
 * 
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, 0)             # <<<<<<<<<<<<<<
 *     gl.glDisable(gl.GL_TEXTURE_2D)
 *     gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
 */
  glBindTexture(GL_TEXTURE_2D, 0);

  /* "src/pyglui/gldraw.pxi":308
 * 
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, 0)
 *     gl.glDisable(gl.GL_TEXTURE_2D)             # <<<<<<<<<<<<<<
 *     gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
 */
  glDisable(GL_TEXTURE_2D);

  /* "src/pyglui/gldraw.pxi":309
 *     gl.glBindTexture(gl.GL_TEXTURE_2D, 0)
 *     gl.glDisable(gl.GL_TEXTURE_2D)
 *     gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)             # <<<<<<<<<<<<<<
 */
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

  /* "src/pyglui/gldraw.pxi":269
 *     gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
 * 
 * cdef draw_ui_texture(fbo_tex_id ui_layer):             # <<<<<<<<<<<<<<
 *     # render texture
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/helpers.pxi":2
 * 
 * cdef inline double lmap(double value, double istart, double istop, double ostart, double ostop):             # <<<<<<<<<<<<<<
 *     '''
 *     linear mapping of val from space 1 to space 2
 */

static CYTHON_INLINE double __pyx_f_6pyglui_2ui_lmap(double __pyx_v_value, double __pyx_v_istart, double __pyx_v_istop, double __pyx_v_ostart, double __pyx_v_ostop) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  double __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lmap", 0);

  /* "src/pyglui/helpers.pxi":6
 *     linear mapping of val from space 1 to space 2
 *     '''
 *     return ostart + (ostop - ostart) * ((value - istart) / (istop - istart))             # <<<<<<<<<<<<<<
 * 
 * cdef inline double clamp(double value, double minium, double maximum):
 */
  __pyx_t_1 = (__pyx_v_value - __pyx_v_istart);
  __pyx_t_2 = (__pyx_v_istop - __pyx_v_istart);
  if (unlikely(__pyx_t_2 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(5, 6, __pyx_L1_error)
  }
  __pyx_r = (__pyx_v_ostart + ((__pyx_v_ostop - __pyx_v_ostart) * (__pyx_t_1 / __pyx_t_2)));
  goto __pyx_L0;

  /* "src/pyglui/helpers.pxi":2
 * 
 * cdef inline double lmap(double value, double istart, double istop, double ostart, double ostop):             # <<<<<<<<<<<<<<
 *     '''
 *     linear mapping of val from space 1 to space 2
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyglui.ui.lmap", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/helpers.pxi":8
 *     return ostart + (ostop - ostart) * ((value - istart) / (istop - istart))
 * 
 * cdef inline double clamp(double value, double minium, double maximum):             # <<<<<<<<<<<<<<
 *     return max(min(value,maximum),minium)
 * 
 */

static CYTHON_INLINE double __pyx_f_6pyglui_2ui_clamp(double __pyx_v_value, double __pyx_v_minium, double __pyx_v_maximum) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  double __pyx_t_2;
  double __pyx_t_3;
  double __pyx_t_4;
  __Pyx_RefNannySetupContext("clamp", 0);

  /* "src/pyglui/helpers.pxi":9
 * 
 * cdef inline double clamp(double value, double minium, double maximum):
 *     return max(min(value,maximum),minium)             # <<<<<<<<<<<<<<
 * 
 * cdef inline double clampmap(double value, double istart, double istop, double ostart, double ostop):
 */
  __pyx_t_1 = __pyx_v_minium;
  __pyx_t_2 = __pyx_v_maximum;
  __pyx_t_3 = __pyx_v_value;
  if ((__pyx_t_2 < __pyx_t_3)) {
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  __pyx_t_2 = __pyx_t_4;
  if ((__pyx_t_1 > __pyx_t_2)) {
    __pyx_t_4 = __pyx_t_1;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "src/pyglui/helpers.pxi":8
 *     return ostart + (ostop - ostart) * ((value - istart) / (istop - istart))
 * 
 * cdef inline double clamp(double value, double minium, double maximum):             # <<<<<<<<<<<<<<
 *     return max(min(value,maximum),minium)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/helpers.pxi":11
 *     return max(min(value,maximum),minium)
 * 
 * cdef inline double clampmap(double value, double istart, double istop, double ostart, double ostop):             # <<<<<<<<<<<<<<
 *     return clamp(lmap(value,istart,istop,ostart,ostop),ostart,ostop)
 * 
 */

static CYTHON_INLINE double __pyx_f_6pyglui_2ui_clampmap(double __pyx_v_value, double __pyx_v_istart, double __pyx_v_istop, double __pyx_v_ostart, double __pyx_v_ostop) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clampmap", 0);

  /* "src/pyglui/helpers.pxi":12
 * 
 * cdef inline double clampmap(double value, double istart, double istop, double ostart, double ostop):
 *     return clamp(lmap(value,istart,istop,ostart,ostop),ostart,ostop)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint mouse_over_center(Vec2 center, double w, double h, Vec2 m):
 */
  __pyx_r = __pyx_f_6pyglui_2ui_clamp(__pyx_f_6pyglui_2ui_lmap(__pyx_v_value, __pyx_v_istart, __pyx_v_istop, __pyx_v_ostart, __pyx_v_ostop), __pyx_v_ostart, __pyx_v_ostop);
  goto __pyx_L0;

  /* "src/pyglui/helpers.pxi":11
 *     return max(min(value,maximum),minium)
 * 
 * cdef inline double clampmap(double value, double istart, double istop, double ostart, double ostop):             # <<<<<<<<<<<<<<
 *     return clamp(lmap(value,istart,istop,ostart,ostop),ostart,ostop)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/helpers.pxi":14
 *     return clamp(lmap(value,istart,istop,ostart,ostop),ostart,ostop)
 * 
 * cdef inline bint mouse_over_center(Vec2 center, double w, double h, Vec2 m):             # <<<<<<<<<<<<<<
 *     return center.x-w/2 <= m.x <=center.x+w/2 and center.y-h/2 <= m.y <=center.y+h/2
 * 
 */

static CYTHON_INLINE int __pyx_f_6pyglui_2ui_mouse_over_center(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_center, double __pyx_v_w, double __pyx_v_h, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("mouse_over_center", 0);

  /* "src/pyglui/helpers.pxi":15
 * 
 * cdef inline bint mouse_over_center(Vec2 center, double w, double h, Vec2 m):
 *     return center.x-w/2 <= m.x <=center.x+w/2 and center.y-h/2 <= m.y <=center.y+h/2             # <<<<<<<<<<<<<<
 * 
 * cdef inline double step(double value, double start, double stop, double step):
 */
  __pyx_t_2 = ((__pyx_v_center->x - (__pyx_v_w / 2.0)) <= __pyx_v_m->x);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_m->x <= (__pyx_v_center->x + (__pyx_v_w / 2.0)));
  }
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_center->y - (__pyx_v_h / 2.0)) <= __pyx_v_m->y);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_m->y <= (__pyx_v_center->y + (__pyx_v_h / 2.0)));
  }
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "src/pyglui/helpers.pxi":14
 *     return clamp(lmap(value,istart,istop,ostart,ostop),ostart,ostop)
 * 
 * cdef inline bint mouse_over_center(Vec2 center, double w, double h, Vec2 m):             # <<<<<<<<<<<<<<
 *     return center.x-w/2 <= m.x <=center.x+w/2 and center.y-h/2 <= m.y <=center.y+h/2
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/helpers.pxi":17
 *     return center.x-w/2 <= m.x <=center.x+w/2 and center.y-h/2 <= m.y <=center.y+h/2
 * 
 * cdef inline double step(double value, double start, double stop, double step):             # <<<<<<<<<<<<<<
 *     cdef double rest
 *     if step:
 */

static CYTHON_INLINE double __pyx_f_6pyglui_2ui_step(double __pyx_v_value, double __pyx_v_start, CYTHON_UNUSED double __pyx_v_stop, double __pyx_v_step) {
  double __pyx_v_rest;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("step", 0);

  /* "src/pyglui/helpers.pxi":19
 * cdef inline double step(double value, double start, double stop, double step):
 *     cdef double rest
 *     if step:             # <<<<<<<<<<<<<<
 *         value -=start
 *         rest = value%step
 */
  __pyx_t_1 = (__pyx_v_step != 0);
  if (__pyx_t_1) {

    /* "src/pyglui/helpers.pxi":20
 *     cdef double rest
 *     if step:
 *         value -=start             # <<<<<<<<<<<<<<
 *         rest = value%step
 *         #round down
 */
    __pyx_v_value = (__pyx_v_value - __pyx_v_start);

    /* "src/pyglui/helpers.pxi":21
 *     if step:
 *         value -=start
 *         rest = value%step             # <<<<<<<<<<<<<<
 *         #round down
 *         if rest < step/2.:
 */
    if (unlikely(__pyx_v_step == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float divmod()");
      __PYX_ERR(5, 21, __pyx_L1_error)
    }
    __pyx_v_rest = __Pyx_mod_double(__pyx_v_value, __pyx_v_step);

    /* "src/pyglui/helpers.pxi":23
 *         rest = value%step
 *         #round down
 *         if rest < step/2.:             # <<<<<<<<<<<<<<
 *             value -=rest
 *         #round up
 */
    __pyx_t_1 = (__pyx_v_rest < (__pyx_v_step / 2.));
    if (__pyx_t_1) {

      /* "src/pyglui/helpers.pxi":24
 *         #round down
 *         if rest < step/2.:
 *             value -=rest             # <<<<<<<<<<<<<<
 *         #round up
 *         else:
 */
      __pyx_v_value = (__pyx_v_value - __pyx_v_rest);

      /* "src/pyglui/helpers.pxi":23
 *         rest = value%step
 *         #round down
 *         if rest < step/2.:             # <<<<<<<<<<<<<<
 *             value -=rest
 *         #round up
 */
      goto __pyx_L4;
    }

    /* "src/pyglui/helpers.pxi":27
 *         #round up
 *         else:
 *             value += step-rest             # <<<<<<<<<<<<<<
 *         value +=start
 *     return value
 */
    /*else*/ {
      __pyx_v_value = (__pyx_v_value + (__pyx_v_step - __pyx_v_rest));
    }
    __pyx_L4:;

    /* "src/pyglui/helpers.pxi":28
 *         else:
 *             value += step-rest
 *         value +=start             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
    __pyx_v_value = (__pyx_v_value + __pyx_v_start);

    /* "src/pyglui/helpers.pxi":19
 * cdef inline double step(double value, double start, double stop, double step):
 *     cdef double rest
 *     if step:             # <<<<<<<<<<<<<<
 *         value -=start
 *         rest = value%step
 */
  }

  /* "src/pyglui/helpers.pxi":29
 *             value += step-rest
 *         value +=start
 *     return value             # <<<<<<<<<<<<<<
 * 
 * def frange(start, stop, step):
 */
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "src/pyglui/helpers.pxi":17
 *     return center.x-w/2 <= m.x <=center.x+w/2 and center.y-h/2 <= m.y <=center.y+h/2
 * 
 * cdef inline double step(double value, double start, double stop, double step):             # <<<<<<<<<<<<<<
 *     cdef double rest
 *     if step:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyglui.ui.step", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pyglui_2ui_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "src/pyglui/helpers.pxi":31
 *     return value
 * 
 * def frange(start, stop, step):             # <<<<<<<<<<<<<<
 *     '''
 *     todo: translate to cython function
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4frange(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pyglui_2ui_3frange, "\n    todo: translate to cython function\n    ");
static PyMethodDef __pyx_mdef_6pyglui_2ui_4frange = {"frange", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4frange, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pyglui_2ui_3frange};
static PyObject *__pyx_pw_6pyglui_2ui_4frange(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_stop = 0;
  PyObject *__pyx_v_step = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frange (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_step,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_step,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 31, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stop)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 31, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("frange", 1, 3, 3, 1); __PYX_ERR(5, 31, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_step)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 31, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("frange", 1, 3, 3, 2); __PYX_ERR(5, 31, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "frange") < 0)) __PYX_ERR(5, 31, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_start = values[0];
    __pyx_v_stop = values[1];
    __pyx_v_step = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("frange", 1, 3, 3, __pyx_nargs); __PYX_ERR(5, 31, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.frange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_3frange(__pyx_self, __pyx_v_start, __pyx_v_stop, __pyx_v_step);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_3frange(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_step) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frange", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *)__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_1_frange(__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(5, 31, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_start = __pyx_v_start;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start);
  __pyx_cur_scope->__pyx_v_stop = __pyx_v_stop;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop);
  __pyx_cur_scope->__pyx_v_step = __pyx_v_step;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_step);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pyglui_2ui_5generator1, __pyx_codeobj__4, (PyObject *) __pyx_cur_scope, __pyx_n_s_frange, __pyx_n_s_frange, __pyx_n_s_pyglui_ui); if (unlikely(!gen)) __PYX_ERR(5, 31, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.frange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pyglui_2ui_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *__pyx_cur_scope = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frange", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(5, 31, __pyx_L1_error)

  /* "src/pyglui/helpers.pxi":35
 *     todo: translate to cython function
 *     '''
 *     while start < stop:             # <<<<<<<<<<<<<<
 *         yield start
 *         start += step
 */
  while (1) {
    __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_start, __pyx_cur_scope->__pyx_v_stop, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 35, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(5, 35, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_2) break;

    /* "src/pyglui/helpers.pxi":36
 *     '''
 *     while start < stop:
 *         yield start             # <<<<<<<<<<<<<<
 *         start += step
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
    __pyx_r = __pyx_cur_scope->__pyx_v_start;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(5, 36, __pyx_L1_error)

    /* "src/pyglui/helpers.pxi":37
 *     while start < stop:
 *         yield start
 *         start += step             # <<<<<<<<<<<<<<
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_start, __pyx_cur_scope->__pyx_v_step); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_start);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_start, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "src/pyglui/helpers.pxi":31
 *     return value
 * 
 * def frange(start, stop, step):             # <<<<<<<<<<<<<<
 *     '''
 *     todo: translate to cython function
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("frange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":49
 * cdef bint should_redraw_overlay = True
 * 
 * def get_roboto_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_7get_roboto_font_path(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_7get_roboto_font_path = {"get_roboto_font_path", (PyCFunction)__pyx_pw_6pyglui_2ui_7get_roboto_font_path, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_7get_roboto_font_path(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_roboto_font_path (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6get_roboto_font_path(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6get_roboto_font_path(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_roboto_font_path", 0);

  /* "pyglui/ui.pyx":50
 * 
 * def get_roboto_font_path():
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')             # <<<<<<<<<<<<<<
 * 
 * def get_opensans_font_path():
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dirname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_2, __pyx_kp_u_Roboto_Regular_ttf};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":49
 * cdef bint should_redraw_overlay = True
 * 
 * def get_roboto_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.get_roboto_font_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":52
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')
 * 
 * def get_opensans_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9get_opensans_font_path(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9get_opensans_font_path = {"get_opensans_font_path", (PyCFunction)__pyx_pw_6pyglui_2ui_9get_opensans_font_path, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9get_opensans_font_path(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_opensans_font_path (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8get_opensans_font_path(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8get_opensans_font_path(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_opensans_font_path", 0);

  /* "pyglui/ui.pyx":53
 * 
 * def get_opensans_font_path():
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')             # <<<<<<<<<<<<<<
 * 
 * def get_pupil_icons_font_path():
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dirname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_2, __pyx_kp_u_OpenSans_Regular_ttf};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":52
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')
 * 
 * def get_opensans_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.get_opensans_font_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":55
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')
 * 
 * def get_pupil_icons_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_11get_pupil_icons_font_path(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_11get_pupil_icons_font_path = {"get_pupil_icons_font_path", (PyCFunction)__pyx_pw_6pyglui_2ui_11get_pupil_icons_font_path, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_11get_pupil_icons_font_path(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_pupil_icons_font_path (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10get_pupil_icons_font_path(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10get_pupil_icons_font_path(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_pupil_icons_font_path", 0);

  /* "pyglui/ui.pyx":56
 * 
 * def get_pupil_icons_font_path():
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')             # <<<<<<<<<<<<<<
 * 
 * def get_all_font_paths():
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dirname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_2, __pyx_kp_u_pupil_icons_ttf};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":55
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')
 * 
 * def get_pupil_icons_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.get_pupil_icons_font_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":58
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')
 * 
 * def get_all_font_paths():             # <<<<<<<<<<<<<<
 *     return get_roboto_font_path(),get_opensans_font_path(),get_pupil_icons_font_path()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13get_all_font_paths(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13get_all_font_paths = {"get_all_font_paths", (PyCFunction)__pyx_pw_6pyglui_2ui_13get_all_font_paths, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13get_all_font_paths(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_all_font_paths (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12get_all_font_paths(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12get_all_font_paths(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_all_font_paths", 0);

  /* "pyglui/ui.pyx":59
 * 
 * def get_all_font_paths():
 *     return get_roboto_font_path(),get_opensans_font_path(),get_pupil_icons_font_path()             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_roboto_font_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_opensans_font_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_pupil_icons_font_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_6, };
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":58
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')
 * 
 * def get_all_font_paths():             # <<<<<<<<<<<<<<
 *     return get_roboto_font_path(),get_opensans_font_path(),get_pupil_icons_font_path()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.get_all_font_paths", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":80
 *     cdef fbo_tex_id overlay_layer
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         with sig_on_off():
 *             self.elements = []
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI___cinit__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI___cinit__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyglui/ui.pyx":81
 * 
 *     def __cinit__(self):
 *         with sig_on_off():             # <<<<<<<<<<<<<<
 *             self.elements = []
 *             self.new_input = Input()
 */
  /*with:*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sig_on_off); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_3, };
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_6, };
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {

          /* "pyglui/ui.pyx":82
 *     def __cinit__(self):
 *         with sig_on_off():
 *             self.elements = []             # <<<<<<<<<<<<<<
 *             self.new_input = Input()
 *             self.window = FitBox(Vec2(0,0),Vec2(0,0))
 */
          __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_v_self->elements);
          __Pyx_DECREF(__pyx_v_self->elements);
          __pyx_v_self->elements = ((PyObject*)__pyx_t_1);
          __pyx_t_1 = 0;

          /* "pyglui/ui.pyx":83
 *         with sig_on_off():
 *             self.elements = []
 *             self.new_input = Input()             # <<<<<<<<<<<<<<
 *             self.window = FitBox(Vec2(0,0),Vec2(0,0))
 *             self.ui_layer = create_ui_texture(Vec2(200,200))
 */
          __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6pyglui_2ui_Input)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_1);
          __Pyx_GOTREF((PyObject *)__pyx_v_self->new_input);
          __Pyx_DECREF((PyObject *)__pyx_v_self->new_input);
          __pyx_v_self->new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_t_1);
          __pyx_t_1 = 0;

          /* "pyglui/ui.pyx":84
 *             self.elements = []
 *             self.new_input = Input()
 *             self.window = FitBox(Vec2(0,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 *             self.ui_layer = create_ui_texture(Vec2(200,200))
 *             self.overlay_layer = create_ui_texture(Vec2(200,200))
 */
          __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
          __pyx_t_1 = 0;
          __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_GOTREF((PyObject *)__pyx_v_self->window);
          __Pyx_DECREF((PyObject *)__pyx_v_self->window);
          __pyx_v_self->window = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyglui/ui.pyx":85
 *             self.new_input = Input()
 *             self.window = FitBox(Vec2(0,0),Vec2(0,0))
 *             self.ui_layer = create_ui_texture(Vec2(200,200))             # <<<<<<<<<<<<<<
 *             self.overlay_layer = create_ui_texture(Vec2(200,200))
 * 
 */
          __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_self->ui_layer = __pyx_f_6pyglui_2ui_create_ui_texture(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2));
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyglui/ui.pyx":86
 *             self.window = FitBox(Vec2(0,0),Vec2(0,0))
 *             self.ui_layer = create_ui_texture(Vec2(200,200))
 *             self.overlay_layer = create_ui_texture(Vec2(200,200))             # <<<<<<<<<<<<<<
 * 
 *             #global init of gl fonts
 */
          __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_self->overlay_layer = __pyx_f_6pyglui_2ui_create_ui_texture(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2));
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyglui/ui.pyx":90
 *             #global init of gl fonts
 *             global glfont
 *             glfont = fs.Context()             # <<<<<<<<<<<<<<
 *             self.add_font('roboto',get_roboto_font_path() )
 *             self.add_font('opensans',get_opensans_font_path())
 */
          __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XGOTREF((PyObject *)__pyx_v_6pyglui_2ui_glfont);
          __Pyx_DECREF_SET(__pyx_v_6pyglui_2ui_glfont, ((struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_t_2));
          __Pyx_GIVEREF(__pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyglui/ui.pyx":91
 *             global glfont
 *             glfont = fs.Context()
 *             self.add_font('roboto',get_roboto_font_path() )             # <<<<<<<<<<<<<<
 *             self.add_font('opensans',get_opensans_font_path())
 *             self.add_font('pupil_icons',get_pupil_icons_font_path())
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_font); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_roboto_font_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = NULL;
          __pyx_t_4 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_4 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[1] = {__pyx_t_10, };
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __pyx_t_6 = NULL;
          __pyx_t_4 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_4 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_n_u_roboto, __pyx_t_1};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyglui/ui.pyx":92
 *             glfont = fs.Context()
 *             self.add_font('roboto',get_roboto_font_path() )
 *             self.add_font('opensans',get_opensans_font_path())             # <<<<<<<<<<<<<<
 *             self.add_font('pupil_icons',get_pupil_icons_font_path())
 * 
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_font); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_opensans_font_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = NULL;
          __pyx_t_4 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_4 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[1] = {__pyx_t_10, };
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __pyx_t_6 = NULL;
          __pyx_t_4 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_4 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_n_u_opensans, __pyx_t_1};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyglui/ui.pyx":93
 *             self.add_font('roboto',get_roboto_font_path() )
 *             self.add_font('opensans',get_opensans_font_path())
 *             self.add_font('pupil_icons',get_pupil_icons_font_path())             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_font); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_pupil_icons_font_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = NULL;
          __pyx_t_4 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_4 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[1] = {__pyx_t_10, };
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __pyx_t_6 = NULL;
          __pyx_t_4 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_4 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_n_u_pupil_icons, __pyx_t_1};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyglui/ui.pyx":81
 * 
 *     def __cinit__(self):
 *         with sig_on_off():             # <<<<<<<<<<<<<<
 *             self.elements = []
 *             self.new_input = Input()
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("pyglui.ui.UI.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 81, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 81, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (__pyx_t_12 < 0) __PYX_ERR(0, 81, __pyx_L9_except_error)
          __pyx_t_13 = (!__pyx_t_12);
          if (unlikely(__pyx_t_13)) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_1);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_1);
            __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; 
            __PYX_ERR(0, 81, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__7, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 81, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "pyglui/ui.pyx":80
 *     cdef fbo_tex_id overlay_layer
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         with sig_on_off():
 *             self.elements = []
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyglui.ui.UI.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":95
 *             self.add_font('pupil_icons',get_pupil_icons_font_path())
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_2__init__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":98
 *         pass
 * 
 *     def add_font(self,font_name,font_path):             # <<<<<<<<<<<<<<
 *         if glfont:
 *             glfont.add_font(font_name,font_path)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_5add_font(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_5add_font = {"add_font", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_5add_font, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_5add_font(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_font_name = 0;
  PyObject *__pyx_v_font_path = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_font (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_font_name,&__pyx_n_s_font_path,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_font_name,&__pyx_n_s_font_path,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_font_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_font_path)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("add_font", 1, 2, 2, 1); __PYX_ERR(0, 98, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_font") < 0)) __PYX_ERR(0, 98, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_font_name = values[0];
    __pyx_v_font_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_font", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 98, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.add_font", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_4add_font(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_font_name, __pyx_v_font_path);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_4add_font(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_font_name, PyObject *__pyx_v_font_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_font", 0);

  /* "pyglui/ui.pyx":99
 * 
 *     def add_font(self,font_name,font_path):
 *         if glfont:             # <<<<<<<<<<<<<<
 *             glfont.add_font(font_name,font_path)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_6pyglui_2ui_glfont)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 99, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":100
 *     def add_font(self,font_name,font_path):
 *         if glfont:
 *             glfont.add_font(font_name,font_path)             # <<<<<<<<<<<<<<
 * 
 *     def terminate(self):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_add_font); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_font_name, __pyx_v_font_path};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":99
 * 
 *     def add_font(self,font_name,font_path):
 *         if glfont:             # <<<<<<<<<<<<<<
 *             glfont.add_font(font_name,font_path)
 * 
 */
  }

  /* "pyglui/ui.pyx":98
 *         pass
 * 
 *     def add_font(self,font_name,font_path):             # <<<<<<<<<<<<<<
 *         if glfont:
 *             glfont.add_font(font_name,font_path)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.UI.add_font", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":102
 *             glfont.add_font(font_name,font_path)
 * 
 *     def terminate(self):             # <<<<<<<<<<<<<<
 *         global glfont
 *         glfont = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_7terminate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_7terminate = {"terminate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_7terminate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_7terminate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("terminate (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("terminate", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "terminate", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_6terminate(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_6terminate(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("terminate", 0);

  /* "pyglui/ui.pyx":104
 *     def terminate(self):
 *         global glfont
 *         glfont = None             # <<<<<<<<<<<<<<
 *         destroy_ui_texture(self.ui_layer)
 *         destroy_ui_texture(self.overlay_layer)
 */
  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF((PyObject *)__pyx_v_6pyglui_2ui_glfont);
  __Pyx_DECREF_SET(__pyx_v_6pyglui_2ui_glfont, ((struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *)Py_None));
  __Pyx_GIVEREF(Py_None);

  /* "pyglui/ui.pyx":105
 *         global glfont
 *         glfont = None
 *         destroy_ui_texture(self.ui_layer)             # <<<<<<<<<<<<<<
 *         destroy_ui_texture(self.overlay_layer)
 *         self.elements = []
 */
  __pyx_t_1 = __pyx_f_6pyglui_2ui_destroy_ui_texture(__pyx_v_self->ui_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":106
 *         glfont = None
 *         destroy_ui_texture(self.ui_layer)
 *         destroy_ui_texture(self.overlay_layer)             # <<<<<<<<<<<<<<
 *         self.elements = []
 * 
 */
  __pyx_t_1 = __pyx_f_6pyglui_2ui_destroy_ui_texture(__pyx_v_self->overlay_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":107
 *         destroy_ui_texture(self.ui_layer)
 *         destroy_ui_texture(self.overlay_layer)
 *         self.elements = []             # <<<<<<<<<<<<<<
 * 
 *     def update_mouse(self,mx,my):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->elements);
  __Pyx_DECREF(__pyx_v_self->elements);
  __pyx_v_self->elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":102
 *             glfont.add_font(font_name,font_path)
 * 
 *     def terminate(self):             # <<<<<<<<<<<<<<
 *         global glfont
 *         glfont = None
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.terminate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":109
 *         self.elements = []
 * 
 *     def update_mouse(self,mx,my):             # <<<<<<<<<<<<<<
 *         if self.window.mouse_over(Vec2(mx,my)):
 *             self.new_input.dm.x,self.new_input.dm.y = mx-self.new_input.m.x, my-self.new_input.m.y
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_9update_mouse(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_9update_mouse = {"update_mouse", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_9update_mouse, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_9update_mouse(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_mx = 0;
  PyObject *__pyx_v_my = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_mouse (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mx,&__pyx_n_s_my,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mx,&__pyx_n_s_my,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_my)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_mouse", 1, 2, 2, 1); __PYX_ERR(0, 109, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_mouse") < 0)) __PYX_ERR(0, 109, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_mx = values[0];
    __pyx_v_my = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_mouse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 109, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.update_mouse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_8update_mouse(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_mx, __pyx_v_my);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_8update_mouse(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_mx, PyObject *__pyx_v_my) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  float __pyx_t_4;
  float __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_mouse", 0);

  /* "pyglui/ui.pyx":110
 * 
 *     def update_mouse(self,mx,my):
 *         if self.window.mouse_over(Vec2(mx,my)):             # <<<<<<<<<<<<<<
 *             self.new_input.dm.x,self.new_input.dm.y = mx-self.new_input.m.x, my-self.new_input.m.y
 *             self.new_input.m.x,self.new_input.m.y = mx,my
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_mx);
  __Pyx_GIVEREF(__pyx_v_mx);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mx);
  __Pyx_INCREF(__pyx_v_my);
  __Pyx_GIVEREF(__pyx_v_my);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_my);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->window->__pyx_vtab)->mouse_over(__pyx_v_self->window, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pyglui/ui.pyx":111
 *     def update_mouse(self,mx,my):
 *         if self.window.mouse_over(Vec2(mx,my)):
 *             self.new_input.dm.x,self.new_input.dm.y = mx-self.new_input.m.x, my-self.new_input.m.y             # <<<<<<<<<<<<<<
 *             self.new_input.m.x,self.new_input.m.y = mx,my
 * 
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->new_input->m->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_mx, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->new_input->m->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Subtract(__pyx_v_my, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->new_input->dm->x = __pyx_t_4;
    __pyx_v_self->new_input->dm->y = __pyx_t_5;

    /* "pyglui/ui.pyx":112
 *         if self.window.mouse_over(Vec2(mx,my)):
 *             self.new_input.dm.x,self.new_input.dm.y = mx-self.new_input.m.x, my-self.new_input.m.y
 *             self.new_input.m.x,self.new_input.m.y = mx,my             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_mx); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_v_my); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
    __pyx_v_self->new_input->m->x = __pyx_t_5;
    __pyx_v_self->new_input->m->y = __pyx_t_4;

    /* "pyglui/ui.pyx":110
 * 
 *     def update_mouse(self,mx,my):
 *         if self.window.mouse_over(Vec2(mx,my)):             # <<<<<<<<<<<<<<
 *             self.new_input.dm.x,self.new_input.dm.y = mx-self.new_input.m.x, my-self.new_input.m.y
 *             self.new_input.m.x,self.new_input.m.y = mx,my
 */
  }

  /* "pyglui/ui.pyx":109
 *         self.elements = []
 * 
 *     def update_mouse(self,mx,my):             # <<<<<<<<<<<<<<
 *         if self.window.mouse_over(Vec2(mx,my)):
 *             self.new_input.dm.x,self.new_input.dm.y = mx-self.new_input.m.x, my-self.new_input.m.y
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.UI.update_mouse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":115
 * 
 * 
 *     def update_window(self,w,h):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_11update_window(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_11update_window = {"update_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_11update_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_11update_window(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_w = 0;
  PyObject *__pyx_v_h = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_window (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_w,&__pyx_n_s_h,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_w,&__pyx_n_s_h,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_w)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_h)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_window", 1, 2, 2, 1); __PYX_ERR(0, 115, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_window") < 0)) __PYX_ERR(0, 115, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_w = values[0];
    __pyx_v_h = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_window", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 115, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.update_window", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_10update_window(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_w, __pyx_v_h);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_10update_window(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_w, PyObject *__pyx_v_h) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  float __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  GLsizei __pyx_t_4;
  GLsizei __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_window", 0);

  /* "pyglui/ui.pyx":117
 *     def update_window(self,w,h):
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 *         self.window.size.x,self.window.size.y = w,h
 *         gl.glScissor(0,0,int(w),int(h))
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "pyglui/ui.pyx":118
 *         global should_redraw
 *         should_redraw = True
 *         self.window.size.x,self.window.size.y = w,h             # <<<<<<<<<<<<<<
 *         gl.glScissor(0,0,int(w),int(h))
 *         resize_ui_texture(self.ui_layer,self.window.size)
 */
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_w); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_h); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
  __pyx_v_self->window->size->x = __pyx_t_1;
  __pyx_v_self->window->size->y = __pyx_t_2;

  /* "pyglui/ui.pyx":119
 *         should_redraw = True
 *         self.window.size.x,self.window.size.y = w,h
 *         gl.glScissor(0,0,int(w),int(h))             # <<<<<<<<<<<<<<
 *         resize_ui_texture(self.ui_layer,self.window.size)
 *         resize_ui_texture(self.overlay_layer,self.window.size)
 */
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_GLsizei(__pyx_t_3); if (unlikely((__pyx_t_4 == ((GLsizei)-1)) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_h); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_GLsizei(__pyx_t_3); if (unlikely((__pyx_t_5 == ((GLsizei)-1)) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  glScissor(0, 0, __pyx_t_4, __pyx_t_5);

  /* "pyglui/ui.pyx":120
 *         self.window.size.x,self.window.size.y = w,h
 *         gl.glScissor(0,0,int(w),int(h))
 *         resize_ui_texture(self.ui_layer,self.window.size)             # <<<<<<<<<<<<<<
 *         resize_ui_texture(self.overlay_layer,self.window.size)
 * 
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->window->size);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = __pyx_f_6pyglui_2ui_resize_ui_texture(__pyx_v_self->ui_layer, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pyglui/ui.pyx":121
 *         gl.glScissor(0,0,int(w),int(h))
 *         resize_ui_texture(self.ui_layer,self.window.size)
 *         resize_ui_texture(self.overlay_layer,self.window.size)             # <<<<<<<<<<<<<<
 * 
 *     def update_scroll(self, sx,sy):
 */
  __pyx_t_6 = ((PyObject *)__pyx_v_self->window->size);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_3 = __pyx_f_6pyglui_2ui_resize_ui_texture(__pyx_v_self->overlay_layer, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyglui/ui.pyx":115
 * 
 * 
 *     def update_window(self,w,h):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.UI.update_window", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":123
 *         resize_ui_texture(self.overlay_layer,self.window.size)
 * 
 *     def update_scroll(self, sx,sy):             # <<<<<<<<<<<<<<
 *         self.new_input.s.x = sx
 *         self.new_input.s.y = sy
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_13update_scroll(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_13update_scroll = {"update_scroll", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_13update_scroll, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_13update_scroll(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_sx = 0;
  PyObject *__pyx_v_sy = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_scroll (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sx,&__pyx_n_s_sy,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sx,&__pyx_n_s_sy,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sy)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_scroll", 1, 2, 2, 1); __PYX_ERR(0, 123, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_scroll") < 0)) __PYX_ERR(0, 123, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_sx = values[0];
    __pyx_v_sy = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_scroll", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 123, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.update_scroll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_12update_scroll(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_sx, __pyx_v_sy);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_12update_scroll(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_sx, PyObject *__pyx_v_sy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_scroll", 0);

  /* "pyglui/ui.pyx":124
 * 
 *     def update_scroll(self, sx,sy):
 *         self.new_input.s.x = sx             # <<<<<<<<<<<<<<
 *         self.new_input.s.y = sy
 * 
 */
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_sx); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L1_error)
  __pyx_v_self->new_input->s->x = __pyx_t_1;

  /* "pyglui/ui.pyx":125
 *     def update_scroll(self, sx,sy):
 *         self.new_input.s.x = sx
 *         self.new_input.s.y = sy             # <<<<<<<<<<<<<<
 * 
 *     def update_key(self, key, scancode, action, mods):
 */
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_sy); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L1_error)
  __pyx_v_self->new_input->s->y = __pyx_t_1;

  /* "pyglui/ui.pyx":123
 *         resize_ui_texture(self.overlay_layer,self.window.size)
 * 
 *     def update_scroll(self, sx,sy):             # <<<<<<<<<<<<<<
 *         self.new_input.s.x = sx
 *         self.new_input.s.y = sy
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.update_scroll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":127
 *         self.new_input.s.y = sy
 * 
 *     def update_key(self, key, scancode, action, mods):             # <<<<<<<<<<<<<<
 *         self.new_input.keys.append((key,scancode,action,mods))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_15update_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_15update_key = {"update_key", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_15update_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_15update_key(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_scancode = 0;
  PyObject *__pyx_v_action = 0;
  PyObject *__pyx_v_mods = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_key (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_scancode,&__pyx_n_s_action,&__pyx_n_s_mods,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_scancode,&__pyx_n_s_action,&__pyx_n_s_mods,0};
    #endif
    PyObject* values[4] = {0,0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scancode)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_key", 1, 4, 4, 1); __PYX_ERR(0, 127, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_action)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_key", 1, 4, 4, 2); __PYX_ERR(0, 127, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mods)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_key", 1, 4, 4, 3); __PYX_ERR(0, 127, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_key") < 0)) __PYX_ERR(0, 127, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_key = values[0];
    __pyx_v_scancode = values[1];
    __pyx_v_action = values[2];
    __pyx_v_mods = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_key", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 127, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.update_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_14update_key(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_key, __pyx_v_scancode, __pyx_v_action, __pyx_v_mods);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_14update_key(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_scancode, PyObject *__pyx_v_action, PyObject *__pyx_v_mods) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_key", 0);

  /* "pyglui/ui.pyx":128
 * 
 *     def update_key(self, key, scancode, action, mods):
 *         self.new_input.keys.append((key,scancode,action,mods))             # <<<<<<<<<<<<<<
 * 
 *     def update_char(self,c):
 */
  if (unlikely(__pyx_v_self->new_input->keys == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(0, 128, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
  __Pyx_INCREF(__pyx_v_scancode);
  __Pyx_GIVEREF(__pyx_v_scancode);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_scancode);
  __Pyx_INCREF(__pyx_v_action);
  __Pyx_GIVEREF(__pyx_v_action);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_action);
  __Pyx_INCREF(__pyx_v_mods);
  __Pyx_GIVEREF(__pyx_v_mods);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mods);
  __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->new_input->keys, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":127
 *         self.new_input.s.y = sy
 * 
 *     def update_key(self, key, scancode, action, mods):             # <<<<<<<<<<<<<<
 *         self.new_input.keys.append((key,scancode,action,mods))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.update_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":130
 *         self.new_input.keys.append((key,scancode,action,mods))
 * 
 *     def update_char(self,c):             # <<<<<<<<<<<<<<
 *         try:
 *             self.new_input.chars.append(chr(c))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_17update_char(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_17update_char = {"update_char", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_17update_char, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_17update_char(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_c = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_char (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_c,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_c,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_c)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_char") < 0)) __PYX_ERR(0, 130, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_c = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_char", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 130, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.update_char", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_16update_char(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_c);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_16update_char(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_char", 0);

  /* "pyglui/ui.pyx":131
 * 
 *     def update_char(self,c):
 *         try:             # <<<<<<<<<<<<<<
 *             self.new_input.chars.append(chr(c))
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pyglui/ui.pyx":132
 *     def update_char(self,c):
 *         try:
 *             self.new_input.chars.append(chr(c))             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
      if (unlikely(__pyx_v_self->new_input->chars == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
        __PYX_ERR(0, 132, __pyx_L3_error)
      }
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->new_input->chars, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 132, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyglui/ui.pyx":131
 * 
 *     def update_char(self,c):
 *         try:             # <<<<<<<<<<<<<<
 *             self.new_input.chars.append(chr(c))
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":133
 *         try:
 *             self.new_input.chars.append(chr(c))
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "pyglui/ui.pyx":130
 *         self.new_input.keys.append((key,scancode,action,mods))
 * 
 *     def update_char(self,c):             # <<<<<<<<<<<<<<
 *         try:
 *             self.new_input.chars.append(chr(c))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":136
 *             pass
 * 
 *     def update_button(self,button,action,mods):             # <<<<<<<<<<<<<<
 *         self.new_input.buttons.append((button,action,mods))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_19update_button(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_19update_button = {"update_button", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_19update_button, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_19update_button(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_button = 0;
  PyObject *__pyx_v_action = 0;
  PyObject *__pyx_v_mods = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_button (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_button,&__pyx_n_s_action,&__pyx_n_s_mods,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_button,&__pyx_n_s_action,&__pyx_n_s_mods,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_button)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_action)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_button", 1, 3, 3, 1); __PYX_ERR(0, 136, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mods)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_button", 1, 3, 3, 2); __PYX_ERR(0, 136, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_button") < 0)) __PYX_ERR(0, 136, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_button = values[0];
    __pyx_v_action = values[1];
    __pyx_v_mods = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_button", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 136, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.update_button", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_18update_button(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_button, __pyx_v_action, __pyx_v_mods);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_18update_button(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_button, PyObject *__pyx_v_action, PyObject *__pyx_v_mods) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_button", 0);

  /* "pyglui/ui.pyx":137
 * 
 *     def update_button(self,button,action,mods):
 *         self.new_input.buttons.append((button,action,mods))             # <<<<<<<<<<<<<<
 * 
 *     def update_clipboard(self, clipboard):
 */
  if (unlikely(__pyx_v_self->new_input->buttons == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(0, 137, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_button);
  __Pyx_GIVEREF(__pyx_v_button);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_button);
  __Pyx_INCREF(__pyx_v_action);
  __Pyx_GIVEREF(__pyx_v_action);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_action);
  __Pyx_INCREF(__pyx_v_mods);
  __Pyx_GIVEREF(__pyx_v_mods);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_mods);
  __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->new_input->buttons, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":136
 *             pass
 * 
 *     def update_button(self,button,action,mods):             # <<<<<<<<<<<<<<
 *         self.new_input.buttons.append((button,action,mods))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.update_button", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":139
 *         self.new_input.buttons.append((button,action,mods))
 * 
 *     def update_clipboard(self, clipboard):             # <<<<<<<<<<<<<<
 *         self.new_input.cb = clipboard
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_21update_clipboard(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_21update_clipboard = {"update_clipboard", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_21update_clipboard, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_21update_clipboard(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_clipboard = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_clipboard (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_clipboard,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_clipboard,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_clipboard)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_clipboard") < 0)) __PYX_ERR(0, 139, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_clipboard = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_clipboard", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 139, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.update_clipboard", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_20update_clipboard(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_clipboard);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_20update_clipboard(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_clipboard) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_clipboard", 0);

  /* "pyglui/ui.pyx":140
 * 
 *     def update_clipboard(self, clipboard):
 *         self.new_input.cb = clipboard             # <<<<<<<<<<<<<<
 * 
 *     cdef sync(self):
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_clipboard))||((__pyx_v_clipboard) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_clipboard))) __PYX_ERR(0, 140, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_clipboard;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->new_input->cb);
  __Pyx_DECREF(__pyx_v_self->new_input->cb);
  __pyx_v_self->new_input->cb = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":139
 *         self.new_input.buttons.append((button,action,mods))
 * 
 *     def update_clipboard(self, clipboard):             # <<<<<<<<<<<<<<
 *         self.new_input.cb = clipboard
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.update_clipboard", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":142
 *         self.new_input.cb = clipboard
 * 
 *     cdef sync(self):             # <<<<<<<<<<<<<<
 *         for e in self.elements:
 *             e.sync()
 */

static PyObject *__pyx_f_6pyglui_2ui_2UI_sync(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);

  /* "pyglui/ui.pyx":143
 * 
 *     cdef sync(self):
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             e.sync()
 * 
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 143, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 143, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyglui/ui.pyx":144
 *     cdef sync(self):
 *         for e in self.elements:
 *             e.sync()             # <<<<<<<<<<<<<<
 * 
 *     cdef handle_input(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_sync); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_5, };
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyglui/ui.pyx":143
 * 
 *     cdef sync(self):
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             e.sync()
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":142
 *         self.new_input.cb = clipboard
 * 
 *     cdef sync(self):             # <<<<<<<<<<<<<<
 *         for e in self.elements:
 *             e.sync()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.UI.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":146
 *             e.sync()
 * 
 *     cdef handle_input(self):             # <<<<<<<<<<<<<<
 *         if self.new_input:
 *             #let active elements deal with input first:
 */

static PyObject *__pyx_f_6pyglui_2ui_2UI_handle_input(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_unused = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);

  /* "pyglui/ui.pyx":147
 * 
 *     cdef handle_input(self):
 *         if self.new_input:             # <<<<<<<<<<<<<<
 *             #let active elements deal with input first:
 *             for e in self.new_input.active_ui_elements:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->new_input)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 147, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":149
 *         if self.new_input:
 *             #let active elements deal with input first:
 *             for e in self.new_input.active_ui_elements:             # <<<<<<<<<<<<<<
 *                 e.pre_handle_input(self.new_input)
 *             self.new_input.active_ui_elements = []
 */
    if (unlikely(__pyx_v_self->new_input->active_ui_elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 149, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->new_input->active_ui_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 149, __pyx_L1_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyglui/ui.pyx":150
 *             #let active elements deal with input first:
 *             for e in self.new_input.active_ui_elements:
 *                 e.pre_handle_input(self.new_input)             # <<<<<<<<<<<<<<
 *             self.new_input.active_ui_elements = []
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_pre_handle_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self->new_input)};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyglui/ui.pyx":149
 *         if self.new_input:
 *             #let active elements deal with input first:
 *             for e in self.new_input.active_ui_elements:             # <<<<<<<<<<<<<<
 *                 e.pre_handle_input(self.new_input)
 *             self.new_input.active_ui_elements = []
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":151
 *             for e in self.new_input.active_ui_elements:
 *                 e.pre_handle_input(self.new_input)
 *             self.new_input.active_ui_elements = []             # <<<<<<<<<<<<<<
 * 
 *             #now everybody
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->new_input->active_ui_elements);
    __Pyx_DECREF(__pyx_v_self->new_input->active_ui_elements);
    __pyx_v_self->new_input->active_ui_elements = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":155
 *             #now everybody
 *             # ontop level in reverse so that menus drawn above other take precedence
 *             for e in self.elements[::-1]:             # <<<<<<<<<<<<<<
 *                 e.handle_input(self.new_input,True)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->elements, __pyx_slice__8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 155, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyglui/ui.pyx":156
 *             # ontop level in reverse so that menus drawn above other take precedence
 *             for e in self.elements[::-1]:
 *                 e.handle_input(self.new_input,True)             # <<<<<<<<<<<<<<
 * 
 *             unused = Unused_Input(self.new_input.buttons, self.new_input.keys,
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_handle_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self->new_input), Py_True};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyglui/ui.pyx":155
 *             #now everybody
 *             # ontop level in reverse so that menus drawn above other take precedence
 *             for e in self.elements[::-1]:             # <<<<<<<<<<<<<<
 *                 e.handle_input(self.new_input,True)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":158
 *                 e.handle_input(self.new_input,True)
 * 
 *             unused = Unused_Input(self.new_input.buttons, self.new_input.keys,             # <<<<<<<<<<<<<<
 *                                   self.new_input.chars, self.new_input.cb)
 *             self.new_input.purge()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Unused_Input); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "pyglui/ui.pyx":159
 * 
 *             unused = Unused_Input(self.new_input.buttons, self.new_input.keys,
 *                                   self.new_input.chars, self.new_input.cb)             # <<<<<<<<<<<<<<
 *             self.new_input.purge()
 *         else:
 */
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_self->new_input->buttons, __pyx_v_self->new_input->keys, __pyx_v_self->new_input->chars, __pyx_v_self->new_input->cb};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_unused = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":160
 *             unused = Unused_Input(self.new_input.buttons, self.new_input.keys,
 *                                   self.new_input.chars, self.new_input.cb)
 *             self.new_input.purge()             # <<<<<<<<<<<<<<
 *         else:
 *             unused = Unused_Input([], [], [], self.new_input.cb)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->new_input), __pyx_n_s_purge); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_5, };
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":147
 * 
 *     cdef handle_input(self):
 *         if self.new_input:             # <<<<<<<<<<<<<<
 *             #let active elements deal with input first:
 *             for e in self.new_input.active_ui_elements:
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":162
 *             self.new_input.purge()
 *         else:
 *             unused = Unused_Input([], [], [], self.new_input.cb)             # <<<<<<<<<<<<<<
 * 
 *         return unused
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Unused_Input); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_t_5, __pyx_t_6, __pyx_t_8, __pyx_v_self->new_input->cb};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_unused = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "pyglui/ui.pyx":164
 *             unused = Unused_Input([], [], [], self.new_input.cb)
 * 
 *         return unused             # <<<<<<<<<<<<<<
 * 
 *     cdef draw(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_unused);
  __pyx_r = __pyx_v_unused;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":146
 *             e.sync()
 * 
 *     cdef handle_input(self):             # <<<<<<<<<<<<<<
 *         if self.new_input:
 *             #let active elements deal with input first:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyglui.ui.UI.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_unused);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":166
 *         return unused
 * 
 *     cdef draw(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         global should_redraw_overlay
 */

static PyObject *__pyx_f_6pyglui_2ui_2UI_draw(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);

  /* "pyglui/ui.pyx":170
 *         global should_redraw_overlay
 *         global window_size
 *         window_size = self.window.size             # <<<<<<<<<<<<<<
 * 
 *         if should_redraw:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->window->size);
  __Pyx_INCREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_window_size, __pyx_t_1) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":172
 *         window_size = self.window.size
 * 
 *         if should_redraw:             # <<<<<<<<<<<<<<
 *             should_redraw = False
 *             should_redraw_overlay = True
 */
  if (__pyx_v_6pyglui_2ui_should_redraw) {

    /* "pyglui/ui.pyx":173
 * 
 *         if should_redraw:
 *             should_redraw = False             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 *             push_view(self.window.size)
 */
    __pyx_v_6pyglui_2ui_should_redraw = 0;

    /* "pyglui/ui.pyx":174
 *         if should_redraw:
 *             should_redraw = False
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *             push_view(self.window.size)
 *             render_to_ui_texture(self.ui_layer)
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "pyglui/ui.pyx":175
 *             should_redraw = False
 *             should_redraw_overlay = True
 *             push_view(self.window.size)             # <<<<<<<<<<<<<<
 *             render_to_ui_texture(self.ui_layer)
 *             glfont.clear_state()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->window->size);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_6pyglui_2ui_push_view(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":176
 *             should_redraw_overlay = True
 *             push_view(self.window.size)
 *             render_to_ui_texture(self.ui_layer)             # <<<<<<<<<<<<<<
 *             glfont.clear_state()
 *             glfont.set_font('opensans')
 */
    __pyx_t_2 = __pyx_f_6pyglui_2ui_render_to_ui_texture(__pyx_v_self->ui_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":177
 *             push_view(self.window.size)
 *             render_to_ui_texture(self.ui_layer)
 *             glfont.clear_state()             # <<<<<<<<<<<<<<
 *             glfont.set_font('opensans')
 *             glfont.set_size(int(ui_scale * text_size))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_clear_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_3, };
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":178
 *             render_to_ui_texture(self.ui_layer)
 *             glfont.clear_state()
 *             glfont.set_font('opensans')             # <<<<<<<<<<<<<<
 *             glfont.set_size(int(ui_scale * text_size))
 *             glfont.set_color_float(color_text_default)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_font); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_u_opensans};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":179
 *             glfont.clear_state()
 *             glfont.set_font('opensans')
 *             glfont.set_size(int(ui_scale * text_size))             # <<<<<<<<<<<<<<
 *             glfont.set_color_float(color_text_default)
 *             glfont.set_blur(.1)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_FromDouble((__pyx_v_6pyglui_2ui_ui_scale * 18.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":180
 *             glfont.set_font('opensans')
 *             glfont.set_size(int(ui_scale * text_size))
 *             glfont.set_color_float(color_text_default)             # <<<<<<<<<<<<<<
 *             glfont.set_blur(.1)
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_tuple__9, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":181
 *             glfont.set_size(int(ui_scale * text_size))
 *             glfont.set_color_float(color_text_default)
 *             glfont.set_blur(.1)             # <<<<<<<<<<<<<<
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_float__1};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":182
 *             glfont.set_color_float(color_text_default)
 *             glfont.set_blur(.1)
 *             glfont.set_align(fs.FONS_ALIGN_TOP)             # <<<<<<<<<<<<<<
 * 
 *             for e in self.elements:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":184
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 * 
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.draw(self.window, nested=False)
 * 
 */
    if (unlikely(__pyx_v_self->elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 184, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 184, __pyx_L1_error)
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyglui/ui.pyx":185
 * 
 *             for e in self.elements:
 *                 e.draw(self.window, nested=False)             # <<<<<<<<<<<<<<
 * 
 *             render_to_screen()
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF((PyObject *)__pyx_v_self->window);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->window);
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->window));
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nested, Py_False) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyglui/ui.pyx":184
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 * 
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.draw(self.window, nested=False)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":187
 *                 e.draw(self.window, nested=False)
 * 
 *             render_to_screen()             # <<<<<<<<<<<<<<
 *             pop_view()
 * 
 */
    __pyx_t_2 = __pyx_f_6pyglui_2ui_render_to_screen(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":188
 * 
 *             render_to_screen()
 *             pop_view()             # <<<<<<<<<<<<<<
 * 
 *         draw_ui_texture(self.ui_layer)
 */
    __pyx_t_2 = __pyx_f_6pyglui_2ui_pop_view(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":172
 *         window_size = self.window.size
 * 
 *         if should_redraw:             # <<<<<<<<<<<<<<
 *             should_redraw = False
 *             should_redraw_overlay = True
 */
  }

  /* "pyglui/ui.pyx":190
 *             pop_view()
 * 
 *         draw_ui_texture(self.ui_layer)             # <<<<<<<<<<<<<<
 * 
 *         if should_redraw or should_redraw_overlay:
 */
  __pyx_t_2 = __pyx_f_6pyglui_2ui_draw_ui_texture(__pyx_v_self->ui_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":192
 *         draw_ui_texture(self.ui_layer)
 * 
 *         if should_redraw or should_redraw_overlay:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = False
 *             push_view(self.window.size)
 */
  if (!__pyx_v_6pyglui_2ui_should_redraw) {
  } else {
    __pyx_t_8 = __pyx_v_6pyglui_2ui_should_redraw;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_6pyglui_2ui_should_redraw_overlay;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_8) {

    /* "pyglui/ui.pyx":193
 * 
 *         if should_redraw or should_redraw_overlay:
 *             should_redraw_overlay = False             # <<<<<<<<<<<<<<
 *             push_view(self.window.size)
 *             render_to_ui_texture(self.overlay_layer)
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 0;

    /* "pyglui/ui.pyx":194
 *         if should_redraw or should_redraw_overlay:
 *             should_redraw_overlay = False
 *             push_view(self.window.size)             # <<<<<<<<<<<<<<
 *             render_to_ui_texture(self.overlay_layer)
 *             glfont.clear_state()
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_self->window->size);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_7 = __pyx_f_6pyglui_2ui_push_view(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":195
 *             should_redraw_overlay = False
 *             push_view(self.window.size)
 *             render_to_ui_texture(self.overlay_layer)             # <<<<<<<<<<<<<<
 *             glfont.clear_state()
 *             glfont.set_font('opensans')
 */
    __pyx_t_7 = __pyx_f_6pyglui_2ui_render_to_ui_texture(__pyx_v_self->overlay_layer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":196
 *             push_view(self.window.size)
 *             render_to_ui_texture(self.overlay_layer)
 *             glfont.clear_state()             # <<<<<<<<<<<<<<
 *             glfont.set_font('opensans')
 *             glfont.set_size(int(ui_scale * text_size))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_clear_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_5, };
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":197
 *             render_to_ui_texture(self.overlay_layer)
 *             glfont.clear_state()
 *             glfont.set_font('opensans')             # <<<<<<<<<<<<<<
 *             glfont.set_size(int(ui_scale * text_size))
 *             glfont.set_color_float(color_text_default)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_font); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_n_u_opensans};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":198
 *             glfont.clear_state()
 *             glfont.set_font('opensans')
 *             glfont.set_size(int(ui_scale * text_size))             # <<<<<<<<<<<<<<
 *             glfont.set_color_float(color_text_default)
 *             glfont.set_blur(.1)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_FromDouble((__pyx_v_6pyglui_2ui_ui_scale * 18.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":199
 *             glfont.set_font('opensans')
 *             glfont.set_size(int(ui_scale * text_size))
 *             glfont.set_color_float(color_text_default)             # <<<<<<<<<<<<<<
 *             glfont.set_blur(.1)
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 */
    __pyx_t_7 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_tuple__9, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":200
 *             glfont.set_size(int(ui_scale * text_size))
 *             glfont.set_color_float(color_text_default)
 *             glfont.set_blur(.1)             # <<<<<<<<<<<<<<
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_float__1};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":201
 *             glfont.set_color_float(color_text_default)
 *             glfont.set_blur(.1)
 *             glfont.set_align(fs.FONS_ALIGN_TOP)             # <<<<<<<<<<<<<<
 * 
 *             for e in self.elements:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":203
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 * 
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.draw_overlay(self.window, nested=False)
 * 
 */
    if (unlikely(__pyx_v_self->elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 203, __pyx_L1_error)
    }
    __pyx_t_7 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_7); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 203, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyglui/ui.pyx":204
 * 
 *             for e in self.elements:
 *                 e.draw_overlay(self.window, nested=False)             # <<<<<<<<<<<<<<
 * 
 *             render_to_screen()
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF((PyObject *)__pyx_v_self->window);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->window);
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->window));
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nested, Py_False) < 0) __PYX_ERR(0, 204, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyglui/ui.pyx":203
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 * 
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.draw_overlay(self.window, nested=False)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":206
 *                 e.draw_overlay(self.window, nested=False)
 * 
 *             render_to_screen()             # <<<<<<<<<<<<<<
 *             pop_view()
 * 
 */
    __pyx_t_7 = __pyx_f_6pyglui_2ui_render_to_screen(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":207
 * 
 *             render_to_screen()
 *             pop_view()             # <<<<<<<<<<<<<<
 * 
 *         draw_ui_texture(self.overlay_layer)
 */
    __pyx_t_7 = __pyx_f_6pyglui_2ui_pop_view(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyglui/ui.pyx":192
 *         draw_ui_texture(self.ui_layer)
 * 
 *         if should_redraw or should_redraw_overlay:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = False
 *             push_view(self.window.size)
 */
  }

  /* "pyglui/ui.pyx":209
 *             pop_view()
 * 
 *         draw_ui_texture(self.overlay_layer)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_7 = __pyx_f_6pyglui_2ui_draw_ui_texture(__pyx_v_self->overlay_layer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyglui/ui.pyx":166
 *         return unused
 * 
 *     cdef draw(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         global should_redraw_overlay
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.UI.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":212
 * 
 * 
 *     def update(self):             # <<<<<<<<<<<<<<
 *         unused_Input = self.handle_input()
 *         self.sync()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_23update(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_23update = {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_23update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_23update(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("update", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "update", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_22update(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_22update(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_v_unused_Input = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update", 0);

  /* "pyglui/ui.pyx":213
 * 
 *     def update(self):
 *         unused_Input = self.handle_input()             # <<<<<<<<<<<<<<
 *         self.sync()
 *         self.draw()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI *)__pyx_v_self->__pyx_vtab)->handle_input(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_unused_Input = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":214
 *     def update(self):
 *         unused_Input = self.handle_input()
 *         self.sync()             # <<<<<<<<<<<<<<
 *         self.draw()
 *         return unused_Input
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI *)__pyx_v_self->__pyx_vtab)->sync(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":215
 *         unused_Input = self.handle_input()
 *         self.sync()
 *         self.draw()             # <<<<<<<<<<<<<<
 *         return unused_Input
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI *)__pyx_v_self->__pyx_vtab)->draw(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":216
 *         self.sync()
 *         self.draw()
 *         return unused_Input             # <<<<<<<<<<<<<<
 * 
 *     def collect_menus(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_unused_Input);
  __pyx_r = __pyx_v_unused_Input;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":212
 * 
 * 
 *     def update(self):             # <<<<<<<<<<<<<<
 *         unused_Input = self.handle_input()
 *         self.sync()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unused_Input);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":218
 *         return unused_Input
 * 
 *     def collect_menus(self):             # <<<<<<<<<<<<<<
 *         for e in self.elements:
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_25collect_menus(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_25collect_menus = {"collect_menus", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_25collect_menus, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_25collect_menus(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("collect_menus (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("collect_menus", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "collect_menus", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_24collect_menus(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_24collect_menus(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("collect_menus", 0);

  /* "pyglui/ui.pyx":219
 * 
 *     def collect_menus(self):
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             try:
 *                 e.collect_in_window(self.window)
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 219, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 219, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyglui/ui.pyx":220
 *     def collect_menus(self):
 *         for e in self.elements:
 *             try:             # <<<<<<<<<<<<<<
 *                 e.collect_in_window(self.window)
 *             except AttributeError:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      /*try:*/ {

        /* "pyglui/ui.pyx":221
 *         for e in self.elements:
 *             try:
 *                 e.collect_in_window(self.window)             # <<<<<<<<<<<<<<
 *             except AttributeError:
 *                 pass
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_collect_in_window); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 221, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_9 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_v_self->window)};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyglui/ui.pyx":220
 *     def collect_menus(self):
 *         for e in self.elements:
 *             try:             # <<<<<<<<<<<<<<
 *                 e.collect_in_window(self.window)
 *             except AttributeError:
 */
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pyglui/ui.pyx":222
 *             try:
 *                 e.collect_in_window(self.window)
 *             except AttributeError:             # <<<<<<<<<<<<<<
 *                 pass
 * 
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
      if (__pyx_t_9) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "pyglui/ui.pyx":220
 *     def collect_menus(self):
 *         for e in self.elements:
 *             try:             # <<<<<<<<<<<<<<
 *                 e.collect_in_window(self.window)
 *             except AttributeError:
 */
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      __pyx_L12_try_end:;
    }

    /* "pyglui/ui.pyx":219
 * 
 *     def collect_menus(self):
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             try:
 *                 e.collect_in_window(self.window)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":218
 *         return unused_Input
 * 
 *     def collect_menus(self):             # <<<<<<<<<<<<<<
 *         for e in self.elements:
 *             try:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyglui.ui.UI.collect_menus", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":226
 * 
 *     ###special methods to make UI behave like a list
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_27append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_27append = {"append", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_27append, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_27append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "append") < 0)) __PYX_ERR(0, 226, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_26append(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_26append(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);

  /* "pyglui/ui.pyx":227
 *     ###special methods to make UI behave like a list
 *     def append(self, obj):
 *         if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.append(obj)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsSubclass(__pyx_t_1, ((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (unlikely(__pyx_t_3)) {

    /* "pyglui/ui.pyx":228
 *     def append(self, obj):
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )             # <<<<<<<<<<<<<<
 *         self.elements.append(obj)
 *         global should_redraw
 */
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Can_only_append_UI_elements_not, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 228, __pyx_L1_error)

    /* "pyglui/ui.pyx":227
 *     ###special methods to make UI behave like a list
 *     def append(self, obj):
 *         if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.append(obj)
 */
  }

  /* "pyglui/ui.pyx":229
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.append(obj)             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(0, 229, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->elements, __pyx_v_obj); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 229, __pyx_L1_error)

  /* "pyglui/ui.pyx":231
 *         self.elements.append(obj)
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     def extend(self, objs):
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "pyglui/ui.pyx":226
 * 
 *     ###special methods to make UI behave like a list
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.UI.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":233
 *         should_redraw = True
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_29extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_29extend = {"extend", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_29extend, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_29extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_objs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objs,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objs,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_objs)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "extend") < 0)) __PYX_ERR(0, 233, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_objs = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extend", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 233, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_28extend(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_objs);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_28extend(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_objs) {
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);

  /* "pyglui/ui.pyx":234
 * 
 *     def extend(self, objs):
 *         for obj in objs:             # <<<<<<<<<<<<<<
 *             if not issubclass(obj.__class__,UI_element):
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  if (likely(PyList_CheckExact(__pyx_v_objs)) || PyTuple_CheckExact(__pyx_v_objs)) {
    __pyx_t_1 = __pyx_v_objs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_objs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 234, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 234, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 234, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":235
 *     def extend(self, objs):
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.extend(objs)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsSubclass(__pyx_t_4, ((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = (!__pyx_t_5);
    if (unlikely(__pyx_t_6)) {

      /* "pyglui/ui.pyx":236
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )             # <<<<<<<<<<<<<<
 *         self.elements.extend(objs)
 *         global should_redraw
 */
      __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Can_only_append_UI_elements_not, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 236, __pyx_L1_error)

      /* "pyglui/ui.pyx":235
 *     def extend(self, objs):
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.extend(objs)
 */
    }

    /* "pyglui/ui.pyx":234
 * 
 *     def extend(self, objs):
 *         for obj in objs:             # <<<<<<<<<<<<<<
 *             if not issubclass(obj.__class__,UI_element):
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":237
 *             if not issubclass(obj.__class__,UI_element):
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.extend(objs)             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend");
    __PYX_ERR(0, 237, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyList_Extend(__pyx_v_self->elements, __pyx_v_objs); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 237, __pyx_L1_error)

  /* "pyglui/ui.pyx":239
 *         self.elements.extend(objs)
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     def remove(self, obj):
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "pyglui/ui.pyx":233
 *         should_redraw = True
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.UI.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":241
 *         should_redraw = True
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_31remove(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_31remove = {"remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_31remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_31remove(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove") < 0)) __PYX_ERR(0, 241, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("remove", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 241, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_30remove(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_30remove(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);

  /* "pyglui/ui.pyx":242
 * 
 *     def remove(self, obj):
 *         del self.elements[self.elements.index(obj)]             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 242, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->elements, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (unlikely((PyObject_DelItem(__pyx_v_self->elements, __pyx_t_1) < 0))) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":244
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "pyglui/ui.pyx":241
 *         should_redraw = True
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.UI.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":248
 * 
 *     #identical to base_menu method
 *     cdef get_submenu_config(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Growing menus are sometimes emebedded in Other menues. We load their configurations recursively.
 */

static PyObject *__pyx_f_6pyglui_2ui_2UI_get_submenu_config(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_v_submenus = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_submenu_config", 0);

  /* "pyglui/ui.pyx":252
 *         Growing menus are sometimes emebedded in Other menues. We load their configurations recursively.
 *         '''
 *         cdef dict submenus = {}             # <<<<<<<<<<<<<<
 *         for e in self.elements:
 *             if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_submenus = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":253
 *         '''
 *         cdef dict submenus = {}
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 253, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 253, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyglui/ui.pyx":254
 *         cdef dict submenus = {}
 *         for e in self.elements:
 *             if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):             # <<<<<<<<<<<<<<
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 *         return submenus
 */
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Growing_Menu); 
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Scrolling_Menu); 
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Stretching_Menu); 
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Container); 
    __pyx_t_4 = __pyx_t_5;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "pyglui/ui.pyx":255
 *         for e in self.elements:
 *             if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu             # <<<<<<<<<<<<<<
 *         return submenus
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_submenus, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_configuration); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely((PyDict_SetItem(__pyx_v_submenus, __pyx_t_3, __pyx_t_6) < 0))) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pyglui/ui.pyx":254
 *         cdef dict submenus = {}
 *         for e in self.elements:
 *             if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):             # <<<<<<<<<<<<<<
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 *         return submenus
 */
    }

    /* "pyglui/ui.pyx":253
 *         '''
 *         cdef dict submenus = {}
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":256
 *             if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 *         return submenus             # <<<<<<<<<<<<<<
 * 
 *     #identical to base_menu method
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_submenus);
  __pyx_r = __pyx_v_submenus;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":248
 * 
 *     #identical to base_menu method
 *     cdef get_submenu_config(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Growing menus are sometimes emebedded in Other menues. We load their configurations recursively.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.UI.get_submenu_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_submenus);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":259
 * 
 *     #identical to base_menu method
 *     cdef set_submenu_config(self,dict submenus):             # <<<<<<<<<<<<<<
 *         '''
 *         Growing menus are sometimes emebedded in Other menues. We save their configurations recursively.
 */

static PyObject *__pyx_f_6pyglui_2ui_2UI_set_submenu_config(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_submenus) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_submenu_config", 0);

  /* "pyglui/ui.pyx":263
 *         Growing menus are sometimes emebedded in Other menues. We save their configurations recursively.
 *         '''
 *         if submenus:             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_submenus); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 263, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":264
 *         '''
 *         if submenus:
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.
 */
    if (unlikely(__pyx_v_self->elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 264, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 264, __pyx_L1_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyglui/ui.pyx":265
 *         if submenus:
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):             # <<<<<<<<<<<<<<
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.
 * 
 */
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Growing_Menu); 
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Scrolling_Menu); 
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Stretching_Menu); 
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Container); 
      __pyx_t_1 = __pyx_t_5;
      __pyx_L7_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":266
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.             # <<<<<<<<<<<<<<
 * 
 *     property configuration:
 */
        if (unlikely(__pyx_v_submenus == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
          __PYX_ERR(0, 266, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_label); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6);
        PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_submenus, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_PopIndex(__pyx_t_6, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_configuration, __pyx_t_7) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "pyglui/ui.pyx":265
 *         if submenus:
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):             # <<<<<<<<<<<<<<
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.
 * 
 */
      }

      /* "pyglui/ui.pyx":264
 *         '''
 *         if submenus:
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":263
 *         Growing menus are sometimes emebedded in Other menues. We save their configurations recursively.
 *         '''
 *         if submenus:             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 */
  }

  /* "pyglui/ui.pyx":259
 * 
 *     #identical to base_menu method
 *     cdef set_submenu_config(self,dict submenus):             # <<<<<<<<<<<<<<
 *         '''
 *         Growing menus are sometimes emebedded in Other menues. We save their configurations recursively.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.UI.set_submenu_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":269
 * 
 *     property configuration:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef dict submenus = self.get_submenu_config()
 *             return {'submenus':submenus}
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_13configuration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_2UI_13configuration_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_13configuration___get__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_13configuration___get__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_v_submenus = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyglui/ui.pyx":270
 *     property configuration:
 *         def __get__(self):
 *             cdef dict submenus = self.get_submenu_config()             # <<<<<<<<<<<<<<
 *             return {'submenus':submenus}
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI *)__pyx_v_self->__pyx_vtab)->get_submenu_config(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 270, __pyx_L1_error)
  __pyx_v_submenus = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":271
 *         def __get__(self):
 *             cdef dict submenus = self.get_submenu_config()
 *             return {'submenus':submenus}             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self,new_conf):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_submenus, __pyx_v_submenus) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":269
 * 
 *     property configuration:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef dict submenus = self.get_submenu_config()
 *             return {'submenus':submenus}
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.configuration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_submenus);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":273
 *             return {'submenus':submenus}
 * 
 *         def __set__(self,new_conf):             # <<<<<<<<<<<<<<
 *             self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_13configuration_2__set__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), ((PyObject *)__pyx_v_new_conf));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyglui/ui.pyx":274
 * 
 *         def __set__(self,new_conf):
 *             self.set_submenu_config(new_conf.get('submenus',{}))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_submenus, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 274, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI *)__pyx_v_self->__pyx_vtab)->set_submenu_config(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":273
 *             return {'submenus':submenus}
 * 
 *         def __set__(self,new_conf):             # <<<<<<<<<<<<<<
 *             self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.UI.configuration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":278
 * 
 * 
 *     def __len__ (self):             # <<<<<<<<<<<<<<
 *         return len(self.elements)
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_6pyglui_2ui_2UI_33__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_6pyglui_2ui_2UI_33__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_32__len__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_6pyglui_2ui_2UI_32__len__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyglui/ui.pyx":279
 * 
 *     def __len__ (self):
 *         return len(self.elements)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__ (self,x):
 */
  __pyx_t_1 = __pyx_v_self->elements;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 279, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":278
 * 
 * 
 *     def __len__ (self):             # <<<<<<<<<<<<<<
 *         return len(self.elements)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":281
 *         return len(self.elements)
 * 
 *     def __getitem__ (self,x):             # <<<<<<<<<<<<<<
 *         return self.elements[x]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_35__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_2UI_35__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_34__getitem__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_34__getitem__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyglui/ui.pyx":282
 * 
 *     def __getitem__ (self,x):
 *         return self.elements[x]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__ (self,x,obj):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 282, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->elements, __pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":281
 *         return len(self.elements)
 * 
 *     def __getitem__ (self,x):             # <<<<<<<<<<<<<<
 *         return self.elements[x]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":284
 *         return self.elements[x]
 * 
 *     def __setitem__ (self,x,obj):             # <<<<<<<<<<<<<<
 *         self.elements[x] = obj
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_37__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_obj); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_37__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_36__setitem__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), ((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_obj));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI_36__setitem__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyglui/ui.pyx":285
 * 
 *     def __setitem__ (self,x,obj):
 *         self.elements[x] = obj             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__ (self,x):
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 285, __pyx_L1_error)
  }
  if (unlikely((PyObject_SetItem(__pyx_v_self->elements, __pyx_v_x, __pyx_v_obj) < 0))) __PYX_ERR(0, 285, __pyx_L1_error)

  /* "pyglui/ui.pyx":284
 *         return self.elements[x]
 * 
 *     def __setitem__ (self,x,obj):             # <<<<<<<<<<<<<<
 *         self.elements[x] = obj
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":287
 *         self.elements[x] = obj
 * 
 *     def __delitem__ (self,x):             # <<<<<<<<<<<<<<
 *         del self.elements[x]
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_39__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_39__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_38__delitem__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI_38__delitem__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_x) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyglui/ui.pyx":288
 * 
 *     def __delitem__ (self,x):
 *         del self.elements[x]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 288, __pyx_L1_error)
  }
  if (unlikely((PyObject_DelItem(__pyx_v_self->elements, __pyx_v_x) < 0))) __PYX_ERR(0, 288, __pyx_L1_error)

  /* "pyglui/ui.pyx":287
 *         self.elements[x] = obj
 * 
 *     def __delitem__ (self,x):             # <<<<<<<<<<<<<<
 *         del self.elements[x]
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":291
 * 
 * 
 *     def __contains__ (self,obj):             # <<<<<<<<<<<<<<
 *         return obj in self.elements
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_41__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_41__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_40__contains__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI_40__contains__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyglui/ui.pyx":292
 * 
 *     def __contains__ (self,obj):
 *         return obj in self.elements             # <<<<<<<<<<<<<<
 * 
 *     property scale:
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_obj, __pyx_v_self->elements, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 292, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":291
 * 
 * 
 *     def __contains__ (self,obj):             # <<<<<<<<<<<<<<
 *         return obj in self.elements
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":295
 * 
 *     property scale:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return ui_scale
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_2UI_5scale_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_5scale___get__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_5scale___get__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyglui/ui.pyx":296
 *     property scale:
 *         def __get__(self):
 *             return ui_scale             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, float val):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":295
 * 
 *     property scale:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return ui_scale
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.scale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":298
 *             return ui_scale
 * 
 *         def __set__(self, float val):             # <<<<<<<<<<<<<<
 *             global ui_scale
 *             ui_scale = val
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
  float __pyx_v_val;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_val); {
    __pyx_v_val = __pyx_PyFloat_AsFloat(__pyx_arg_val); if (unlikely((__pyx_v_val == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.scale.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_5scale_2__set__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), ((float)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI_5scale_2__set__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, float __pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyglui/ui.pyx":300
 *         def __set__(self, float val):
 *             global ui_scale
 *             ui_scale = val             # <<<<<<<<<<<<<<
 * 
 * include 'ui_elements.pxi'
 */
  __pyx_v_6pyglui_2ui_ui_scale = __pyx_v_val;

  /* "pyglui/ui.pyx":298
 *             return ui_scale
 * 
 *         def __set__(self, float val):             # <<<<<<<<<<<<<<
 *             global ui_scale
 *             ui_scale = val
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":75
 *     cdef Input new_input
 *     # cdef bint should_redraw
 *     cdef public list elements             # <<<<<<<<<<<<<<
 *     cdef FitBox window
 *     cdef fbo_tex_id ui_layer
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_8elements_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_2UI_8elements_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_8elements___get__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_8elements___get__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->elements);
  __pyx_r = __pyx_v_self->elements;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_8elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_8elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_8elements_2__set__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI_8elements_2__set__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 75, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->elements);
  __Pyx_DECREF(__pyx_v_self->elements);
  __pyx_v_self->elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI.elements.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_2UI_8elements_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_2UI_8elements_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_8elements_4__del__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_2UI_8elements_4__del__(struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->elements);
  __Pyx_DECREF(__pyx_v_self->elements);
  __pyx_v_self->elements = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_43__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_43__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_43__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_43__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_42__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_42__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_2UI_45__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_2UI_45__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_45__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_2UI_45__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_2UI_44__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_UI *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_2UI_44__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.UI.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":15
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         pass
 */

static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_1sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_sync(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10UI_element_1sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":16
 * 
 *     cpdef sync(self):
 *         global should_redraw             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.UI_element.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":15
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         pass
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_1sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10UI_element_1sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_1sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_1sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_sync(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_sync(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_10UI_element_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":19
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_3draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_draw(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 19, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10UI_element_3draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 19, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 19, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 19, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":20
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.UI_element.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":19
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_3draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10UI_element_3draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_3draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_3draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 19, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 19, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 19, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 19, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 19, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 19, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 19, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 19, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_2draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_2draw(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_UI_element->draw(__pyx_v_self, __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":22
 *         pass
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_draw_overlay(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 22, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10UI_element_5draw_overlay)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 22, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 22, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 22, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":23
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self,Input new_input,bint visible, bint parent_read_only = False):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.UI_element.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":22
 *         pass
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10UI_element_5draw_overlay = {"draw_overlay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_5draw_overlay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_overlay (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 22, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 22, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 22, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_overlay") < 0)) __PYX_ERR(2, 22, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 22, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 22, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_overlay", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 22, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 22, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_4draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_4draw_overlay(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_UI_element->draw_overlay(__pyx_v_self, __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":25
 *         pass
 * 
 *     cpdef handle_input(self,Input new_input,bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_handle_input(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, CYTHON_UNUSED int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 25, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10UI_element_7handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 25, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 25, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 25, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":26
 * 
 *     cpdef handle_input(self,Input new_input,bint visible, bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             pass
 */
  if (!__pyx_v_self->_read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->_read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  __pyx_t_9 = (!__pyx_t_8);
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":27
 *     cpdef handle_input(self,Input new_input,bint visible, bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":25
 *         pass
 * 
 *     cpdef handle_input(self,Input new_input,bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.UI_element.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10UI_element_7handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_7handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 25, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 25, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 25, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 25, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 25, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 25, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 25, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 25, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 25, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_6handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_6handle_input(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_UI_element->handle_input(__pyx_v_self, __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":30
 *             pass
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         # if your element needs to catch input event in front of everybody else:
 *         # add yourself to new_input.active_ui_elements during handle_input
 */

static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_9pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_pre_handle_input(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pre_handle_input", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pre_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10UI_element_9pre_handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_new_input)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 30, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":35
 *         # pre_handle input will be called in the next frame with new input.
 *         # add yourself again in handle input if you need to stay in active_ui_elements
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     cpdef precompute(self,FitBox parent):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.UI_element.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":30
 *             pass
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         # if your element needs to catch input event in front of everybody else:
 *         # add yourself to new_input.active_ui_elements during handle_input
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_9pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10UI_element_9pre_handle_input = {"pre_handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_9pre_handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_9pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pre_handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 30, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pre_handle_input") < 0)) __PYX_ERR(2, 30, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pre_handle_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 30, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 30, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_8pre_handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_8pre_handle_input(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pre_handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_10UI_element_pre_handle_input(__pyx_v_self, __pyx_v_new_input, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":37
 *         pass
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_11precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10UI_element_precompute(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10UI_element_11precompute)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_parent)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 37, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":38
 * 
 *     cpdef precompute(self,FitBox parent):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 *     property width:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->outline->__pyx_vtab)->compute(__pyx_v_self->outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":37
 *         pass
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.UI_element.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_11precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10UI_element_11precompute = {"precompute", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_11precompute, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_11precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("precompute (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 37, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "precompute") < 0)) __PYX_ERR(2, 37, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("precompute", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 37, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 37, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_10precompute(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_10precompute(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_10UI_element_precompute(__pyx_v_self, __pyx_v_parent, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":41
 * 
 *     property width:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.outline.size.x
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5width_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_5width___get__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_5width___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":42
 *     property width:
 *         def __get__(self):
 *             return self.outline.size.x             # <<<<<<<<<<<<<<
 * 
 *     property height:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->outline->size->x); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":41
 * 
 *     property width:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.outline.size.x
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":45
 * 
 *     property height:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.outline.size.y
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_6height_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_6height___get__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_6height___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":46
 *     property height:
 *         def __get__(self):
 *             return self.outline.size.y             # <<<<<<<<<<<<<<
 * 
 *     property read_only:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->outline->size->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":45
 * 
 *     property height:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.outline.size.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":49
 * 
 *     property read_only:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._read_only
 *         def __set__(self,bint val):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_9read_only_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_9read_only_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_9read_only___get__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_9read_only___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":50
 *     property read_only:
 *         def __get__(self):
 *             return self._read_only             # <<<<<<<<<<<<<<
 *         def __set__(self,bint val):
 *             if self._read_only != val:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_read_only); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":49
 * 
 *     property read_only:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._read_only
 *         def __set__(self,bint val):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.read_only.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":51
 *         def __get__(self):
 *             return self._read_only
 *         def __set__(self,bint val):             # <<<<<<<<<<<<<<
 *             if self._read_only != val:
 *                 self._read_only = val
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_10UI_element_9read_only_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_10UI_element_9read_only_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
  int __pyx_v_val;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_val); {
    __pyx_v_val = __Pyx_PyObject_IsTrue(__pyx_arg_val); if (unlikely((__pyx_v_val == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 51, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.read_only.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_9read_only_2__set__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), ((int)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_10UI_element_9read_only_2__set__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, int __pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":52
 *             return self._read_only
 *         def __set__(self,bint val):
 *             if self._read_only != val:             # <<<<<<<<<<<<<<
 *                 self._read_only = val
 *                 global should_redraw
 */
  __pyx_t_1 = (__pyx_v_self->_read_only != __pyx_v_val);
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":53
 *         def __set__(self,bint val):
 *             if self._read_only != val:
 *                 self._read_only = val             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
    __pyx_v_self->_read_only = __pyx_v_val;

    /* "src/pyglui/ui_elements.pxi":55
 *                 self._read_only = val
 *                 global should_redraw
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     property label:
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":52
 *             return self._read_only
 *         def __set__(self,bint val):
 *             if self._read_only != val:             # <<<<<<<<<<<<<<
 *                 self._read_only = val
 *                 global should_redraw
 */
  }

  /* "src/pyglui/ui_elements.pxi":51
 *         def __get__(self):
 *             return self._read_only
 *         def __set__(self,bint val):             # <<<<<<<<<<<<<<
 *             if self._read_only != val:
 *                 self._read_only = val
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":58
 * 
 *     property label:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *         def __set__(self,basestring val):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5label_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5label_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_5label___get__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_5label___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":59
 *     property label:
 *         def __get__(self):
 *             return self._label             # <<<<<<<<<<<<<<
 *         def __set__(self,basestring val):
 *             if self._label != val:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_label);
  __pyx_r = __pyx_v_self->_label;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":58
 * 
 *     property label:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._label
 *         def __set__(self,basestring val):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":60
 *         def __get__(self):
 *             return self._label
 *         def __set__(self,basestring val):             # <<<<<<<<<<<<<<
 *             if self._label != val:
 *                 self._label = val
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_10UI_element_5label_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_10UI_element_5label_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_val), (&PyBaseString_Type), 1, "val", 1))) __PYX_ERR(2, 60, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_5label_2__set__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), ((PyObject*)__pyx_v_val));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_10UI_element_5label_2__set__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":61
 *             return self._label
 *         def __set__(self,basestring val):
 *             if self._label != val:             # <<<<<<<<<<<<<<
 *                 self._label = val
 *                 global should_redraw
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_label, __pyx_v_val, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 61, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":62
 *         def __set__(self,basestring val):
 *             if self._label != val:
 *                 self._label = val             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
    __Pyx_INCREF(__pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __Pyx_GOTREF(__pyx_v_self->_label);
    __Pyx_DECREF(__pyx_v_self->_label);
    __pyx_v_self->_label = __pyx_v_val;

    /* "src/pyglui/ui_elements.pxi":64
 *                 self._label = val
 *                 global should_redraw
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     property order:
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":61
 *             return self._label
 *         def __set__(self,basestring val):
 *             if self._label != val:             # <<<<<<<<<<<<<<
 *                 self._label = val
 *                 global should_redraw
 */
  }

  /* "src/pyglui/ui_elements.pxi":60
 *         def __get__(self):
 *             return self._label
 *         def __set__(self,basestring val):             # <<<<<<<<<<<<<<
 *             if self._label != val:
 *                 self._label = val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.label.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":67
 * 
 *     property order:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._order
 *         def __set__(self,float order):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5order_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_5order_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_5order___get__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_5order___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":68
 *     property order:
 *         def __get__(self):
 *             return self._order             # <<<<<<<<<<<<<<
 *         def __set__(self,float order):
 *             if self._order != order:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":67
 * 
 *     property order:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._order
 *         def __set__(self,float order):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.order.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":69
 *         def __get__(self):
 *             return self._order
 *         def __set__(self,float order):             # <<<<<<<<<<<<<<
 *             if self._order != order:
 *                 self._order = order
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_10UI_element_5order_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_order); /*proto*/
static int __pyx_pw_6pyglui_2ui_10UI_element_5order_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_order) {
  float __pyx_v_order;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_order); {
    __pyx_v_order = __pyx_PyFloat_AsFloat(__pyx_arg_order); if (unlikely((__pyx_v_order == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 69, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.order.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_5order_2__set__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), ((float)__pyx_v_order));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_10UI_element_5order_2__set__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, float __pyx_v_order) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":70
 *             return self._order
 *         def __set__(self,float order):
 *             if self._order != order:             # <<<<<<<<<<<<<<
 *                 self._order = order
 *                 global should_redraw
 */
  __pyx_t_1 = (__pyx_v_self->_order != __pyx_v_order);
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":71
 *         def __set__(self,float order):
 *             if self._order != order:
 *                 self._order = order             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
    __pyx_v_self->_order = __pyx_v_order;

    /* "src/pyglui/ui_elements.pxi":73
 *                 self._order = order
 *                 global should_redraw
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":70
 *             return self._order
 *         def __set__(self,float order):
 *             if self._order != order:             # <<<<<<<<<<<<<<
 *                 self._order = order
 *                 global should_redraw
 */
  }

  /* "src/pyglui/ui_elements.pxi":69
 *         def __get__(self):
 *             return self._order
 *         def __set__(self,float order):             # <<<<<<<<<<<<<<
 *             if self._order != order:
 *                 self._order = order
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":9
 *     '''
 *     cdef float _order
 *     cdef readonly object uid             # <<<<<<<<<<<<<<
 *     cdef public FitBox outline
 *     cdef basestring _label
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_3uid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_3uid_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_3uid___get__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_3uid___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->uid);
  __pyx_r = __pyx_v_self->uid;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":10
 *     cdef float _order
 *     cdef readonly object uid
 *     cdef public FitBox outline             # <<<<<<<<<<<<<<
 *     cdef basestring _label
 *     cdef bint _read_only
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_7outline_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_7outline_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_7outline___get__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_7outline___get__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->outline);
  __pyx_r = ((PyObject *)__pyx_v_self->outline);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_10UI_element_7outline_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_10UI_element_7outline_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_7outline_2__set__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_10UI_element_7outline_2__set__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(2, 10, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->outline);
  __pyx_v_self->outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.outline.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_10UI_element_7outline_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_10UI_element_7outline_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_7outline_4__del__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_10UI_element_7outline_4__del__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->outline);
  __pyx_v_self->outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10UI_element_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_12__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_12__reduce_cython__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._label, self._order, self._read_only, self.outline, self.uid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_read_only); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->_label);
  __Pyx_GIVEREF(__pyx_v_self->_label);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_label);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->outline);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->outline);
  PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_v_self->outline));
  __Pyx_INCREF(__pyx_v_self->uid);
  __Pyx_GIVEREF(__pyx_v_self->uid);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->uid);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._label, self._order, self._read_only, self.outline, self.uid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._label, self._order, self._read_only, self.outline, self.uid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._label is not None or self.outline is not None or self.uid is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._label, self._order, self._read_only, self.outline, self.uid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._label is not None or self.outline is not None or self.uid is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->_label != ((PyObject*)Py_None));
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->outline) != Py_None);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->uid != Py_None);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._label is not None or self.outline is not None or self.uid is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self._label is not None or self.outline is not None or self.uid is not None
 *     if use_setstate:
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_UI_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_126102751);
    __Pyx_GIVEREF(__pyx_int_126102751);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_126102751);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._label is not None or self.outline is not None or self.uid is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, None), state
 *     else:
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_UI_element__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_126102751);
    __Pyx_GIVEREF(__pyx_int_126102751);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_126102751);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.UI_element.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_UI_element__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10UI_element_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10UI_element_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.UI_element.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_10UI_element_14__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10UI_element_14__setstate_cython__(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_UI_element__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pyglui_2ui___pyx_unpickle_UI_element__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_UI_element__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.UI_element.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":92
 *     cdef Slider_Text_Input label_field
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, label = None, min = 0, max = 100, step = 0,setter= None,getter= None):             # <<<<<<<<<<<<<<
 * 
 *         self.label_field = Slider_Text_Input(attribute_name, attribute_context,
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Slider_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Slider_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_name = 0;
  PyObject *__pyx_v_attribute_context = 0;
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_min = 0;
  PyObject *__pyx_v_max = 0;
  PyObject *__pyx_v_step = 0;
  PyObject *__pyx_v_setter = 0;
  PyObject *__pyx_v_getter = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_min,&__pyx_n_s_max,&__pyx_n_s_step,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_min,&__pyx_n_s_max,&__pyx_n_s_step,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #endif
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)__pyx_int_0);
    values[4] = ((PyObject *)__pyx_int_100);
    values[5] = ((PyObject *)__pyx_int_0);
    values[6] = ((PyObject *)Py_None);
    values[7] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_step);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[7] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 92, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_label = values[2];
    __pyx_v_min = values[3];
    __pyx_v_max = values[4];
    __pyx_v_step = values[5];
    __pyx_v_setter = values[6];
    __pyx_v_getter = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 8, __pyx_nargs); __PYX_ERR(2, 92, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 92, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider___cinit__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_label, __pyx_v_min, __pyx_v_max, __pyx_v_step, __pyx_v_setter, __pyx_v_getter);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Slider___cinit__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_label, PyObject *__pyx_v_min, PyObject *__pyx_v_max, PyObject *__pyx_v_step, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  float __pyx_t_5;
  double __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":94
 *     def __cinit__(self,str attribute_name, object attribute_context = None, label = None, min = 0, max = 100, step = 0,setter= None,getter= None):
 * 
 *         self.label_field = Slider_Text_Input(attribute_name, attribute_context,             # <<<<<<<<<<<<<<
 *                                              label=label or attribute_name,
 *                                              setter=setter, getter=getter)
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_attribute_name);
  __Pyx_GIVEREF(__pyx_v_attribute_name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attribute_name);
  __Pyx_INCREF(__pyx_v_attribute_context);
  __Pyx_GIVEREF(__pyx_v_attribute_context);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attribute_context);

  /* "src/pyglui/ui_elements.pxi":95
 * 
 *         self.label_field = Slider_Text_Input(attribute_name, attribute_context,
 *                                              label=label or attribute_name,             # <<<<<<<<<<<<<<
 *                                              setter=setter, getter=getter)
 *         self.label_field.validator = self.validate
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_label); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 95, __pyx_L1_error)
  if (!__pyx_t_4) {
  } else {
    __Pyx_INCREF(__pyx_v_label);
    __pyx_t_3 = __pyx_v_label;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_v_attribute_name);
  __pyx_t_3 = __pyx_v_attribute_name;
  __pyx_L3_bool_binop_done:;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_label, __pyx_t_3) < 0) __PYX_ERR(2, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":96
 *         self.label_field = Slider_Text_Input(attribute_name, attribute_context,
 *                                              label=label or attribute_name,
 *                                              setter=setter, getter=getter)             # <<<<<<<<<<<<<<
 *         self.label_field.validator = self.validate
 *         self.uid = id(self)
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_setter, __pyx_v_setter) < 0) __PYX_ERR(2, 95, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_getter, __pyx_v_getter) < 0) __PYX_ERR(2, 95, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":94
 *     def __cinit__(self,str attribute_name, object attribute_context = None, label = None, min = 0, max = 100, step = 0,setter= None,getter= None):
 * 
 *         self.label_field = Slider_Text_Input(attribute_name, attribute_context,             # <<<<<<<<<<<<<<
 *                                              label=label or attribute_name,
 *                                              setter=setter, getter=getter)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Slider_Text_Input), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->label_field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->label_field);
  __pyx_v_self->label_field = ((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":97
 *                                              label=label or attribute_name,
 *                                              setter=setter, getter=getter)
 *         self.label_field.validator = self.validate             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self.sync_val = self.label_field.sync_val
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->label_field->validator);
  __Pyx_DECREF(__pyx_v_self->label_field->validator);
  __pyx_v_self->label_field->validator = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":98
 *                                              setter=setter, getter=getter)
 *         self.label_field.validator = self.validate
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self.sync_val = self.label_field.sync_val
 *         self.step = abs(step)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":99
 *         self.label_field.validator = self.validate
 *         self.uid = id(self)
 *         self.sync_val = self.label_field.sync_val             # <<<<<<<<<<<<<<
 *         self.step = abs(step)
 *         self.minimum = min
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->label_field->__pyx_base.sync_val);
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->sync_val);
  __Pyx_DECREF((PyObject *)__pyx_v_self->sync_val);
  __pyx_v_self->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":100
 *         self.uid = id(self)
 *         self.sync_val = self.label_field.sync_val
 *         self.step = abs(step)             # <<<<<<<<<<<<<<
 *         self.minimum = min
 *         if self.step:
 */
  __pyx_t_3 = __Pyx_PyNumber_Absolute(__pyx_v_step); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->step = __pyx_t_5;

  /* "src/pyglui/ui_elements.pxi":101
 *         self.sync_val = self.label_field.sync_val
 *         self.step = abs(step)
 *         self.minimum = min             # <<<<<<<<<<<<<<
 *         if self.step:
 *             self.maximum = (((max-min+.0000001)//self.step))*self.step+min # + 0.0000001 becasue of floating point rounding issues.
 */
  __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_min); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 101, __pyx_L1_error)
  __pyx_v_self->minimum = __pyx_t_5;

  /* "src/pyglui/ui_elements.pxi":102
 *         self.step = abs(step)
 *         self.minimum = min
 *         if self.step:             # <<<<<<<<<<<<<<
 *             self.maximum = (((max-min+.0000001)//self.step))*self.step+min # + 0.0000001 becasue of floating point rounding issues.
 *         else:
 */
  __pyx_t_4 = (__pyx_v_self->step != 0);
  if (__pyx_t_4) {

    /* "src/pyglui/ui_elements.pxi":103
 *         self.minimum = min
 *         if self.step:
 *             self.maximum = (((max-min+.0000001)//self.step))*self.step+min # + 0.0000001 becasue of floating point rounding issues.             # <<<<<<<<<<<<<<
 *         else:
 *             self.maximum = max
 */
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_max, __pyx_v_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyFloat_AddObjC(__pyx_t_3, __pyx_float__0000001, .0000001, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->step); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->step); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 103, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_self->maximum = __pyx_t_5;

    /* "src/pyglui/ui_elements.pxi":102
 *         self.step = abs(step)
 *         self.minimum = min
 *         if self.step:             # <<<<<<<<<<<<<<
 *             self.maximum = (((max-min+.0000001)//self.step))*self.step+min # + 0.0000001 becasue of floating point rounding issues.
 *         else:
 */
    goto __pyx_L5;
  }

  /* "src/pyglui/ui_elements.pxi":105
 *             self.maximum = (((max-min+.0000001)//self.step))*self.step+min # + 0.0000001 becasue of floating point rounding issues.
 *         else:
 *             self.maximum = max             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,slider_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 */
  /*else*/ {
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_max); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 105, __pyx_L1_error)
    __pyx_v_self->maximum = __pyx_t_5;
  }
  __pyx_L5:;

  /* "src/pyglui/ui_elements.pxi":106
 *         else:
 *             self.maximum = max
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,slider_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.slider_pos = Vec2(0,slider_label_org_y)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":107
 *             self.maximum = max
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,slider_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))             # <<<<<<<<<<<<<<
 *         self.slider_pos = Vec2(0,slider_label_org_y)
 *         self.selected = False
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":108
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,slider_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.slider_pos = Vec2(0,slider_label_org_y)             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         self._read_only = False
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->slider_pos);
  __Pyx_DECREF((PyObject *)__pyx_v_self->slider_pos);
  __pyx_v_self->slider_pos = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":109
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.slider_pos = Vec2(0,slider_label_org_y)
 *         self.selected = False             # <<<<<<<<<<<<<<
 *         self._read_only = False
 *         if self.step:
 */
  __pyx_v_self->selected = 0;

  /* "src/pyglui/ui_elements.pxi":110
 *         self.slider_pos = Vec2(0,slider_label_org_y)
 *         self.selected = False
 *         self._read_only = False             # <<<<<<<<<<<<<<
 *         if self.step:
 *             self.steps = int((self.maximum-self.minimum)/float(step))
 */
  __pyx_v_self->__pyx_base._read_only = 0;

  /* "src/pyglui/ui_elements.pxi":111
 *         self.selected = False
 *         self._read_only = False
 *         if self.step:             # <<<<<<<<<<<<<<
 *             self.steps = int((self.maximum-self.minimum)/float(step))
 *         else:
 */
  __pyx_t_4 = (__pyx_v_self->step != 0);
  if (__pyx_t_4) {

    /* "src/pyglui/ui_elements.pxi":112
 *         self._read_only = False
 *         if self.step:
 *             self.steps = int((self.maximum-self.minimum)/float(step))             # <<<<<<<<<<<<<<
 *         else:
 *             self.steps = 0
 */
    __pyx_t_5 = (__pyx_v_self->maximum - __pyx_v_self->minimum);
    __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_v_step); if (unlikely(__pyx_t_6 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(2, 112, __pyx_L1_error)
    if (unlikely(__pyx_t_6 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(2, 112, __pyx_L1_error)
    }
    __pyx_v_self->steps = ((int)(((double)__pyx_t_5) / __pyx_t_6));

    /* "src/pyglui/ui_elements.pxi":111
 *         self.selected = False
 *         self._read_only = False
 *         if self.step:             # <<<<<<<<<<<<<<
 *             self.steps = int((self.maximum-self.minimum)/float(step))
 *         else:
 */
    goto __pyx_L6;
  }

  /* "src/pyglui/ui_elements.pxi":114
 *             self.steps = int((self.maximum-self.minimum)/float(step))
 *         else:
 *             self.steps = 0             # <<<<<<<<<<<<<<
 *         self.line_default_color = RGBA(*slider_line_color_default)
 *         self.line_highlight_color = RGBA(*slider_line_color_highlight)
 */
  /*else*/ {
    __pyx_v_self->steps = 0;
  }
  __pyx_L6:;

  /* "src/pyglui/ui_elements.pxi":115
 *         else:
 *             self.steps = 0
 *         self.line_default_color = RGBA(*slider_line_color_default)             # <<<<<<<<<<<<<<
 *         self.line_highlight_color = RGBA(*slider_line_color_highlight)
 *         self.text_color = RGBA(*color_text_default)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->line_default_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->line_default_color);
  __pyx_v_self->line_default_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":116
 *             self.steps = 0
 *         self.line_default_color = RGBA(*slider_line_color_default)
 *         self.line_highlight_color = RGBA(*slider_line_color_highlight)             # <<<<<<<<<<<<<<
 *         self.text_color = RGBA(*color_text_default)
 *         self.button_color = RGBA(*color_default)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->line_highlight_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->line_highlight_color);
  __pyx_v_self->line_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":117
 *         self.line_default_color = RGBA(*slider_line_color_default)
 *         self.line_highlight_color = RGBA(*slider_line_color_highlight)
 *         self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 *         self.button_color = RGBA(*color_default)
 *         self.button_selected_color = RGBA(*color_selected)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
  __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":118
 *         self.line_highlight_color = RGBA(*slider_line_color_highlight)
 *         self.text_color = RGBA(*color_text_default)
 *         self.button_color = RGBA(*color_default)             # <<<<<<<<<<<<<<
 *         self.button_selected_color = RGBA(*color_selected)
 *         self.button_shadow_color = RGBA(*color_shadow)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button_color);
  __pyx_v_self->button_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":119
 *         self.text_color = RGBA(*color_text_default)
 *         self.button_color = RGBA(*color_default)
 *         self.button_selected_color = RGBA(*color_selected)             # <<<<<<<<<<<<<<
 *         self.button_shadow_color = RGBA(*color_shadow)
 *         self.step_color = RGBA(*slider_color_step)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button_selected_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button_selected_color);
  __pyx_v_self->button_selected_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":120
 *         self.button_color = RGBA(*color_default)
 *         self.button_selected_color = RGBA(*color_selected)
 *         self.button_shadow_color = RGBA(*color_shadow)             # <<<<<<<<<<<<<<
 *         self.step_color = RGBA(*slider_color_step)
 *         self.display_format = '%0.2f'
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button_shadow_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button_shadow_color);
  __pyx_v_self->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":121
 *         self.button_selected_color = RGBA(*color_selected)
 *         self.button_shadow_color = RGBA(*color_shadow)
 *         self.step_color = RGBA(*slider_color_step)             # <<<<<<<<<<<<<<
 *         self.display_format = '%0.2f'
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->step_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->step_color);
  __pyx_v_self->step_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":122
 *         self.button_shadow_color = RGBA(*color_shadow)
 *         self.step_color = RGBA(*slider_color_step)
 *         self.display_format = '%0.2f'             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None, min = 0, max = 100, step = 1,setter= None,getter= None):
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_display_format, __pyx_kp_u_0_2f) < 0) __PYX_ERR(2, 122, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":92
 *     cdef Slider_Text_Input label_field
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, label = None, min = 0, max = 100, step = 0,setter= None,getter= None):             # <<<<<<<<<<<<<<
 * 
 *         self.label_field = Slider_Text_Input(attribute_name, attribute_context,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Slider.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":124
 *         self.display_format = '%0.2f'
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None, min = 0, max = 100, step = 1,setter= None,getter= None):             # <<<<<<<<<<<<<<
 *         self.sync()
 *         if not isinstance(self.sync_val.value, (float,int) ):
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Slider_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Slider_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_attribute_name = 0;
  CYTHON_UNUSED PyObject *__pyx_v_attribute_context = 0;
  CYTHON_UNUSED PyObject *__pyx_v_label = 0;
  CYTHON_UNUSED PyObject *__pyx_v_min = 0;
  CYTHON_UNUSED PyObject *__pyx_v_max = 0;
  CYTHON_UNUSED PyObject *__pyx_v_step = 0;
  CYTHON_UNUSED PyObject *__pyx_v_setter = 0;
  CYTHON_UNUSED PyObject *__pyx_v_getter = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_min,&__pyx_n_s_max,&__pyx_n_s_step,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_min,&__pyx_n_s_max,&__pyx_n_s_step,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #endif
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)__pyx_int_0);
    values[4] = ((PyObject *)__pyx_int_100);
    values[5] = ((PyObject *)__pyx_int_1);
    values[6] = ((PyObject *)Py_None);
    values[7] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_step);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[7] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(2, 124, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_label = values[2];
    __pyx_v_min = values[3];
    __pyx_v_max = values[4];
    __pyx_v_step = values[5];
    __pyx_v_setter = values[6];
    __pyx_v_getter = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 8, __pyx_nargs); __PYX_ERR(2, 124, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 124, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_2__init__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_label, __pyx_v_min, __pyx_v_max, __pyx_v_step, __pyx_v_setter, __pyx_v_getter);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Slider_2__init__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_min, CYTHON_UNUSED PyObject *__pyx_v_max, CYTHON_UNUSED PyObject *__pyx_v_step, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_getter) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "src/pyglui/ui_elements.pxi":125
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None, min = 0, max = 100, step = 1,setter= None,getter= None):
 *         self.sync()             # <<<<<<<<<<<<<<
 *         if not isinstance(self.sync_val.value, (float,int) ):
 *             raise Exception('Slider values should be float or int type. "%s" is of type %s'%(self.sync_val.value,type(self.sync_val.value)))
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Slider *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.sync(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":126
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None, min = 0, max = 100, step = 1,setter= None,getter= None):
 *         self.sync()
 *         if not isinstance(self.sync_val.value, (float,int) ):             # <<<<<<<<<<<<<<
 *             raise Exception('Slider values should be float or int type. "%s" is of type %s'%(self.sync_val.value,type(self.sync_val.value)))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyFloat_Check(__pyx_t_1); 
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyInt_Check(__pyx_t_1); 
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (unlikely(__pyx_t_3)) {

    /* "src/pyglui/ui_elements.pxi":127
 *         self.sync()
 *         if not isinstance(self.sync_val.value, (float,int) ):
 *             raise Exception('Slider values should be float or int type. "%s" is of type %s'%(self.sync_val.value,type(self.sync_val.value)))             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_Slider_values_should_be_float_or);
    __pyx_t_4 += 44;
    __Pyx_GIVEREF(__pyx_kp_u_Slider_values_should_be_float_or);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Slider_values_should_be_float_or);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u_is_of_type);
    __pyx_t_4 += 13;
    __Pyx_GIVEREF(__pyx_kp_u_is_of_type);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_is_of_type);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)Py_TYPE(__pyx_t_7))), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 127, __pyx_L1_error)

    /* "src/pyglui/ui_elements.pxi":126
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None, min = 0, max = 100, step = 1,setter= None,getter= None):
 *         self.sync()
 *         if not isinstance(self.sync_val.value, (float,int) ):             # <<<<<<<<<<<<<<
 *             raise Exception('Slider values should be float or int type. "%s" is of type %s'%(self.sync_val.value,type(self.sync_val.value)))
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":124
 *         self.display_format = '%0.2f'
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None, min = 0, max = 100, step = 1,setter= None,getter= None):             # <<<<<<<<<<<<<<
 *         self.sync()
 *         if not isinstance(self.sync_val.value, (float,int) ):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":130
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Slider_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Slider_sync(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Slider_5sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 130, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":131
 * 
 *     cpdef sync(self):
 *         self.sync_val.sync()             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->sync_val->__pyx_vtab)->sync(__pyx_v_self->sync_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":130
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Slider.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Slider_5sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Slider_5sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_4sync(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_4sync(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_6Slider_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":133
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance:
 *         self.outline.compute(parent)
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Slider_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Slider_draw(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Slider_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  float __pyx_v_step_pixel_size;
  PyObject *__pyx_v_step_marks = NULL;
  float __pyx_7genexpr__pyx_v_x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  double __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  float __pyx_t_12;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points __pyx_t_13;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Slider_7draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 133, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 133, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":135
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         #update appearance:
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.field.compute(self.outline)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":136
 *         #update appearance:
 *         self.outline.compute(parent)
 *         self.field.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         # map slider value
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->field->__pyx_vtab)->compute(__pyx_v_self->field, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":139
 * 
 *         # map slider value
 *         self.slider_pos.x = clampmap(self.sync_val.value,self.minimum,self.maximum,0,self.field.size.x)             # <<<<<<<<<<<<<<
 *         self.slider_pos.y = slider_handle_org_y * ui_scale
 *         #self.outline.sketch()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->slider_pos->x = __pyx_f_6pyglui_2ui_clampmap(__pyx_t_8, __pyx_v_self->minimum, __pyx_v_self->maximum, 0.0, __pyx_v_self->field->size->x);

  /* "src/pyglui/ui_elements.pxi":140
 *         # map slider value
 *         self.slider_pos.x = clampmap(self.sync_val.value,self.minimum,self.maximum,0,self.field.size.x)
 *         self.slider_pos.y = slider_handle_org_y * ui_scale             # <<<<<<<<<<<<<<
 *         #self.outline.sketch()
 *         #self.field.sketch()
 */
  __pyx_v_self->slider_pos->y = (40.0 * __pyx_v_6pyglui_2ui_ui_scale);

  /* "src/pyglui/ui_elements.pxi":146
 *         # read only rendering rules
 *         # cdef tuple line_default_color, line_highlight_color, text_color, button_color, button_shadow_color
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.line_default_color = RGBA(*slider_line_color_default_read_only)
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_9 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_9 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":147
 *         # cdef tuple line_default_color, line_highlight_color, text_color, button_color, button_shadow_color
 *         if self._read_only or parent_read_only:
 *             self.line_default_color = RGBA(*slider_line_color_default_read_only)             # <<<<<<<<<<<<<<
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)
 *             self.text_color = RGBA(*color_text_read_only)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->line_default_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->line_default_color);
    __pyx_v_self->line_default_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":148
 *         if self._read_only or parent_read_only:
 *             self.line_default_color = RGBA(*slider_line_color_default_read_only)
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color = RGBA(*color_default_read_only)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->line_highlight_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->line_highlight_color);
    __pyx_v_self->line_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":149
 *             self.line_default_color = RGBA(*slider_line_color_default_read_only)
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)
 *             self.text_color = RGBA(*color_text_read_only)             # <<<<<<<<<<<<<<
 *             self.button_color = RGBA(*color_default_read_only)
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":150
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color = RGBA(*color_default_read_only)             # <<<<<<<<<<<<<<
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_color);
    __pyx_v_self->button_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":151
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color = RGBA(*color_default_read_only)
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)             # <<<<<<<<<<<<<<
 *         else:
 *             self.line_default_color = RGBA(*slider_line_color_default)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_shadow_color);
    __pyx_v_self->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":146
 *         # read only rendering rules
 *         # cdef tuple line_default_color, line_highlight_color, text_color, button_color, button_shadow_color
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.line_default_color = RGBA(*slider_line_color_default_read_only)
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":153
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)
 *         else:
 *             self.line_default_color = RGBA(*slider_line_color_default)             # <<<<<<<<<<<<<<
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight)
 *             self.text_color = RGBA(*color_text_default)
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->line_default_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->line_default_color);
    __pyx_v_self->line_default_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":154
 *         else:
 *             self.line_default_color = RGBA(*slider_line_color_default)
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight)             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_default)
 *             self.button_color = RGBA(*color_default)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->line_highlight_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->line_highlight_color);
    __pyx_v_self->line_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":155
 *             self.line_default_color = RGBA(*slider_line_color_default)
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight)
 *             self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 *             self.button_color = RGBA(*color_default)
 *             self.button_shadow_color = RGBA(*color_shadow)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":156
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight)
 *             self.text_color = RGBA(*color_text_default)
 *             self.button_color = RGBA(*color_default)             # <<<<<<<<<<<<<<
 *             self.button_shadow_color = RGBA(*color_shadow)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_color);
    __pyx_v_self->button_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":157
 *             self.text_color = RGBA(*color_text_default)
 *             self.button_color = RGBA(*color_default)
 *             self.button_shadow_color = RGBA(*color_shadow)             # <<<<<<<<<<<<<<
 * 
 *         gl.glPushMatrix()
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_shadow_color);
    __pyx_v_self->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":159
 *             self.button_shadow_color = RGBA(*color_shadow)
 * 
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 * 
 */
  glPushMatrix();

  /* "src/pyglui/ui_elements.pxi":160
 * 
 *         gl.glPushMatrix()
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  glTranslatef(__pyx_v_self->field->org->x, __pyx_v_self->field->org->y, 0.0);

  /* "src/pyglui/ui_elements.pxi":163
 * 
 * 
 *         rect_corners(Vec2(self.slider_pos.x, self.slider_pos.y - 1. * ui_scale),             # <<<<<<<<<<<<<<
 *                      Vec2(self.field.size.x, self.slider_pos.y +  1. * ui_scale),
 *                      self.line_default_color)
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->slider_pos->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->slider_pos->y - (1. * __pyx_v_6pyglui_2ui_ui_scale))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":164
 * 
 *         rect_corners(Vec2(self.slider_pos.x, self.slider_pos.y - 1. * ui_scale),
 *                      Vec2(self.field.size.x, self.slider_pos.y +  1. * ui_scale),             # <<<<<<<<<<<<<<
 *                      self.line_default_color)
 *         rect_corners(Vec2(0., self.slider_pos.y - 1. * ui_scale),
 */
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->field->size->x); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->slider_pos->y + (1. * __pyx_v_6pyglui_2ui_ui_scale))); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __pyx_t_5 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":165
 *         rect_corners(Vec2(self.slider_pos.x, self.slider_pos.y - 1. * ui_scale),
 *                      Vec2(self.field.size.x, self.slider_pos.y +  1. * ui_scale),
 *                      self.line_default_color)             # <<<<<<<<<<<<<<
 *         rect_corners(Vec2(0., self.slider_pos.y - 1. * ui_scale),
 *                      Vec2(self.slider_pos.x, self.slider_pos.y +  1. * ui_scale),
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->line_default_color);
  __Pyx_INCREF(__pyx_t_4);

  /* "src/pyglui/ui_elements.pxi":163
 * 
 * 
 *         rect_corners(Vec2(self.slider_pos.x, self.slider_pos.y - 1. * ui_scale),             # <<<<<<<<<<<<<<
 *                      Vec2(self.field.size.x, self.slider_pos.y +  1. * ui_scale),
 *                      self.line_default_color)
 */
  __pyx_t_5 = __pyx_f_6pyglui_2ui_rect_corners(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":166
 *                      Vec2(self.field.size.x, self.slider_pos.y +  1. * ui_scale),
 *                      self.line_default_color)
 *         rect_corners(Vec2(0., self.slider_pos.y - 1. * ui_scale),             # <<<<<<<<<<<<<<
 *                      Vec2(self.slider_pos.x, self.slider_pos.y +  1. * ui_scale),
 *                      self.line_highlight_color)
 */
  __pyx_t_5 = PyFloat_FromDouble((__pyx_v_self->slider_pos->y - (1. * __pyx_v_6pyglui_2ui_ui_scale))); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_float_0_);
  __Pyx_GIVEREF(__pyx_float_0_);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_float_0_);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":167
 *                      self.line_default_color)
 *         rect_corners(Vec2(0., self.slider_pos.y - 1. * ui_scale),
 *                      Vec2(self.slider_pos.x, self.slider_pos.y +  1. * ui_scale),             # <<<<<<<<<<<<<<
 *                      self.line_highlight_color)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->slider_pos->x); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->slider_pos->y + (1. * __pyx_v_6pyglui_2ui_ui_scale))); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":168
 *         rect_corners(Vec2(0., self.slider_pos.y - 1. * ui_scale),
 *                      Vec2(self.slider_pos.x, self.slider_pos.y +  1. * ui_scale),
 *                      self.line_highlight_color)             # <<<<<<<<<<<<<<
 * 
 *         cdef float step_pixel_size,x
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->line_highlight_color);
  __Pyx_INCREF(__pyx_t_1);

  /* "src/pyglui/ui_elements.pxi":166
 *                      Vec2(self.field.size.x, self.slider_pos.y +  1. * ui_scale),
 *                      self.line_default_color)
 *         rect_corners(Vec2(0., self.slider_pos.y - 1. * ui_scale),             # <<<<<<<<<<<<<<
 *                      Vec2(self.slider_pos.x, self.slider_pos.y +  1. * ui_scale),
 *                      self.line_highlight_color)
 */
  __pyx_t_4 = __pyx_f_6pyglui_2ui_rect_corners(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_5), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":171
 * 
 *         cdef float step_pixel_size,x
 *         if self.steps>1:             # <<<<<<<<<<<<<<
 *             step_pixel_size = lmap(self.minimum+self.step,self.minimum,self.maximum,0,self.field.size.x)
 *             if step_pixel_size >= slider_button_size*ui_scale:
 */
  __pyx_t_9 = (__pyx_v_self->steps > 1);
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":172
 *         cdef float step_pixel_size,x
 *         if self.steps>1:
 *             step_pixel_size = lmap(self.minimum+self.step,self.minimum,self.maximum,0,self.field.size.x)             # <<<<<<<<<<<<<<
 *             if step_pixel_size >= slider_button_size*ui_scale:
 *                 step_marks = [(x*step_pixel_size,self.slider_pos.y) for x in range(self.steps+1)]
 */
    __pyx_v_step_pixel_size = __pyx_f_6pyglui_2ui_lmap((__pyx_v_self->minimum + __pyx_v_self->step), __pyx_v_self->minimum, __pyx_v_self->maximum, 0.0, __pyx_v_self->field->size->x);

    /* "src/pyglui/ui_elements.pxi":173
 *         if self.steps>1:
 *             step_pixel_size = lmap(self.minimum+self.step,self.minimum,self.maximum,0,self.field.size.x)
 *             if step_pixel_size >= slider_button_size*ui_scale:             # <<<<<<<<<<<<<<
 *                 step_marks = [(x*step_pixel_size,self.slider_pos.y) for x in range(self.steps+1)]
 *                 utils.draw_points(step_marks,size=slider_step_mark_size*ui_scale, color=self.step_color)
 */
    __pyx_t_9 = (__pyx_v_step_pixel_size >= (20.0 * __pyx_v_6pyglui_2ui_ui_scale));
    if (__pyx_t_9) {

      /* "src/pyglui/ui_elements.pxi":174
 *             step_pixel_size = lmap(self.minimum+self.step,self.minimum,self.maximum,0,self.field.size.x)
 *             if step_pixel_size >= slider_button_size*ui_scale:
 *                 step_marks = [(x*step_pixel_size,self.slider_pos.y) for x in range(self.steps+1)]             # <<<<<<<<<<<<<<
 *                 utils.draw_points(step_marks,size=slider_step_mark_size*ui_scale, color=self.step_color)
 * 
 */
      { /* enter inner scope */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_self->steps + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
          __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
          __pyx_t_11 = NULL;
        } else {
          __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 174, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 174, __pyx_L1_error)
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        for (;;) {
          if (likely(!__pyx_t_11)) {
            if (likely(PyList_CheckExact(__pyx_t_1))) {
              if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 174, __pyx_L1_error)
              #else
              __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 174, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            } else {
              if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 174, __pyx_L1_error)
              #else
              __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 174, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            }
          } else {
            __pyx_t_2 = __pyx_t_11(__pyx_t_1);
            if (unlikely(!__pyx_t_2)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(2, 174, __pyx_L1_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_2);
          }
          __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 174, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_7genexpr__pyx_v_x = __pyx_t_12;
          __pyx_t_2 = PyFloat_FromDouble((__pyx_7genexpr__pyx_v_x * __pyx_v_step_pixel_size)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 174, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->slider_pos->y); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 174, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 174, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
          __pyx_t_2 = 0;
          __pyx_t_5 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(2, 174, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } /* exit inner scope */
      __pyx_v_step_marks = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "src/pyglui/ui_elements.pxi":175
 *             if step_pixel_size >= slider_button_size*ui_scale:
 *                 step_marks = [(x*step_pixel_size,self.slider_pos.y) for x in range(self.steps+1)]
 *                 utils.draw_points(step_marks,size=slider_step_mark_size*ui_scale, color=self.step_color)             # <<<<<<<<<<<<<<
 * 
 *         if self.selected:
 */
      __pyx_t_4 = ((PyObject *)__pyx_v_self->step_color);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_13.__pyx_n = 2;
      __pyx_t_13.size = (8.0 * __pyx_v_6pyglui_2ui_ui_scale);
      __pyx_t_13.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
      __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_v_step_marks, 0, &__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":173
 *         if self.steps>1:
 *             step_pixel_size = lmap(self.minimum+self.step,self.minimum,self.maximum,0,self.field.size.x)
 *             if step_pixel_size >= slider_button_size*ui_scale:             # <<<<<<<<<<<<<<
 *                 step_marks = [(x*step_pixel_size,self.slider_pos.y) for x in range(self.steps+1)]
 *                 utils.draw_points(step_marks,size=slider_step_mark_size*ui_scale, color=self.step_color)
 */
    }

    /* "src/pyglui/ui_elements.pxi":171
 * 
 *         cdef float step_pixel_size,x
 *         if self.steps>1:             # <<<<<<<<<<<<<<
 *             step_pixel_size = lmap(self.minimum+self.step,self.minimum,self.maximum,0,self.field.size.x)
 *             if step_pixel_size >= slider_button_size*ui_scale:
 */
  }

  /* "src/pyglui/ui_elements.pxi":177
 *                 utils.draw_points(step_marks,size=slider_step_mark_size*ui_scale, color=self.step_color)
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             utils.draw_points((self.slider_pos,),size=(slider_button_size_selected+slider_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points((self.slider_pos,),size=slider_button_size_selected*ui_scale, color=self.button_selected_color)
 */
  if (__pyx_v_self->selected) {

    /* "src/pyglui/ui_elements.pxi":178
 * 
 *         if self.selected:
 *             utils.draw_points((self.slider_pos,),size=(slider_button_size_selected+slider_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)             # <<<<<<<<<<<<<<
 *             utils.draw_points((self.slider_pos,),size=slider_button_size_selected*ui_scale, color=self.button_selected_color)
 *         else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF((PyObject *)__pyx_v_self->slider_pos);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->slider_pos);
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->slider_pos));
    __pyx_t_4 = ((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.size = (35.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_13.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
    __pyx_t_13.sharpness = 0.3;
    __pyx_t_3 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_1, 0, &__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/ui_elements.pxi":179
 *         if self.selected:
 *             utils.draw_points((self.slider_pos,),size=(slider_button_size_selected+slider_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points((self.slider_pos,),size=slider_button_size_selected*ui_scale, color=self.button_selected_color)             # <<<<<<<<<<<<<<
 *         else:
 *             utils.draw_points((self.slider_pos,),size=(slider_button_size+slider_button_shadow)+ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF((PyObject *)__pyx_v_self->slider_pos);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->slider_pos);
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->slider_pos));
    __pyx_t_4 = ((PyObject *)__pyx_v_self->button_selected_color);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.size = (25.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_13.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
    __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_3, 0, &__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":177
 *                 utils.draw_points(step_marks,size=slider_step_mark_size*ui_scale, color=self.step_color)
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             utils.draw_points((self.slider_pos,),size=(slider_button_size_selected+slider_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points((self.slider_pos,),size=slider_button_size_selected*ui_scale, color=self.button_selected_color)
 */
    goto __pyx_L10;
  }

  /* "src/pyglui/ui_elements.pxi":181
 *             utils.draw_points((self.slider_pos,),size=slider_button_size_selected*ui_scale, color=self.button_selected_color)
 *         else:
 *             utils.draw_points((self.slider_pos,),size=(slider_button_size+slider_button_shadow)+ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)             # <<<<<<<<<<<<<<
 *             utils.draw_points((self.slider_pos,),size=slider_button_size*ui_scale, color=self.button_color)
 * 
 */
  /*else*/ {
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF((PyObject *)__pyx_v_self->slider_pos);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->slider_pos);
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->slider_pos));
    __pyx_t_4 = ((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.size = (30.0 + __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_13.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
    __pyx_t_13.sharpness = 0.3;
    __pyx_t_3 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_1, 0, &__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/ui_elements.pxi":182
 *         else:
 *             utils.draw_points((self.slider_pos,),size=(slider_button_size+slider_button_shadow)+ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points((self.slider_pos,),size=slider_button_size*ui_scale, color=self.button_color)             # <<<<<<<<<<<<<<
 * 
 *         gl.glPopMatrix()
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF((PyObject *)__pyx_v_self->slider_pos);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->slider_pos);
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->slider_pos));
    __pyx_t_4 = ((PyObject *)__pyx_v_self->button_color);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.size = (20.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_13.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
    __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_3, 0, &__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L10:;

  /* "src/pyglui/ui_elements.pxi":184
 *             utils.draw_points((self.slider_pos,),size=slider_button_size*ui_scale, color=self.button_color)
 * 
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 *         self.label_field.draw(self.outline, nested=True, parent_read_only=(self._read_only or parent_read_only))
 * 
 */
  glPopMatrix();

  /* "src/pyglui/ui_elements.pxi":185
 * 
 *         gl.glPopMatrix()
 *         self.label_field.draw(self.outline, nested=True, parent_read_only=(self._read_only or parent_read_only))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_9 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_9 = __pyx_v_parent_read_only;
  __pyx_L11_bool_binop_done:;
  __pyx_t_14.__pyx_n = 2;
  __pyx_t_14.nested = 1;
  __pyx_t_14.parent_read_only = __pyx_t_9;
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self->label_field->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->label_field), ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1), 0, &__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":133
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance:
 *         self.outline.compute(parent)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Slider.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_step_marks);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Slider_7draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Slider_7draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 133, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 133, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 133, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 133, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 133, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 133, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 133, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 133, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_6draw(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_6draw(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Slider->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":189
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Slider_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Slider_handle_input(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Slider_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  double __pyx_v_val;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Slider_9handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 189, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":190
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  __pyx_t_9 = (!__pyx_t_8);
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":193
 *             global should_redraw
 * 
 *             if self.selected and new_input.dm:             # <<<<<<<<<<<<<<
 *                 val = clampmap(new_input.m.x-self.field.org.x,0,self.field.size.x,self.minimum,self.maximum)
 *                 #conserve some spcial types.
 */
    if (__pyx_v_self->selected) {
    } else {
      __pyx_t_9 = __pyx_v_self->selected;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_8 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_new_input->dm)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 193, __pyx_L1_error)
    __pyx_t_9 = __pyx_t_8;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_9) {

      /* "src/pyglui/ui_elements.pxi":194
 * 
 *             if self.selected and new_input.dm:
 *                 val = clampmap(new_input.m.x-self.field.org.x,0,self.field.size.x,self.minimum,self.maximum)             # <<<<<<<<<<<<<<
 *                 #conserve some spcial types.
 *                 if isinstance(self.sync_val.value,int):
 */
      __pyx_v_val = __pyx_f_6pyglui_2ui_clampmap((__pyx_v_new_input->m->x - __pyx_v_self->field->org->x), 0.0, __pyx_v_self->field->size->x, __pyx_v_self->minimum, __pyx_v_self->maximum);

      /* "src/pyglui/ui_elements.pxi":196
 *                 val = clampmap(new_input.m.x-self.field.org.x,0,self.field.size.x,self.minimum,self.maximum)
 *                 #conserve some spcial types.
 *                 if isinstance(self.sync_val.value,int):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = int(step(val,self.minimum,self.maximum,self.step))
 *                 else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyInt_Check(__pyx_t_1); 
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":197
 *                 #conserve some spcial types.
 *                 if isinstance(self.sync_val.value,int):
 *                     self.sync_val.value = int(step(val,self.minimum,self.maximum,self.step))             # <<<<<<<<<<<<<<
 *                 else:
 *                     self.sync_val.value = step(val,self.minimum,self.maximum,self.step)
 */
        __pyx_t_1 = __Pyx_PyInt_FromDouble(__pyx_f_6pyglui_2ui_step(__pyx_v_val, __pyx_v_self->minimum, __pyx_v_self->maximum, __pyx_v_self->step)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(2, 197, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":196
 *                 val = clampmap(new_input.m.x-self.field.org.x,0,self.field.size.x,self.minimum,self.maximum)
 *                 #conserve some spcial types.
 *                 if isinstance(self.sync_val.value,int):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = int(step(val,self.minimum,self.maximum,self.step))
 *                 else:
 */
        goto __pyx_L9;
      }

      /* "src/pyglui/ui_elements.pxi":199
 *                     self.sync_val.value = int(step(val,self.minimum,self.maximum,self.step))
 *                 else:
 *                     self.sync_val.value = step(val,self.minimum,self.maximum,self.step)             # <<<<<<<<<<<<<<
 * 
 *                 should_redraw = True
 */
      /*else*/ {
        __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pyglui_2ui_step(__pyx_v_val, __pyx_v_self->minimum, __pyx_v_self->maximum, __pyx_v_self->step)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 199, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(2, 199, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L9:;

      /* "src/pyglui/ui_elements.pxi":201
 *                     self.sync_val.value = step(val,self.minimum,self.maximum,self.step)
 * 
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             for b in new_input.buttons[:]:#list copy for remove to work
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":193
 *             global should_redraw
 * 
 *             if self.selected and new_input.dm:             # <<<<<<<<<<<<<<
 *                 val = clampmap(new_input.m.x-self.field.org.x,0,self.field.size.x,self.minimum,self.maximum)
 *                 #conserve some spcial types.
 */
    }

    /* "src/pyglui/ui_elements.pxi":203
 *                 should_redraw = True
 * 
 *             for b in new_input.buttons[:]:#list copy for remove to work             # <<<<<<<<<<<<<<
 *                 if b[1] == 1 and visible:
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,
 */
    if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 203, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_new_input->buttons, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 203, __pyx_L1_error)
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":204
 * 
 *             for b in new_input.buttons[:]:#list copy for remove to work
 *                 if b[1] == 1 and visible:             # <<<<<<<<<<<<<<
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,
 *                                               self.slider_pos.y + self.field.org.y),
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 204, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_8) {
      } else {
        __pyx_t_9 = __pyx_t_8;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_9 = __pyx_v_visible;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":205
 *             for b in new_input.buttons[:]:#list copy for remove to work
 *                 if b[1] == 1 and visible:
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,             # <<<<<<<<<<<<<<
 *                                               self.slider_pos.y + self.field.org.y),
 *                                          self.field.size.x,self.field.size.y/2.,new_input.m):
 */
        __pyx_t_5 = PyFloat_FromDouble((__pyx_v_self->field->org->x + (((double)__pyx_v_self->field->size->x) / 2.))); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);

        /* "src/pyglui/ui_elements.pxi":206
 *                 if b[1] == 1 and visible:
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,
 *                                               self.slider_pos.y + self.field.org.y),             # <<<<<<<<<<<<<<
 *                                          self.field.size.x,self.field.size.y/2.,new_input.m):
 *                         new_input.buttons.remove(b) # the slider should catch the event (unlike other elements)
 */
        __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->slider_pos->y + __pyx_v_self->field->org->y)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "src/pyglui/ui_elements.pxi":205
 *             for b in new_input.buttons[:]:#list copy for remove to work
 *                 if b[1] == 1 and visible:
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,             # <<<<<<<<<<<<<<
 *                                               self.slider_pos.y + self.field.org.y),
 *                                          self.field.size.x,self.field.size.y/2.,new_input.m):
 */
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
        __pyx_t_5 = 0;
        __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyglui/ui_elements.pxi":207
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,
 *                                               self.slider_pos.y + self.field.org.y),
 *                                          self.field.size.x,self.field.size.y/2.,new_input.m):             # <<<<<<<<<<<<<<
 *                         new_input.buttons.remove(b) # the slider should catch the event (unlike other elements)
 *                         self.selected = True
 */
        __pyx_t_4 = ((PyObject *)__pyx_v_new_input->m);
        __Pyx_INCREF(__pyx_t_4);

        /* "src/pyglui/ui_elements.pxi":205
 *             for b in new_input.buttons[:]:#list copy for remove to work
 *                 if b[1] == 1 and visible:
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,             # <<<<<<<<<<<<<<
 *                                               self.slider_pos.y + self.field.org.y),
 *                                          self.field.size.x,self.field.size.y/2.,new_input.m):
 */
        __pyx_t_9 = __pyx_f_6pyglui_2ui_mouse_over_center(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), __pyx_v_self->field->size->x, (((double)__pyx_v_self->field->size->y) / 2.), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_4));
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_9) {

          /* "src/pyglui/ui_elements.pxi":208
 *                                               self.slider_pos.y + self.field.org.y),
 *                                          self.field.size.x,self.field.size.y/2.,new_input.m):
 *                         new_input.buttons.remove(b) # the slider should catch the event (unlike other elements)             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_input->buttons, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 208, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
              __pyx_t_7 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_b};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 208, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "src/pyglui/ui_elements.pxi":209
 *                                          self.field.size.x,self.field.size.y/2.,new_input.m):
 *                         new_input.buttons.remove(b) # the slider should catch the event (unlike other elements)
 *                         self.selected = True             # <<<<<<<<<<<<<<
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0:
 */
          __pyx_v_self->selected = 1;

          /* "src/pyglui/ui_elements.pxi":210
 *                         new_input.buttons.remove(b) # the slider should catch the event (unlike other elements)
 *                         self.selected = True
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 *                 if self.selected and b[1] == 0:
 *                     self.selected = False
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":205
 *             for b in new_input.buttons[:]:#list copy for remove to work
 *                 if b[1] == 1 and visible:
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,             # <<<<<<<<<<<<<<
 *                                               self.slider_pos.y + self.field.org.y),
 *                                          self.field.size.x,self.field.size.y/2.,new_input.m):
 */
        }

        /* "src/pyglui/ui_elements.pxi":204
 * 
 *             for b in new_input.buttons[:]:#list copy for remove to work
 *                 if b[1] == 1 and visible:             # <<<<<<<<<<<<<<
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,
 *                                               self.slider_pos.y + self.field.org.y),
 */
      }

      /* "src/pyglui/ui_elements.pxi":211
 *                         self.selected = True
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0:             # <<<<<<<<<<<<<<
 *                     self.selected = False
 *                     should_redraw = True
 */
      if (__pyx_v_self->selected) {
      } else {
        __pyx_t_9 = __pyx_v_self->selected;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 211, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __pyx_t_8;
      __pyx_L17_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":212
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0:
 *                     self.selected = False             # <<<<<<<<<<<<<<
 *                     should_redraw = True
 * 
 */
        __pyx_v_self->selected = 0;

        /* "src/pyglui/ui_elements.pxi":213
 *                 if self.selected and b[1] == 0:
 *                     self.selected = False
 *                     should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             self.label_field.handle_input(new_input, visible, False)
 */
        __pyx_v_6pyglui_2ui_should_redraw = 1;

        /* "src/pyglui/ui_elements.pxi":211
 *                         self.selected = True
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0:             # <<<<<<<<<<<<<<
 *                     self.selected = False
 *                     should_redraw = True
 */
      }

      /* "src/pyglui/ui_elements.pxi":203
 *                 should_redraw = True
 * 
 *             for b in new_input.buttons[:]:#list copy for remove to work             # <<<<<<<<<<<<<<
 *                 if b[1] == 1 and visible:
 *                     if mouse_over_center(Vec2(self.field.org.x + self.field.size.x / 2.,
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":215
 *                     should_redraw = True
 * 
 *             self.label_field.handle_input(new_input, visible, False)             # <<<<<<<<<<<<<<
 * 
 *     cpdef validate(self, val):
 */
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.parent_read_only = 0;
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self->label_field->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->label_field), __pyx_v_new_input, __pyx_v_visible, 0, &__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":190
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":189
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Slider.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Slider_9handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Slider_9handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 189, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 189, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 189, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 189, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 189, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 189, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 189, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 189, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 189, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_8handle_input(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_8handle_input(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Slider->__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":217
 *             self.label_field.handle_input(new_input, visible, False)
 * 
 *     cpdef validate(self, val):             # <<<<<<<<<<<<<<
 *         return step(clamp(val, self.minimum, self.maximum), self.minimum, self.maximum, self.step)
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Slider_11validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Slider_validate(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  double __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("validate", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Slider_11validate)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_val};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 217, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":218
 * 
 *     cpdef validate(self, val):
 *         return step(clamp(val, self.minimum, self.maximum), self.minimum, self.maximum, self.step)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 218, __pyx_L1_error)
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pyglui_2ui_step(__pyx_f_6pyglui_2ui_clamp(__pyx_t_6, __pyx_v_self->minimum, __pyx_v_self->maximum), __pyx_v_self->minimum, __pyx_v_self->maximum, __pyx_v_self->step)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":217
 *             self.label_field.handle_input(new_input, visible, False)
 * 
 *     cpdef validate(self, val):             # <<<<<<<<<<<<<<
 *         return step(clamp(val, self.minimum, self.maximum), self.minimum, self.maximum, self.step)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Slider.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_11validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Slider_11validate = {"validate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Slider_11validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_11validate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_val = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("validate (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_val)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 217, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "validate") < 0)) __PYX_ERR(2, 217, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_val = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("validate", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 217, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_10validate(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), __pyx_v_val);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_10validate(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("validate", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_6Slider_validate(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":220
 *         return step(clamp(val, self.minimum, self.maximum), self.minimum, self.maximum, self.step)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def display_format(self):
 *         return self.label_field.display_format
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_14display_format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_14display_format_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_14display_format___get__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_14display_format___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":222
 *     @property
 *     def display_format(self):
 *         return self.label_field.display_format             # <<<<<<<<<<<<<<
 * 
 *     @display_format.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->label_field->display_format);
  __pyx_r = __pyx_v_self->label_field->display_format;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":220
 *         return step(clamp(val, self.minimum, self.maximum), self.minimum, self.maximum, self.step)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def display_format(self):
 *         return self.label_field.display_format
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":224
 *         return self.label_field.display_format
 * 
 *     @display_format.setter             # <<<<<<<<<<<<<<
 *     def display_format(self, val):
 *         self.label_field.display_format = val
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Slider_14display_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Slider_14display_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_14display_format_2__set__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Slider_14display_format_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":226
 *     @display_format.setter
 *     def display_format(self, val):
 *         self.label_field.display_format = val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_val))||((__pyx_v_val) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_val))) __PYX_ERR(2, 226, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->label_field->display_format);
  __Pyx_DECREF(__pyx_v_self->label_field->display_format);
  __pyx_v_self->label_field->display_format = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":224
 *         return self.label_field.display_format
 * 
 *     @display_format.setter             # <<<<<<<<<<<<<<
 *     def display_format(self, val):
 *         self.label_field.display_format = val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.display_format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":83
 * 
 * cdef class Slider(UI_element):
 *     cdef public float minimum,maximum,step             # <<<<<<<<<<<<<<
 *     cdef public FitBox field
 *     cdef bint selected
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_7minimum_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_7minimum_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_7minimum___get__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_7minimum___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->minimum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.minimum.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Slider_7minimum_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Slider_7minimum_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_7minimum_2__set__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Slider_7minimum_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 83, __pyx_L1_error)
  __pyx_v_self->minimum = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.minimum.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_7maximum_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_7maximum_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_7maximum___get__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_7maximum___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->maximum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.maximum.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Slider_7maximum_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Slider_7maximum_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_7maximum_2__set__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Slider_7maximum_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 83, __pyx_L1_error)
  __pyx_v_self->maximum = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.maximum.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_4step_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_4step_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_4step___get__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_4step___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->step); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.step.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Slider_4step_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Slider_4step_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_4step_2__set__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Slider_4step_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 83, __pyx_L1_error)
  __pyx_v_self->step = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.step.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":84
 * cdef class Slider(UI_element):
 *     cdef public float minimum,maximum,step
 *     cdef public FitBox field             # <<<<<<<<<<<<<<
 *     cdef bint selected
 *     cdef Vec2 slider_pos
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_5field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_5field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_5field___get__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_5field___get__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->field);
  __pyx_r = ((PyObject *)__pyx_v_self->field);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Slider_5field_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Slider_5field_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_5field_2__set__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Slider_5field_2__set__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(2, 84, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider.field.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Slider_5field_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Slider_5field_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_5field_4__del__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Slider_5field_4__del__(struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Slider_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Slider_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_12__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Slider_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Slider_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Slider_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Slider_14__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Slider *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Slider_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Slider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":243
 *     cdef RGBA text_color, button_color_on, button_color_off, button_shadow_color, button_selected_color
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, on_val=True, off_val=False, label=None, setter=None, getter=None):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Switch_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Switch_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_name = 0;
  PyObject *__pyx_v_attribute_context = 0;
  PyObject *__pyx_v_on_val = 0;
  PyObject *__pyx_v_off_val = 0;
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_setter = 0;
  PyObject *__pyx_v_getter = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #endif
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    values[3] = ((PyObject *)Py_False);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 243, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 243, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_on_val);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 243, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_off_val);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 243, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 243, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 243, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 243, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 243, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_on_val = values[2];
    __pyx_v_off_val = values[3];
    __pyx_v_label = values[4];
    __pyx_v_setter = values[5];
    __pyx_v_getter = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 7, __pyx_nargs); __PYX_ERR(2, 243, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Switch.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 243, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch___cinit__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_on_val, __pyx_v_off_val, __pyx_v_label, __pyx_v_setter, __pyx_v_getter);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Switch___cinit__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_on_val, PyObject *__pyx_v_off_val, PyObject *__pyx_v_label, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":244
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, on_val=True, off_val=False, label=None, setter=None, getter=None):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":245
 *     def __cinit__(self,str attribute_name, object attribute_context = None, on_val=True, off_val=False, label=None, setter=None, getter=None):
 *         self.uid = id(self)
 *         self._label = label or attribute_name             # <<<<<<<<<<<<<<
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_label); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 245, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(2, 245, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_label);
    __pyx_t_1 = __pyx_v_label;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_v_attribute_name);
  __pyx_t_1 = __pyx_v_attribute_name;
  __pyx_L3_bool_binop_done:;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._label);
  __pyx_v_self->__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":246
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)             # <<<<<<<<<<<<<<
 *         self.on_val = on_val
 *         self.off_val = off_val
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_attribute_name);
  __Pyx_GIVEREF(__pyx_v_attribute_name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attribute_name);
  __Pyx_INCREF(__pyx_v_attribute_context);
  __Pyx_GIVEREF(__pyx_v_attribute_context);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attribute_context);
  __Pyx_INCREF(__pyx_v_getter);
  __Pyx_GIVEREF(__pyx_v_getter);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_getter);
  __Pyx_INCREF(__pyx_v_setter);
  __Pyx_GIVEREF(__pyx_v_setter);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_setter);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Synced_Value), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->sync_val);
  __Pyx_DECREF((PyObject *)__pyx_v_self->sync_val);
  __pyx_v_self->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":247
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val             # <<<<<<<<<<<<<<
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,switch_outline_size_y)) # we only fix the height
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_on_val); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 247, __pyx_L1_error)
  __pyx_v_self->on_val = __pyx_t_4;

  /* "src/pyglui/ui_elements.pxi":248
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val
 *         self.off_val = off_val             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,switch_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_off_val); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 248, __pyx_L1_error)
  __pyx_v_self->off_val = __pyx_t_4;

  /* "src/pyglui/ui_elements.pxi":249
 *         self.on_val = on_val
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,switch_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.button = FitBox(Vec2(-switch_button_size-x_spacer,0),Vec2(switch_button_size,switch_button_size))
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":250
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,switch_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))             # <<<<<<<<<<<<<<
 *         self.button = FitBox(Vec2(-switch_button_size-x_spacer,0),Vec2(switch_button_size,switch_button_size))
 *         self.selected = False
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":251
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,switch_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.button = FitBox(Vec2(-switch_button_size-x_spacer,0),Vec2(switch_button_size,switch_button_size))             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         # rendering variables
 */
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button);
  __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":252
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.button = FitBox(Vec2(-switch_button_size-x_spacer,0),Vec2(switch_button_size,switch_button_size))
 *         self.selected = False             # <<<<<<<<<<<<<<
 *         # rendering variables
 *         self.text_color = RGBA(*color_text_default)
 */
  __pyx_v_self->selected = 0;

  /* "src/pyglui/ui_elements.pxi":254
 *         self.selected = False
 *         # rendering variables
 *         self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 *         self.button_color_on = RGBA(*color_on)
 *         self.button_color_off = RGBA(*color_default)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
  __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":255
 *         # rendering variables
 *         self.text_color = RGBA(*color_text_default)
 *         self.button_color_on = RGBA(*color_on)             # <<<<<<<<<<<<<<
 *         self.button_color_off = RGBA(*color_default)
 *         self.button_shadow_color = RGBA(*color_shadow)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color_on);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button_color_on);
  __pyx_v_self->button_color_on = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":256
 *         self.text_color = RGBA(*color_text_default)
 *         self.button_color_on = RGBA(*color_on)
 *         self.button_color_off = RGBA(*color_default)             # <<<<<<<<<<<<<<
 *         self.button_shadow_color = RGBA(*color_shadow)
 *         self.button_selected_color = RGBA(*color_selected)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color_off);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button_color_off);
  __pyx_v_self->button_color_off = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":257
 *         self.button_color_on = RGBA(*color_on)
 *         self.button_color_off = RGBA(*color_default)
 *         self.button_shadow_color = RGBA(*color_shadow)             # <<<<<<<<<<<<<<
 *         self.button_selected_color = RGBA(*color_selected)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button_shadow_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button_shadow_color);
  __pyx_v_self->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":258
 *         self.button_color_off = RGBA(*color_default)
 *         self.button_shadow_color = RGBA(*color_shadow)
 *         self.button_selected_color = RGBA(*color_selected)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button_selected_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button_selected_color);
  __pyx_v_self->button_selected_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":243
 *     cdef RGBA text_color, button_color_on, button_color_off, button_shadow_color, button_selected_color
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, on_val=True, off_val=False, label=None, setter=None, getter=None):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Switch.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":261
 * 
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None, on_val = True, off_val = False ,setter= None,getter= None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Switch_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Switch_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_attribute_name = 0;
  CYTHON_UNUSED PyObject *__pyx_v_attribute_context = 0;
  CYTHON_UNUSED PyObject *__pyx_v_label = 0;
  CYTHON_UNUSED PyObject *__pyx_v_on_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v_off_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v_setter = 0;
  CYTHON_UNUSED PyObject *__pyx_v_getter = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #endif
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_True);
    values[4] = ((PyObject *)Py_False);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 261, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 261, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 261, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_on_val);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 261, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_off_val);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 261, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 261, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 261, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(2, 261, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_label = values[2];
    __pyx_v_on_val = values[3];
    __pyx_v_off_val = values[4];
    __pyx_v_setter = values[5];
    __pyx_v_getter = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, __pyx_nargs); __PYX_ERR(2, 261, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Switch.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 261, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_2__init__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_label, __pyx_v_on_val, __pyx_v_off_val, __pyx_v_setter, __pyx_v_getter);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Switch_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_on_val, CYTHON_UNUSED PyObject *__pyx_v_off_val, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_getter) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":265
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Switch_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Switch_sync(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Switch_5sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 265, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":266
 * 
 *     cpdef sync(self):
 *         self.sync_val.sync()             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->sync_val->__pyx_vtab)->sync(__pyx_v_self->sync_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":265
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Switch.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Switch_5sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Switch_5sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_4sync(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Switch_4sync(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_6Switch_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Switch.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":268
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Switch_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Switch_draw(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Switch_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Switch_7draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 268, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":270
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         #update appearance
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.field.compute(self.outline)
 *         self.button.compute(self.field)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":271
 *         #update appearance
 *         self.outline.compute(parent)
 *         self.field.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.button.compute(self.field)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->field->__pyx_vtab)->compute(__pyx_v_self->field, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":272
 *         self.outline.compute(parent)
 *         self.field.compute(self.outline)
 *         self.button.compute(self.field)             # <<<<<<<<<<<<<<
 * 
 *         # read only rendering rules
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->field);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->button->__pyx_vtab)->compute(__pyx_v_self->button, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":275
 * 
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color_on = RGBA(*color_on_read_only)
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":276
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:
 *             self.text_color = RGBA(*color_text_read_only)             # <<<<<<<<<<<<<<
 *             self.button_color_on = RGBA(*color_on_read_only)
 *             self.button_color_off = RGBA(*color_default_read_only)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":277
 *         if self._read_only or parent_read_only:
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color_on = RGBA(*color_on_read_only)             # <<<<<<<<<<<<<<
 *             self.button_color_off = RGBA(*color_default_read_only)
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color_on);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_color_on);
    __pyx_v_self->button_color_on = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":278
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color_on = RGBA(*color_on_read_only)
 *             self.button_color_off = RGBA(*color_default_read_only)             # <<<<<<<<<<<<<<
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color_off);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_color_off);
    __pyx_v_self->button_color_off = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":279
 *             self.button_color_on = RGBA(*color_on_read_only)
 *             self.button_color_off = RGBA(*color_default_read_only)
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)             # <<<<<<<<<<<<<<
 *         else:
 *             self.text_color = RGBA(*color_text_default)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_shadow_color);
    __pyx_v_self->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":275
 * 
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color_on = RGBA(*color_on_read_only)
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":281
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)
 *         else:
 *             self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 *             self.button_color_on = RGBA(*color_on)
 *             self.button_color_off = RGBA(*color_default)
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":282
 *         else:
 *             self.text_color = RGBA(*color_text_default)
 *             self.button_color_on = RGBA(*color_on)             # <<<<<<<<<<<<<<
 *             self.button_color_off = RGBA(*color_default)
 *             self.button_shadow_color = RGBA(*color_shadow)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color_on);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_color_on);
    __pyx_v_self->button_color_on = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":283
 *             self.text_color = RGBA(*color_text_default)
 *             self.button_color_on = RGBA(*color_on)
 *             self.button_color_off = RGBA(*color_default)             # <<<<<<<<<<<<<<
 *             self.button_shadow_color = RGBA(*color_shadow)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_color_off);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_color_off);
    __pyx_v_self->button_color_off = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":284
 *             self.button_color_on = RGBA(*color_on)
 *             self.button_color_off = RGBA(*color_default)
 *             self.button_shadow_color = RGBA(*color_shadow)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button_shadow_color);
    __pyx_v_self->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":287
 * 
 * 
 *         if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *             # on state
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_on+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":289
 *         if self.sync_val.value == self.on_val:
 *             # on state
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_on+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)             # <<<<<<<<<<<<<<
 *             utils.draw_points(((self.button.center),),size=switch_button_size_on*ui_scale, color=self.button_color_on)
 *         elif self.selected:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = ((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.size = (38.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_9.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5);
    __pyx_t_9.sharpness = 0.3;
    __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_2, 0, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":290
 *             # on state
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_on+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points(((self.button.center),),size=switch_button_size_on*ui_scale, color=self.button_color_on)             # <<<<<<<<<<<<<<
 *         elif self.selected:
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_selected+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_v_self->button_color_on);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.size = (25.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_9.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_2 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_5, 0, &__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":287
 * 
 * 
 *         if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *             # on state
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_on+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 */
    goto __pyx_L6;
  }

  /* "src/pyglui/ui_elements.pxi":291
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_on+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points(((self.button.center),),size=switch_button_size_on*ui_scale, color=self.button_color_on)
 *         elif self.selected:             # <<<<<<<<<<<<<<
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_selected+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points(((self.button.center),),size=switch_button_size_selected*ui_scale, color=self.button_selected_color)
 */
  if (__pyx_v_self->selected) {

    /* "src/pyglui/ui_elements.pxi":292
 *             utils.draw_points(((self.button.center),),size=switch_button_size_on*ui_scale, color=self.button_color_on)
 *         elif self.selected:
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_selected+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)             # <<<<<<<<<<<<<<
 *             utils.draw_points(((self.button.center),),size=switch_button_size_selected*ui_scale, color=self.button_selected_color)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = ((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.size = (38.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_9.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_9.sharpness = 0.3;
    __pyx_t_5 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_1, 0, &__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":293
 *         elif self.selected:
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_selected+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points(((self.button.center),),size=switch_button_size_selected*ui_scale, color=self.button_selected_color)             # <<<<<<<<<<<<<<
 *         else:
 *             # off state
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = ((PyObject *)__pyx_v_self->button_selected_color);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.size = (25.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_9.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5);
    __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_2, 0, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":291
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_on+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points(((self.button.center),),size=switch_button_size_on*ui_scale, color=self.button_color_on)
 *         elif self.selected:             # <<<<<<<<<<<<<<
 *             utils.draw_points(((self.button.center),),size=(switch_button_size_selected+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points(((self.button.center),),size=switch_button_size_selected*ui_scale, color=self.button_selected_color)
 */
    goto __pyx_L6;
  }

  /* "src/pyglui/ui_elements.pxi":296
 *         else:
 *             # off state
 *             utils.draw_points(((self.button.center),),size=(switch_button_size+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)             # <<<<<<<<<<<<<<
 *             utils.draw_points(((self.button.center),),size=switch_button_size*ui_scale, color=self.button_color_off)
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_v_self->button_shadow_color);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.size = (33.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_9.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_9.sharpness = 0.3;
    __pyx_t_2 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_5, 0, &__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":297
 *             # off state
 *             utils.draw_points(((self.button.center),),size=(switch_button_size+switch_button_shadow)*ui_scale, color=self.button_shadow_color,sharpness=shadow_sharpness)
 *             utils.draw_points(((self.button.center),),size=switch_button_size*ui_scale, color=self.button_color_off)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = ((PyObject *)__pyx_v_self->button_color_off);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.size = (20.0 * __pyx_v_6pyglui_2ui_ui_scale);
    __pyx_t_9.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_5 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_1, 0, &__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L6:;

  /* "src/pyglui/ui_elements.pxi":300
 * 
 * 
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 * 
 */
  glPushMatrix();

  /* "src/pyglui/ui_elements.pxi":301
 * 
 *         gl.glPushMatrix()
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)             # <<<<<<<<<<<<<<
 * 
 *         glfont.push_state()
 */
  glTranslatef(__pyx_v_self->field->org->x, __pyx_v_self->field->org->y, 0.0);

  /* "src/pyglui/ui_elements.pxi":303
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 * 
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(self.text_color[:])
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_1, };
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":304
 * 
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color[:])             # <<<<<<<<<<<<<<
 * 
 *         glfont.draw_limited_text(x_spacer,0,self._label,self.field.size.x-(switch_button_size_on+switch_button_shadow))
 */
  __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->text_color), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(PyTuple_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_5))) __PYX_ERR(2, 304, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_5), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":306
 *         glfont.set_color_float(self.text_color[:])
 * 
 *         glfont.draw_limited_text(x_spacer,0,self._label,self.field.size.x-(switch_button_size_on+switch_button_shadow))             # <<<<<<<<<<<<<<
 * 
 *         glfont.pop_state()
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base._label;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_limited_text(__pyx_v_6pyglui_2ui_glfont, 5.0, 0.0, __pyx_t_2, (__pyx_v_self->field->size->x - 38.0), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":308
 *         glfont.draw_limited_text(x_spacer,0,self._label,self.field.size.x-(switch_button_size_on+switch_button_shadow))
 * 
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_1, };
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":309
 * 
 *         glfont.pop_state()
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 */
  glPopMatrix();

  /* "src/pyglui/ui_elements.pxi":268
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Switch.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Switch_7draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Switch_7draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 268, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 268, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 268, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 268, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 268, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 268, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 268, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Switch.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 268, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_6draw(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Switch_6draw(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Switch->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Switch.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":311
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Switch_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Switch_handle_input(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Switch_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 311, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Switch_9handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 311, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 311, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 311, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":312
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  __pyx_t_9 = (!__pyx_t_8);
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":315
 *             global should_redraw
 * 
 *             for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:
 */
    if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(2, 315, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_new_input->buttons; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 315, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 315, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/ui_elements.pxi":316
 * 
 *             for b in new_input.buttons:
 *                 if visible and self.button.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     if b[1] == 1:
 *                         self.selected = True
 */
      if (__pyx_v_visible) {
      } else {
        __pyx_t_9 = __pyx_v_visible;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_2 = ((PyObject *)__pyx_v_new_input->m);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_8 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->button->__pyx_vtab)->mouse_over(__pyx_v_self->button, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_t_8;
      __pyx_L9_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":317
 *             for b in new_input.buttons:
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 317, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 317, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 317, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_9) {

          /* "src/pyglui/ui_elements.pxi":318
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:
 *                         self.selected = True             # <<<<<<<<<<<<<<
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.on_val):
 */
          __pyx_v_self->selected = 1;

          /* "src/pyglui/ui_elements.pxi":319
 *                     if b[1] == 1:
 *                         self.selected = True
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.on_val):
 *                     self.sync_val.value = self.off_val
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":317
 *             for b in new_input.buttons:
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
        }

        /* "src/pyglui/ui_elements.pxi":316
 * 
 *             for b in new_input.buttons:
 *                 if visible and self.button.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     if b[1] == 1:
 *                         self.selected = True
 */
      }

      /* "src/pyglui/ui_elements.pxi":320
 *                         self.selected = True
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.on_val):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = self.off_val
 *                     self.selected = False
 */
      if (__pyx_v_self->selected) {
      } else {
        __pyx_t_9 = __pyx_v_self->selected;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 320, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_8) {
      } else {
        __pyx_t_9 = __pyx_t_8;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 320, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 320, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_9 = __pyx_t_8;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":321
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.on_val):
 *                     self.sync_val.value = self.off_val             # <<<<<<<<<<<<<<
 *                     self.selected = False
 *                     should_redraw = True
 */
        __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 321, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(2, 321, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyglui/ui_elements.pxi":322
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.on_val):
 *                     self.sync_val.value = self.off_val
 *                     self.selected = False             # <<<<<<<<<<<<<<
 *                     should_redraw = True
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.off_val):
 */
        __pyx_v_self->selected = 0;

        /* "src/pyglui/ui_elements.pxi":323
 *                     self.sync_val.value = self.off_val
 *                     self.selected = False
 *                     should_redraw = True             # <<<<<<<<<<<<<<
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.off_val):
 *                     self.sync_val.value = self.on_val
 */
        __pyx_v_6pyglui_2ui_should_redraw = 1;

        /* "src/pyglui/ui_elements.pxi":320
 *                         self.selected = True
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.on_val):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = self.off_val
 *                     self.selected = False
 */
      }

      /* "src/pyglui/ui_elements.pxi":324
 *                     self.selected = False
 *                     should_redraw = True
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.off_val):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = self.on_val
 *                     self.selected = False
 */
      if (__pyx_v_self->selected) {
      } else {
        __pyx_t_9 = __pyx_v_self->selected;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_8) {
      } else {
        __pyx_t_9 = __pyx_t_8;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_t_8;
      __pyx_L17_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":325
 *                     should_redraw = True
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.off_val):
 *                     self.sync_val.value = self.on_val             # <<<<<<<<<<<<<<
 *                     self.selected = False
 *                     should_redraw = True
 */
        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_2) < 0) __PYX_ERR(2, 325, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "src/pyglui/ui_elements.pxi":326
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.off_val):
 *                     self.sync_val.value = self.on_val
 *                     self.selected = False             # <<<<<<<<<<<<<<
 *                     should_redraw = True
 * 
 */
        __pyx_v_self->selected = 0;

        /* "src/pyglui/ui_elements.pxi":327
 *                     self.sync_val.value = self.on_val
 *                     self.selected = False
 *                     should_redraw = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_v_6pyglui_2ui_should_redraw = 1;

        /* "src/pyglui/ui_elements.pxi":324
 *                     self.selected = False
 *                     should_redraw = True
 *                 if self.selected and b[1] == 0 and (self.sync_val.value == self.off_val):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = self.on_val
 *                     self.selected = False
 */
      }

      /* "src/pyglui/ui_elements.pxi":315
 *             global should_redraw
 * 
 *             for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":312
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":311
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Switch.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Switch_9handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Switch_9handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 311, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 311, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 311, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 311, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 311, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 311, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 311, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 311, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Switch.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 311, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_8handle_input(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Switch_8handle_input(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Switch->__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Switch.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":237
 * 
 * cdef class Switch(UI_element):
 *     cdef public FitBox field,button             # <<<<<<<<<<<<<<
 *     cdef bint selected
 *     cdef int on_val,off_val
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_5field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_5field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_5field___get__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Switch_5field___get__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->field);
  __pyx_r = ((PyObject *)__pyx_v_self->field);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Switch_5field_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Switch_5field_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_5field_2__set__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Switch_5field_2__set__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(2, 237, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Switch.field.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Switch_5field_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Switch_5field_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_5field_4__del__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Switch_5field_4__del__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_6button_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_6button_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_6button___get__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Switch_6button___get__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->button);
  __pyx_r = ((PyObject *)__pyx_v_self->button);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Switch_6button_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Switch_6button_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_6button_2__set__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Switch_6button_2__set__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(2, 237, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button);
  __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Switch.button.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Switch_6button_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Switch_6button_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_6button_4__del__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Switch_6button_4__del__(struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button);
  __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Switch_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Switch_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_10__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Switch_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Switch.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Switch_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Switch_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Switch_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Switch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Switch_12__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Switch *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Switch_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Switch *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Switch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":351
 *     cdef object selection_getter
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, selection = [], labels=None, label=None, setter=None, getter=None, selection_getter = None):             # <<<<<<<<<<<<<<
 *         # NOTE: implementing a custom selection_getter can lead to race-conditions. Make
 *         # sure that the current set value is always contained in the returned selections
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Selector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Selector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_name = 0;
  PyObject *__pyx_v_attribute_context = 0;
  PyObject *__pyx_v_selection = 0;
  PyObject *__pyx_v_labels = 0;
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_setter = 0;
  PyObject *__pyx_v_getter = 0;
  PyObject *__pyx_v_selection_getter = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_selection,&__pyx_n_s_labels,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,&__pyx_n_s_selection_getter,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_selection,&__pyx_n_s_labels,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,&__pyx_n_s_selection_getter,0};
    #endif
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k__27;
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((PyObject *)Py_None);
    values[7] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 351, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_selection);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_labels);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_selection_getter);
          if (value) { values[7] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 351, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 351, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_selection = values[2];
    __pyx_v_labels = values[3];
    __pyx_v_label = values[4];
    __pyx_v_setter = values[5];
    __pyx_v_getter = values[6];
    __pyx_v_selection_getter = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 8, __pyx_nargs); __PYX_ERR(2, 351, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Selector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 351, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector___cinit__(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_selection, __pyx_v_labels, __pyx_v_label, __pyx_v_setter, __pyx_v_getter, __pyx_v_selection_getter);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":362
 *         self.triangle_color = RGBA(*selector_triangle_color_default)
 * 
 *         def default_selection_getter():             # <<<<<<<<<<<<<<
 *             def to_str(obj):
 *                 if isinstance(obj,basestring):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_9__cinit___1default_selection_getter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Selector_9__cinit___1default_selection_getter = {"default_selection_getter", (PyCFunction)__pyx_pw_6pyglui_2ui_8Selector_9__cinit___1default_selection_getter, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_9__cinit___1default_selection_getter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("default_selection_getter (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_9__cinit___default_selection_getter(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":363
 * 
 *         def default_selection_getter():
 *             def to_str(obj):             # <<<<<<<<<<<<<<
 *                 if isinstance(obj,basestring):
 *                     return obj
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_1to_str(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_1to_str = {"to_str", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_1to_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_1to_str(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_str (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 363, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "to_str") < 0)) __PYX_ERR(2, 363, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_str", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 363, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Selector.__cinit__.default_selection_getter.to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_to_str(__pyx_self, __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_str", 0);

  /* "src/pyglui/ui_elements.pxi":364
 *         def default_selection_getter():
 *             def to_str(obj):
 *                 if isinstance(obj,basestring):             # <<<<<<<<<<<<<<
 *                     return obj
 *                 else:
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_obj); 
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":365
 *             def to_str(obj):
 *                 if isinstance(obj,basestring):
 *                     return obj             # <<<<<<<<<<<<<<
 *                 else:
 *                     return str(obj)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_obj);
    __pyx_r = __pyx_v_obj;
    goto __pyx_L0;

    /* "src/pyglui/ui_elements.pxi":364
 *         def default_selection_getter():
 *             def to_str(obj):
 *                 if isinstance(obj,basestring):             # <<<<<<<<<<<<<<
 *                     return obj
 *                 else:
 */
  }

  /* "src/pyglui/ui_elements.pxi":367
 *                     return obj
 *                 else:
 *                     return str(obj)             # <<<<<<<<<<<<<<
 * 
 *             return selection,(labels or [to_str(s) for s in selection])
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_Str(__pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "src/pyglui/ui_elements.pxi":363
 * 
 *         def default_selection_getter():
 *             def to_str(obj):             # <<<<<<<<<<<<<<
 *                 if isinstance(obj,basestring):
 *                     return obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Selector.__cinit__.default_selection_getter.to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":362
 *         self.triangle_color = RGBA(*selector_triangle_color_default)
 * 
 *         def default_selection_getter():             # <<<<<<<<<<<<<<
 *             def to_str(obj):
 *                 if isinstance(obj,basestring):
 */

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_9__cinit___default_selection_getter(PyObject *__pyx_self) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *__pyx_cur_scope;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *__pyx_outer_scope;
  PyObject *__pyx_v_to_str = 0;
  PyObject *__pyx_8genexpr1__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("default_selection_getter", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "src/pyglui/ui_elements.pxi":363
 * 
 *         def default_selection_getter():
 *             def to_str(obj):             # <<<<<<<<<<<<<<
 *                 if isinstance(obj,basestring):
 *                     return obj
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_1to_str, 0, __pyx_n_s_cinit___locals_default_selecti, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_str = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":369
 *                     return str(obj)
 * 
 *             return selection,(labels or [to_str(s) for s in selection])             # <<<<<<<<<<<<<<
 * 
 *         self.selection_getter = selection_getter or default_selection_getter
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_selection)) { __Pyx_RaiseClosureNameError("selection"); __PYX_ERR(2, 369, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_labels)) { __Pyx_RaiseClosureNameError("labels"); __PYX_ERR(2, 369, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_labels); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 369, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_labels);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_labels;
    goto __pyx_L3_bool_binop_done;
  }
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 369, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(!__pyx_cur_scope->__pyx_v_selection)) { __Pyx_RaiseClosureNameError("selection"); __PYX_ERR(2, 369, __pyx_L7_error) }
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_selection)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_selection)) {
      __pyx_t_4 = __pyx_cur_scope->__pyx_v_selection; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_selection); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 369, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 369, __pyx_L7_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 369, __pyx_L7_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 369, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 369, __pyx_L7_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 369, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(2, 369, __pyx_L7_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_s, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __pyx_pf_6pyglui_2ui_8Selector_9__cinit___24default_selection_getter_to_str(__pyx_v_to_str, __pyx_8genexpr1__pyx_v_s); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 369, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(2, 369, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_s); __pyx_8genexpr1__pyx_v_s = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_s); __pyx_8genexpr1__pyx_v_s = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_selection);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_selection);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_selection);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":362
 *         self.triangle_color = RGBA(*selector_triangle_color_default)
 * 
 *         def default_selection_getter():             # <<<<<<<<<<<<<<
 *             def to_str(obj):
 *                 if isinstance(obj,basestring):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.Selector.__cinit__.default_selection_getter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_to_str);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":351
 *     cdef object selection_getter
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, selection = [], labels=None, label=None, setter=None, getter=None, selection_getter = None):             # <<<<<<<<<<<<<<
 *         # NOTE: implementing a custom selection_getter can lead to race-conditions. Make
 *         # sure that the current set value is always contained in the returned selections
 */

static int __pyx_pf_6pyglui_2ui_8Selector___cinit__(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_selection, PyObject *__pyx_v_labels, PyObject *__pyx_v_label, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter, PyObject *__pyx_v_selection_getter) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *__pyx_cur_scope;
  PyObject *__pyx_v_default_selection_getter = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *)__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_2___cinit__(__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(2, 351, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_selection = __pyx_v_selection;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_selection);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_selection);
  __pyx_cur_scope->__pyx_v_labels = __pyx_v_labels;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_labels);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_labels);

  /* "src/pyglui/ui_elements.pxi":356
 *         # from selection_getter.
 * 
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label or attribute_name
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":357
 * 
 *         self.uid = id(self)
 *         self._label = label or attribute_name             # <<<<<<<<<<<<<<
 * 
 *         self.text_color = RGBA(*color_text_default)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_label); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 357, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(2, 357, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_label);
    __pyx_t_1 = __pyx_v_label;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_v_attribute_name);
  __pyx_t_1 = __pyx_v_attribute_name;
  __pyx_L3_bool_binop_done:;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._label);
  __pyx_v_self->__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":359
 *         self._label = label or attribute_name
 * 
 *         self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 *         self.triangle_color = RGBA(*selector_triangle_color_default)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
  __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":360
 * 
 *         self.text_color = RGBA(*color_text_default)
 *         self.triangle_color = RGBA(*selector_triangle_color_default)             # <<<<<<<<<<<<<<
 * 
 *         def default_selection_getter():
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->triangle_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->triangle_color);
  __pyx_v_self->triangle_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":362
 *         self.triangle_color = RGBA(*selector_triangle_color_default)
 * 
 *         def default_selection_getter():             # <<<<<<<<<<<<<<
 *             def to_str(obj):
 *                 if isinstance(obj,basestring):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Selector_9__cinit___1default_selection_getter, 0, __pyx_n_s_cinit___locals_default_selecti_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_default_selection_getter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":371
 *             return selection,(labels or [to_str(s) for s in selection])
 * 
 *         self.selection_getter = selection_getter or default_selection_getter             # <<<<<<<<<<<<<<
 * 
 *         self.selection,self.selection_labels = self.selection_getter()
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_selection_getter); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 371, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_selection_getter);
    __pyx_t_1 = __pyx_v_selection_getter;
    goto __pyx_L5_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_v_default_selection_getter);
  __pyx_t_1 = __pyx_v_default_selection_getter;
  __pyx_L5_bool_binop_done:;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->selection_getter);
  __Pyx_DECREF(__pyx_v_self->selection_getter);
  __pyx_v_self->selection_getter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":373
 *         self.selection_getter = selection_getter or default_selection_getter
 * 
 *         self.selection,self.selection_labels = self.selection_getter()             # <<<<<<<<<<<<<<
 * 
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter,self._on_change)
 */
  __Pyx_INCREF(__pyx_v_self->selection_getter);
  __pyx_t_3 = __pyx_v_self->selection_getter; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_4, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 373, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(2, 373, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L8_unpacking_done;
    __pyx_L7_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 373, __pyx_L1_error)
    __pyx_L8_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->selection);
  __Pyx_DECREF(__pyx_v_self->selection);
  __pyx_v_self->selection = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->selection_labels);
  __Pyx_DECREF(__pyx_v_self->selection_labels);
  __pyx_v_self->selection_labels = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":375
 *         self.selection,self.selection_labels = self.selection_getter()
 * 
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter,self._on_change)             # <<<<<<<<<<<<<<
 * 
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,selector_outline_size_y)) # we only fix the height
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_change); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_attribute_name);
  __Pyx_GIVEREF(__pyx_v_attribute_name);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_attribute_name);
  __Pyx_INCREF(__pyx_v_attribute_context);
  __Pyx_GIVEREF(__pyx_v_attribute_context);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_attribute_context);
  __Pyx_INCREF(__pyx_v_getter);
  __Pyx_GIVEREF(__pyx_v_getter);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_getter);
  __Pyx_INCREF(__pyx_v_setter);
  __Pyx_GIVEREF(__pyx_v_setter);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_setter);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Synced_Value), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->sync_val);
  __Pyx_DECREF((PyObject *)__pyx_v_self->sync_val);
  __pyx_v_self->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":377
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter,self._on_change)
 * 
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,selector_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.select_field = FitBox(Vec2(x_spacer,0),Vec2(0,0))
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":378
 * 
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,selector_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))             # <<<<<<<<<<<<<<
 *         self.select_field = FitBox(Vec2(x_spacer,0),Vec2(0,0))
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":379
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,selector_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.select_field = FitBox(Vec2(x_spacer,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,*args,**kwargs):
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->select_field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->select_field);
  __pyx_v_self->select_field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":351
 *     cdef object selection_getter
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, selection = [], labels=None, label=None, setter=None, getter=None, selection_getter = None):             # <<<<<<<<<<<<<<
 *         # NOTE: implementing a custom selection_getter can lead to race-conditions. Make
 *         # sure that the current set value is always contained in the returned selections
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Selector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_default_selection_getter);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":381
 *         self.select_field = FitBox(Vec2(x_spacer,0),Vec2(0,0))
 * 
 *     def __init__(self,*args,**kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Selector_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Selector_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_2__init__(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Selector_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":384
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Selector_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Selector_sync(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Selector_5sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 384, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":385
 * 
 *     cpdef sync(self):
 *         self.sync_val.sync()             # <<<<<<<<<<<<<<
 * 
 *     def _on_change(self,new_value):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->sync_val->__pyx_vtab)->sync(__pyx_v_self->sync_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":384
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Selector.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Selector_5sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_5sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_4sync(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_4sync(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_8Selector_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Selector.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":387
 *         self.sync_val.sync()
 * 
 *     def _on_change(self,new_value):             # <<<<<<<<<<<<<<
 *         self.selection,self.selection_labels = self.selection_getter()
 *         try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_7_on_change(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Selector_7_on_change = {"_on_change", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_7_on_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_7_on_change(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_new_value = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_on_change (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_value,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_value,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_value)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 387, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_on_change") < 0)) __PYX_ERR(2, 387, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_new_value = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_on_change", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 387, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Selector._on_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_6_on_change(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self), __pyx_v_new_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_6_on_change(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, PyObject *__pyx_v_new_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_on_change", 0);

  /* "src/pyglui/ui_elements.pxi":388
 * 
 *     def _on_change(self,new_value):
 *         self.selection,self.selection_labels = self.selection_getter()             # <<<<<<<<<<<<<<
 *         try:
 *             self.selection_idx = list(self.selection).index(new_value)
 */
  __Pyx_INCREF(__pyx_v_self->selection_getter);
  __pyx_t_2 = __pyx_v_self->selection_getter; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 388, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(2, 388, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 388, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->selection);
  __Pyx_DECREF(__pyx_v_self->selection);
  __pyx_v_self->selection = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->selection_labels);
  __Pyx_DECREF(__pyx_v_self->selection_labels);
  __pyx_v_self->selection_labels = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":389
 *     def _on_change(self,new_value):
 *         self.selection,self.selection_labels = self.selection_getter()
 *         try:             # <<<<<<<<<<<<<<
 *             self.selection_idx = list(self.selection).index(new_value)
 *         except ValueError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "src/pyglui/ui_elements.pxi":390
 *         self.selection,self.selection_labels = self.selection_getter()
 *         try:
 *             self.selection_idx = list(self.selection).index(new_value)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             ##we could throw and error here or ignore
 */
      __pyx_t_3 = PySequence_List(__pyx_v_self->selection); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 390, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 390, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_new_value};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 390, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 390, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_self->selection_idx = __pyx_t_4;

      /* "src/pyglui/ui_elements.pxi":389
 *     def _on_change(self,new_value):
 *         self.selection,self.selection_labels = self.selection_getter()
 *         try:             # <<<<<<<<<<<<<<
 *             self.selection_idx = list(self.selection).index(new_value)
 *         except ValueError:
 */
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":391
 *         try:
 *             self.selection_idx = list(self.selection).index(new_value)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             ##we could throw and error here or ignore
 *             ##but for now we just add the new object to the selection
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_4) {
      __Pyx_AddTraceback("pyglui.ui.Selector._on_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(2, 391, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);

      /* "src/pyglui/ui_elements.pxi":396
 *             #self.selection.append(new_value)
 *             #self.selection_labels.append(str(new_value))
 *             raise ValueError("Synced value '%s' is not part of selection."%str(new_value))             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_Str(__pyx_v_new_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 396, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Synced_value_s_is_not_part_of_se, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 396, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 396, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(2, 396, __pyx_L7_except_error)
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "src/pyglui/ui_elements.pxi":389
 *     def _on_change(self,new_value):
 *         self.selection,self.selection_labels = self.selection_getter()
 *         try:             # <<<<<<<<<<<<<<
 *             self.selection_idx = list(self.selection).index(new_value)
 *         except ValueError:
 */
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L10_try_end:;
  }

  /* "src/pyglui/ui_elements.pxi":387
 *         self.sync_val.sync()
 * 
 *     def _on_change(self,new_value):             # <<<<<<<<<<<<<<
 *         self.selection,self.selection_labels = self.selection_getter()
 *         try:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyglui.ui.Selector._on_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":399
 * 
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         #update appearance
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Selector_9draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Selector_draw(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Selector_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  float __pyx_v_label_text_space;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  float __pyx_t_9;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_10 = NULL;
  double __pyx_t_11;
  double __pyx_t_12;
  double __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Selector_9draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 399, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":402
 * 
 *         #update appearance
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.field.compute(self.outline)
 *         self.select_field.compute(self.field)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":403
 *         #update appearance
 *         self.outline.compute(parent)
 *         self.field.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.select_field.compute(self.field)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->field->__pyx_vtab)->compute(__pyx_v_self->field, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":404
 *         self.outline.compute(parent)
 *         self.field.compute(self.outline)
 *         self.select_field.compute(self.field)             # <<<<<<<<<<<<<<
 * 
 *         # read only rendering rules
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->field);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->select_field->__pyx_vtab)->compute(__pyx_v_self->select_field, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":407
 * 
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.triangle_color = RGBA(*selector_triangle_color_read_only)
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":408
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:
 *             self.text_color = RGBA(*color_text_read_only)             # <<<<<<<<<<<<<<
 *             self.triangle_color = RGBA(*selector_triangle_color_read_only)
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":409
 *         if self._read_only or parent_read_only:
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.triangle_color = RGBA(*selector_triangle_color_read_only)             # <<<<<<<<<<<<<<
 *         else:
 *             self.text_color = RGBA(*color_text_default)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->triangle_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->triangle_color);
    __pyx_v_self->triangle_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":407
 * 
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.triangle_color = RGBA(*selector_triangle_color_read_only)
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":411
 *             self.triangle_color = RGBA(*selector_triangle_color_read_only)
 *         else:
 *             self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 *             if self.selected:
 *                 self.triangle_color = RGBA(*color_on)
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":412
 *         else:
 *             self.text_color = RGBA(*color_text_default)
 *             if self.selected:             # <<<<<<<<<<<<<<
 *                 self.triangle_color = RGBA(*color_on)
 *             else:
 */
    if (__pyx_v_self->selected) {

      /* "src/pyglui/ui_elements.pxi":413
 *             self.text_color = RGBA(*color_text_default)
 *             if self.selected:
 *                 self.triangle_color = RGBA(*color_on)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.triangle_color = RGBA(*selector_triangle_color_default)
 */
      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->triangle_color);
      __Pyx_DECREF((PyObject *)__pyx_v_self->triangle_color);
      __pyx_v_self->triangle_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":412
 *         else:
 *             self.text_color = RGBA(*color_text_default)
 *             if self.selected:             # <<<<<<<<<<<<<<
 *                 self.triangle_color = RGBA(*color_on)
 *             else:
 */
      goto __pyx_L6;
    }

    /* "src/pyglui/ui_elements.pxi":415
 *                 self.triangle_color = RGBA(*color_on)
 *             else:
 *                 self.triangle_color = RGBA(*selector_triangle_color_default)             # <<<<<<<<<<<<<<
 * 
 *         gl.glPushMatrix()
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->triangle_color);
      __Pyx_DECREF((PyObject *)__pyx_v_self->triangle_color);
      __pyx_v_self->triangle_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L6:;
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":417
 *                 self.triangle_color = RGBA(*selector_triangle_color_default)
 * 
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 *         glfont.push_state()
 */
  glPushMatrix();

  /* "src/pyglui/ui_elements.pxi":418
 * 
 *         gl.glPushMatrix()
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color[:])
 */
  glTranslatef(__pyx_v_self->field->org->x, __pyx_v_self->field->org->y, 0.0);

  /* "src/pyglui/ui_elements.pxi":419
 *         gl.glPushMatrix()
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(self.text_color[:])
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":420
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color[:])             # <<<<<<<<<<<<<<
 * 
 *         cdef float label_text_space = glfont.draw_text(x_spacer,0,self._label)
 */
  __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->text_color), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 420, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":422
 *         glfont.set_color_float(self.text_color[:])
 * 
 *         cdef float label_text_space = glfont.draw_text(x_spacer,0,self._label)             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 *         gl.glPopMatrix()
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base._label;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, 5.0, 0.0, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_label_text_space = __pyx_t_9;

  /* "src/pyglui/ui_elements.pxi":423
 * 
 *         cdef float label_text_space = glfont.draw_text(x_spacer,0,self._label)
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":424
 *         cdef float label_text_space = glfont.draw_text(x_spacer,0,self._label)
 *         glfont.pop_state()
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 *         self.select_field.org.x += label_text_space + x_spacer * ui_scale
 */
  glPopMatrix();

  /* "src/pyglui/ui_elements.pxi":426
 *         gl.glPopMatrix()
 * 
 *         self.select_field.org.x += label_text_space + x_spacer * ui_scale             # <<<<<<<<<<<<<<
 *         self.select_field.size.x  = max(0.0,self.select_field.size.x-label_text_space - x_spacer * ui_scale)
 *         rect_outline(self.select_field.org, self.select_field.size, 2.*ui_scale, self.triangle_color)
 */
  __Pyx_INCREF((PyObject *)__pyx_v_self->select_field->org);
  __pyx_t_10 = __pyx_v_self->select_field->org;
  __pyx_t_10->x = (__pyx_t_10->x + (__pyx_v_label_text_space + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)));
  __Pyx_DECREF((PyObject *)__pyx_t_10); __pyx_t_10 = 0;

  /* "src/pyglui/ui_elements.pxi":427
 * 
 *         self.select_field.org.x += label_text_space + x_spacer * ui_scale
 *         self.select_field.size.x  = max(0.0,self.select_field.size.x-label_text_space - x_spacer * ui_scale)             # <<<<<<<<<<<<<<
 *         rect_outline(self.select_field.org, self.select_field.size, 2.*ui_scale, self.triangle_color)
 *         #self.select_field.sketch()
 */
  __pyx_t_11 = ((__pyx_v_self->select_field->size->x - __pyx_v_label_text_space) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale));
  __pyx_t_12 = 0.0;
  if ((__pyx_t_11 > __pyx_t_12)) {
    __pyx_t_13 = __pyx_t_11;
  } else {
    __pyx_t_13 = __pyx_t_12;
  }
  __pyx_v_self->select_field->size->x = __pyx_t_13;

  /* "src/pyglui/ui_elements.pxi":428
 *         self.select_field.org.x += label_text_space + x_spacer * ui_scale
 *         self.select_field.size.x  = max(0.0,self.select_field.size.x-label_text_space - x_spacer * ui_scale)
 *         rect_outline(self.select_field.org, self.select_field.size, 2.*ui_scale, self.triangle_color)             # <<<<<<<<<<<<<<
 *         #self.select_field.sketch()
 *         # line(self.select_field.org+Vec2(0,self.select_field.size.y),self.select_field.org+self.select_field.size,color=self.triangle_color)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->select_field->org);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_v_self->select_field->size);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = ((PyObject *)__pyx_v_self->triangle_color);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = __pyx_f_6pyglui_2ui_rect_outline(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), (2. * __pyx_v_6pyglui_2ui_ui_scale), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":433
 * 
 * 
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glTranslatef(self.select_field.org.x,self.select_field.org.y,0)
 * 
 */
  glPushMatrix();

  /* "src/pyglui/ui_elements.pxi":434
 * 
 *         gl.glPushMatrix()
 *         gl.glTranslatef(self.select_field.org.x,self.select_field.org.y,0)             # <<<<<<<<<<<<<<
 * 
 *         glfont.push_state()
 */
  glTranslatef(__pyx_v_self->select_field->org->x, __pyx_v_self->select_field->org->y, 0.0);

  /* "src/pyglui/ui_elements.pxi":436
 *         gl.glTranslatef(self.select_field.org.x,self.select_field.org.y,0)
 * 
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(self.text_color[:])
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":437
 * 
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color[:])             # <<<<<<<<<<<<<<
 * 
 *         if self.selected:
 */
  __pyx_t_4 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->text_color), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_4))) __PYX_ERR(2, 437, __pyx_L1_error)
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":439
 *         glfont.set_color_float(self.text_color[:])
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             for y in range(len(self.selection)):
 *                 glfont.draw_limited_text(x_spacer,y*line_height*ui_scale,self.selection_labels[y],self.select_field.size.x-x_spacer)
 */
  if (__pyx_v_self->selected) {

    /* "src/pyglui/ui_elements.pxi":440
 * 
 *         if self.selected:
 *             for y in range(len(self.selection)):             # <<<<<<<<<<<<<<
 *                 glfont.draw_limited_text(x_spacer,y*line_height*ui_scale,self.selection_labels[y],self.select_field.size.x-x_spacer)
 *         else:
 */
    __pyx_t_5 = __pyx_v_self->selection;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_14 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(2, 440, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 440, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(2, 440, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(2, 440, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_15(__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(2, 440, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "src/pyglui/ui_elements.pxi":441
 *         if self.selected:
 *             for y in range(len(self.selection)):
 *                 glfont.draw_limited_text(x_spacer,y*line_height*ui_scale,self.selection_labels[y],self.select_field.size.x-x_spacer)             # <<<<<<<<<<<<<<
 *         else:
 *             glfont.draw_limited_text(x_spacer,0,self.selection_labels[self.selection_idx],self.select_field.size.x-x_spacer-self.select_field.size.y)
 */
      __pyx_t_4 = PyNumber_Multiply(__pyx_v_y, __pyx_float_20_0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyNumber_Multiply(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 441, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->selection_labels, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_limited_text(__pyx_v_6pyglui_2ui_glfont, 5.0, __pyx_t_9, __pyx_t_1, (__pyx_v_self->select_field->size->x - 5.0), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/ui_elements.pxi":440
 * 
 *         if self.selected:
 *             for y in range(len(self.selection)):             # <<<<<<<<<<<<<<
 *                 glfont.draw_limited_text(x_spacer,y*line_height*ui_scale,self.selection_labels[y],self.select_field.size.x-x_spacer)
 *         else:
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":439
 *         glfont.set_color_float(self.text_color[:])
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             for y in range(len(self.selection)):
 *                 glfont.draw_limited_text(x_spacer,y*line_height*ui_scale,self.selection_labels[y],self.select_field.size.x-x_spacer)
 */
    goto __pyx_L7;
  }

  /* "src/pyglui/ui_elements.pxi":443
 *                 glfont.draw_limited_text(x_spacer,y*line_height*ui_scale,self.selection_labels[y],self.select_field.size.x-x_spacer)
 *         else:
 *             glfont.draw_limited_text(x_spacer,0,self.selection_labels[self.selection_idx],self.select_field.size.x-x_spacer-self.select_field.size.y)             # <<<<<<<<<<<<<<
 *             triangle_h(self.select_field.size-Vec2(self.select_field.size.y,self.select_field.size.y),
 *                     Vec2(self.select_field.size.y,self.select_field.size.y),
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->selection_labels, __pyx_v_self->selection_idx, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_limited_text(__pyx_v_6pyglui_2ui_glfont, 5.0, 0.0, __pyx_t_5, ((__pyx_v_self->select_field->size->x - 5.0) - __pyx_v_self->select_field->size->y), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":444
 *         else:
 *             glfont.draw_limited_text(x_spacer,0,self.selection_labels[self.selection_idx],self.select_field.size.x-x_spacer-self.select_field.size.y)
 *             triangle_h(self.select_field.size-Vec2(self.select_field.size.y,self.select_field.size.y),             # <<<<<<<<<<<<<<
 *                     Vec2(self.select_field.size.y,self.select_field.size.y),
 *                     self.triangle_color)
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->select_field->size->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->select_field->size->y); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
    __pyx_t_2 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_self->select_field->size), __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(2, 444, __pyx_L1_error)

    /* "src/pyglui/ui_elements.pxi":445
 *             glfont.draw_limited_text(x_spacer,0,self.selection_labels[self.selection_idx],self.select_field.size.x-x_spacer-self.select_field.size.y)
 *             triangle_h(self.select_field.size-Vec2(self.select_field.size.y,self.select_field.size.y),
 *                     Vec2(self.select_field.size.y,self.select_field.size.y),             # <<<<<<<<<<<<<<
 *                     self.triangle_color)
 *         glfont.pop_state()
 */
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->select_field->size->y); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->select_field->size->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/pyglui/ui_elements.pxi":446
 *             triangle_h(self.select_field.size-Vec2(self.select_field.size.y,self.select_field.size.y),
 *                     Vec2(self.select_field.size.y,self.select_field.size.y),
 *                     self.triangle_color)             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 *         gl.glPopMatrix()
 */
    __pyx_t_4 = ((PyObject *)__pyx_v_self->triangle_color);
    __Pyx_INCREF(__pyx_t_4);

    /* "src/pyglui/ui_elements.pxi":444
 *         else:
 *             glfont.draw_limited_text(x_spacer,0,self.selection_labels[self.selection_idx],self.select_field.size.x-x_spacer-self.select_field.size.y)
 *             triangle_h(self.select_field.size-Vec2(self.select_field.size.y,self.select_field.size.y),             # <<<<<<<<<<<<<<
 *                     Vec2(self.select_field.size.y,self.select_field.size.y),
 *                     self.triangle_color)
 */
    __pyx_t_5 = __pyx_f_6pyglui_2ui_triangle_h(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L7:;

  /* "src/pyglui/ui_elements.pxi":447
 *                     Vec2(self.select_field.size.y,self.select_field.size.y),
 *                     self.triangle_color)
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":448
 *                     self.triangle_color)
 *         glfont.pop_state()
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 */
  glPopMatrix();

  /* "src/pyglui/ui_elements.pxi":399
 * 
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         #update appearance
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF((PyObject *)__pyx_t_10);
  __Pyx_AddTraceback("pyglui.ui.Selector.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_9draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Selector_9draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_9draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_9draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 399, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 399, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 399, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 399, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 399, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 399, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 399, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Selector.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 399, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_8draw(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_8draw(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Selector->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Selector.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":450
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Selector_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Selector_handle_input(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Selector_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Selector_11handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 450, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 450, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 450, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":451
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  __pyx_t_9 = (!__pyx_t_8);
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":454
 *             global should_redraw
 * 
 *             for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *                 if visible and self.select_field.mouse_over(new_input.m):
 *                     if b[1] == 0:
 */
    if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(2, 454, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_new_input->buttons; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 454, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 454, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/ui_elements.pxi":455
 * 
 *             for b in new_input.buttons:
 *                 if visible and self.select_field.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     if b[1] == 0:
 *                         should_redraw = True
 */
      if (__pyx_v_visible) {
      } else {
        __pyx_t_9 = __pyx_v_visible;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_2 = ((PyObject *)__pyx_v_new_input->m);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_8 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->select_field->__pyx_vtab)->mouse_over(__pyx_v_self->select_field, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_t_8;
      __pyx_L9_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":456
 *             for b in new_input.buttons:
 *                 if visible and self.select_field.mouse_over(new_input.m):
 *                     if b[1] == 0:             # <<<<<<<<<<<<<<
 *                         should_redraw = True
 *                         if not self.selected:
 */
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 456, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_9) {

          /* "src/pyglui/ui_elements.pxi":457
 *                 if visible and self.select_field.mouse_over(new_input.m):
 *                     if b[1] == 0:
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 *                         if not self.selected:
 *                             self.init_selection()
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":458
 *                     if b[1] == 0:
 *                         should_redraw = True
 *                         if not self.selected:             # <<<<<<<<<<<<<<
 *                             self.init_selection()
 *                         else:
 */
          __pyx_t_9 = (!__pyx_v_self->selected);
          if (__pyx_t_9) {

            /* "src/pyglui/ui_elements.pxi":459
 *                         should_redraw = True
 *                         if not self.selected:
 *                             self.init_selection()             # <<<<<<<<<<<<<<
 *                         else:
 *                             self.finish_selection(mouse_y = new_input.m.y-self.select_field.org.y)
 */
            __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_Selector *)__pyx_v_self->__pyx_base.__pyx_vtab)->init_selection(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 459, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "src/pyglui/ui_elements.pxi":458
 *                     if b[1] == 0:
 *                         should_redraw = True
 *                         if not self.selected:             # <<<<<<<<<<<<<<
 *                             self.init_selection()
 *                         else:
 */
            goto __pyx_L12;
          }

          /* "src/pyglui/ui_elements.pxi":461
 *                             self.init_selection()
 *                         else:
 *                             self.finish_selection(mouse_y = new_input.m.y-self.select_field.org.y)             # <<<<<<<<<<<<<<
 * 
 *     cdef init_selection(self):
 */
          /*else*/ {
            __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_Selector *)__pyx_v_self->__pyx_base.__pyx_vtab)->finish_selection(__pyx_v_self, (__pyx_v_new_input->m->y - __pyx_v_self->select_field->org->y)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 461, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __pyx_L12:;

          /* "src/pyglui/ui_elements.pxi":456
 *             for b in new_input.buttons:
 *                 if visible and self.select_field.mouse_over(new_input.m):
 *                     if b[1] == 0:             # <<<<<<<<<<<<<<
 *                         should_redraw = True
 *                         if not self.selected:
 */
        }

        /* "src/pyglui/ui_elements.pxi":455
 * 
 *             for b in new_input.buttons:
 *                 if visible and self.select_field.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     if b[1] == 0:
 *                         should_redraw = True
 */
      }

      /* "src/pyglui/ui_elements.pxi":454
 *             global should_redraw
 * 
 *             for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *                 if visible and self.select_field.mouse_over(new_input.m):
 *                     if b[1] == 0:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":451
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":450
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Selector.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Selector_11handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_11handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 450, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 450, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 450, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 450, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 450, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 450, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 450, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 450, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Selector.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 450, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_10handle_input(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_10handle_input(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Selector->__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Selector.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":463
 *                             self.finish_selection(mouse_y = new_input.m.y-self.select_field.org.y)
 * 
 *     cdef init_selection(self):             # <<<<<<<<<<<<<<
 *         self.selected = True
 *         self.selection,self.selection_labels = self.selection_getter()
 */

static PyObject *__pyx_f_6pyglui_2ui_8Selector_init_selection(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self) {
  PyObject *__pyx_v_h = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  float __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_selection", 0);

  /* "src/pyglui/ui_elements.pxi":464
 * 
 *     cdef init_selection(self):
 *         self.selected = True             # <<<<<<<<<<<<<<
 *         self.selection,self.selection_labels = self.selection_getter()
 *         #blow up the menu to fit the open selector field
 */
  __pyx_v_self->selected = 1;

  /* "src/pyglui/ui_elements.pxi":465
 *     cdef init_selection(self):
 *         self.selected = True
 *         self.selection,self.selection_labels = self.selection_getter()             # <<<<<<<<<<<<<<
 *         #blow up the menu to fit the open selector field
 *         cdef h = line_height * len(self.selection_labels)
 */
  __Pyx_INCREF(__pyx_v_self->selection_getter);
  __pyx_t_2 = __pyx_v_self->selection_getter; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 465, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(2, 465, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 465, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->selection);
  __Pyx_DECREF(__pyx_v_self->selection);
  __pyx_v_self->selection = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->selection_labels);
  __Pyx_DECREF(__pyx_v_self->selection_labels);
  __pyx_v_self->selection_labels = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":467
 *         self.selection,self.selection_labels = self.selection_getter()
 *         #blow up the menu to fit the open selector field
 *         cdef h = line_height * len(self.selection_labels)             # <<<<<<<<<<<<<<
 *         h+= self.field.design_org.y - self.field.design_size.y #double neg
 *         h+= self.select_field.design_org.y - self.select_field.design_size.y
 */
  __pyx_t_1 = __pyx_v_self->selection_labels;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(2, 467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble((20.0 * __pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_h = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":468
 *         #blow up the menu to fit the open selector field
 *         cdef h = line_height * len(self.selection_labels)
 *         h+= self.field.design_org.y - self.field.design_size.y #double neg             # <<<<<<<<<<<<<<
 *         h+= self.select_field.design_org.y - self.select_field.design_size.y
 *          #double neg
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->field->design_org->y - __pyx_v_self->field->design_size->y)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_h, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_h, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":469
 *         cdef h = line_height * len(self.selection_labels)
 *         h+= self.field.design_org.y - self.field.design_size.y #double neg
 *         h+= self.select_field.design_org.y - self.select_field.design_size.y             # <<<<<<<<<<<<<<
 *          #double neg
 *         self.outline.design_size.y = h
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->select_field->design_org->y - __pyx_v_self->select_field->design_size->y)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_h, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_h, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":471
 *         h+= self.select_field.design_org.y - self.select_field.design_size.y
 *          #double neg
 *         self.outline.design_size.y = h             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_v_h); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 471, __pyx_L1_error)
  __pyx_v_self->__pyx_base.outline->design_size->y = __pyx_t_8;

  /* "src/pyglui/ui_elements.pxi":463
 *                             self.finish_selection(mouse_y = new_input.m.y-self.select_field.org.y)
 * 
 *     cdef init_selection(self):             # <<<<<<<<<<<<<<
 *         self.selected = True
 *         self.selection,self.selection_labels = self.selection_getter()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Selector.init_selection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":474
 * 
 * 
 *     cdef finish_selection(self,float mouse_y):             # <<<<<<<<<<<<<<
 *         clicked_idx = int(mouse_y/(self.select_field.size.y/float(len(self.selection))) )
 *         #just for sanity
 */

static PyObject *__pyx_f_6pyglui_2ui_8Selector_finish_selection(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, float __pyx_v_mouse_y) {
  PyObject *__pyx_v_clicked_idx = NULL;
  PyObject *__pyx_v_h = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  double __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  float __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("finish_selection", 0);

  /* "src/pyglui/ui_elements.pxi":475
 * 
 *     cdef finish_selection(self,float mouse_y):
 *         clicked_idx = int(mouse_y/(self.select_field.size.y/float(len(self.selection))) )             # <<<<<<<<<<<<<<
 *         #just for sanity
 *         clicked_idx = int(clamp(clicked_idx,0,len(self.selection)-1))
 */
  __pyx_t_1 = __pyx_v_self->selection;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(((double)__pyx_t_2) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(2, 475, __pyx_L1_error)
  }
  __pyx_t_3 = (((double)__pyx_v_self->select_field->size->y) / ((double)__pyx_t_2));
  if (unlikely(__pyx_t_3 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(2, 475, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyInt_FromDouble((((double)__pyx_v_mouse_y) / __pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_clicked_idx = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":477
 *         clicked_idx = int(mouse_y/(self.select_field.size.y/float(len(self.selection))) )
 *         #just for sanity
 *         clicked_idx = int(clamp(clicked_idx,0,len(self.selection)-1))             # <<<<<<<<<<<<<<
 * 
 *         self.sync_val.value = self.selection[clicked_idx]
 */
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_clicked_idx); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 477, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_self->selection;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_FromDouble(__pyx_f_6pyglui_2ui_clamp(__pyx_t_3, 0.0, (__pyx_t_2 - 1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_clicked_idx, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":479
 *         clicked_idx = int(clamp(clicked_idx,0,len(self.selection)-1))
 * 
 *         self.sync_val.value = self.selection[clicked_idx]             # <<<<<<<<<<<<<<
 * 
 *         # Sync value. Will update self.selection_idx if the value actually changed.
 */
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->selection, __pyx_v_clicked_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(2, 479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":482
 * 
 *         # Sync value. Will update self.selection_idx if the value actually changed.
 *         self.sync_val.sync()             # <<<<<<<<<<<<<<
 * 
 *         #make the outline small again
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->sync_val->__pyx_vtab)->sync(__pyx_v_self->sync_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":485
 * 
 *         #make the outline small again
 *         cdef h = line_height             # <<<<<<<<<<<<<<
 *         h+= self.field.design_org.y - self.field.design_size.y #double neg
 *         h+= self.select_field.design_org.y - self.select_field.design_size.y #double neg
 */
  __Pyx_INCREF(__pyx_float_20_0);
  __pyx_v_h = __pyx_float_20_0;

  /* "src/pyglui/ui_elements.pxi":486
 *         #make the outline small again
 *         cdef h = line_height
 *         h+= self.field.design_org.y - self.field.design_size.y #double neg             # <<<<<<<<<<<<<<
 *         h+= self.select_field.design_org.y - self.select_field.design_size.y #double neg
 *         self.outline.design_size.y = h
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->field->design_org->y - __pyx_v_self->field->design_size->y)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_h, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_h, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":487
 *         cdef h = line_height
 *         h+= self.field.design_org.y - self.field.design_size.y #double neg
 *         h+= self.select_field.design_org.y - self.select_field.design_size.y #double neg             # <<<<<<<<<<<<<<
 *         self.outline.design_size.y = h
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_self->select_field->design_org->y - __pyx_v_self->select_field->design_size->y)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_h, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_h, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":488
 *         h+= self.field.design_org.y - self.field.design_size.y #double neg
 *         h+= self.select_field.design_org.y - self.select_field.design_size.y #double neg
 *         self.outline.design_size.y = h             # <<<<<<<<<<<<<<
 * 
 *         self.selected = False
 */
  __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_h); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 488, __pyx_L1_error)
  __pyx_v_self->__pyx_base.outline->design_size->y = __pyx_t_5;

  /* "src/pyglui/ui_elements.pxi":490
 *         self.outline.design_size.y = h
 * 
 *         self.selected = False             # <<<<<<<<<<<<<<
 * 
 * ########## TextInput ##########
 */
  __pyx_v_self->selected = 0;

  /* "src/pyglui/ui_elements.pxi":474
 * 
 * 
 *     cdef finish_selection(self,float mouse_y):             # <<<<<<<<<<<<<<
 *         clicked_idx = int(mouse_y/(self.select_field.size.y/float(len(self.selection))) )
 *         #just for sanity
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Selector.finish_selection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_clicked_idx);
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":342
 * 
 * cdef class Selector(UI_element):
 *     cdef public FitBox field             # <<<<<<<<<<<<<<
 *     cdef FitBox select_field
 *     cdef object selection, selection_labels
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_5field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_5field_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_5field___get__(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_5field___get__(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->field);
  __pyx_r = ((PyObject *)__pyx_v_self->field);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Selector_5field_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Selector_5field_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_5field_2__set__(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Selector_5field_2__set__(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(2, 342, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Selector.field.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Selector_5field_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Selector_5field_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_5field_4__del__(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Selector_5field_4__del__(struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Selector_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_12__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Selector.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Selector_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Selector_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Selector.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Selector_14__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Selector *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Selector_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Selector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Selector.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":511
 *     cdef double t_long_press, t_double_click
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None,label = None,setter= None,getter= None):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_10Text_Input_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_10Text_Input_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_name = 0;
  PyObject *__pyx_v_attribute_context = 0;
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_setter = 0;
  PyObject *__pyx_v_getter = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #endif
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 511, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 511, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 511, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 511, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 511, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 511, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_label = values[2];
    __pyx_v_setter = values[3];
    __pyx_v_getter = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, __pyx_nargs); __PYX_ERR(2, 511, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Text_Input.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 511, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input___cinit__(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_label, __pyx_v_setter, __pyx_v_getter);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_10Text_Input___cinit__(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_label, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":512
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None,label = None,setter= None,getter= None):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":513
 *     def __cinit__(self,str attribute_name, object attribute_context = None,label = None,setter= None,getter= None):
 *         self.uid = id(self)
 *         self._label = label or attribute_name             # <<<<<<<<<<<<<<
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,text_input_outline_size_y)) # we only fix the height
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_label); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 513, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(2, 513, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_label);
    __pyx_t_1 = __pyx_v_label;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_v_attribute_name);
  __pyx_t_1 = __pyx_v_attribute_name;
  __pyx_L3_bool_binop_done:;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._label);
  __pyx_v_self->__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":514
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,text_input_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_attribute_name);
  __Pyx_GIVEREF(__pyx_v_attribute_name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attribute_name);
  __Pyx_INCREF(__pyx_v_attribute_context);
  __Pyx_GIVEREF(__pyx_v_attribute_context);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attribute_context);
  __Pyx_INCREF(__pyx_v_getter);
  __Pyx_GIVEREF(__pyx_v_getter);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_getter);
  __Pyx_INCREF(__pyx_v_setter);
  __Pyx_GIVEREF(__pyx_v_setter);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_setter);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Synced_Value), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->sync_val);
  __Pyx_DECREF((PyObject *)__pyx_v_self->sync_val);
  __pyx_v_self->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":515
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,text_input_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.textfield = FitBox(Vec2(x_spacer,0),Vec2(0,0))
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":516
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,text_input_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))             # <<<<<<<<<<<<<<
 *         self.textfield = FitBox(Vec2(x_spacer,0),Vec2(0,0))
 *         self.selected = False
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":517
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,text_input_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.textfield = FitBox(Vec2(x_spacer,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         self.highlight = False
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->textfield);
  __Pyx_DECREF((PyObject *)__pyx_v_self->textfield);
  __pyx_v_self->textfield = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":518
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.textfield = FitBox(Vec2(x_spacer,0),Vec2(0,0))
 *         self.selected = False             # <<<<<<<<<<<<<<
 *         self.highlight = False
 *         self.preview = u'' #only used when self.selected==True
 */
  __pyx_v_self->selected = 0;

  /* "src/pyglui/ui_elements.pxi":519
 *         self.textfield = FitBox(Vec2(x_spacer,0),Vec2(0,0))
 *         self.selected = False
 *         self.highlight = False             # <<<<<<<<<<<<<<
 *         self.preview = u'' #only used when self.selected==True
 *         self.caret = 0 #only used when self.selected==True
 */
  __pyx_v_self->highlight = 0;

  /* "src/pyglui/ui_elements.pxi":520
 *         self.selected = False
 *         self.highlight = False
 *         self.preview = u'' #only used when self.selected==True             # <<<<<<<<<<<<<<
 *         self.caret = 0 #only used when self.selected==True
 *         self.start_char_idx = 0
 */
  __Pyx_INCREF(__pyx_kp_u__34);
  __Pyx_GIVEREF(__pyx_kp_u__34);
  __Pyx_GOTREF(__pyx_v_self->preview);
  __Pyx_DECREF(__pyx_v_self->preview);
  __pyx_v_self->preview = __pyx_kp_u__34;

  /* "src/pyglui/ui_elements.pxi":521
 *         self.highlight = False
 *         self.preview = u'' #only used when self.selected==True
 *         self.caret = 0 #only used when self.selected==True             # <<<<<<<<<<<<<<
 *         self.start_char_idx = 0
 *         self.end_char_idx = self.caret
 */
  __pyx_v_self->caret = 0;

  /* "src/pyglui/ui_elements.pxi":522
 *         self.preview = u'' #only used when self.selected==True
 *         self.caret = 0 #only used when self.selected==True
 *         self.start_char_idx = 0             # <<<<<<<<<<<<<<
 *         self.end_char_idx = self.caret
 *         self.start_highlight_idx = 0
 */
  __pyx_v_self->start_char_idx = 0;

  /* "src/pyglui/ui_elements.pxi":523
 *         self.caret = 0 #only used when self.selected==True
 *         self.start_char_idx = 0
 *         self.end_char_idx = self.caret             # <<<<<<<<<<<<<<
 *         self.start_highlight_idx = 0
 *         self.text_color = RGBA(*color_text_default)
 */
  __pyx_t_5 = __pyx_v_self->caret;
  __pyx_v_self->end_char_idx = __pyx_t_5;

  /* "src/pyglui/ui_elements.pxi":524
 *         self.start_char_idx = 0
 *         self.end_char_idx = self.caret
 *         self.start_highlight_idx = 0             # <<<<<<<<<<<<<<
 *         self.text_color = RGBA(*color_text_default)
 *         self.text_input_highlight_color = RGBA(*text_input_highlight_color)
 */
  __pyx_v_self->start_highlight_idx = 0;

  /* "src/pyglui/ui_elements.pxi":525
 *         self.end_char_idx = self.caret
 *         self.start_highlight_idx = 0
 *         self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 *         self.text_input_highlight_color = RGBA(*text_input_highlight_color)
 *         self.text_input_line_highlight_color = RGBA(*text_input_line_highlight_color)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
  __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":526
 *         self.start_highlight_idx = 0
 *         self.text_color = RGBA(*color_text_default)
 *         self.text_input_highlight_color = RGBA(*text_input_highlight_color)             # <<<<<<<<<<<<<<
 *         self.text_input_line_highlight_color = RGBA(*text_input_line_highlight_color)
 *         self.data_type = type(self.sync_val.value)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_input_highlight_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_input_highlight_color);
  __pyx_v_self->text_input_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":527
 *         self.text_color = RGBA(*color_text_default)
 *         self.text_input_highlight_color = RGBA(*text_input_highlight_color)
 *         self.text_input_line_highlight_color = RGBA(*text_input_line_highlight_color)             # <<<<<<<<<<<<<<
 *         self.data_type = type(self.sync_val.value)
 *         self.catch_input = True
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_input_line_highlight_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_input_line_highlight_color);
  __pyx_v_self->text_input_line_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":528
 *         self.text_input_highlight_color = RGBA(*text_input_highlight_color)
 *         self.text_input_line_highlight_color = RGBA(*text_input_line_highlight_color)
 *         self.data_type = type(self.sync_val.value)             # <<<<<<<<<<<<<<
 *         self.catch_input = True
 *         self.t_long_press = 0.0 #timer used for long press
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_3)));
  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_3)));
  __Pyx_GOTREF(__pyx_v_self->data_type);
  __Pyx_DECREF(__pyx_v_self->data_type);
  __pyx_v_self->data_type = ((PyObject *)Py_TYPE(__pyx_t_3));
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":529
 *         self.text_input_line_highlight_color = RGBA(*text_input_line_highlight_color)
 *         self.data_type = type(self.sync_val.value)
 *         self.catch_input = True             # <<<<<<<<<<<<<<
 *         self.t_long_press = 0.0 #timer used for long press
 *         self.t_double_click = 0.0 #timer used for t_double_click
 */
  __pyx_v_self->catch_input = 1;

  /* "src/pyglui/ui_elements.pxi":530
 *         self.data_type = type(self.sync_val.value)
 *         self.catch_input = True
 *         self.t_long_press = 0.0 #timer used for long press             # <<<<<<<<<<<<<<
 *         self.t_double_click = 0.0 #timer used for t_double_click
 * 
 */
  __pyx_v_self->t_long_press = 0.0;

  /* "src/pyglui/ui_elements.pxi":531
 *         self.catch_input = True
 *         self.t_long_press = 0.0 #timer used for long press
 *         self.t_double_click = 0.0 #timer used for t_double_click             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None,setter= None,getter= None):
 */
  __pyx_v_self->t_double_click = 0.0;

  /* "src/pyglui/ui_elements.pxi":511
 *     cdef double t_long_press, t_double_click
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None,label = None,setter= None,getter= None):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":533
 *         self.t_double_click = 0.0 #timer used for t_double_click
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None,setter= None,getter= None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_10Text_Input_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_10Text_Input_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_attribute_name = 0;
  CYTHON_UNUSED PyObject *__pyx_v_attribute_context = 0;
  CYTHON_UNUSED PyObject *__pyx_v_label = 0;
  CYTHON_UNUSED PyObject *__pyx_v_setter = 0;
  CYTHON_UNUSED PyObject *__pyx_v_getter = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,0};
    #endif
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 533, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 533, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(2, 533, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_label = values[2];
    __pyx_v_setter = values[3];
    __pyx_v_getter = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, __pyx_nargs); __PYX_ERR(2, 533, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Text_Input.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 533, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input_2__init__(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_label, __pyx_v_setter, __pyx_v_getter);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_10Text_Input_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_getter) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":537
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_sync(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10Text_Input_5sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 537, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":538
 * 
 *     cpdef sync(self):
 *         self.sync_val.sync()             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->sync_val->__pyx_vtab)->sync(__pyx_v_self->sync_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":537
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10Text_Input_5sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10Text_Input_5sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input_4sync(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_4sync(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_10Text_Input_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":540
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         # read only rendering rules
 */

static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_draw(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10Text_Input_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_dx = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_9 = NULL;
  float __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 540, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10Text_Input_7draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 540, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 540, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 540, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":543
 * 
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_read_only)
 *         else:
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":544
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:
 *             self.text_color = RGBA(*color_text_read_only)             # <<<<<<<<<<<<<<
 *         else:
 *             self.text_color = RGBA(*color_text_default)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":543
 * 
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_read_only)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":546
 *             self.text_color = RGBA(*color_text_read_only)
 *         else:
 *             self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 * 
 *         #update appearance:
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":549
 * 
 *         #update appearance:
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.field.compute(self.outline)
 *         self.textfield.compute(self.field)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":550
 *         #update appearance:
 *         self.outline.compute(parent)
 *         self.field.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.textfield.compute(self.field)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->field->__pyx_vtab)->compute(__pyx_v_self->field, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":551
 *         self.outline.compute(parent)
 *         self.field.compute(self.outline)
 *         self.textfield.compute(self.field)             # <<<<<<<<<<<<<<
 * 
 *         glfont.push_state()
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->field);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->textfield->__pyx_vtab)->compute(__pyx_v_self->textfield, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":553
 *         self.textfield.compute(self.field)
 * 
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(self.text_color[:])
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":554
 * 
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color[:])             # <<<<<<<<<<<<<<
 * 
 *         gl.glPushMatrix()
 */
  __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->text_color), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 554, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":556
 *         glfont.set_color_float(self.text_color[:])
 * 
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 *         dx = glfont.draw_text(x_spacer,0,self._label)
 */
  glPushMatrix();

  /* "src/pyglui/ui_elements.pxi":557
 * 
 *         gl.glPushMatrix()
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)             # <<<<<<<<<<<<<<
 *         dx = glfont.draw_text(x_spacer,0,self._label)
 *         gl.glPopMatrix()
 */
  glTranslatef(__pyx_v_self->field->org->x, __pyx_v_self->field->org->y, 0.0);

  /* "src/pyglui/ui_elements.pxi":558
 *         gl.glPushMatrix()
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 *         dx = glfont.draw_text(x_spacer,0,self._label)             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 * 
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base._label;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, 5.0, 0.0, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_dx = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":559
 *         gl.glTranslatef(self.field.org.x,self.field.org.y,0)
 *         dx = glfont.draw_text(x_spacer,0,self._label)
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 *         self.textfield.org.x += dx + x_spacer * ui_scale
 */
  glPopMatrix();

  /* "src/pyglui/ui_elements.pxi":561
 *         gl.glPopMatrix()
 * 
 *         self.textfield.org.x += dx + x_spacer * ui_scale             # <<<<<<<<<<<<<<
 *         self.textfield.size.x -= dx + x_spacer * ui_scale
 * 
 */
  __Pyx_INCREF((PyObject *)__pyx_v_self->textfield->org);
  __pyx_t_9 = __pyx_v_self->textfield->org;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_9->x); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((5.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Add(__pyx_v_dx, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9->x = __pyx_t_10;
  __Pyx_DECREF((PyObject *)__pyx_t_9); __pyx_t_9 = 0;

  /* "src/pyglui/ui_elements.pxi":562
 * 
 *         self.textfield.org.x += dx + x_spacer * ui_scale
 *         self.textfield.size.x -= dx + x_spacer * ui_scale             # <<<<<<<<<<<<<<
 * 
 *         self.draw_text_field()
 */
  __Pyx_INCREF((PyObject *)__pyx_v_self->textfield->size);
  __pyx_t_9 = __pyx_v_self->textfield->size;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_9->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyFloat_FromDouble((5.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyNumber_Add(__pyx_v_dx, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9->x = __pyx_t_10;
  __Pyx_DECREF((PyObject *)__pyx_t_9); __pyx_t_9 = 0;

  /* "src/pyglui/ui_elements.pxi":564
 *         self.textfield.size.x -= dx + x_spacer * ui_scale
 * 
 *         self.draw_text_field()             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 *         # self.draw_text_selection()
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->draw_text_field(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":565
 * 
 *         self.draw_text_field()
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         # self.draw_text_selection()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":540
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         # read only rendering rules
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF((PyObject *)__pyx_t_9);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10Text_Input_7draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10Text_Input_7draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 540, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 540, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 540, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 540, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 540, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 540, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 540, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Text_Input.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 540, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input_6draw(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_6draw(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Text_Input->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":569
 * 
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         while new_input.keys:
 */

static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_9pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_pre_handle_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_key = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_scancode = NULL;
  PyObject *__pyx_v_action = NULL;
  PyObject *__pyx_v_mods = NULL;
  PyObject *__pyx_v_min_idx = NULL;
  int __pyx_v_max_idx;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  long __pyx_t_16;
  long __pyx_t_17;
  long __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pre_handle_input", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pre_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 569, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10Text_Input_9pre_handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_new_input)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 569, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":571
 *     cpdef pre_handle_input(self,Input new_input):
 *         global should_redraw
 *         while new_input.keys:             # <<<<<<<<<<<<<<
 *             key,scancode,action,mods = new_input.keys.pop(0)
 *             # See file glfw.py
 */
  while (1) {
    __pyx_t_6 = (__pyx_v_new_input->keys != Py_None)&&(PyList_GET_SIZE(__pyx_v_new_input->keys) != 0);
    if (!__pyx_t_6) break;

    /* "src/pyglui/ui_elements.pxi":572
 *         global should_redraw
 *         while new_input.keys:
 *             key,scancode,action,mods = new_input.keys.pop(0)             # <<<<<<<<<<<<<<
 *             # See file glfw.py
 *             # for key,scancode,action,mods definitions
 */
    if (unlikely(__pyx_v_new_input->keys == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
      __PYX_ERR(2, 572, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyList_PopIndex(__pyx_v_new_input->keys, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 4)) {
        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(2, 572, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_7};
        for (i=0; i < 4; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(2, 572, __pyx_L1_error)
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_7};
      __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 572, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      for (index=0; index < 4; index++) {
        PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) __PYX_ERR(2, 572, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(2, 572, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_scancode, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_action, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_mods, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "src/pyglui/ui_elements.pxi":575
 *             # See file glfw.py
 *             # for key,scancode,action,mods definitions
 *             if key == 257 and action == 0: #Enter and key press             # <<<<<<<<<<<<<<
 *                 self.finish_input()
 *                 return
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_257, 0x101, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 575, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_6 = __pyx_t_10;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_action, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 575, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_10;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":576
 *             # for key,scancode,action,mods definitions
 *             if key == 257 and action == 0: #Enter and key press
 *                 self.finish_input()             # <<<<<<<<<<<<<<
 *                 return
 *             if  key == 256 and action == 0: #ESC and key press
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->finish_input(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":577
 *             if key == 257 and action == 0: #Enter and key press
 *                 self.finish_input()
 *                 return             # <<<<<<<<<<<<<<
 *             if  key == 256 and action == 0: #ESC and key press
 *                 self.abort_input()
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "src/pyglui/ui_elements.pxi":575
 *             # See file glfw.py
 *             # for key,scancode,action,mods definitions
 *             if key == 257 and action == 0: #Enter and key press             # <<<<<<<<<<<<<<
 *                 self.finish_input()
 *                 return
 */
    }

    /* "src/pyglui/ui_elements.pxi":578
 *                 self.finish_input()
 *                 return
 *             if  key == 256 and action == 0: #ESC and key press             # <<<<<<<<<<<<<<
 *                 self.abort_input()
 *                 return
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_256, 0x100, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 578, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_6 = __pyx_t_10;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_action, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 578, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_10;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":579
 *                 return
 *             if  key == 256 and action == 0: #ESC and key press
 *                 self.abort_input()             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->abort_input(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":580
 *             if  key == 256 and action == 0: #ESC and key press
 *                 self.abort_input()
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             # cut: mod+x (88), copy: mod+c (67)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "src/pyglui/ui_elements.pxi":578
 *                 self.finish_input()
 *                 return
 *             if  key == 256 and action == 0: #ESC and key press             # <<<<<<<<<<<<<<
 *                 self.abort_input()
 *                 return
 */
    }

    /* "src/pyglui/ui_elements.pxi":583
 * 
 *             # cut: mod+x (88), copy: mod+c (67)
 *             elif key in (67, 88) and mods & UI_MOD_KEY and action != 0:             # <<<<<<<<<<<<<<
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 */
    __Pyx_INCREF(__pyx_v_key);
    __pyx_t_1 = __pyx_v_key;
    __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_67, 67, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (!__pyx_t_11) {
    } else {
      __pyx_t_10 = __pyx_t_11;
      goto __pyx_L15_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_88, 88, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = __pyx_t_11;
    __pyx_L15_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __pyx_t_10;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_6pyglui_2ui_UI_MOD_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyNumber_And(__pyx_v_mods, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyInt_NeObjC(__pyx_v_action, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 583, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_6 = __pyx_t_11;
    __pyx_L13_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":584
 *             # cut: mod+x (88), copy: mod+c (67)
 *             elif key in (67, 88) and mods & UI_MOD_KEY and action != 0:
 *                 if self.highlight:             # <<<<<<<<<<<<<<
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 */
      if (__pyx_v_self->highlight) {

        /* "src/pyglui/ui_elements.pxi":585
 *             elif key in (67, 88) and mods & UI_MOD_KEY and action != 0:
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)             # <<<<<<<<<<<<<<
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                     new_input.cb = self.preview[min_idx:max_idx]
 */
        __pyx_t_5 = __pyx_v_self->caret;
        __pyx_t_12 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_5 < __pyx_t_12)) {
          __pyx_t_13 = __pyx_t_5;
        } else {
          __pyx_t_13 = __pyx_t_12;
        }
        __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 585, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_min_idx, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "src/pyglui/ui_elements.pxi":586
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)             # <<<<<<<<<<<<<<
 *                     new_input.cb = self.preview[min_idx:max_idx]
 *                     if key == 88:
 */
        __pyx_t_13 = __pyx_v_self->caret;
        __pyx_t_5 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_13 > __pyx_t_5)) {
          __pyx_t_12 = __pyx_t_13;
        } else {
          __pyx_t_12 = __pyx_t_5;
        }
        __pyx_v_max_idx = __pyx_t_12;

        /* "src/pyglui/ui_elements.pxi":587
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                     new_input.cb = self.preview[min_idx:max_idx]             # <<<<<<<<<<<<<<
 *                     if key == 88:
 *                         self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 */
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 587, __pyx_L1_error)
        }
        __Pyx_INCREF(__pyx_v_min_idx);
        __pyx_t_7 = __pyx_v_min_idx;
        __pyx_t_6 = (__pyx_t_7 == Py_None);
        if (__pyx_t_6) {
          __pyx_t_14 = 0;
        } else {
          __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 587, __pyx_L1_error)
          __pyx_t_14 = __pyx_t_15;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_t_14, __pyx_v_max_idx); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 587, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_v_new_input->cb);
        __Pyx_DECREF(__pyx_v_new_input->cb);
        __pyx_v_new_input->cb = ((PyObject*)__pyx_t_7);
        __pyx_t_7 = 0;

        /* "src/pyglui/ui_elements.pxi":588
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                     new_input.cb = self.preview[min_idx:max_idx]
 *                     if key == 88:             # <<<<<<<<<<<<<<
 *                         self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 *                         self.caret = min_idx
 */
        __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_88, 88, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 588, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_6) {

          /* "src/pyglui/ui_elements.pxi":589
 *                     new_input.cb = self.preview[min_idx:max_idx]
 *                     if key == 88:
 *                         self.preview = self.preview[:min_idx] + self.preview[max_idx:]             # <<<<<<<<<<<<<<
 *                         self.caret = min_idx
 *                         self.highlight = False
 */
          if (unlikely(__pyx_v_self->preview == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(2, 589, __pyx_L1_error)
          }
          __Pyx_INCREF(__pyx_v_min_idx);
          __pyx_t_7 = __pyx_v_min_idx;
          __pyx_t_6 = (__pyx_t_7 == Py_None);
          if (__pyx_t_6) {
            __pyx_t_14 = PY_SSIZE_T_MAX;
          } else {
            __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 589, __pyx_L1_error)
            __pyx_t_14 = __pyx_t_15;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, __pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 589, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (unlikely(__pyx_v_self->preview == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(2, 589, __pyx_L1_error)
          }
          __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_max_idx, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 589, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 589, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GIVEREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_v_self->preview);
          __Pyx_DECREF(__pyx_v_self->preview);
          __pyx_v_self->preview = ((PyObject*)__pyx_t_4);
          __pyx_t_4 = 0;

          /* "src/pyglui/ui_elements.pxi":590
 *                     if key == 88:
 *                         self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 *                         self.caret = min_idx             # <<<<<<<<<<<<<<
 *                         self.highlight = False
 *                         should_redraw = True
 */
          __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_min_idx); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 590, __pyx_L1_error)
          __pyx_v_self->caret = __pyx_t_12;

          /* "src/pyglui/ui_elements.pxi":591
 *                         self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 *                         self.caret = min_idx
 *                         self.highlight = False             # <<<<<<<<<<<<<<
 *                         should_redraw = True
 *             # paste: mod+v
 */
          __pyx_v_self->highlight = 0;

          /* "src/pyglui/ui_elements.pxi":592
 *                         self.caret = min_idx
 *                         self.highlight = False
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 *             # paste: mod+v
 *             elif key == 86 and mods & UI_MOD_KEY and action != 0 and new_input.cb:
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":588
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                     new_input.cb = self.preview[min_idx:max_idx]
 *                     if key == 88:             # <<<<<<<<<<<<<<
 *                         self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 *                         self.caret = min_idx
 */
        }

        /* "src/pyglui/ui_elements.pxi":584
 *             # cut: mod+x (88), copy: mod+c (67)
 *             elif key in (67, 88) and mods & UI_MOD_KEY and action != 0:
 *                 if self.highlight:             # <<<<<<<<<<<<<<
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 */
      }

      /* "src/pyglui/ui_elements.pxi":583
 * 
 *             # cut: mod+x (88), copy: mod+c (67)
 *             elif key in (67, 88) and mods & UI_MOD_KEY and action != 0:             # <<<<<<<<<<<<<<
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":594
 *                         should_redraw = True
 *             # paste: mod+v
 *             elif key == 86 and mods & UI_MOD_KEY and action != 0 and new_input.cb:             # <<<<<<<<<<<<<<
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 */
    __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_86, 86, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_6pyglui_2ui_UI_MOD_KEY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_And(__pyx_v_mods, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_action, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_new_input->cb); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 594, __pyx_L1_error)
    __pyx_t_6 = __pyx_t_11;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":595
 *             # paste: mod+v
 *             elif key == 86 and mods & UI_MOD_KEY and action != 0 and new_input.cb:
 *                 if self.highlight:             # <<<<<<<<<<<<<<
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 */
      if (__pyx_v_self->highlight) {

        /* "src/pyglui/ui_elements.pxi":596
 *             elif key == 86 and mods & UI_MOD_KEY and action != 0 and new_input.cb:
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)             # <<<<<<<<<<<<<<
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                 else:
 */
        __pyx_t_12 = __pyx_v_self->caret;
        __pyx_t_13 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_12 < __pyx_t_13)) {
          __pyx_t_5 = __pyx_t_12;
        } else {
          __pyx_t_5 = __pyx_t_13;
        }
        __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_min_idx, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":597
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)             # <<<<<<<<<<<<<<
 *                 else:
 *                     min_idx = max_idx = self.caret
 */
        __pyx_t_5 = __pyx_v_self->caret;
        __pyx_t_12 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_5 > __pyx_t_12)) {
          __pyx_t_13 = __pyx_t_5;
        } else {
          __pyx_t_13 = __pyx_t_12;
        }
        __pyx_v_max_idx = __pyx_t_13;

        /* "src/pyglui/ui_elements.pxi":595
 *             # paste: mod+v
 *             elif key == 86 and mods & UI_MOD_KEY and action != 0 and new_input.cb:
 *                 if self.highlight:             # <<<<<<<<<<<<<<
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 */
        goto __pyx_L24;
      }

      /* "src/pyglui/ui_elements.pxi":599
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                 else:
 *                     min_idx = max_idx = self.caret             # <<<<<<<<<<<<<<
 * 
 *                 self.preview = self.preview[:min_idx] + new_input.cb + self.preview[max_idx:]
 */
      /*else*/ {
        __pyx_t_13 = __pyx_v_self->caret;
        __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_min_idx, __pyx_t_1);
        __pyx_v_max_idx = __pyx_t_13;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L24:;

      /* "src/pyglui/ui_elements.pxi":601
 *                     min_idx = max_idx = self.caret
 * 
 *                 self.preview = self.preview[:min_idx] + new_input.cb + self.preview[max_idx:]             # <<<<<<<<<<<<<<
 *                 self.caret = min_idx + len(new_input.cb)
 *                 self.highlight = False
 */
      if (unlikely(__pyx_v_self->preview == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(2, 601, __pyx_L1_error)
      }
      __Pyx_INCREF(__pyx_v_min_idx);
      __pyx_t_1 = __pyx_v_min_idx;
      __pyx_t_6 = (__pyx_t_1 == Py_None);
      if (__pyx_t_6) {
        __pyx_t_14 = PY_SSIZE_T_MAX;
      } else {
        __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 601, __pyx_L1_error)
        __pyx_t_14 = __pyx_t_15;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_v_new_input->cb); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_v_self->preview == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(2, 601, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_max_idx, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GIVEREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_v_self->preview);
      __Pyx_DECREF(__pyx_v_self->preview);
      __pyx_v_self->preview = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "src/pyglui/ui_elements.pxi":602
 * 
 *                 self.preview = self.preview[:min_idx] + new_input.cb + self.preview[max_idx:]
 *                 self.caret = min_idx + len(new_input.cb)             # <<<<<<<<<<<<<<
 *                 self.highlight = False
 *                 should_redraw = True
 */
      __pyx_t_7 = __pyx_v_new_input->cb;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_14 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(2, 602, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = PyNumber_Add(__pyx_v_min_idx, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 602, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_self->caret = __pyx_t_13;

      /* "src/pyglui/ui_elements.pxi":603
 *                 self.preview = self.preview[:min_idx] + new_input.cb + self.preview[max_idx:]
 *                 self.caret = min_idx + len(new_input.cb)
 *                 self.highlight = False             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      __pyx_v_self->highlight = 0;

      /* "src/pyglui/ui_elements.pxi":604
 *                 self.caret = min_idx + len(new_input.cb)
 *                 self.highlight = False
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             elif key == 259 and action != 1: # Backspace and key not released (key repeat)
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":594
 *                         should_redraw = True
 *             # paste: mod+v
 *             elif key == 86 and mods & UI_MOD_KEY and action != 0 and new_input.cb:             # <<<<<<<<<<<<<<
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":606
 *                 should_redraw = True
 * 
 *             elif key == 259 and action != 1: # Backspace and key not released (key repeat)             # <<<<<<<<<<<<<<
 *                 if self.caret > 0 and self.highlight is False:
 *                     self.preview = self.preview[:self.caret-1] + self.preview[self.caret:]
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_259, 0x103, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 606, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L25_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_action, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 606, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_11;
    __pyx_L25_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":607
 * 
 *             elif key == 259 and action != 1: # Backspace and key not released (key repeat)
 *                 if self.caret > 0 and self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.preview = self.preview[:self.caret-1] + self.preview[self.caret:]
 *                     self.caret -=1
 */
      __pyx_t_11 = (__pyx_v_self->caret > 0);
      if (__pyx_t_11) {
      } else {
        __pyx_t_6 = __pyx_t_11;
        goto __pyx_L28_bool_binop_done;
      }
      __pyx_t_11 = (__pyx_v_self->highlight == 0);
      __pyx_t_6 = __pyx_t_11;
      __pyx_L28_bool_binop_done:;
      if (__pyx_t_6) {

        /* "src/pyglui/ui_elements.pxi":608
 *             elif key == 259 and action != 1: # Backspace and key not released (key repeat)
 *                 if self.caret > 0 and self.highlight is False:
 *                     self.preview = self.preview[:self.caret-1] + self.preview[self.caret:]             # <<<<<<<<<<<<<<
 *                     self.caret -=1
 *                 if self.highlight:
 */
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 608, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, (__pyx_v_self->caret - 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 608, __pyx_L1_error)
        }
        __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_self->caret, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->preview);
        __Pyx_DECREF(__pyx_v_self->preview);
        __pyx_v_self->preview = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "src/pyglui/ui_elements.pxi":609
 *                 if self.caret > 0 and self.highlight is False:
 *                     self.preview = self.preview[:self.caret-1] + self.preview[self.caret:]
 *                     self.caret -=1             # <<<<<<<<<<<<<<
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 */
        __pyx_v_self->caret = (__pyx_v_self->caret - 1);

        /* "src/pyglui/ui_elements.pxi":607
 * 
 *             elif key == 259 and action != 1: # Backspace and key not released (key repeat)
 *                 if self.caret > 0 and self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.preview = self.preview[:self.caret-1] + self.preview[self.caret:]
 *                     self.caret -=1
 */
      }

      /* "src/pyglui/ui_elements.pxi":610
 *                     self.preview = self.preview[:self.caret-1] + self.preview[self.caret:]
 *                     self.caret -=1
 *                 if self.highlight:             # <<<<<<<<<<<<<<
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 */
      if (__pyx_v_self->highlight) {

        /* "src/pyglui/ui_elements.pxi":611
 *                     self.caret -=1
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)             # <<<<<<<<<<<<<<
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                     self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 */
        __pyx_t_13 = __pyx_v_self->caret;
        __pyx_t_5 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_13 < __pyx_t_5)) {
          __pyx_t_12 = __pyx_t_13;
        } else {
          __pyx_t_12 = __pyx_t_5;
        }
        __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_min_idx, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "src/pyglui/ui_elements.pxi":612
 *                 if self.highlight:
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)             # <<<<<<<<<<<<<<
 *                     self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 *                     self.caret = min_idx
 */
        __pyx_t_12 = __pyx_v_self->caret;
        __pyx_t_13 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_12 > __pyx_t_13)) {
          __pyx_t_5 = __pyx_t_12;
        } else {
          __pyx_t_5 = __pyx_t_13;
        }
        __pyx_v_max_idx = __pyx_t_5;

        /* "src/pyglui/ui_elements.pxi":613
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                     self.preview = self.preview[:min_idx] + self.preview[max_idx:]             # <<<<<<<<<<<<<<
 *                     self.caret = min_idx
 *                     self.highlight = False
 */
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 613, __pyx_L1_error)
        }
        __Pyx_INCREF(__pyx_v_min_idx);
        __pyx_t_4 = __pyx_v_min_idx;
        __pyx_t_6 = (__pyx_t_4 == Py_None);
        if (__pyx_t_6) {
          __pyx_t_14 = PY_SSIZE_T_MAX;
        } else {
          __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 613, __pyx_L1_error)
          __pyx_t_14 = __pyx_t_15;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 613, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 613, __pyx_L1_error)
        }
        __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_max_idx, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 613, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 613, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_v_self->preview);
        __Pyx_DECREF(__pyx_v_self->preview);
        __pyx_v_self->preview = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":614
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 *                     self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 *                     self.caret = min_idx             # <<<<<<<<<<<<<<
 *                     self.highlight = False
 * 
 */
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_min_idx); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 614, __pyx_L1_error)
        __pyx_v_self->caret = __pyx_t_5;

        /* "src/pyglui/ui_elements.pxi":615
 *                     self.preview = self.preview[:min_idx] + self.preview[max_idx:]
 *                     self.caret = min_idx
 *                     self.highlight = False             # <<<<<<<<<<<<<<
 * 
 *                 self.caret = max(0, self.caret)
 */
        __pyx_v_self->highlight = 0;

        /* "src/pyglui/ui_elements.pxi":610
 *                     self.preview = self.preview[:self.caret-1] + self.preview[self.caret:]
 *                     self.caret -=1
 *                 if self.highlight:             # <<<<<<<<<<<<<<
 *                     min_idx = min(self.start_highlight_idx, self.caret)
 *                     max_idx = max(self.start_highlight_idx, self.caret)
 */
      }

      /* "src/pyglui/ui_elements.pxi":617
 *                     self.highlight = False
 * 
 *                 self.caret = max(0, self.caret)             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      __pyx_t_5 = __pyx_v_self->caret;
      __pyx_t_16 = 0;
      if ((__pyx_t_5 > __pyx_t_16)) {
        __pyx_t_17 = __pyx_t_5;
      } else {
        __pyx_t_17 = __pyx_t_16;
      }
      __pyx_v_self->caret = __pyx_t_17;

      /* "src/pyglui/ui_elements.pxi":618
 * 
 *                 self.caret = max(0, self.caret)
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             elif key == 261 and action != 1: # Delete and key not released (key repeat)
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":606
 *                 should_redraw = True
 * 
 *             elif key == 259 and action != 1: # Backspace and key not released (key repeat)             # <<<<<<<<<<<<<<
 *                 if self.caret > 0 and self.highlight is False:
 *                     self.preview = self.preview[:self.caret-1] + self.preview[self.caret:]
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":620
 *                 should_redraw = True
 * 
 *             elif key == 261 and action != 1: # Delete and key not released (key repeat)             # <<<<<<<<<<<<<<
 *                 if self.caret < len(self.preview) and self.highlight is False:
 *                     self.preview = self.preview[:self.caret] + self.preview[self.caret+1:]
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_261, 0x105, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 620, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L31_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_action, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 620, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_11;
    __pyx_L31_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":621
 * 
 *             elif key == 261 and action != 1: # Delete and key not released (key repeat)
 *                 if self.caret < len(self.preview) and self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.preview = self.preview[:self.caret] + self.preview[self.caret+1:]
 *                 if self.highlight:
 */
      __pyx_t_1 = __pyx_v_self->preview;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(2, 621, __pyx_L1_error)
      }
      __pyx_t_14 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(2, 621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = (__pyx_v_self->caret < __pyx_t_14);
      if (__pyx_t_11) {
      } else {
        __pyx_t_6 = __pyx_t_11;
        goto __pyx_L34_bool_binop_done;
      }
      __pyx_t_11 = (__pyx_v_self->highlight == 0);
      __pyx_t_6 = __pyx_t_11;
      __pyx_L34_bool_binop_done:;
      if (__pyx_t_6) {

        /* "src/pyglui/ui_elements.pxi":622
 *             elif key == 261 and action != 1: # Delete and key not released (key repeat)
 *                 if self.caret < len(self.preview) and self.highlight is False:
 *                     self.preview = self.preview[:self.caret] + self.preview[self.caret+1:]             # <<<<<<<<<<<<<<
 *                 if self.highlight:
 *                     self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + self.preview[max(self.start_highlight_idx,self.caret):]
 */
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 622, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, __pyx_v_self->caret); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 622, __pyx_L1_error)
        }
        __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, (__pyx_v_self->caret + 1), PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->preview);
        __Pyx_DECREF(__pyx_v_self->preview);
        __pyx_v_self->preview = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "src/pyglui/ui_elements.pxi":621
 * 
 *             elif key == 261 and action != 1: # Delete and key not released (key repeat)
 *                 if self.caret < len(self.preview) and self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.preview = self.preview[:self.caret] + self.preview[self.caret+1:]
 *                 if self.highlight:
 */
      }

      /* "src/pyglui/ui_elements.pxi":623
 *                 if self.caret < len(self.preview) and self.highlight is False:
 *                     self.preview = self.preview[:self.caret] + self.preview[self.caret+1:]
 *                 if self.highlight:             # <<<<<<<<<<<<<<
 *                     self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + self.preview[max(self.start_highlight_idx,self.caret):]
 *                     self.caret = min(self.start_highlight_idx,self.caret)
 */
      if (__pyx_v_self->highlight) {

        /* "src/pyglui/ui_elements.pxi":624
 *                     self.preview = self.preview[:self.caret] + self.preview[self.caret+1:]
 *                 if self.highlight:
 *                     self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + self.preview[max(self.start_highlight_idx,self.caret):]             # <<<<<<<<<<<<<<
 *                     self.caret = min(self.start_highlight_idx,self.caret)
 *                     self.highlight = False
 */
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 624, __pyx_L1_error)
        }
        __pyx_t_5 = __pyx_v_self->caret;
        __pyx_t_12 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_5 < __pyx_t_12)) {
          __pyx_t_13 = __pyx_t_5;
        } else {
          __pyx_t_13 = __pyx_t_12;
        }
        __pyx_t_4 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 624, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__pyx_v_self->preview == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(2, 624, __pyx_L1_error)
        }
        __pyx_t_13 = __pyx_v_self->caret;
        __pyx_t_5 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_13 > __pyx_t_5)) {
          __pyx_t_12 = __pyx_t_13;
        } else {
          __pyx_t_12 = __pyx_t_5;
        }
        __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_t_12, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 624, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 624, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_v_self->preview);
        __Pyx_DECREF(__pyx_v_self->preview);
        __pyx_v_self->preview = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":625
 *                 if self.highlight:
 *                     self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + self.preview[max(self.start_highlight_idx,self.caret):]
 *                     self.caret = min(self.start_highlight_idx,self.caret)             # <<<<<<<<<<<<<<
 *                     self.highlight = False
 * 
 */
        __pyx_t_12 = __pyx_v_self->caret;
        __pyx_t_13 = __pyx_v_self->start_highlight_idx;
        if ((__pyx_t_12 < __pyx_t_13)) {
          __pyx_t_5 = __pyx_t_12;
        } else {
          __pyx_t_5 = __pyx_t_13;
        }
        __pyx_v_self->caret = __pyx_t_5;

        /* "src/pyglui/ui_elements.pxi":626
 *                     self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + self.preview[max(self.start_highlight_idx,self.caret):]
 *                     self.caret = min(self.start_highlight_idx,self.caret)
 *                     self.highlight = False             # <<<<<<<<<<<<<<
 * 
 *                 self.caret = min(len(self.preview), self.caret)
 */
        __pyx_v_self->highlight = 0;

        /* "src/pyglui/ui_elements.pxi":623
 *                 if self.caret < len(self.preview) and self.highlight is False:
 *                     self.preview = self.preview[:self.caret] + self.preview[self.caret+1:]
 *                 if self.highlight:             # <<<<<<<<<<<<<<
 *                     self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + self.preview[max(self.start_highlight_idx,self.caret):]
 *                     self.caret = min(self.start_highlight_idx,self.caret)
 */
      }

      /* "src/pyglui/ui_elements.pxi":628
 *                     self.highlight = False
 * 
 *                 self.caret = min(len(self.preview), self.caret)             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      __pyx_t_5 = __pyx_v_self->caret;
      __pyx_t_1 = __pyx_v_self->preview;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(2, 628, __pyx_L1_error)
      }
      __pyx_t_14 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(2, 628, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if ((__pyx_t_5 < __pyx_t_14)) {
        __pyx_t_15 = __pyx_t_5;
      } else {
        __pyx_t_15 = __pyx_t_14;
      }
      __pyx_v_self->caret = __pyx_t_15;

      /* "src/pyglui/ui_elements.pxi":629
 * 
 *                 self.caret = min(len(self.preview), self.caret)
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             elif key == 263 and action != 1 and mods == 0: #key left and key not released without mod keys
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":620
 *                 should_redraw = True
 * 
 *             elif key == 261 and action != 1: # Delete and key not released (key repeat)             # <<<<<<<<<<<<<<
 *                 if self.caret < len(self.preview) and self.highlight is False:
 *                     self.preview = self.preview[:self.caret] + self.preview[self.caret+1:]
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":631
 *                 should_redraw = True
 * 
 *             elif key == 263 and action != 1 and mods == 0: #key left and key not released without mod keys             # <<<<<<<<<<<<<<
 *                 self.caret -=1
 *                 self.caret = max(0,self.caret)
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_263, 0x107, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 631, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L37_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_action, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 631, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L37_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_mods, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 631, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_11;
    __pyx_L37_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":632
 * 
 *             elif key == 263 and action != 1 and mods == 0: #key left and key not released without mod keys
 *                 self.caret -=1             # <<<<<<<<<<<<<<
 *                 self.caret = max(0,self.caret)
 *                 self.highlight=False
 */
      __pyx_v_self->caret = (__pyx_v_self->caret - 1);

      /* "src/pyglui/ui_elements.pxi":633
 *             elif key == 263 and action != 1 and mods == 0: #key left and key not released without mod keys
 *                 self.caret -=1
 *                 self.caret = max(0,self.caret)             # <<<<<<<<<<<<<<
 *                 self.highlight=False
 *                 should_redraw = True
 */
      __pyx_t_5 = __pyx_v_self->caret;
      __pyx_t_17 = 0;
      if ((__pyx_t_5 > __pyx_t_17)) {
        __pyx_t_16 = __pyx_t_5;
      } else {
        __pyx_t_16 = __pyx_t_17;
      }
      __pyx_v_self->caret = __pyx_t_16;

      /* "src/pyglui/ui_elements.pxi":634
 *                 self.caret -=1
 *                 self.caret = max(0,self.caret)
 *                 self.highlight=False             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      __pyx_v_self->highlight = 0;

      /* "src/pyglui/ui_elements.pxi":635
 *                 self.caret = max(0,self.caret)
 *                 self.highlight=False
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             elif key == 262 and action != 1 and mods == 0: #key right and key not released without mod keys
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":631
 *                 should_redraw = True
 * 
 *             elif key == 263 and action != 1 and mods == 0: #key left and key not released without mod keys             # <<<<<<<<<<<<<<
 *                 self.caret -=1
 *                 self.caret = max(0,self.caret)
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":637
 *                 should_redraw = True
 * 
 *             elif key == 262 and action != 1 and mods == 0: #key right and key not released without mod keys             # <<<<<<<<<<<<<<
 *                 self.caret +=1
 *                 self.caret = min(len(self.preview),self.caret)
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_262, 0x106, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 637, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L40_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_action, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 637, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L40_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_mods, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 637, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_11;
    __pyx_L40_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":638
 * 
 *             elif key == 262 and action != 1 and mods == 0: #key right and key not released without mod keys
 *                 self.caret +=1             # <<<<<<<<<<<<<<
 *                 self.caret = min(len(self.preview),self.caret)
 *                 self.highlight=False
 */
      __pyx_v_self->caret = (__pyx_v_self->caret + 1);

      /* "src/pyglui/ui_elements.pxi":639
 *             elif key == 262 and action != 1 and mods == 0: #key right and key not released without mod keys
 *                 self.caret +=1
 *                 self.caret = min(len(self.preview),self.caret)             # <<<<<<<<<<<<<<
 *                 self.highlight=False
 *                 should_redraw = True
 */
      __pyx_t_5 = __pyx_v_self->caret;
      __pyx_t_1 = __pyx_v_self->preview;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(2, 639, __pyx_L1_error)
      }
      __pyx_t_15 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(2, 639, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if ((__pyx_t_5 < __pyx_t_15)) {
        __pyx_t_14 = __pyx_t_5;
      } else {
        __pyx_t_14 = __pyx_t_15;
      }
      __pyx_v_self->caret = __pyx_t_14;

      /* "src/pyglui/ui_elements.pxi":640
 *                 self.caret +=1
 *                 self.caret = min(len(self.preview),self.caret)
 *                 self.highlight=False             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      __pyx_v_self->highlight = 0;

      /* "src/pyglui/ui_elements.pxi":641
 *                 self.caret = min(len(self.preview),self.caret)
 *                 self.highlight=False
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             elif  key == 263 and action != 1 and mods == 1: #key left and key not released with shift mod
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":637
 *                 should_redraw = True
 * 
 *             elif key == 262 and action != 1 and mods == 0: #key right and key not released without mod keys             # <<<<<<<<<<<<<<
 *                 self.caret +=1
 *                 self.caret = min(len(self.preview),self.caret)
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":643
 *                 should_redraw = True
 * 
 *             elif  key == 263 and action != 1 and mods == 1: #key left and key not released with shift mod             # <<<<<<<<<<<<<<
 *                 if self.highlight is False:
 *                     self.start_highlight_idx = max(0,self.caret)
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_263, 0x107, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L43_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_action, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L43_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_mods, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_11;
    __pyx_L43_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":644
 * 
 *             elif  key == 263 and action != 1 and mods == 1: #key left and key not released with shift mod
 *                 if self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.start_highlight_idx = max(0,self.caret)
 *                 self.caret -=1
 */
      __pyx_t_6 = (__pyx_v_self->highlight == 0);
      if (__pyx_t_6) {

        /* "src/pyglui/ui_elements.pxi":645
 *             elif  key == 263 and action != 1 and mods == 1: #key left and key not released with shift mod
 *                 if self.highlight is False:
 *                     self.start_highlight_idx = max(0,self.caret)             # <<<<<<<<<<<<<<
 *                 self.caret -=1
 *                 self.caret = max(0,self.caret)
 */
        __pyx_t_5 = __pyx_v_self->caret;
        __pyx_t_16 = 0;
        if ((__pyx_t_5 > __pyx_t_16)) {
          __pyx_t_17 = __pyx_t_5;
        } else {
          __pyx_t_17 = __pyx_t_16;
        }
        __pyx_v_self->start_highlight_idx = __pyx_t_17;

        /* "src/pyglui/ui_elements.pxi":644
 * 
 *             elif  key == 263 and action != 1 and mods == 1: #key left and key not released with shift mod
 *                 if self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.start_highlight_idx = max(0,self.caret)
 *                 self.caret -=1
 */
      }

      /* "src/pyglui/ui_elements.pxi":646
 *                 if self.highlight is False:
 *                     self.start_highlight_idx = max(0,self.caret)
 *                 self.caret -=1             # <<<<<<<<<<<<<<
 *                 self.caret = max(0,self.caret)
 *                 self.highlight = True
 */
      __pyx_v_self->caret = (__pyx_v_self->caret - 1);

      /* "src/pyglui/ui_elements.pxi":647
 *                     self.start_highlight_idx = max(0,self.caret)
 *                 self.caret -=1
 *                 self.caret = max(0,self.caret)             # <<<<<<<<<<<<<<
 *                 self.highlight = True
 *                 should_redraw = True
 */
      __pyx_t_5 = __pyx_v_self->caret;
      __pyx_t_17 = 0;
      if ((__pyx_t_5 > __pyx_t_17)) {
        __pyx_t_16 = __pyx_t_5;
      } else {
        __pyx_t_16 = __pyx_t_17;
      }
      __pyx_v_self->caret = __pyx_t_16;

      /* "src/pyglui/ui_elements.pxi":648
 *                 self.caret -=1
 *                 self.caret = max(0,self.caret)
 *                 self.highlight = True             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      __pyx_v_self->highlight = 1;

      /* "src/pyglui/ui_elements.pxi":649
 *                 self.caret = max(0,self.caret)
 *                 self.highlight = True
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             elif key == 262 and action != 1 and mods == 1: #key right and key not released with shift mod
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":643
 *                 should_redraw = True
 * 
 *             elif  key == 263 and action != 1 and mods == 1: #key left and key not released with shift mod             # <<<<<<<<<<<<<<
 *                 if self.highlight is False:
 *                     self.start_highlight_idx = max(0,self.caret)
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":651
 *                 should_redraw = True
 * 
 *             elif key == 262 and action != 1 and mods == 1: #key right and key not released with shift mod             # <<<<<<<<<<<<<<
 *                 if self.highlight is False:
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_262, 0x106, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 651, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L47_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_action, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 651, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L47_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_mods, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 651, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_11;
    __pyx_L47_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":652
 * 
 *             elif key == 262 and action != 1 and mods == 1: #key right and key not released with shift mod
 *                 if self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 *                 self.caret +=1
 */
      __pyx_t_6 = (__pyx_v_self->highlight == 0);
      if (__pyx_t_6) {

        /* "src/pyglui/ui_elements.pxi":653
 *             elif key == 262 and action != 1 and mods == 1: #key right and key not released with shift mod
 *                 if self.highlight is False:
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)             # <<<<<<<<<<<<<<
 *                 self.caret +=1
 *                 self.caret = min(len(self.preview),self.caret)
 */
        __pyx_t_5 = __pyx_v_self->caret;
        __pyx_t_1 = __pyx_v_self->preview;
        __Pyx_INCREF(__pyx_t_1);
        if (unlikely(__pyx_t_1 == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(2, 653, __pyx_L1_error)
        }
        __pyx_t_14 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(2, 653, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if ((__pyx_t_5 < __pyx_t_14)) {
          __pyx_t_15 = __pyx_t_5;
        } else {
          __pyx_t_15 = __pyx_t_14;
        }
        __pyx_v_self->start_highlight_idx = __pyx_t_15;

        /* "src/pyglui/ui_elements.pxi":652
 * 
 *             elif key == 262 and action != 1 and mods == 1: #key right and key not released with shift mod
 *                 if self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 *                 self.caret +=1
 */
      }

      /* "src/pyglui/ui_elements.pxi":654
 *                 if self.highlight is False:
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 *                 self.caret +=1             # <<<<<<<<<<<<<<
 *                 self.caret = min(len(self.preview),self.caret)
 *                 self.highlight = True
 */
      __pyx_v_self->caret = (__pyx_v_self->caret + 1);

      /* "src/pyglui/ui_elements.pxi":655
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 *                 self.caret +=1
 *                 self.caret = min(len(self.preview),self.caret)             # <<<<<<<<<<<<<<
 *                 self.highlight = True
 *                 should_redraw = True
 */
      __pyx_t_5 = __pyx_v_self->caret;
      __pyx_t_1 = __pyx_v_self->preview;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(2, 655, __pyx_L1_error)
      }
      __pyx_t_15 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(2, 655, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if ((__pyx_t_5 < __pyx_t_15)) {
        __pyx_t_14 = __pyx_t_5;
      } else {
        __pyx_t_14 = __pyx_t_15;
      }
      __pyx_v_self->caret = __pyx_t_14;

      /* "src/pyglui/ui_elements.pxi":656
 *                 self.caret +=1
 *                 self.caret = min(len(self.preview),self.caret)
 *                 self.highlight = True             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      __pyx_v_self->highlight = 1;

      /* "src/pyglui/ui_elements.pxi":657
 *                 self.caret = min(len(self.preview),self.caret)
 *                 self.highlight = True
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *             elif key == 65 and action == 0 and mods == UI_MOD_KEY: # select all
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":651
 *                 should_redraw = True
 * 
 *             elif key == 262 and action != 1 and mods == 1: #key right and key not released with shift mod             # <<<<<<<<<<<<<<
 *                 if self.highlight is False:
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":659
 *                 should_redraw = True
 * 
 *             elif key == 65 and action == 0 and mods == UI_MOD_KEY: # select all             # <<<<<<<<<<<<<<
 *                 # key a and action key press and mods are either command/super for MacOS or control for Windows
 *                 if len(self.preview) > 0 and self.highlight is False:
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_65, 65, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L51_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_action, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_6 = __pyx_t_11;
      goto __pyx_L51_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_6pyglui_2ui_UI_MOD_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_mods, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_6 = __pyx_t_11;
    __pyx_L51_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":661
 *             elif key == 65 and action == 0 and mods == UI_MOD_KEY: # select all
 *                 # key a and action key press and mods are either command/super for MacOS or control for Windows
 *                 if len(self.preview) > 0 and self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.start_highlight_idx = 0
 *                     self.caret = len(self.preview)
 */
      __pyx_t_7 = __pyx_v_self->preview;
      __Pyx_INCREF(__pyx_t_7);
      if (unlikely(__pyx_t_7 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(2, 661, __pyx_L1_error)
      }
      __pyx_t_14 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(2, 661, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_11 = (__pyx_t_14 > 0);
      if (__pyx_t_11) {
      } else {
        __pyx_t_6 = __pyx_t_11;
        goto __pyx_L55_bool_binop_done;
      }
      __pyx_t_11 = (__pyx_v_self->highlight == 0);
      __pyx_t_6 = __pyx_t_11;
      __pyx_L55_bool_binop_done:;
      if (__pyx_t_6) {

        /* "src/pyglui/ui_elements.pxi":662
 *                 # key a and action key press and mods are either command/super for MacOS or control for Windows
 *                 if len(self.preview) > 0 and self.highlight is False:
 *                     self.start_highlight_idx = 0             # <<<<<<<<<<<<<<
 *                     self.caret = len(self.preview)
 *                     self.highlight = True
 */
        __pyx_v_self->start_highlight_idx = 0;

        /* "src/pyglui/ui_elements.pxi":663
 *                 if len(self.preview) > 0 and self.highlight is False:
 *                     self.start_highlight_idx = 0
 *                     self.caret = len(self.preview)             # <<<<<<<<<<<<<<
 *                     self.highlight = True
 *                 should_redraw = True
 */
        __pyx_t_7 = __pyx_v_self->preview;
        __Pyx_INCREF(__pyx_t_7);
        if (unlikely(__pyx_t_7 == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(2, 663, __pyx_L1_error)
        }
        __pyx_t_14 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(2, 663, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_v_self->caret = __pyx_t_14;

        /* "src/pyglui/ui_elements.pxi":664
 *                     self.start_highlight_idx = 0
 *                     self.caret = len(self.preview)
 *                     self.highlight = True             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *             elif key in (268, 269) and action == 1:  # home on release
 */
        __pyx_v_self->highlight = 1;

        /* "src/pyglui/ui_elements.pxi":661
 *             elif key == 65 and action == 0 and mods == UI_MOD_KEY: # select all
 *                 # key a and action key press and mods are either command/super for MacOS or control for Windows
 *                 if len(self.preview) > 0 and self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.start_highlight_idx = 0
 *                     self.caret = len(self.preview)
 */
      }

      /* "src/pyglui/ui_elements.pxi":665
 *                     self.caret = len(self.preview)
 *                     self.highlight = True
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *             elif key in (268, 269) and action == 1:  # home on release
 *                 if mods != 1:
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":659
 *                 should_redraw = True
 * 
 *             elif key == 65 and action == 0 and mods == UI_MOD_KEY: # select all             # <<<<<<<<<<<<<<
 *                 # key a and action key press and mods are either command/super for MacOS or control for Windows
 *                 if len(self.preview) > 0 and self.highlight is False:
 */
      goto __pyx_L10;
    }

    /* "src/pyglui/ui_elements.pxi":666
 *                     self.highlight = True
 *                 should_redraw = True
 *             elif key in (268, 269) and action == 1:  # home on release             # <<<<<<<<<<<<<<
 *                 if mods != 1:
 *                     self.highlight = False
 */
    __Pyx_INCREF(__pyx_v_key);
    __pyx_t_7 = __pyx_v_key;
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_7, __pyx_int_268, 0x10C, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 666, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_10) {
    } else {
      __pyx_t_11 = __pyx_t_10;
      goto __pyx_L59_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_7, __pyx_int_269, 0x10D, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 666, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __pyx_t_10;
    __pyx_L59_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = __pyx_t_11;
    if (__pyx_t_10) {
    } else {
      __pyx_t_6 = __pyx_t_10;
      goto __pyx_L57_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_v_action, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 666, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_6 = __pyx_t_10;
    __pyx_L57_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":667
 *                 should_redraw = True
 *             elif key in (268, 269) and action == 1:  # home on release
 *                 if mods != 1:             # <<<<<<<<<<<<<<
 *                     self.highlight = False
 *                 elif self.highlight is False:
 */
      __pyx_t_7 = __Pyx_PyInt_NeObjC(__pyx_v_mods, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 667, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_6) {

        /* "src/pyglui/ui_elements.pxi":668
 *             elif key in (268, 269) and action == 1:  # home on release
 *                 if mods != 1:
 *                     self.highlight = False             # <<<<<<<<<<<<<<
 *                 elif self.highlight is False:
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 */
        __pyx_v_self->highlight = 0;

        /* "src/pyglui/ui_elements.pxi":667
 *                 should_redraw = True
 *             elif key in (268, 269) and action == 1:  # home on release
 *                 if mods != 1:             # <<<<<<<<<<<<<<
 *                     self.highlight = False
 *                 elif self.highlight is False:
 */
        goto __pyx_L61;
      }

      /* "src/pyglui/ui_elements.pxi":669
 *                 if mods != 1:
 *                     self.highlight = False
 *                 elif self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 *                     self.highlight = True
 */
      __pyx_t_6 = (__pyx_v_self->highlight == 0);
      if (__pyx_t_6) {

        /* "src/pyglui/ui_elements.pxi":670
 *                     self.highlight = False
 *                 elif self.highlight is False:
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)             # <<<<<<<<<<<<<<
 *                     self.highlight = True
 * 
 */
        __pyx_t_5 = __pyx_v_self->caret;
        __pyx_t_7 = __pyx_v_self->preview;
        __Pyx_INCREF(__pyx_t_7);
        if (unlikely(__pyx_t_7 == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(2, 670, __pyx_L1_error)
        }
        __pyx_t_14 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(2, 670, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if ((__pyx_t_5 < __pyx_t_14)) {
          __pyx_t_15 = __pyx_t_5;
        } else {
          __pyx_t_15 = __pyx_t_14;
        }
        __pyx_v_self->start_highlight_idx = __pyx_t_15;

        /* "src/pyglui/ui_elements.pxi":671
 *                 elif self.highlight is False:
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 *                     self.highlight = True             # <<<<<<<<<<<<<<
 * 
 *                 if key == 269:
 */
        __pyx_v_self->highlight = 1;

        /* "src/pyglui/ui_elements.pxi":669
 *                 if mods != 1:
 *                     self.highlight = False
 *                 elif self.highlight is False:             # <<<<<<<<<<<<<<
 *                     self.start_highlight_idx = min(len(self.preview),self.caret)
 *                     self.highlight = True
 */
      }
      __pyx_L61:;

      /* "src/pyglui/ui_elements.pxi":673
 *                     self.highlight = True
 * 
 *                 if key == 269:             # <<<<<<<<<<<<<<
 *                     self.caret = len(self.preview)
 *                 else:
 */
      __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_269, 0x10D, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 673, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_6) {

        /* "src/pyglui/ui_elements.pxi":674
 * 
 *                 if key == 269:
 *                     self.caret = len(self.preview)             # <<<<<<<<<<<<<<
 *                 else:
 *                     self.caret = 0
 */
        __pyx_t_7 = __pyx_v_self->preview;
        __Pyx_INCREF(__pyx_t_7);
        if (unlikely(__pyx_t_7 == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(2, 674, __pyx_L1_error)
        }
        __pyx_t_15 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(2, 674, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_v_self->caret = __pyx_t_15;

        /* "src/pyglui/ui_elements.pxi":673
 *                     self.highlight = True
 * 
 *                 if key == 269:             # <<<<<<<<<<<<<<
 *                     self.caret = len(self.preview)
 *                 else:
 */
        goto __pyx_L62;
      }

      /* "src/pyglui/ui_elements.pxi":676
 *                     self.caret = len(self.preview)
 *                 else:
 *                     self.caret = 0             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      /*else*/ {
        __pyx_v_self->caret = 0;
      }
      __pyx_L62:;

      /* "src/pyglui/ui_elements.pxi":677
 *                 else:
 *                     self.caret = 0
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *         while new_input.chars:
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/ui_elements.pxi":666
 *                     self.highlight = True
 *                 should_redraw = True
 *             elif key in (268, 269) and action == 1:  # home on release             # <<<<<<<<<<<<<<
 *                 if mods != 1:
 *                     self.highlight = False
 */
    }
    __pyx_L10:;
  }

  /* "src/pyglui/ui_elements.pxi":679
 *                 should_redraw = True
 * 
 *         while new_input.chars:             # <<<<<<<<<<<<<<
 *             c = new_input.chars.pop(0)
 *             if self.highlight:
 */
  while (1) {
    __pyx_t_6 = (__pyx_v_new_input->chars != Py_None)&&(PyList_GET_SIZE(__pyx_v_new_input->chars) != 0);
    if (!__pyx_t_6) break;

    /* "src/pyglui/ui_elements.pxi":680
 * 
 *         while new_input.chars:
 *             c = new_input.chars.pop(0)             # <<<<<<<<<<<<<<
 *             if self.highlight:
 *                 # new char overwrites all highlighted chars
 */
    if (unlikely(__pyx_v_new_input->chars == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
      __PYX_ERR(2, 680, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_PyList_PopIndex(__pyx_v_new_input->chars, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "src/pyglui/ui_elements.pxi":681
 *         while new_input.chars:
 *             c = new_input.chars.pop(0)
 *             if self.highlight:             # <<<<<<<<<<<<<<
 *                 # new char overwrites all highlighted chars
 *                 self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + c + self.preview[max(self.start_highlight_idx,self.caret):]
 */
    if (__pyx_v_self->highlight) {

      /* "src/pyglui/ui_elements.pxi":683
 *             if self.highlight:
 *                 # new char overwrites all highlighted chars
 *                 self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + c + self.preview[max(self.start_highlight_idx,self.caret):]             # <<<<<<<<<<<<<<
 *                 self.caret = min(self.start_highlight_idx+1,self.caret+1)
 *                 self.caret = max(1,self.caret)
 */
      if (unlikely(__pyx_v_self->preview == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(2, 683, __pyx_L1_error)
      }
      __pyx_t_5 = __pyx_v_self->caret;
      __pyx_t_12 = __pyx_v_self->start_highlight_idx;
      if ((__pyx_t_5 < __pyx_t_12)) {
        __pyx_t_13 = __pyx_t_5;
      } else {
        __pyx_t_13 = __pyx_t_12;
      }
      __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = PyNumber_Add(__pyx_t_7, __pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__pyx_v_self->preview == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(2, 683, __pyx_L1_error)
      }
      __pyx_t_13 = __pyx_v_self->caret;
      __pyx_t_5 = __pyx_v_self->start_highlight_idx;
      if ((__pyx_t_13 > __pyx_t_5)) {
        __pyx_t_12 = __pyx_t_13;
      } else {
        __pyx_t_12 = __pyx_t_5;
      }
      __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_t_12, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_4))) __PYX_ERR(2, 683, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_v_self->preview);
      __Pyx_DECREF(__pyx_v_self->preview);
      __pyx_v_self->preview = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "src/pyglui/ui_elements.pxi":684
 *                 # new char overwrites all highlighted chars
 *                 self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + c + self.preview[max(self.start_highlight_idx,self.caret):]
 *                 self.caret = min(self.start_highlight_idx+1,self.caret+1)             # <<<<<<<<<<<<<<
 *                 self.caret = max(1,self.caret)
 *                 self.highlight = False
 */
      __pyx_t_16 = (__pyx_v_self->caret + 1);
      __pyx_t_17 = (__pyx_v_self->start_highlight_idx + 1);
      if ((__pyx_t_16 < __pyx_t_17)) {
        __pyx_t_18 = __pyx_t_16;
      } else {
        __pyx_t_18 = __pyx_t_17;
      }
      __pyx_v_self->caret = __pyx_t_18;

      /* "src/pyglui/ui_elements.pxi":685
 *                 self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + c + self.preview[max(self.start_highlight_idx,self.caret):]
 *                 self.caret = min(self.start_highlight_idx+1,self.caret+1)
 *                 self.caret = max(1,self.caret)             # <<<<<<<<<<<<<<
 *                 self.highlight = False
 *             else:
 */
      __pyx_t_12 = __pyx_v_self->caret;
      __pyx_t_18 = 1;
      if ((__pyx_t_12 > __pyx_t_18)) {
        __pyx_t_16 = __pyx_t_12;
      } else {
        __pyx_t_16 = __pyx_t_18;
      }
      __pyx_v_self->caret = __pyx_t_16;

      /* "src/pyglui/ui_elements.pxi":686
 *                 self.caret = min(self.start_highlight_idx+1,self.caret+1)
 *                 self.caret = max(1,self.caret)
 *                 self.highlight = False             # <<<<<<<<<<<<<<
 *             else:
 *                 self.preview = self.preview[:self.caret] + c + self.preview[self.caret:]
 */
      __pyx_v_self->highlight = 0;

      /* "src/pyglui/ui_elements.pxi":681
 *         while new_input.chars:
 *             c = new_input.chars.pop(0)
 *             if self.highlight:             # <<<<<<<<<<<<<<
 *                 # new char overwrites all highlighted chars
 *                 self.preview = self.preview[:min(self.start_highlight_idx,self.caret)] + c + self.preview[max(self.start_highlight_idx,self.caret):]
 */
      goto __pyx_L65;
    }

    /* "src/pyglui/ui_elements.pxi":688
 *                 self.highlight = False
 *             else:
 *                 self.preview = self.preview[:self.caret] + c + self.preview[self.caret:]             # <<<<<<<<<<<<<<
 *                 self.caret +=1
 * 
 */
    /*else*/ {
      if (unlikely(__pyx_v_self->preview == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(2, 688, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, __pyx_v_self->caret); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_v_c); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__pyx_v_self->preview == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(2, 688, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_self->caret, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyNumber_Add(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(2, 688, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->preview);
      __Pyx_DECREF(__pyx_v_self->preview);
      __pyx_v_self->preview = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":689
 *             else:
 *                 self.preview = self.preview[:self.caret] + c + self.preview[self.caret:]
 *                 self.caret +=1             # <<<<<<<<<<<<<<
 * 
 *             should_redraw = True
 */
      __pyx_v_self->caret = (__pyx_v_self->caret + 1);
    }
    __pyx_L65:;

    /* "src/pyglui/ui_elements.pxi":691
 *                 self.caret +=1
 * 
 *             should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *         for b in new_input.buttons:
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;
  }

  /* "src/pyglui/ui_elements.pxi":693
 *             should_redraw = True
 * 
 *         for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *             if b[1] == 0 and not self.textfield.mouse_over(new_input.m):
 *                 self.finish_input()
 */
  if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(2, 693, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_new_input->buttons; __Pyx_INCREF(__pyx_t_1); __pyx_t_15 = 0;
  for (;;) {
    if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_4); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(2, 693, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/ui_elements.pxi":694
 * 
 *         for b in new_input.buttons:
 *             if b[1] == 0 and not self.textfield.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                 self.finish_input()
 * 
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 694, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_6 = __pyx_t_10;
      goto __pyx_L69_bool_binop_done;
    }
    __pyx_t_7 = ((PyObject *)__pyx_v_new_input->m);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_10 = (!((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->textfield->__pyx_vtab)->mouse_over(__pyx_v_self->textfield, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_7), 0));
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_6 = __pyx_t_10;
    __pyx_L69_bool_binop_done:;
    if (__pyx_t_6) {

      /* "src/pyglui/ui_elements.pxi":695
 *         for b in new_input.buttons:
 *             if b[1] == 0 and not self.textfield.mouse_over(new_input.m):
 *                 self.finish_input()             # <<<<<<<<<<<<<<
 * 
 *     cdef to_unicode(self,obj):
 */
      __pyx_t_7 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->finish_input(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 695, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "src/pyglui/ui_elements.pxi":694
 * 
 *         for b in new_input.buttons:
 *             if b[1] == 0 and not self.textfield.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                 self.finish_input()
 * 
 */
    }

    /* "src/pyglui/ui_elements.pxi":693
 *             should_redraw = True
 * 
 *         for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *             if b[1] == 0 and not self.textfield.mouse_over(new_input.m):
 *                 self.finish_input()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":569
 * 
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         while new_input.keys:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_scancode);
  __Pyx_XDECREF(__pyx_v_action);
  __Pyx_XDECREF(__pyx_v_mods);
  __Pyx_XDECREF(__pyx_v_min_idx);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_9pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10Text_Input_9pre_handle_input = {"pre_handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10Text_Input_9pre_handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_9pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pre_handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 569, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pre_handle_input") < 0)) __PYX_ERR(2, 569, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pre_handle_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 569, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Text_Input.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 569, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input_8pre_handle_input(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self), __pyx_v_new_input);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_8pre_handle_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pre_handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_10Text_Input_pre_handle_input(__pyx_v_self, __pyx_v_new_input, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":697
 *                 self.finish_input()
 * 
 *     cdef to_unicode(self,obj):             # <<<<<<<<<<<<<<
 *         if type(obj) is unicode:
 *             return obj
 */

static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_to_unicode(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_unicode", 0);

  /* "src/pyglui/ui_elements.pxi":698
 * 
 *     cdef to_unicode(self,obj):
 *         if type(obj) is unicode:             # <<<<<<<<<<<<<<
 *             return obj
 *         elif type(obj) is bytes:
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_obj)) == ((PyObject *)(&PyUnicode_Type)));
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":699
 *     cdef to_unicode(self,obj):
 *         if type(obj) is unicode:
 *             return obj             # <<<<<<<<<<<<<<
 *         elif type(obj) is bytes:
 *             return obj.decode('utf-8')
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_obj);
    __pyx_r = __pyx_v_obj;
    goto __pyx_L0;

    /* "src/pyglui/ui_elements.pxi":698
 * 
 *     cdef to_unicode(self,obj):
 *         if type(obj) is unicode:             # <<<<<<<<<<<<<<
 *             return obj
 *         elif type(obj) is bytes:
 */
  }

  /* "src/pyglui/ui_elements.pxi":700
 *         if type(obj) is unicode:
 *             return obj
 *         elif type(obj) is bytes:             # <<<<<<<<<<<<<<
 *             return obj.decode('utf-8')
 *         else:
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_obj)) == ((PyObject *)(&PyBytes_Type)));
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":701
 *             return obj
 *         elif type(obj) is bytes:
 *             return obj.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             return unicode(obj)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_utf_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "src/pyglui/ui_elements.pxi":700
 *         if type(obj) is unicode:
 *             return obj
 *         elif type(obj) is bytes:             # <<<<<<<<<<<<<<
 *             return obj.decode('utf-8')
 *         else:
 */
  }

  /* "src/pyglui/ui_elements.pxi":703
 *             return obj.decode('utf-8')
 *         else:
 *             return unicode(obj)             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "src/pyglui/ui_elements.pxi":697
 *                 self.finish_input()
 * 
 *     cdef to_unicode(self,obj):             # <<<<<<<<<<<<<<
 *         if type(obj) is unicode:
 *             return obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.to_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":705
 *             return unicode(obj)
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef double d_double_click = 0.5  # delay used for double click
 */

static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_handle_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10Text_Input_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  double __pyx_v_d_double_click;
  double __pyx_v_d_long_press;
  double __pyx_v_now;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_mouse_x_in_text_box = NULL;
  PyObject *__pyx_v_caret_positions = NULL;
  PyObject *__pyx_v_mouse_to_caret = NULL;
  PyObject *__pyx_v_min_distance = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  double __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_10Text_Input_11handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 705, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 705, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 705, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":707
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         global should_redraw
 *         cdef double d_double_click = 0.5  # delay used for double click             # <<<<<<<<<<<<<<
 *         cdef double d_long_press = 1.0  # delay used for long press
 *         cdef double now = time()
 */
  __pyx_v_d_double_click = 0.5;

  /* "src/pyglui/ui_elements.pxi":708
 *         global should_redraw
 *         cdef double d_double_click = 0.5  # delay used for double click
 *         cdef double d_long_press = 1.0  # delay used for long press             # <<<<<<<<<<<<<<
 *         cdef double now = time()
 * 
 */
  __pyx_v_d_long_press = 1.0;

  /* "src/pyglui/ui_elements.pxi":709
 *         cdef double d_double_click = 0.5  # delay used for double click
 *         cdef double d_long_press = 1.0  # delay used for long press
 *         cdef double now = time()             # <<<<<<<<<<<<<<
 * 
 *         if not (self._read_only or parent_read_only):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_now = __pyx_t_8;

  /* "src/pyglui/ui_elements.pxi":711
 *         cdef double now = time()
 * 
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             for b in new_input.buttons[:]:
 *                 if self.textfield.mouse_over(new_input.m) and visible:
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_9 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_9 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  __pyx_t_10 = (!__pyx_t_9);
  if (__pyx_t_10) {

    /* "src/pyglui/ui_elements.pxi":712
 * 
 *         if not (self._read_only or parent_read_only):
 *             for b in new_input.buttons[:]:             # <<<<<<<<<<<<<<
 *                 if self.textfield.mouse_over(new_input.m) and visible:
 *                     if b[1] == 1:
 */
    if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 712, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_new_input->buttons, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(2, 712, __pyx_L1_error)
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":713
 *         if not (self._read_only or parent_read_only):
 *             for b in new_input.buttons[:]:
 *                 if self.textfield.mouse_over(new_input.m) and visible:             # <<<<<<<<<<<<<<
 *                     if b[1] == 1:
 *                         self.selected = True
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_new_input->m);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_9 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->textfield->__pyx_vtab)->mouse_over(__pyx_v_self->textfield, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {
      } else {
        __pyx_t_10 = __pyx_t_9;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_10 = __pyx_v_visible;
      __pyx_L9_bool_binop_done:;
      if (__pyx_t_10) {

        /* "src/pyglui/ui_elements.pxi":714
 *             for b in new_input.buttons[:]:
 *                 if self.textfield.mouse_over(new_input.m) and visible:
 *                     if b[1] == 1:             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         self.highlight = False
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 714, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 714, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 714, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_10) {

          /* "src/pyglui/ui_elements.pxi":715
 *                 if self.textfield.mouse_over(new_input.m) and visible:
 *                     if b[1] == 1:
 *                         self.selected = True             # <<<<<<<<<<<<<<
 *                         self.highlight = False
 *                         self.preview = self.to_unicode(self.sync_val.value)
 */
          __pyx_v_self->selected = 1;

          /* "src/pyglui/ui_elements.pxi":716
 *                     if b[1] == 1:
 *                         self.selected = True
 *                         self.highlight = False             # <<<<<<<<<<<<<<
 *                         self.preview = self.to_unicode(self.sync_val.value)
 *                         self.caret = len(self.preview)
 */
          __pyx_v_self->highlight = 0;

          /* "src/pyglui/ui_elements.pxi":717
 *                         self.selected = True
 *                         self.highlight = False
 *                         self.preview = self.to_unicode(self.sync_val.value)             # <<<<<<<<<<<<<<
 *                         self.caret = len(self.preview)
 * 
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 717, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->to_unicode(__pyx_v_self, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 717, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(2, 717, __pyx_L1_error)
          __Pyx_GIVEREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_v_self->preview);
          __Pyx_DECREF(__pyx_v_self->preview);
          __pyx_v_self->preview = ((PyObject*)__pyx_t_1);
          __pyx_t_1 = 0;

          /* "src/pyglui/ui_elements.pxi":718
 *                         self.highlight = False
 *                         self.preview = self.to_unicode(self.sync_val.value)
 *                         self.caret = len(self.preview)             # <<<<<<<<<<<<<<
 * 
 *                         mouse_x_in_text_box = new_input.m.x-x_spacer-self.textfield.org.x
 */
          __pyx_t_1 = __pyx_v_self->preview;
          __Pyx_INCREF(__pyx_t_1);
          if (unlikely(__pyx_t_1 == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
            __PYX_ERR(2, 718, __pyx_L1_error)
          }
          __pyx_t_12 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(2, 718, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_v_self->caret = __pyx_t_12;

          /* "src/pyglui/ui_elements.pxi":720
 *                         self.caret = len(self.preview)
 * 
 *                         mouse_x_in_text_box = new_input.m.x-x_spacer-self.textfield.org.x             # <<<<<<<<<<<<<<
 * 
 *                         # get caret position closest to current mouse.x
 */
          __pyx_t_1 = PyFloat_FromDouble(((__pyx_v_new_input->m->x - 5.0) - __pyx_v_self->textfield->org->x)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 720, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_mouse_x_in_text_box, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "src/pyglui/ui_elements.pxi":723
 * 
 *                         # get caret position closest to current mouse.x
 *                         self.calculate_start_idx() # caret position needs to be updated relative to text offset in the case of long string of text             # <<<<<<<<<<<<<<
 *                         caret_positions = glfont.char_cumulative_width(x_spacer,0,self.preview[self.start_char_idx:self.caret])
 *                         mouse_to_caret = [abs(i-mouse_x_in_text_box) for i in caret_positions]
 */
          __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->calculate_start_idx(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 723, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "src/pyglui/ui_elements.pxi":724
 *                         # get caret position closest to current mouse.x
 *                         self.calculate_start_idx() # caret position needs to be updated relative to text offset in the case of long string of text
 *                         caret_positions = glfont.char_cumulative_width(x_spacer,0,self.preview[self.start_char_idx:self.caret])             # <<<<<<<<<<<<<<
 *                         mouse_to_caret = [abs(i-mouse_x_in_text_box) for i in caret_positions]
 *                         min_distance = min(mouse_to_caret)
 */
          if (unlikely(__pyx_v_self->preview == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(2, 724, __pyx_L1_error)
          }
          __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_self->start_char_idx, __pyx_v_self->caret); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 724, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->char_cumulative_width(__pyx_v_6pyglui_2ui_glfont, 5.0, 0.0, __pyx_t_1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 724, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF_SET(__pyx_v_caret_positions, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "src/pyglui/ui_elements.pxi":725
 *                         self.calculate_start_idx() # caret position needs to be updated relative to text offset in the case of long string of text
 *                         caret_positions = glfont.char_cumulative_width(x_spacer,0,self.preview[self.start_char_idx:self.caret])
 *                         mouse_to_caret = [abs(i-mouse_x_in_text_box) for i in caret_positions]             # <<<<<<<<<<<<<<
 *                         min_distance = min(mouse_to_caret)
 *                         self.caret = mouse_to_caret.index(min_distance)
 */
          { /* enter inner scope */
            __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 725, __pyx_L14_error)
            __Pyx_GOTREF(__pyx_t_5);
            if (likely(PyList_CheckExact(__pyx_v_caret_positions)) || PyTuple_CheckExact(__pyx_v_caret_positions)) {
              __pyx_t_1 = __pyx_v_caret_positions; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_caret_positions); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 725, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 725, __pyx_L14_error)
            }
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_1))) {
                  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(2, 725, __pyx_L14_error)
                  #else
                  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 725, __pyx_L14_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  #endif
                } else {
                  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(2, 725, __pyx_L14_error)
                  #else
                  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 725, __pyx_L14_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  #endif
                }
              } else {
                __pyx_t_4 = __pyx_t_13(__pyx_t_1);
                if (unlikely(!__pyx_t_4)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(2, 725, __pyx_L14_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_4);
              }
              __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_i, __pyx_t_4);
              __pyx_t_4 = 0;
              __pyx_t_4 = PyNumber_Subtract(__pyx_8genexpr2__pyx_v_i, __pyx_v_mouse_x_in_text_box); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 725, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_3 = __Pyx_PyNumber_Absolute(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 725, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))) __PYX_ERR(2, 725, __pyx_L14_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_i); __pyx_8genexpr2__pyx_v_i = 0;
            goto __pyx_L17_exit_scope;
            __pyx_L14_error:;
            __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_i); __pyx_8genexpr2__pyx_v_i = 0;
            goto __pyx_L1_error;
            __pyx_L17_exit_scope:;
          } /* exit inner scope */
          __Pyx_XDECREF_SET(__pyx_v_mouse_to_caret, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "src/pyglui/ui_elements.pxi":726
 *                         caret_positions = glfont.char_cumulative_width(x_spacer,0,self.preview[self.start_char_idx:self.caret])
 *                         mouse_to_caret = [abs(i-mouse_x_in_text_box) for i in caret_positions]
 *                         min_distance = min(mouse_to_caret)             # <<<<<<<<<<<<<<
 *                         self.caret = mouse_to_caret.index(min_distance)
 * 
 */
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_v_mouse_to_caret); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 726, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_min_distance, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "src/pyglui/ui_elements.pxi":727
 *                         mouse_to_caret = [abs(i-mouse_x_in_text_box) for i in caret_positions]
 *                         min_distance = min(mouse_to_caret)
 *                         self.caret = mouse_to_caret.index(min_distance)             # <<<<<<<<<<<<<<
 * 
 *                         should_redraw = True
 */
          __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_mouse_to_caret, __pyx_v_min_distance); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 727, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 727, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_self->caret = __pyx_t_7;

          /* "src/pyglui/ui_elements.pxi":729
 *                         self.caret = mouse_to_caret.index(min_distance)
 * 
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 *                         self.t_long_press = now
 * 
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":730
 * 
 *                         should_redraw = True
 *                         self.t_long_press = now             # <<<<<<<<<<<<<<
 * 
 *                         if now - self.t_double_click > d_double_click:
 */
          __pyx_v_self->t_long_press = __pyx_v_now;

          /* "src/pyglui/ui_elements.pxi":732
 *                         self.t_long_press = now
 * 
 *                         if now - self.t_double_click > d_double_click:             # <<<<<<<<<<<<<<
 *                             self.highlight = False
 *                             self.t_double_click = now
 */
          __pyx_t_10 = ((__pyx_v_now - __pyx_v_self->t_double_click) > __pyx_v_d_double_click);
          if (__pyx_t_10) {

            /* "src/pyglui/ui_elements.pxi":733
 * 
 *                         if now - self.t_double_click > d_double_click:
 *                             self.highlight = False             # <<<<<<<<<<<<<<
 *                             self.t_double_click = now
 *                         elif len(self.preview) > 0:
 */
            __pyx_v_self->highlight = 0;

            /* "src/pyglui/ui_elements.pxi":734
 *                         if now - self.t_double_click > d_double_click:
 *                             self.highlight = False
 *                             self.t_double_click = now             # <<<<<<<<<<<<<<
 *                         elif len(self.preview) > 0:
 *                             self.highlight = True
 */
            __pyx_v_self->t_double_click = __pyx_v_now;

            /* "src/pyglui/ui_elements.pxi":732
 *                         self.t_long_press = now
 * 
 *                         if now - self.t_double_click > d_double_click:             # <<<<<<<<<<<<<<
 *                             self.highlight = False
 *                             self.t_double_click = now
 */
            goto __pyx_L18;
          }

          /* "src/pyglui/ui_elements.pxi":735
 *                             self.highlight = False
 *                             self.t_double_click = now
 *                         elif len(self.preview) > 0:             # <<<<<<<<<<<<<<
 *                             self.highlight = True
 *                             self.start_highlight_idx = 0
 */
          __pyx_t_5 = __pyx_v_self->preview;
          __Pyx_INCREF(__pyx_t_5);
          if (unlikely(__pyx_t_5 == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
            __PYX_ERR(2, 735, __pyx_L1_error)
          }
          __pyx_t_12 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(2, 735, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_10 = (__pyx_t_12 > 0);
          if (__pyx_t_10) {

            /* "src/pyglui/ui_elements.pxi":736
 *                             self.t_double_click = now
 *                         elif len(self.preview) > 0:
 *                             self.highlight = True             # <<<<<<<<<<<<<<
 *                             self.start_highlight_idx = 0
 *                             self.caret = len(self.preview)
 */
            __pyx_v_self->highlight = 1;

            /* "src/pyglui/ui_elements.pxi":737
 *                         elif len(self.preview) > 0:
 *                             self.highlight = True
 *                             self.start_highlight_idx = 0             # <<<<<<<<<<<<<<
 *                             self.caret = len(self.preview)
 *                             self.t_double_click = 0.
 */
            __pyx_v_self->start_highlight_idx = 0;

            /* "src/pyglui/ui_elements.pxi":738
 *                             self.highlight = True
 *                             self.start_highlight_idx = 0
 *                             self.caret = len(self.preview)             # <<<<<<<<<<<<<<
 *                             self.t_double_click = 0.
 * 
 */
            __pyx_t_5 = __pyx_v_self->preview;
            __Pyx_INCREF(__pyx_t_5);
            if (unlikely(__pyx_t_5 == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
              __PYX_ERR(2, 738, __pyx_L1_error)
            }
            __pyx_t_12 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(2, 738, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_v_self->caret = __pyx_t_12;

            /* "src/pyglui/ui_elements.pxi":739
 *                             self.start_highlight_idx = 0
 *                             self.caret = len(self.preview)
 *                             self.t_double_click = 0.             # <<<<<<<<<<<<<<
 * 
 *                     elif b[1] == 0:  # button release
 */
            __pyx_v_self->t_double_click = 0.;

            /* "src/pyglui/ui_elements.pxi":735
 *                             self.highlight = False
 *                             self.t_double_click = now
 *                         elif len(self.preview) > 0:             # <<<<<<<<<<<<<<
 *                             self.highlight = True
 *                             self.start_highlight_idx = 0
 */
          }
          __pyx_L18:;

          /* "src/pyglui/ui_elements.pxi":714
 *             for b in new_input.buttons[:]:
 *                 if self.textfield.mouse_over(new_input.m) and visible:
 *                     if b[1] == 1:             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         self.highlight = False
 */
          goto __pyx_L11;
        }

        /* "src/pyglui/ui_elements.pxi":741
 *                             self.t_double_click = 0.
 * 
 *                     elif b[1] == 0:  # button release             # <<<<<<<<<<<<<<
 *                         if now - self.t_long_press > d_long_press:
 *                             # long press highlights all text
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 741, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 741, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 741, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_10) {

          /* "src/pyglui/ui_elements.pxi":742
 * 
 *                     elif b[1] == 0:  # button release
 *                         if now - self.t_long_press > d_long_press:             # <<<<<<<<<<<<<<
 *                             # long press highlights all text
 *                             # similar to the behavior on a mobile device
 */
          __pyx_t_10 = ((__pyx_v_now - __pyx_v_self->t_long_press) > __pyx_v_d_long_press);
          if (__pyx_t_10) {

            /* "src/pyglui/ui_elements.pxi":745
 *                             # long press highlights all text
 *                             # similar to the behavior on a mobile device
 *                             self.highlight = True             # <<<<<<<<<<<<<<
 *                             self.start_highlight_idx = 0
 *                             self.caret = len(self.preview)
 */
            __pyx_v_self->highlight = 1;

            /* "src/pyglui/ui_elements.pxi":746
 *                             # similar to the behavior on a mobile device
 *                             self.highlight = True
 *                             self.start_highlight_idx = 0             # <<<<<<<<<<<<<<
 *                             self.caret = len(self.preview)
 * 
 */
            __pyx_v_self->start_highlight_idx = 0;

            /* "src/pyglui/ui_elements.pxi":747
 *                             self.highlight = True
 *                             self.start_highlight_idx = 0
 *                             self.caret = len(self.preview)             # <<<<<<<<<<<<<<
 * 
 *                         should_redraw = True
 */
            __pyx_t_1 = __pyx_v_self->preview;
            __Pyx_INCREF(__pyx_t_1);
            if (unlikely(__pyx_t_1 == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
              __PYX_ERR(2, 747, __pyx_L1_error)
            }
            __pyx_t_12 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(2, 747, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_v_self->caret = __pyx_t_12;

            /* "src/pyglui/ui_elements.pxi":742
 * 
 *                     elif b[1] == 0:  # button release
 *                         if now - self.t_long_press > d_long_press:             # <<<<<<<<<<<<<<
 *                             # long press highlights all text
 *                             # similar to the behavior on a mobile device
 */
          }

          /* "src/pyglui/ui_elements.pxi":749
 *                             self.caret = len(self.preview)
 * 
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *                     if self.catch_input:
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":741
 *                             self.t_double_click = 0.
 * 
 *                     elif b[1] == 0:  # button release             # <<<<<<<<<<<<<<
 *                         if now - self.t_long_press > d_long_press:
 *                             # long press highlights all text
 */
        }
        __pyx_L11:;

        /* "src/pyglui/ui_elements.pxi":751
 *                         should_redraw = True
 * 
 *                     if self.catch_input:             # <<<<<<<<<<<<<<
 *                         # this is required so that we can catch mouse up behavior
 *                         new_input.buttons.remove(b)
 */
        if (__pyx_v_self->catch_input) {

          /* "src/pyglui/ui_elements.pxi":753
 *                     if self.catch_input:
 *                         # this is required so that we can catch mouse up behavior
 *                         new_input.buttons.remove(b)             # <<<<<<<<<<<<<<
 * 
 *         if self.selected:
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_input->buttons, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 753, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
              __pyx_t_7 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_b};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "src/pyglui/ui_elements.pxi":751
 *                         should_redraw = True
 * 
 *                     if self.catch_input:             # <<<<<<<<<<<<<<
 *                         # this is required so that we can catch mouse up behavior
 *                         new_input.buttons.remove(b)
 */
        }

        /* "src/pyglui/ui_elements.pxi":713
 *         if not (self._read_only or parent_read_only):
 *             for b in new_input.buttons[:]:
 *                 if self.textfield.mouse_over(new_input.m) and visible:             # <<<<<<<<<<<<<<
 *                     if b[1] == 1:
 *                         self.selected = True
 */
      }

      /* "src/pyglui/ui_elements.pxi":712
 * 
 *         if not (self._read_only or parent_read_only):
 *             for b in new_input.buttons[:]:             # <<<<<<<<<<<<<<
 *                 if self.textfield.mouse_over(new_input.m) and visible:
 *                     if b[1] == 1:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":711
 *         cdef double now = time()
 * 
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             for b in new_input.buttons[:]:
 *                 if self.textfield.mouse_over(new_input.m) and visible:
 */
  }

  /* "src/pyglui/ui_elements.pxi":755
 *                         new_input.buttons.remove(b)
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             new_input.active_ui_elements.append(self)
 * 
 */
  if (__pyx_v_self->selected) {

    /* "src/pyglui/ui_elements.pxi":756
 * 
 *         if self.selected:
 *             new_input.active_ui_elements.append(self)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    if (unlikely(__pyx_v_new_input->active_ui_elements == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
      __PYX_ERR(2, 756, __pyx_L1_error)
    }
    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_new_input->active_ui_elements, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(2, 756, __pyx_L1_error)

    /* "src/pyglui/ui_elements.pxi":755
 *                         new_input.buttons.remove(b)
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             new_input.active_ui_elements.append(self)
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":705
 *             return unicode(obj)
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef double d_double_click = 0.5  # delay used for double click
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_mouse_x_in_text_box);
  __Pyx_XDECREF(__pyx_v_caret_positions);
  __Pyx_XDECREF(__pyx_v_mouse_to_caret);
  __Pyx_XDECREF(__pyx_v_min_distance);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10Text_Input_11handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10Text_Input_11handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 705, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 705, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 705, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 705, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 705, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 705, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 705, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 705, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Text_Input.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 705, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input_10handle_input(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_10handle_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Text_Input->__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":759
 * 
 * 
 *     cdef finish_input(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_finish_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("finish_input", 0);

  /* "src/pyglui/ui_elements.pxi":761
 *     cdef finish_input(self):
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         self.update_input_val()
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/ui_elements.pxi":762
 *         global should_redraw
 *         should_redraw = True
 *         self.selected = False             # <<<<<<<<<<<<<<
 *         self.update_input_val()
 * 
 */
  __pyx_v_self->selected = 0;

  /* "src/pyglui/ui_elements.pxi":763
 *         should_redraw = True
 *         self.selected = False
 *         self.update_input_val()             # <<<<<<<<<<<<<<
 * 
 *     cdef update_input_val(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->update_input_val(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":759
 * 
 * 
 *     cdef finish_input(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.finish_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":765
 *         self.update_input_val()
 * 
 *     cdef update_input_val(self):             # <<<<<<<<<<<<<<
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):
 */

static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_update_input_val(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self) {
  PyObject *__pyx_v_typed_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_input_val", 0);

  /* "src/pyglui/ui_elements.pxi":767
 *     cdef update_input_val(self):
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):             # <<<<<<<<<<<<<<
 *             typed_val = self.preview
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyglui/ui_elements.pxi":768
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):
 *             typed_val = self.preview             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
    __pyx_t_1 = __pyx_v_self->preview;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_typed_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":767
 *     cdef update_input_val(self):
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):             # <<<<<<<<<<<<<<
 *             typed_val = self.preview
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":770
 *             typed_val = self.preview
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 typed_val = self.data_type(eval(self.preview))
 *             except:
 */
  /*else*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "src/pyglui/ui_elements.pxi":771
 *         else:
 *             try:
 *                 typed_val = self.data_type(eval(self.preview))             # <<<<<<<<<<<<<<
 *             except:
 *                 #failed to convert. Ignore user input.
 */
        __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 771, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 771, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (((PyObject *)__pyx_v_self)) {
          if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_self, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(2, 771, __pyx_L4_error)
        }
        if (__pyx_v_typed_val) {
          if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_typed_val, __pyx_v_typed_val) < 0) __PYX_ERR(2, 771, __pyx_L4_error)
        }
        __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 771, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_self->preview);
        __Pyx_GIVEREF(__pyx_v_self->preview);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->preview);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
        __pyx_t_6 = 0;
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 771, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_INCREF(__pyx_v_self->data_type);
        __pyx_t_8 = __pyx_v_self->data_type; __pyx_t_6 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_9 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 771, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __pyx_v_typed_val = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":770
 *             typed_val = self.preview
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 typed_val = self.data_type(eval(self.preview))
 *             except:
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "src/pyglui/ui_elements.pxi":772
 *             try:
 *                 typed_val = self.data_type(eval(self.preview))
 *             except:             # <<<<<<<<<<<<<<
 *                 #failed to convert. Ignore user input.
 *                 return
 */
      /*except:*/ {
        __Pyx_AddTraceback("pyglui.ui.Text_Input.update_input_val", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(2, 772, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_7);

        /* "src/pyglui/ui_elements.pxi":774
 *             except:
 *                 #failed to convert. Ignore user input.
 *                 return             # <<<<<<<<<<<<<<
 *         self.sync_val.value = typed_val
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_except_return;
      }
      __pyx_L6_except_error:;

      /* "src/pyglui/ui_elements.pxi":770
 *             typed_val = self.preview
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 typed_val = self.data_type(eval(self.preview))
 *             except:
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":775
 *                 #failed to convert. Ignore user input.
 *                 return
 *         self.sync_val.value = typed_val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_v_typed_val) < 0) __PYX_ERR(2, 775, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":765
 *         self.update_input_val()
 * 
 *     cdef update_input_val(self):             # <<<<<<<<<<<<<<
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.update_input_val", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_typed_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":778
 * 
 * 
 *     cdef abort_input(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_abort_input(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("abort_input", 0);

  /* "src/pyglui/ui_elements.pxi":780
 *     cdef abort_input(self):
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 *         self.selected = False
 * 
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/ui_elements.pxi":781
 *         global should_redraw
 *         should_redraw = True
 *         self.selected = False             # <<<<<<<<<<<<<<
 * 
 *     cdef calculate_start_idx(self):
 */
  __pyx_v_self->selected = 0;

  /* "src/pyglui/ui_elements.pxi":778
 * 
 * 
 *     cdef abort_input(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":783
 *         self.selected = False
 * 
 *     cdef calculate_start_idx(self):             # <<<<<<<<<<<<<<
 *         # clip the preview text appropriately so that it always fits within the textfield
 *         # make sure there is always one char before or after caret
 */

static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_calculate_start_idx(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self) {
  float __pyx_v_width;
  int __pyx_v_start_char_idx;
  int __pyx_v_caret_x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  long __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_start_idx", 0);

  /* "src/pyglui/ui_elements.pxi":788
 *         cdef float width
 *         cdef int start_char_idx, caret_x
 *         width = self.textfield.size.x - 2*x_spacer             # <<<<<<<<<<<<<<
 * 
 *         # sanity check - if the preview is shorter than the width, then start_char_idx should be 0
 */
  __pyx_v_width = (__pyx_v_self->textfield->size->x - 10.0);

  /* "src/pyglui/ui_elements.pxi":791
 * 
 *         # sanity check - if the preview is shorter than the width, then start_char_idx should be 0
 *         if glfont.text_bounds(x_spacer,0,self.preview[self.start_char_idx:]) < width:             # <<<<<<<<<<<<<<
 *             self.start_char_idx = 0
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_text_bounds); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__pyx_v_self->preview == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 791, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_self->start_char_idx, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_int_5, __pyx_int_0, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_width); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "src/pyglui/ui_elements.pxi":792
 *         # sanity check - if the preview is shorter than the width, then start_char_idx should be 0
 *         if glfont.text_bounds(x_spacer,0,self.preview[self.start_char_idx:]) < width:
 *             self.start_char_idx = 0             # <<<<<<<<<<<<<<
 * 
 *         # get the position of the caret
 */
    __pyx_v_self->start_char_idx = 0;

    /* "src/pyglui/ui_elements.pxi":791
 * 
 *         # sanity check - if the preview is shorter than the width, then start_char_idx should be 0
 *         if glfont.text_bounds(x_spacer,0,self.preview[self.start_char_idx:]) < width:             # <<<<<<<<<<<<<<
 *             self.start_char_idx = 0
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":795
 * 
 *         # get the position of the caret
 *         caret_x = glfont.text_bounds(x_spacer,0,self.preview[self.start_char_idx:self.caret])             # <<<<<<<<<<<<<<
 * 
 *         # scroll left:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_text_bounds); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__pyx_v_self->preview == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 795, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_self->start_char_idx, __pyx_v_self->caret); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_int_5, __pyx_int_0, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_caret_x = __pyx_t_5;

  /* "src/pyglui/ui_elements.pxi":799
 *         # scroll left:
 *         # if the caret is == start_char_idx subtract one from start_char_idx until idx = 0
 *         if self.caret == self.start_char_idx:             # <<<<<<<<<<<<<<
 *             # start_char_idx = len(self.preview)-glfont.get_clip_position(self.preview[::-1],width)
 *             self.start_char_idx = max(0,self.start_char_idx-1)
 */
  __pyx_t_6 = (__pyx_v_self->caret == __pyx_v_self->start_char_idx);
  if (__pyx_t_6) {

    /* "src/pyglui/ui_elements.pxi":801
 *         if self.caret == self.start_char_idx:
 *             # start_char_idx = len(self.preview)-glfont.get_clip_position(self.preview[::-1],width)
 *             self.start_char_idx = max(0,self.start_char_idx-1)             # <<<<<<<<<<<<<<
 * 
 *         # scroll right:
 */
    __pyx_t_7 = (__pyx_v_self->start_char_idx - 1);
    __pyx_t_8 = 0;
    if ((__pyx_t_7 > __pyx_t_8)) {
      __pyx_t_9 = __pyx_t_7;
    } else {
      __pyx_t_9 = __pyx_t_8;
    }
    __pyx_v_self->start_char_idx = __pyx_t_9;

    /* "src/pyglui/ui_elements.pxi":799
 *         # scroll left:
 *         # if the caret is == start_char_idx subtract one from start_char_idx until idx = 0
 *         if self.caret == self.start_char_idx:             # <<<<<<<<<<<<<<
 *             # start_char_idx = len(self.preview)-glfont.get_clip_position(self.preview[::-1],width)
 *             self.start_char_idx = max(0,self.start_char_idx-1)
 */
  }

  /* "src/pyglui/ui_elements.pxi":805
 *         # scroll right:
 *         # if the caret reaches the right bound
 *         if caret_x >= width:             # <<<<<<<<<<<<<<
 *             # find the starting idx of the left most (starting) char if >= width of textfield+padding
 *             # at the current caret position - overflow on the right is handled by draw_limited_text
 */
  __pyx_t_6 = (__pyx_v_caret_x >= __pyx_v_width);
  if (__pyx_t_6) {

    /* "src/pyglui/ui_elements.pxi":808
 *             # find the starting idx of the left most (starting) char if >= width of textfield+padding
 *             # at the current caret position - overflow on the right is handled by draw_limited_text
 *             start_char_idx = glfont.get_first_char_idx(self.preview[:self.caret],width)             # <<<<<<<<<<<<<<
 *             # adding some preview after the caret by modifying the start_char
 *             # this may result in more than one extra char after, unless monospaced fonts are used
 */
    if (unlikely(__pyx_v_self->preview == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 808, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, 0, __pyx_v_self->caret); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->get_first_char_idx(__pyx_v_6pyglui_2ui_glfont, __pyx_t_3, __pyx_v_width, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 808, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_start_char_idx = __pyx_t_5;

    /* "src/pyglui/ui_elements.pxi":811
 *             # adding some preview after the caret by modifying the start_char
 *             # this may result in more than one extra char after, unless monospaced fonts are used
 *             self.start_char_idx = min(len(self.preview),start_char_idx)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_5 = __pyx_v_start_char_idx;
    __pyx_t_2 = __pyx_v_self->preview;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(2, 811, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(2, 811, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if ((__pyx_t_5 < __pyx_t_10)) {
      __pyx_t_11 = __pyx_t_5;
    } else {
      __pyx_t_11 = __pyx_t_10;
    }
    __pyx_v_self->start_char_idx = __pyx_t_11;

    /* "src/pyglui/ui_elements.pxi":805
 *         # scroll right:
 *         # if the caret reaches the right bound
 *         if caret_x >= width:             # <<<<<<<<<<<<<<
 *             # find the starting idx of the left most (starting) char if >= width of textfield+padding
 *             # at the current caret position - overflow on the right is handled by draw_limited_text
 */
  }

  /* "src/pyglui/ui_elements.pxi":783
 *         self.selected = False
 * 
 *     cdef calculate_start_idx(self):             # <<<<<<<<<<<<<<
 *         # clip the preview text appropriately so that it always fits within the textfield
 *         # make sure there is always one char before or after caret
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.calculate_start_idx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":814
 * 
 * 
 *     cdef draw_text_field(self):             # <<<<<<<<<<<<<<
 *         cdef float x
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_10Text_Input_draw_text_field(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self) {
  float __pyx_v_x;
  PyObject *__pyx_v_highlight_text = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  float __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_text_field", 0);

  /* "src/pyglui/ui_elements.pxi":817
 *         cdef float x
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             self.calculate_start_idx()
 *             highlight_text = self.preview[self.start_char_idx:self.start_highlight_idx]
 */
  if (__pyx_v_self->selected) {

    /* "src/pyglui/ui_elements.pxi":818
 * 
 *         if self.selected:
 *             self.calculate_start_idx()             # <<<<<<<<<<<<<<
 *             highlight_text = self.preview[self.start_char_idx:self.start_highlight_idx]
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->calculate_start_idx(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":819
 *         if self.selected:
 *             self.calculate_start_idx()
 *             highlight_text = self.preview[self.start_char_idx:self.start_highlight_idx]             # <<<<<<<<<<<<<<
 * 
 *             gl.glPushMatrix()
 */
    if (unlikely(__pyx_v_self->preview == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 819, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_self->start_char_idx, __pyx_v_self->start_highlight_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_highlight_text = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":821
 *             highlight_text = self.preview[self.start_char_idx:self.start_highlight_idx]
 * 
 *             gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *             #then transform locally and render the UI element
 *             gl.glTranslatef(self.textfield.org.x,self.textfield.org.y,0)
 */
    glPushMatrix();

    /* "src/pyglui/ui_elements.pxi":823
 *             gl.glPushMatrix()
 *             #then transform locally and render the UI element
 *             gl.glTranslatef(self.textfield.org.x,self.textfield.org.y,0)             # <<<<<<<<<<<<<<
 *             rect_outline(Vec2(0, 0), self.textfield.size, 2.*ui_scale, self.text_input_line_highlight_color)
 * 
 */
    glTranslatef(__pyx_v_self->textfield->org->x, __pyx_v_self->textfield->org->y, 0.0);

    /* "src/pyglui/ui_elements.pxi":824
 *             #then transform locally and render the UI element
 *             gl.glTranslatef(self.textfield.org.x,self.textfield.org.y,0)
 *             rect_outline(Vec2(0, 0), self.textfield.size, 2.*ui_scale, self.text_input_line_highlight_color)             # <<<<<<<<<<<<<<
 * 
 *             x = glfont.text_bounds(0,0,self.preview[self.start_char_idx:self.caret])+x_spacer
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = ((PyObject *)__pyx_v_self->textfield->size);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = ((PyObject *)__pyx_v_self->text_input_line_highlight_color);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __pyx_f_6pyglui_2ui_rect_outline(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), (2. * __pyx_v_6pyglui_2ui_ui_scale), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/pyglui/ui_elements.pxi":826
 *             rect_outline(Vec2(0, 0), self.textfield.size, 2.*ui_scale, self.text_input_line_highlight_color)
 * 
 *             x = glfont.text_bounds(0,0,self.preview[self.start_char_idx:self.caret])+x_spacer             # <<<<<<<<<<<<<<
 *             # draw highlighted text if any
 *             if self.highlight:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_text_bounds); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__pyx_v_self->preview == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 826, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_self->start_char_idx, __pyx_v_self->caret); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_int_0, __pyx_int_0, __pyx_t_2};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_5, 5, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 826, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_x = __pyx_t_6;

    /* "src/pyglui/ui_elements.pxi":828
 *             x = glfont.text_bounds(0,0,self.preview[self.start_char_idx:self.caret])+x_spacer
 *             # draw highlighted text if any
 *             if self.highlight:             # <<<<<<<<<<<<<<
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),
 */
    if (__pyx_v_self->highlight) {

      /* "src/pyglui/ui_elements.pxi":829
 *             # draw highlighted text if any
 *             if self.highlight:
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,             # <<<<<<<<<<<<<<
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),
 *                     self.text_input_highlight_color)
 */
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/ui_elements.pxi":830
 *             if self.highlight:
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),             # <<<<<<<<<<<<<<
 *                     self.text_input_highlight_color)
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_text_bounds); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_int_0, __pyx_int_0, __pyx_v_highlight_text};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_5, 5, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/ui_elements.pxi":829
 *             # draw highlighted text if any
 *             if self.highlight:
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,             # <<<<<<<<<<<<<<
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),
 *                     self.text_input_highlight_color)
 */
      __pyx_t_6 = (__pyx_v_self->textfield->size->x - 5.0);

      /* "src/pyglui/ui_elements.pxi":830
 *             if self.highlight:
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),             # <<<<<<<<<<<<<<
 *                     self.text_input_highlight_color)
 * 
 */
      __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 830, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 830, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_8) {
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_4 = __pyx_t_2;
      } else {

        /* "src/pyglui/ui_elements.pxi":829
 *             # draw highlighted text if any
 *             if self.highlight:
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,             # <<<<<<<<<<<<<<
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),
 *                     self.text_input_highlight_color)
 */
        __pyx_t_7 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __pyx_t_7;
        __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/ui_elements.pxi":830
 *             if self.highlight:
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),             # <<<<<<<<<<<<<<
 *                     self.text_input_highlight_color)
 * 
 */
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->textfield->size->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "src/pyglui/ui_elements.pxi":829
 *             # draw highlighted text if any
 *             if self.highlight:
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,             # <<<<<<<<<<<<<<
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),
 *                     self.text_input_highlight_color)
 */
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "src/pyglui/ui_elements.pxi":831
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),
 *                     self.text_input_highlight_color)             # <<<<<<<<<<<<<<
 * 
 *             glfont.draw_limited_text(x_spacer,0,self.preview[self.start_char_idx:],self.textfield.size.x-x_spacer)
 */
      __pyx_t_7 = ((PyObject *)__pyx_v_self->text_input_highlight_color);
      __Pyx_INCREF(__pyx_t_7);

      /* "src/pyglui/ui_elements.pxi":829
 *             # draw highlighted text if any
 *             if self.highlight:
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,             # <<<<<<<<<<<<<<
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),
 *                     self.text_input_highlight_color)
 */
      __pyx_t_4 = __pyx_f_6pyglui_2ui_rect_corners(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/ui_elements.pxi":828
 *             x = glfont.text_bounds(0,0,self.preview[self.start_char_idx:self.caret])+x_spacer
 *             # draw highlighted text if any
 *             if self.highlight:             # <<<<<<<<<<<<<<
 *                rect_corners(Vec2(x,0),Vec2(min(self.textfield.size.x-x_spacer,
 *                     glfont.text_bounds(0,0,highlight_text)+x_spacer),self.textfield.size.y),
 */
    }

    /* "src/pyglui/ui_elements.pxi":833
 *                     self.text_input_highlight_color)
 * 
 *             glfont.draw_limited_text(x_spacer,0,self.preview[self.start_char_idx:],self.textfield.size.x-x_spacer)             # <<<<<<<<<<<<<<
 * 
 *             # draw the caret
 */
    if (unlikely(__pyx_v_self->preview == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 833, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_PyUnicode_Substring(__pyx_v_self->preview, __pyx_v_self->start_char_idx, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_limited_text(__pyx_v_6pyglui_2ui_glfont, 5.0, 0.0, __pyx_t_4, (__pyx_v_self->textfield->size->x - 5.0), 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "src/pyglui/ui_elements.pxi":836
 * 
 *             # draw the caret
 *             gl.glColor4f(1,1,1,.5)             # <<<<<<<<<<<<<<
 *             gl.glLineWidth(1)
 *             gl.glBegin(gl.GL_LINES)
 */
    glColor4f(1.0, 1.0, 1.0, .5);

    /* "src/pyglui/ui_elements.pxi":837
 *             # draw the caret
 *             gl.glColor4f(1,1,1,.5)
 *             gl.glLineWidth(1)             # <<<<<<<<<<<<<<
 *             gl.glBegin(gl.GL_LINES)
 *             gl.glVertex3f(x,0,0)
 */
    glLineWidth(1.0);

    /* "src/pyglui/ui_elements.pxi":838
 *             gl.glColor4f(1,1,1,.5)
 *             gl.glLineWidth(1)
 *             gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *             gl.glVertex3f(x,0,0)
 *             gl.glVertex3f(x,self.textfield.size.y,0)
 */
    glBegin(GL_LINES);

    /* "src/pyglui/ui_elements.pxi":839
 *             gl.glLineWidth(1)
 *             gl.glBegin(gl.GL_LINES)
 *             gl.glVertex3f(x,0,0)             # <<<<<<<<<<<<<<
 *             gl.glVertex3f(x,self.textfield.size.y,0)
 *             gl.glEnd()
 */
    glVertex3f(__pyx_v_x, 0.0, 0.0);

    /* "src/pyglui/ui_elements.pxi":840
 *             gl.glBegin(gl.GL_LINES)
 *             gl.glVertex3f(x,0,0)
 *             gl.glVertex3f(x,self.textfield.size.y,0)             # <<<<<<<<<<<<<<
 *             gl.glEnd()
 *             gl.glPopMatrix()
 */
    glVertex3f(__pyx_v_x, __pyx_v_self->textfield->size->y, 0.0);

    /* "src/pyglui/ui_elements.pxi":841
 *             gl.glVertex3f(x,0,0)
 *             gl.glVertex3f(x,self.textfield.size.y,0)
 *             gl.glEnd()             # <<<<<<<<<<<<<<
 *             gl.glPopMatrix()
 * 
 */
    glEnd();

    /* "src/pyglui/ui_elements.pxi":842
 *             gl.glVertex3f(x,self.textfield.size.y,0)
 *             gl.glEnd()
 *             gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
    glPopMatrix();

    /* "src/pyglui/ui_elements.pxi":817
 *         cdef float x
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             self.calculate_start_idx()
 *             highlight_text = self.preview[self.start_char_idx:self.start_highlight_idx]
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":845
 * 
 *         else:
 *             gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *             #then transform locally and render the UI element
 *             #self.textfield.sketch()
 */
  /*else*/ {
    glPushMatrix();

    /* "src/pyglui/ui_elements.pxi":848
 *             #then transform locally and render the UI element
 *             #self.textfield.sketch()
 *             gl.glTranslatef(self.textfield.org.x,self.textfield.org.y,0)             # <<<<<<<<<<<<<<
 *             rect_outline(Vec2(0, 0), self.textfield.size, 2.*ui_scale, RGBA(*color_line_default))
 *             glfont.draw_limited_text(x_spacer,0,self.to_unicode(self.sync_val.value),self.textfield.size.x-x_spacer)
 */
    glTranslatef(__pyx_v_self->textfield->org->x, __pyx_v_self->textfield->org->y, 0.0);

    /* "src/pyglui/ui_elements.pxi":849
 *             #self.textfield.sketch()
 *             gl.glTranslatef(self.textfield.org.x,self.textfield.org.y,0)
 *             rect_outline(Vec2(0, 0), self.textfield.size, 2.*ui_scale, RGBA(*color_line_default))             # <<<<<<<<<<<<<<
 *             glfont.draw_limited_text(x_spacer,0,self.to_unicode(self.sync_val.value),self.textfield.size.x-x_spacer)
 *             gl.glPopMatrix()
 */
    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = ((PyObject *)__pyx_v_self->textfield->size);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_6pyglui_2ui_rect_outline(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_7), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_4), (2. * __pyx_v_6pyglui_2ui_ui_scale), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/ui_elements.pxi":850
 *             gl.glTranslatef(self.textfield.org.x,self.textfield.org.y,0)
 *             rect_outline(Vec2(0, 0), self.textfield.size, 2.*ui_scale, RGBA(*color_line_default))
 *             glfont.draw_limited_text(x_spacer,0,self.to_unicode(self.sync_val.value),self.textfield.size.x-x_spacer)             # <<<<<<<<<<<<<<
 *             gl.glPopMatrix()
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Text_Input *)__pyx_v_self->__pyx_base.__pyx_vtab)->to_unicode(__pyx_v_self, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_limited_text(__pyx_v_6pyglui_2ui_glfont, 5.0, 0.0, __pyx_t_2, (__pyx_v_self->textfield->size->x - 5.0), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/ui_elements.pxi":851
 *             rect_outline(Vec2(0, 0), self.textfield.size, 2.*ui_scale, RGBA(*color_line_default))
 *             glfont.draw_limited_text(x_spacer,0,self.to_unicode(self.sync_val.value),self.textfield.size.x-x_spacer)
 *             gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    glPopMatrix();
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":814
 * 
 * 
 *     cdef draw_text_field(self):             # <<<<<<<<<<<<<<
 *         cdef float x
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.Text_Input.draw_text_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_highlight_text);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":504
 *     cdef FitBox field, textfield
 *     cdef bint selected,highlight, catch_input
 *     cdef readonly Synced_Value sync_val             # <<<<<<<<<<<<<<
 *     cdef unicode preview
 *     cdef int caret,start_char_idx,end_char_idx,start_highlight_idx
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_8sync_val_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_8sync_val_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input_8sync_val___get__(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_8sync_val___get__(struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->sync_val);
  __pyx_r = ((PyObject *)__pyx_v_self->sync_val);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10Text_Input_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10Text_Input_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input_12__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Text_Input.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_10Text_Input_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10Text_Input_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_10Text_Input_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Text_Input.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_10Text_Input_14__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Text_Input *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_10Text_Input_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Text_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Text_Input.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":859
 *     cdef public basestring display_format
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.validator = lambda x: x
 *         self.display_format = '%0.2f'
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input___cinit__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":860
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.validator = lambda x: x             # <<<<<<<<<<<<<<
 *         self.display_format = '%0.2f'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_9__cinit___lambda(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_17Slider_Text_Input_9__cinit___lambda = {"lambda", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_17Slider_Text_Input_9__cinit___lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_9__cinit___lambda(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 860, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda") < 0)) __PYX_ERR(2, 860, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 860, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.__cinit__.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_x);
  __pyx_r = __pyx_v_x;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":859
 *     cdef public basestring display_format
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.validator = lambda x: x
 *         self.display_format = '%0.2f'
 */

static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input___cinit__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":860
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.validator = lambda x: x             # <<<<<<<<<<<<<<
 *         self.display_format = '%0.2f'
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_17Slider_Text_Input_9__cinit___lambda, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_pyglui_ui, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->validator);
  __Pyx_DECREF(__pyx_v_self->validator);
  __pyx_v_self->validator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":861
 *     def __cinit__(self, *args, **kwargs):
 *         self.validator = lambda x: x
 *         self.display_format = '%0.2f'             # <<<<<<<<<<<<<<
 * 
 *     cdef update_input_val(self):
 */
  __Pyx_INCREF(__pyx_kp_u_0_2f);
  __Pyx_GIVEREF(__pyx_kp_u_0_2f);
  __Pyx_GOTREF(__pyx_v_self->display_format);
  __Pyx_DECREF(__pyx_v_self->display_format);
  __pyx_v_self->display_format = ((PyObject*)__pyx_kp_u_0_2f);

  /* "src/pyglui/ui_elements.pxi":859
 *     cdef public basestring display_format
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.validator = lambda x: x
 *         self.display_format = '%0.2f'
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":863
 *         self.display_format = '%0.2f'
 * 
 *     cdef update_input_val(self):             # <<<<<<<<<<<<<<
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):
 */

static PyObject *__pyx_f_6pyglui_2ui_17Slider_Text_Input_update_input_val(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self) {
  PyObject *__pyx_v_typed_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_input_val", 0);

  /* "src/pyglui/ui_elements.pxi":865
 *     cdef update_input_val(self):
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):             # <<<<<<<<<<<<<<
 *             typed_val = self.preview
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyglui/ui_elements.pxi":866
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):
 *             typed_val = self.preview             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
    __pyx_t_1 = __pyx_v_self->__pyx_base.preview;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_typed_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":865
 *     cdef update_input_val(self):
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):             # <<<<<<<<<<<<<<
 *             typed_val = self.preview
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":868
 *             typed_val = self.preview
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 typed_val = self.data_type(self.validator(eval(self.preview)))
 *             except:
 */
  /*else*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "src/pyglui/ui_elements.pxi":869
 *         else:
 *             try:
 *                 typed_val = self.data_type(self.validator(eval(self.preview)))             # <<<<<<<<<<<<<<
 *             except:
 *                 #failed to convert. Ignore user input.
 */
        __pyx_t_7 = __Pyx_Globals(); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 869, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 869, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (((PyObject *)__pyx_v_self)) {
          if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_self, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(2, 869, __pyx_L4_error)
        }
        if (__pyx_v_typed_val) {
          if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_typed_val, __pyx_v_typed_val) < 0) __PYX_ERR(2, 869, __pyx_L4_error)
        }
        __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 869, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_self->__pyx_base.preview);
        __Pyx_GIVEREF(__pyx_v_self->__pyx_base.preview);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->__pyx_base.preview);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8);
        __pyx_t_7 = 0;
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 869, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_INCREF(__pyx_v_self->validator);
        __pyx_t_9 = __pyx_v_self->validator; __pyx_t_7 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_10 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 869, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_INCREF(__pyx_v_self->__pyx_base.data_type);
        __pyx_t_9 = __pyx_v_self->__pyx_base.data_type; __pyx_t_8 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_10 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 869, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __pyx_v_typed_val = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":868
 *             typed_val = self.preview
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 typed_val = self.data_type(self.validator(eval(self.preview)))
 *             except:
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "src/pyglui/ui_elements.pxi":870
 *             try:
 *                 typed_val = self.data_type(self.validator(eval(self.preview)))
 *             except:             # <<<<<<<<<<<<<<
 *                 #failed to convert. Ignore user input.
 *                 return
 */
      /*except:*/ {
        __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.update_input_val", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_6) < 0) __PYX_ERR(2, 870, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GOTREF(__pyx_t_6);

        /* "src/pyglui/ui_elements.pxi":872
 *             except:
 *                 #failed to convert. Ignore user input.
 *                 return             # <<<<<<<<<<<<<<
 *         self.sync_val.value = typed_val
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_except_return;
      }
      __pyx_L6_except_error:;

      /* "src/pyglui/ui_elements.pxi":868
 *             typed_val = self.preview
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 typed_val = self.data_type(self.validator(eval(self.preview)))
 *             except:
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":873
 *                 #failed to convert. Ignore user input.
 *                 return
 *         self.sync_val.value = typed_val             # <<<<<<<<<<<<<<
 * 
 *     cdef to_unicode(self,obj):
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.sync_val), __pyx_n_s_value, __pyx_v_typed_val) < 0) __PYX_ERR(2, 873, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":863
 *         self.display_format = '%0.2f'
 * 
 *     cdef update_input_val(self):             # <<<<<<<<<<<<<<
 *         # turn string back into the data_type of the value in case of str always use unicode
 *         if isinstance(self.sync_val.value, basestring):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.update_input_val", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_typed_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":875
 *         self.sync_val.value = typed_val
 * 
 *     cdef to_unicode(self,obj):             # <<<<<<<<<<<<<<
 *         if type(obj) is unicode:
 *             return obj
 */

static PyObject *__pyx_f_6pyglui_2ui_17Slider_Text_Input_to_unicode(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_unicode", 0);

  /* "src/pyglui/ui_elements.pxi":876
 * 
 *     cdef to_unicode(self,obj):
 *         if type(obj) is unicode:             # <<<<<<<<<<<<<<
 *             return obj
 *         elif type(obj) is bytes:
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_obj)) == ((PyObject *)(&PyUnicode_Type)));
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":877
 *     cdef to_unicode(self,obj):
 *         if type(obj) is unicode:
 *             return obj             # <<<<<<<<<<<<<<
 *         elif type(obj) is bytes:
 *             return obj.decode('utf-8')
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_obj);
    __pyx_r = __pyx_v_obj;
    goto __pyx_L0;

    /* "src/pyglui/ui_elements.pxi":876
 * 
 *     cdef to_unicode(self,obj):
 *         if type(obj) is unicode:             # <<<<<<<<<<<<<<
 *             return obj
 *         elif type(obj) is bytes:
 */
  }

  /* "src/pyglui/ui_elements.pxi":878
 *         if type(obj) is unicode:
 *             return obj
 *         elif type(obj) is bytes:             # <<<<<<<<<<<<<<
 *             return obj.decode('utf-8')
 *         elif isinstance(obj, float):
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_obj)) == ((PyObject *)(&PyBytes_Type)));
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":879
 *             return obj
 *         elif type(obj) is bytes:
 *             return obj.decode('utf-8')             # <<<<<<<<<<<<<<
 *         elif isinstance(obj, float):
 *             return self.display_format % obj
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_utf_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "src/pyglui/ui_elements.pxi":878
 *         if type(obj) is unicode:
 *             return obj
 *         elif type(obj) is bytes:             # <<<<<<<<<<<<<<
 *             return obj.decode('utf-8')
 *         elif isinstance(obj, float):
 */
  }

  /* "src/pyglui/ui_elements.pxi":880
 *         elif type(obj) is bytes:
 *             return obj.decode('utf-8')
 *         elif isinstance(obj, float):             # <<<<<<<<<<<<<<
 *             return self.display_format % obj
 *         else:
 */
  __pyx_t_1 = PyFloat_Check(__pyx_v_obj); 
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":881
 *             return obj.decode('utf-8')
 *         elif isinstance(obj, float):
 *             return self.display_format % obj             # <<<<<<<<<<<<<<
 *         else:
 *             return unicode(obj)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyNumber_Remainder(__pyx_v_self->display_format, __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "src/pyglui/ui_elements.pxi":880
 *         elif type(obj) is bytes:
 *             return obj.decode('utf-8')
 *         elif isinstance(obj, float):             # <<<<<<<<<<<<<<
 *             return self.display_format % obj
 *         else:
 */
  }

  /* "src/pyglui/ui_elements.pxi":883
 *             return self.display_format % obj
 *         else:
 *             return unicode(obj)             # <<<<<<<<<<<<<<
 * 
 * ########## Button ##########
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "src/pyglui/ui_elements.pxi":875
 *         self.sync_val.value = typed_val
 * 
 *     cdef to_unicode(self,obj):             # <<<<<<<<<<<<<<
 *         if type(obj) is unicode:
 *             return obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.to_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":856
 * cdef class Slider_Text_Input(Text_Input):
 * 
 *     cdef public object validator             # <<<<<<<<<<<<<<
 *     cdef public basestring display_format
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator___get__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator___get__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->validator);
  __pyx_r = __pyx_v_self->validator;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator_2__set__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator_2__set__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->validator);
  __Pyx_DECREF(__pyx_v_self->validator);
  __pyx_v_self->validator = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator_4__del__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input_9validator_4__del__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->validator);
  __Pyx_DECREF(__pyx_v_self->validator);
  __pyx_v_self->validator = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":857
 * 
 *     cdef public object validator
 *     cdef public basestring display_format             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, *args, **kwargs):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format___get__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format___get__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->display_format);
  __pyx_r = __pyx_v_self->display_format;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format_2__set__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format_2__set__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_value))) __PYX_ERR(2, 857, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->display_format);
  __Pyx_DECREF(__pyx_v_self->display_format);
  __pyx_v_self->display_format = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.display_format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format_4__del__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_17Slider_Text_Input_14display_format_4__del__(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->display_format);
  __Pyx_DECREF(__pyx_v_self->display_format);
  __pyx_v_self->display_format = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_17Slider_Text_Input_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_17Slider_Text_Input_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input_2__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_17Slider_Text_Input_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_17Slider_Text_Input_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_17Slider_Text_Input_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_17Slider_Text_Input_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_17Slider_Text_Input_4__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_17Slider_Text_Input_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Slider_Text_Input.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":902
 *     cdef basestring _outer_label
 * 
 *     def __cinit__(self,label, function, outer_label=''):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Button_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Button_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_function = 0;
  PyObject *__pyx_v_outer_label = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_function,&__pyx_n_s_outer_label,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_function,&__pyx_n_s_outer_label,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_kp_u__34);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 902, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_function)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 902, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(2, 902, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_outer_label);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 902, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 902, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_function = values[1];
    __pyx_v_outer_label = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 902, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Button.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button___cinit__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self), __pyx_v_label, __pyx_v_function, __pyx_v_outer_label);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Button___cinit__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_function, PyObject *__pyx_v_outer_label) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":903
 * 
 *     def __cinit__(self,label, function, outer_label=''):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label
 *         self._outer_label = outer_label
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":904
 *     def __cinit__(self,label, function, outer_label=''):
 *         self.uid = id(self)
 *         self._label = label             # <<<<<<<<<<<<<<
 *         self._outer_label = outer_label
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,button_outline_size_y)) # we only fix the height
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(2, 904, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_label;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._label);
  __pyx_v_self->__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":905
 *         self.uid = id(self)
 *         self._label = label
 *         self._outer_label = outer_label             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,button_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(0,0),Vec2(0,0))  # depends on string length
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_outer_label))||((__pyx_v_outer_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_outer_label))) __PYX_ERR(2, 905, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_outer_label;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_outer_label);
  __Pyx_DECREF(__pyx_v_self->_outer_label);
  __pyx_v_self->_outer_label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":906
 *         self._label = label
 *         self._outer_label = outer_label
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,button_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(0,0),Vec2(0,0))  # depends on string length
 *         self.button = FitBox(Vec2(0,0),Vec2(0,0))  # will be computed on demand
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":907
 *         self._outer_label = outer_label
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,button_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(0,0),Vec2(0,0))  # depends on string length             # <<<<<<<<<<<<<<
 *         self.button = FitBox(Vec2(0,0),Vec2(0,0))  # will be computed on demand
 *         self.selected = False
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
  __Pyx_DECREF((PyObject *)__pyx_v_self->field);
  __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":908
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,button_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(0,0),Vec2(0,0))  # depends on string length
 *         self.button = FitBox(Vec2(0,0),Vec2(0,0))  # will be computed on demand             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         self.function = function
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button);
  __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":909
 *         self.field = FitBox(Vec2(0,0),Vec2(0,0))  # depends on string length
 *         self.button = FitBox(Vec2(0,0),Vec2(0,0))  # will be computed on demand
 *         self.selected = False             # <<<<<<<<<<<<<<
 *         self.function = function
 *         self.text_color = RGBA(*color_text_default)
 */
  __pyx_v_self->selected = 0;

  /* "src/pyglui/ui_elements.pxi":910
 *         self.button = FitBox(Vec2(0,0),Vec2(0,0))  # will be computed on demand
 *         self.selected = False
 *         self.function = function             # <<<<<<<<<<<<<<
 *         self.text_color = RGBA(*color_text_default)
 * 
 */
  __Pyx_INCREF(__pyx_v_function);
  __Pyx_GIVEREF(__pyx_v_function);
  __Pyx_GOTREF(__pyx_v_self->function);
  __Pyx_DECREF(__pyx_v_self->function);
  __pyx_v_self->function = __pyx_v_function;

  /* "src/pyglui/ui_elements.pxi":911
 *         self.selected = False
 *         self.function = function
 *         self.text_color = RGBA(*color_text_default)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args, **kwargs):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
  __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":902
 *     cdef basestring _outer_label
 * 
 *     def __cinit__(self,label, function, outer_label=''):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Button.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":913
 *         self.text_color = RGBA(*color_text_default)
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Button_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Button_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_2__init__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Button_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":916
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef tuple text_color
 *         cdef RGBA bg_color
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Button_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Button_draw(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Button_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_bg_color = 0;
  float __pyx_v_label_width;
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_shadow = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  float __pyx_t_9;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_rounded_rect __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Button_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 916, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":920
 *         cdef RGBA bg_color
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*button_read_only_text_color)
 *             bg_color = RGBA(*button_read_only_color)
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":921
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:
 *             self.text_color = RGBA(*button_read_only_text_color)             # <<<<<<<<<<<<<<
 *             bg_color = RGBA(*button_read_only_color)
 *         elif self.selected:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":922
 *         if self._read_only or parent_read_only:
 *             self.text_color = RGBA(*button_read_only_text_color)
 *             bg_color = RGBA(*button_read_only_color)             # <<<<<<<<<<<<<<
 *         elif self.selected:
 *             self.text_color = RGBA(*button_active_text_color)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_bg_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":920
 *         cdef RGBA bg_color
 *         # read only rendering rules
 *         if self._read_only or parent_read_only:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*button_read_only_text_color)
 *             bg_color = RGBA(*button_read_only_color)
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":923
 *             self.text_color = RGBA(*button_read_only_text_color)
 *             bg_color = RGBA(*button_read_only_color)
 *         elif self.selected:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*button_active_text_color)
 *             bg_color = RGBA(*button_active_color)
 */
  if (__pyx_v_self->selected) {

    /* "src/pyglui/ui_elements.pxi":924
 *             bg_color = RGBA(*button_read_only_color)
 *         elif self.selected:
 *             self.text_color = RGBA(*button_active_text_color)             # <<<<<<<<<<<<<<
 *             bg_color = RGBA(*button_active_color)
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":925
 *         elif self.selected:
 *             self.text_color = RGBA(*button_active_text_color)
 *             bg_color = RGBA(*button_active_color)             # <<<<<<<<<<<<<<
 *         else:
 *             self.text_color = RGBA(*button_default_text_color)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_bg_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":923
 *             self.text_color = RGBA(*button_read_only_text_color)
 *             bg_color = RGBA(*button_read_only_color)
 *         elif self.selected:             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*button_active_text_color)
 *             bg_color = RGBA(*button_active_color)
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":927
 *             bg_color = RGBA(*button_active_color)
 *         else:
 *             self.text_color = RGBA(*button_default_text_color)             # <<<<<<<<<<<<<<
 *             bg_color = RGBA(*button_default_color)
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->text_color);
    __pyx_v_self->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":928
 *         else:
 *             self.text_color = RGBA(*button_default_text_color)
 *             bg_color = RGBA(*button_default_color)             # <<<<<<<<<<<<<<
 * 
 *         #update appearance:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_bg_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":931
 * 
 *         #update appearance:
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 *         cdef float label_width = 0.
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":933
 *         self.outline.compute(parent)
 * 
 *         cdef float label_width = 0.             # <<<<<<<<<<<<<<
 *         if self._outer_label:
 *             label_width = glfont.text_bounds(0., 0., self._label) / ui_scale
 */
  __pyx_v_label_width = 0.;

  /* "src/pyglui/ui_elements.pxi":934
 * 
 *         cdef float label_width = 0.
 *         if self._outer_label:             # <<<<<<<<<<<<<<
 *             label_width = glfont.text_bounds(0., 0., self._label) / ui_scale
 *             self.field = FitBox(Vec2(outline_padding, outline_padding),
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_outer_label); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 934, __pyx_L1_error)
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":935
 *         cdef float label_width = 0.
 *         if self._outer_label:
 *             label_width = glfont.text_bounds(0., 0., self._label) / ui_scale             # <<<<<<<<<<<<<<
 *             self.field = FitBox(Vec2(outline_padding, outline_padding),
 *                                 Vec2(-label_width-outline_padding-3.*x_spacer, -outline_padding))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_text_bounds); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_float_0_, __pyx_float_0_, __pyx_v_self->__pyx_base._label};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 935, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 935, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_label_width = __pyx_t_9;

    /* "src/pyglui/ui_elements.pxi":936
 *         if self._outer_label:
 *             label_width = glfont.text_bounds(0., 0., self._label) / ui_scale
 *             self.field = FitBox(Vec2(outline_padding, outline_padding),             # <<<<<<<<<<<<<<
 *                                 Vec2(-label_width-outline_padding-3.*x_spacer, -outline_padding))
 *             self.button = FitBox(Vec2(-label_width-button_text_padding-button_outline_padding-2.*x_spacer, button_outline_padding),
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "src/pyglui/ui_elements.pxi":937
 *             label_width = glfont.text_bounds(0., 0., self._label) / ui_scale
 *             self.field = FitBox(Vec2(outline_padding, outline_padding),
 *                                 Vec2(-label_width-outline_padding-3.*x_spacer, -outline_padding))             # <<<<<<<<<<<<<<
 *             self.button = FitBox(Vec2(-label_width-button_text_padding-button_outline_padding-2.*x_spacer, button_outline_padding),
 *                                  Vec2(label_width+2.*x_spacer+2*button_text_padding, -button_outline_padding))
 */
    __pyx_t_2 = PyFloat_FromDouble((((-__pyx_v_label_width) - 10.0) - (3. * 5.0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_INCREF(__pyx_int_neg_10);
    __Pyx_GIVEREF(__pyx_int_neg_10);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_neg_10);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":936
 *         if self._outer_label:
 *             label_width = glfont.text_bounds(0., 0., self._label) / ui_scale
 *             self.field = FitBox(Vec2(outline_padding, outline_padding),             # <<<<<<<<<<<<<<
 *                                 Vec2(-label_width-outline_padding-3.*x_spacer, -outline_padding))
 *             self.button = FitBox(Vec2(-label_width-button_text_padding-button_outline_padding-2.*x_spacer, button_outline_padding),
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->field);
    __Pyx_DECREF((PyObject *)__pyx_v_self->field);
    __pyx_v_self->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":938
 *             self.field = FitBox(Vec2(outline_padding, outline_padding),
 *                                 Vec2(-label_width-outline_padding-3.*x_spacer, -outline_padding))
 *             self.button = FitBox(Vec2(-label_width-button_text_padding-button_outline_padding-2.*x_spacer, button_outline_padding),             # <<<<<<<<<<<<<<
 *                                  Vec2(label_width+2.*x_spacer+2*button_text_padding, -button_outline_padding))
 *             self.field.compute(self.outline)
 */
    __pyx_t_2 = PyFloat_FromDouble(((((-__pyx_v_label_width) - 2.0) - 10.0) - (2. * 5.0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_INCREF(__pyx_int_10);
    __Pyx_GIVEREF(__pyx_int_10);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_10);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":939
 *                                 Vec2(-label_width-outline_padding-3.*x_spacer, -outline_padding))
 *             self.button = FitBox(Vec2(-label_width-button_text_padding-button_outline_padding-2.*x_spacer, button_outline_padding),
 *                                  Vec2(label_width+2.*x_spacer+2*button_text_padding, -button_outline_padding))             # <<<<<<<<<<<<<<
 *             self.field.compute(self.outline)
 *         else:
 */
    __pyx_t_1 = PyFloat_FromDouble(((__pyx_v_label_width + (2. * 5.0)) + (2.0 * 2.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_INCREF(__pyx_int_neg_10);
    __Pyx_GIVEREF(__pyx_int_neg_10);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_neg_10);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":938
 *             self.field = FitBox(Vec2(outline_padding, outline_padding),
 *                                 Vec2(-label_width-outline_padding-3.*x_spacer, -outline_padding))
 *             self.button = FitBox(Vec2(-label_width-button_text_padding-button_outline_padding-2.*x_spacer, button_outline_padding),             # <<<<<<<<<<<<<<
 *                                  Vec2(label_width+2.*x_spacer+2*button_text_padding, -button_outline_padding))
 *             self.field.compute(self.outline)
 */
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button);
    __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":940
 *             self.button = FitBox(Vec2(-label_width-button_text_padding-button_outline_padding-2.*x_spacer, button_outline_padding),
 *                                  Vec2(label_width+2.*x_spacer+2*button_text_padding, -button_outline_padding))
 *             self.field.compute(self.outline)             # <<<<<<<<<<<<<<
 *         else:
 *             self.button = FitBox(Vec2(button_outline_padding, button_outline_padding),
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->field->__pyx_vtab)->compute(__pyx_v_self->field, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":934
 * 
 *         cdef float label_width = 0.
 *         if self._outer_label:             # <<<<<<<<<<<<<<
 *             label_width = glfont.text_bounds(0., 0., self._label) / ui_scale
 *             self.field = FitBox(Vec2(outline_padding, outline_padding),
 */
    goto __pyx_L6;
  }

  /* "src/pyglui/ui_elements.pxi":942
 *             self.field.compute(self.outline)
 *         else:
 *             self.button = FitBox(Vec2(button_outline_padding, button_outline_padding),             # <<<<<<<<<<<<<<
 *                                  Vec2(-button_outline_padding, -button_outline_padding))
 *         self.button.compute(self.outline)
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "src/pyglui/ui_elements.pxi":943
 *         else:
 *             self.button = FitBox(Vec2(button_outline_padding, button_outline_padding),
 *                                  Vec2(-button_outline_padding, -button_outline_padding))             # <<<<<<<<<<<<<<
 *         self.button.compute(self.outline)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "src/pyglui/ui_elements.pxi":942
 *             self.field.compute(self.outline)
 *         else:
 *             self.button = FitBox(Vec2(button_outline_padding, button_outline_padding),             # <<<<<<<<<<<<<<
 *                                  Vec2(-button_outline_padding, -button_outline_padding))
 *         self.button.compute(self.outline)
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
    __Pyx_DECREF((PyObject *)__pyx_v_self->button);
    __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L6:;

  /* "src/pyglui/ui_elements.pxi":944
 *             self.button = FitBox(Vec2(button_outline_padding, button_outline_padding),
 *                                  Vec2(-button_outline_padding, -button_outline_padding))
 *         self.button.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         cdef FitBox shadow = self.button.computed_copy()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->button->__pyx_vtab)->compute(__pyx_v_self->button, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":946
 *         self.button.compute(self.outline)
 * 
 *         cdef FitBox shadow = self.button.computed_copy()             # <<<<<<<<<<<<<<
 *         if not self.selected:
 *             shadow.org -= Vec2(2. * ui_scale, 2. * ui_scale)
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->button->__pyx_vtab)->computed_copy(__pyx_v_self->button); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(2, 946, __pyx_L1_error)
  __pyx_v_shadow = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":947
 * 
 *         cdef FitBox shadow = self.button.computed_copy()
 *         if not self.selected:             # <<<<<<<<<<<<<<
 *             shadow.org -= Vec2(2. * ui_scale, 2. * ui_scale)
 *             shadow.size += Vec2(4. * ui_scale, 4. * ui_scale)
 */
  __pyx_t_8 = (!__pyx_v_self->selected);
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":948
 *         cdef FitBox shadow = self.button.computed_copy()
 *         if not self.selected:
 *             shadow.org -= Vec2(2. * ui_scale, 2. * ui_scale)             # <<<<<<<<<<<<<<
 *             shadow.size += Vec2(4. * ui_scale, 4. * ui_scale)
 *             utils.draw_rounded_rect(shadow.org, shadow.size,
 */
    __pyx_t_2 = PyFloat_FromDouble((2. * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyFloat_FromDouble((2. * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_InPlaceSubtract(((PyObject *)__pyx_v_shadow->org), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(2, 948, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF((PyObject *)__pyx_v_shadow->org);
    __Pyx_DECREF((PyObject *)__pyx_v_shadow->org);
    __pyx_v_shadow->org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":949
 *         if not self.selected:
 *             shadow.org -= Vec2(2. * ui_scale, 2. * ui_scale)
 *             shadow.size += Vec2(4. * ui_scale, 4. * ui_scale)             # <<<<<<<<<<<<<<
 *             utils.draw_rounded_rect(shadow.org, shadow.size,
 *                                     button_corner_radius * ui_scale,
 */
    __pyx_t_5 = PyFloat_FromDouble((4. * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyFloat_FromDouble((4. * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_shadow->size), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(2, 949, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_shadow->size);
    __Pyx_DECREF((PyObject *)__pyx_v_shadow->size);
    __pyx_v_shadow->size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":950
 *             shadow.org -= Vec2(2. * ui_scale, 2. * ui_scale)
 *             shadow.size += Vec2(4. * ui_scale, 4. * ui_scale)
 *             utils.draw_rounded_rect(shadow.org, shadow.size,             # <<<<<<<<<<<<<<
 *                                     button_corner_radius * ui_scale,
 *                                     color=RGBA(*color_shadow), sharpness=shadow_sharpness)
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_shadow->org);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((PyObject *)__pyx_v_shadow->size);
    __Pyx_INCREF(__pyx_t_1);

    /* "src/pyglui/ui_elements.pxi":952
 *             utils.draw_rounded_rect(shadow.org, shadow.size,
 *                                     button_corner_radius * ui_scale,
 *                                     color=RGBA(*color_shadow), sharpness=shadow_sharpness)             # <<<<<<<<<<<<<<
 * 
 *         utils.draw_rounded_rect(self.button.org, self.button.size,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "src/pyglui/ui_elements.pxi":950
 *             shadow.org -= Vec2(2. * ui_scale, 2. * ui_scale)
 *             shadow.size += Vec2(4. * ui_scale, 4. * ui_scale)
 *             utils.draw_rounded_rect(shadow.org, shadow.size,             # <<<<<<<<<<<<<<
 *                                     button_corner_radius * ui_scale,
 *                                     color=RGBA(*color_shadow), sharpness=shadow_sharpness)
 */
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5);
    __pyx_t_10.sharpness = 0.3;
    __pyx_t_4 = __pyx_f_6pyglui_4cygl_5utils_draw_rounded_rect(__pyx_t_2, __pyx_t_1, (5.0 * __pyx_v_6pyglui_2ui_ui_scale), 0, &__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/pyglui/ui_elements.pxi":947
 * 
 *         cdef FitBox shadow = self.button.computed_copy()
 *         if not self.selected:             # <<<<<<<<<<<<<<
 *             shadow.org -= Vec2(2. * ui_scale, 2. * ui_scale)
 *             shadow.size += Vec2(4. * ui_scale, 4. * ui_scale)
 */
  }

  /* "src/pyglui/ui_elements.pxi":954
 *                                     color=RGBA(*color_shadow), sharpness=shadow_sharpness)
 * 
 *         utils.draw_rounded_rect(self.button.org, self.button.size,             # <<<<<<<<<<<<<<
 *                                 button_corner_radius * ui_scale,
 *                                 color=bg_color, sharpness=0.9)
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->button->org);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = ((PyObject *)__pyx_v_self->button->size);
  __Pyx_INCREF(__pyx_t_5);

  /* "src/pyglui/ui_elements.pxi":956
 *         utils.draw_rounded_rect(self.button.org, self.button.size,
 *                                 button_corner_radius * ui_scale,
 *                                 color=bg_color, sharpness=0.9)             # <<<<<<<<<<<<<<
 * 
 *         if self._outer_label:
 */
  __pyx_t_10.__pyx_n = 2;
  __pyx_t_10.color = __pyx_v_bg_color;
  __pyx_t_10.sharpness = 0.9;
  __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_rounded_rect(__pyx_t_4, __pyx_t_5, (5.0 * __pyx_v_6pyglui_2ui_ui_scale), 0, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":958
 *                                 color=bg_color, sharpness=0.9)
 * 
 *         if self._outer_label:             # <<<<<<<<<<<<<<
 *             gl.glPushMatrix()
 *             glfont.push_state()
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_outer_label); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 958, __pyx_L1_error)
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":959
 * 
 *         if self._outer_label:
 *             gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *             glfont.push_state()
 *             gl.glTranslatef(self.field.org.x + button_text_padding * ui_scale,
 */
    glPushMatrix();

    /* "src/pyglui/ui_elements.pxi":960
 *         if self._outer_label:
 *             gl.glPushMatrix()
 *             glfont.push_state()             # <<<<<<<<<<<<<<
 *             gl.glTranslatef(self.field.org.x + button_text_padding * ui_scale,
 *                             self.field.org.y + button_text_padding * ui_scale,0)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_4, };
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 960, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":961
 *             gl.glPushMatrix()
 *             glfont.push_state()
 *             gl.glTranslatef(self.field.org.x + button_text_padding * ui_scale,             # <<<<<<<<<<<<<<
 *                             self.field.org.y + button_text_padding * ui_scale,0)
 *             glfont.set_color_float(color_text_default)
 */
    glTranslatef((__pyx_v_self->field->org->x + (2.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_self->field->org->y + (2.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

    /* "src/pyglui/ui_elements.pxi":963
 *             gl.glTranslatef(self.field.org.x + button_text_padding * ui_scale,
 *                             self.field.org.y + button_text_padding * ui_scale,0)
 *             glfont.set_color_float(color_text_default)             # <<<<<<<<<<<<<<
 *             glfont.draw_limited_text(0,0,self._outer_label,self.field.size.x)
 *             glfont.pop_state()
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_tuple__9, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":964
 *                             self.field.org.y + button_text_padding * ui_scale,0)
 *             glfont.set_color_float(color_text_default)
 *             glfont.draw_limited_text(0,0,self._outer_label,self.field.size.x)             # <<<<<<<<<<<<<<
 *             glfont.pop_state()
 *             gl.glPopMatrix()
 */
    __pyx_t_1 = __pyx_v_self->_outer_label;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_limited_text(__pyx_v_6pyglui_2ui_glfont, 0.0, 0.0, __pyx_t_1, __pyx_v_self->field->size->x, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":965
 *             glfont.set_color_float(color_text_default)
 *             glfont.draw_limited_text(0,0,self._outer_label,self.field.size.x)
 *             glfont.pop_state()             # <<<<<<<<<<<<<<
 *             gl.glPopMatrix()
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_4, };
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":966
 *             glfont.draw_limited_text(0,0,self._outer_label,self.field.size.x)
 *             glfont.pop_state()
 *             gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 *         gl.glPushMatrix()
 */
    glPopMatrix();

    /* "src/pyglui/ui_elements.pxi":958
 *                                 color=bg_color, sharpness=0.9)
 * 
 *         if self._outer_label:             # <<<<<<<<<<<<<<
 *             gl.glPushMatrix()
 *             glfont.push_state()
 */
  }

  /* "src/pyglui/ui_elements.pxi":968
 *             gl.glPopMatrix()
 * 
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         gl.glTranslatef(self.button.org.x + button_text_padding * ui_scale,
 */
  glPushMatrix();

  /* "src/pyglui/ui_elements.pxi":969
 * 
 *         gl.glPushMatrix()
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         gl.glTranslatef(self.button.org.x + button_text_padding * ui_scale,
 *                         self.button.org.y + button_text_padding * ui_scale,0)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_4, };
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":970
 *         gl.glPushMatrix()
 *         glfont.push_state()
 *         gl.glTranslatef(self.button.org.x + button_text_padding * ui_scale,             # <<<<<<<<<<<<<<
 *                         self.button.org.y + button_text_padding * ui_scale,0)
 *         glfont.set_color_float(self.text_color[:])
 */
  glTranslatef((__pyx_v_self->button->org->x + (2.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_self->button->org->y + (2.0 * __pyx_v_6pyglui_2ui_ui_scale)), 0.0);

  /* "src/pyglui/ui_elements.pxi":972
 *         gl.glTranslatef(self.button.org.x + button_text_padding * ui_scale,
 *                         self.button.org.y + button_text_padding * ui_scale,0)
 *         glfont.set_color_float(self.text_color[:])             # <<<<<<<<<<<<<<
 *         glfont.draw_limited_text(x_spacer*ui_scale,0,self._label,self.button.size.x - 2. *  button_text_padding * ui_scale)
 *         glfont.pop_state()
 */
  __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->text_color), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(PyTuple_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_5))) __PYX_ERR(2, 972, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_5), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":973
 *                         self.button.org.y + button_text_padding * ui_scale,0)
 *         glfont.set_color_float(self.text_color[:])
 *         glfont.draw_limited_text(x_spacer*ui_scale,0,self._label,self.button.size.x - 2. *  button_text_padding * ui_scale)             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 *         gl.glPopMatrix()
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base._label;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_limited_text(__pyx_v_6pyglui_2ui_glfont, (5.0 * __pyx_v_6pyglui_2ui_ui_scale), 0.0, __pyx_t_1, (__pyx_v_self->button->size->x - ((2. * 2.0) * __pyx_v_6pyglui_2ui_ui_scale)), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":974
 *         glfont.set_color_float(self.text_color[:])
 *         glfont.draw_limited_text(x_spacer*ui_scale,0,self._label,self.button.size.x - 2. *  button_text_padding * ui_scale)
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_4, };
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":975
 *         glfont.draw_limited_text(x_spacer*ui_scale,0,self._label,self.button.size.x - 2. *  button_text_padding * ui_scale)
 *         glfont.pop_state()
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 */
  glPopMatrix();

  /* "src/pyglui/ui_elements.pxi":916
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef tuple text_color
 *         cdef RGBA bg_color
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Button.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_bg_color);
  __Pyx_XDECREF((PyObject *)__pyx_v_shadow);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Button_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Button_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Button_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Button_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 916, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 916, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 916, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 916, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 916, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 916, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 916, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Button.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 916, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_4draw(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Button_4draw(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Button->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Button.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":977
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

static PyObject *__pyx_pw_6pyglui_2ui_6Button_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_6Button_handle_input(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_6Button_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6Button_7handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 977, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 977, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 977, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":978
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  __pyx_t_9 = (!__pyx_t_8);
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":981
 *             global should_redraw
 * 
 *             for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *                 if  visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:
 */
    if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(2, 981, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_new_input->buttons; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 981, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/ui_elements.pxi":982
 * 
 *             for b in new_input.buttons:
 *                 if  visible and self.button.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     if b[1] == 1:
 *                         self.selected = True
 */
      if (__pyx_v_visible) {
      } else {
        __pyx_t_9 = __pyx_v_visible;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_2 = ((PyObject *)__pyx_v_new_input->m);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_8 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->button->__pyx_vtab)->mouse_over(__pyx_v_self->button, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_t_8;
      __pyx_L9_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":983
 *             for b in new_input.buttons:
 *                 if  visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 983, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_9) {

          /* "src/pyglui/ui_elements.pxi":984
 *                 if  visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:
 *                         self.selected = True             # <<<<<<<<<<<<<<
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0:
 */
          __pyx_v_self->selected = 1;

          /* "src/pyglui/ui_elements.pxi":985
 *                     if b[1] == 1:
 *                         self.selected = True
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 *                 if self.selected and b[1] == 0:
 *                     self.selected = False
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":983
 *             for b in new_input.buttons:
 *                 if  visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
        }

        /* "src/pyglui/ui_elements.pxi":982
 * 
 *             for b in new_input.buttons:
 *                 if  visible and self.button.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     if b[1] == 1:
 *                         self.selected = True
 */
      }

      /* "src/pyglui/ui_elements.pxi":986
 *                         self.selected = True
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0:             # <<<<<<<<<<<<<<
 *                     self.selected = False
 *                     should_redraw = True
 */
      if (__pyx_v_self->selected) {
      } else {
        __pyx_t_9 = __pyx_v_self->selected;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 986, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_t_8;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":987
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0:
 *                     self.selected = False             # <<<<<<<<<<<<<<
 *                     should_redraw = True
 *                     self.function()
 */
        __pyx_v_self->selected = 0;

        /* "src/pyglui/ui_elements.pxi":988
 *                 if self.selected and b[1] == 0:
 *                     self.selected = False
 *                     should_redraw = True             # <<<<<<<<<<<<<<
 *                     self.function()
 * 
 */
        __pyx_v_6pyglui_2ui_should_redraw = 1;

        /* "src/pyglui/ui_elements.pxi":989
 *                     self.selected = False
 *                     should_redraw = True
 *                     self.function()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
        __Pyx_INCREF(__pyx_v_self->function);
        __pyx_t_5 = __pyx_v_self->function; __pyx_t_4 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 989, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "src/pyglui/ui_elements.pxi":986
 *                         self.selected = True
 *                         should_redraw = True
 *                 if self.selected and b[1] == 0:             # <<<<<<<<<<<<<<
 *                     self.selected = False
 *                     should_redraw = True
 */
      }

      /* "src/pyglui/ui_elements.pxi":981
 *             global should_redraw
 * 
 *             for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *                 if  visible and self.button.mouse_over(new_input.m):
 *                     if b[1] == 1:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":978
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":977
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Button.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Button_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Button_7handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Button_7handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Button_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 977, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 977, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 977, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 977, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 977, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 977, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 977, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 977, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Button.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 977, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_6handle_input(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Button_6handle_input(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Button->__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Button.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":991
 *                     self.function()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def outer_label(self):
 *         return self._outer_label
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Button_11outer_label_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Button_11outer_label_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_11outer_label___get__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Button_11outer_label___get__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":993
 *     @property
 *     def outer_label(self):
 *         return self._outer_label             # <<<<<<<<<<<<<<
 * 
 *     @outer_label.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_outer_label);
  __pyx_r = __pyx_v_self->_outer_label;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":991
 *                     self.function()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def outer_label(self):
 *         return self._outer_label
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":995
 *         return self._outer_label
 * 
 *     @outer_label.setter             # <<<<<<<<<<<<<<
 *     def outer_label(self,basestring val):
 *         if self._outer_label != val:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Button_11outer_label_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Button_11outer_label_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_val), (&PyBaseString_Type), 1, "val", 1))) __PYX_ERR(2, 996, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_11outer_label_2__set__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self), ((PyObject*)__pyx_v_val));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Button_11outer_label_2__set__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":997
 *     @outer_label.setter
 *     def outer_label(self,basestring val):
 *         if self._outer_label != val:             # <<<<<<<<<<<<<<
 *             self._outer_label = val
 *             global should_redraw
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_outer_label, __pyx_v_val, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 997, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":998
 *     def outer_label(self,basestring val):
 *         if self._outer_label != val:
 *             self._outer_label = val             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             should_redraw = True
 */
    __Pyx_INCREF(__pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __Pyx_GOTREF(__pyx_v_self->_outer_label);
    __Pyx_DECREF(__pyx_v_self->_outer_label);
    __pyx_v_self->_outer_label = __pyx_v_val;

    /* "src/pyglui/ui_elements.pxi":1000
 *             self._outer_label = val
 *             global should_redraw
 *             should_redraw = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":997
 *     @outer_label.setter
 *     def outer_label(self,basestring val):
 *         if self._outer_label != val:             # <<<<<<<<<<<<<<
 *             self._outer_label = val
 *             global should_redraw
 */
  }

  /* "src/pyglui/ui_elements.pxi":995
 *         return self._outer_label
 * 
 *     @outer_label.setter             # <<<<<<<<<<<<<<
 *     def outer_label(self,basestring val):
 *         if self._outer_label != val:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Button.outer_label.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":898
 *     cdef FitBox field, button
 *     cdef bint selected
 *     cdef public object function             # <<<<<<<<<<<<<<
 *     cdef RGBA text_color
 *     cdef basestring _outer_label
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Button_8function_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6Button_8function_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_8function___get__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Button_8function___get__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->function);
  __pyx_r = __pyx_v_self->function;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Button_8function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Button_8function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_8function_2__set__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Button_8function_2__set__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->function);
  __Pyx_DECREF(__pyx_v_self->function);
  __pyx_v_self->function = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6Button_8function_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_6Button_8function_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_8function_4__del__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6Button_8function_4__del__(struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->function);
  __Pyx_DECREF(__pyx_v_self->function);
  __pyx_v_self->function = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Button_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Button_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Button_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Button_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_8__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Button_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Button.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6Button_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6Button_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Button_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6Button_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Button.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_6Button_10__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Button *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6Button_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Button *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Button.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1006
 *     cdef float separator_height
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Separator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Separator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Separator___cinit__(((struct __pyx_obj_6pyglui_2ui_Separator *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Separator___cinit__(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":1007
 * 
 *     def __cinit__(self):
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1006
 *     cdef float separator_height
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Separator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1009
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Separator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Separator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Separator_2__init__(((struct __pyx_obj_6pyglui_2ui_Separator *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Separator_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1012
 *         pass
 * 
 *     cpdef draw(self, FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Separator_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Separator_draw(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Separator_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Separator_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1012, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1012, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1012, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1013
 * 
 *     cpdef draw(self, FitBox parent,bint nested=True, bint parent_read_only = False):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1015
 *         self.outline.compute(parent)
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->x + 10.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyglui/ui_elements.pxi":1016
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,
 *                   self.outline.org.y + outline_padding),             # <<<<<<<<<<<<<<
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,
 *                   self.outline.org.y + outline_padding),
 */
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->y + 10.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "src/pyglui/ui_elements.pxi":1015
 *         self.outline.compute(parent)
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1017
 *         line(Vec2(self.outline.org.x + outline_padding,
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              RGBA(*menu_line))
 */
  __pyx_t_5 = PyFloat_FromDouble(((__pyx_v_self->__pyx_base.outline->org->x - 10.0) + __pyx_v_self->__pyx_base.outline->size->x)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "src/pyglui/ui_elements.pxi":1018
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,
 *                   self.outline.org.y + outline_padding),             # <<<<<<<<<<<<<<
 *              RGBA(*menu_line))
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->y + 10.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyglui/ui_elements.pxi":1017
 *         line(Vec2(self.outline.org.x + outline_padding,
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              RGBA(*menu_line))
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_5 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1019
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,
 *                   self.outline.org.y + outline_padding),
 *              RGBA(*menu_line))             # <<<<<<<<<<<<<<
 * 
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "src/pyglui/ui_elements.pxi":1015
 *         self.outline.compute(parent)
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,
 */
  __pyx_t_5 = __pyx_f_6pyglui_2ui_line(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1021
 *              RGBA(*menu_line))
 * 
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_v_self->__pyx_base.outline->design_size->y = (((1.5 * __pyx_v_6pyglui_2ui_ui_scale) * 10.0) * 2.0);

  /* "src/pyglui/ui_elements.pxi":1022
 * 
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef precompute(self, FitBox parent):
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1012
 *         pass
 * 
 *     cpdef draw(self, FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Separator.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Separator_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Separator_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Separator_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Separator_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 1012, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 1012, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Separator.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1012, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Separator_4draw(((struct __pyx_obj_6pyglui_2ui_Separator *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Separator_4draw(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Separator->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Separator.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1024
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self, FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Separator_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Separator_precompute(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Separator_7precompute)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_parent)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1024, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1025
 * 
 *     cpdef precompute(self, FitBox parent):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 *         self.outline.compute(parent)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1026
 *     cpdef precompute(self, FitBox parent):
 *         self.outline.compute(parent)
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_v_self->__pyx_base.outline->design_size->y = (((1.5 * __pyx_v_6pyglui_2ui_ui_scale) * 10.0) * 2.0);

  /* "src/pyglui/ui_elements.pxi":1027
 *         self.outline.compute(parent)
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 * cdef class Info_Text(UI_element):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1024
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self, FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Separator.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Separator_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Separator_7precompute = {"precompute", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Separator_7precompute, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Separator_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("precompute (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1024, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "precompute") < 0)) __PYX_ERR(2, 1024, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("precompute", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 1024, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Separator.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1024, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Separator_6precompute(((struct __pyx_obj_6pyglui_2ui_Separator *)__pyx_v_self), __pyx_v_parent);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Separator_6precompute(struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_9Separator_precompute(__pyx_v_self, __pyx_v_parent, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Separator.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Separator_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Separator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Separator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Separator_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Separator_8__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Separator *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Separator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Separator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Separator_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Separator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Separator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Separator_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Separator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Separator_10__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Separator *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Separator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Separator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Separator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1037
 *     cdef bint _centered
 * 
 *     def __cinit__(self, basestring text):             # <<<<<<<<<<<<<<
 *         self._text = text
 *         self.max_height = 200
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Info_Text_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Info_Text_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_text = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_text)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1037, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 1037, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_text = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 1037, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyBaseString_Type), 1, "text", 1))) __PYX_ERR(2, 1037, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text___cinit__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), __pyx_v_text);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Info_Text___cinit__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, PyObject *__pyx_v_text) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":1038
 * 
 *     def __cinit__(self, basestring text):
 *         self._text = text             # <<<<<<<<<<<<<<
 *         self.max_height = 200
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 */
  __Pyx_INCREF(__pyx_v_text);
  __Pyx_GIVEREF(__pyx_v_text);
  __Pyx_GOTREF(__pyx_v_self->_text);
  __Pyx_DECREF(__pyx_v_self->_text);
  __pyx_v_self->_text = __pyx_v_text;

  /* "src/pyglui/ui_elements.pxi":1039
 *     def __cinit__(self, basestring text):
 *         self._text = text
 *         self.max_height = 200             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 *         self.text_area = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 */
  __pyx_v_self->max_height = 0xC8;

  /* "src/pyglui/ui_elements.pxi":1040
 *         self._text = text
 *         self.max_height = 200
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 *         self.text_area = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self._text_size = size_text_info
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1041
 *         self.max_height = 200
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 *         self.text_area = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))             # <<<<<<<<<<<<<<
 *         self._text_size = size_text_info
 *         self._text_color = RGBA(*color_text_info)
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_area);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_area);
  __pyx_v_self->text_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1042
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 *         self.text_area = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self._text_size = size_text_info             # <<<<<<<<<<<<<<
 *         self._text_color = RGBA(*color_text_info)
 *         self._centered = False
 */
  __pyx_v_self->_text_size = 18.0;

  /* "src/pyglui/ui_elements.pxi":1043
 *         self.text_area = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self._text_size = size_text_info
 *         self._text_color = RGBA(*color_text_info)             # <<<<<<<<<<<<<<
 *         self._centered = False
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_text_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_text_color);
  __pyx_v_self->_text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1044
 *         self._text_size = size_text_info
 *         self._text_color = RGBA(*color_text_info)
 *         self._centered = False             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, basestring text):
 */
  __pyx_v_self->_centered = 0;

  /* "src/pyglui/ui_elements.pxi":1037
 *     cdef bint _centered
 * 
 *     def __cinit__(self, basestring text):             # <<<<<<<<<<<<<<
 *         self._text = text
 *         self.max_height = 200
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Info_Text.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1046
 *         self._centered = False
 * 
 *     def __init__(self, basestring text):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Info_Text_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Info_Text_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_text = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_text)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1046, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(2, 1046, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_text = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 1046, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyBaseString_Type), 1, "text", 1))) __PYX_ERR(2, 1046, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_2__init__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), __pyx_v_text);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Info_Text_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_text) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1050
 * 
 *     property text:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._text
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_4text_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_4text___get__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_4text___get__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1051
 *     property text:
 *         def __get__(self):
 *             return self._text             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self,basestring new_text):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_text);
  __pyx_r = __pyx_v_self->_text;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1050
 * 
 *     property text:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._text
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1053
 *             return self._text
 * 
 *         def __set__(self,basestring new_text):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             if self._text != new_text:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Info_Text_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_text); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Info_Text_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_text) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_text), (&PyBaseString_Type), 1, "new_text", 1))) __PYX_ERR(2, 1053, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_4text_2__set__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), ((PyObject*)__pyx_v_new_text));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Info_Text_4text_2__set__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, PyObject *__pyx_v_new_text) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":1055
 *         def __set__(self,basestring new_text):
 *             global should_redraw
 *             if self._text != new_text:             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *                 self._text = new_text
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_text, __pyx_v_new_text, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 1055, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":1056
 *             global should_redraw
 *             if self._text != new_text:
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *                 self._text = new_text
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1057
 *             if self._text != new_text:
 *                 should_redraw = True
 *                 self._text = new_text             # <<<<<<<<<<<<<<
 * 
 *     property text_size:
 */
    __Pyx_INCREF(__pyx_v_new_text);
    __Pyx_GIVEREF(__pyx_v_new_text);
    __Pyx_GOTREF(__pyx_v_self->_text);
    __Pyx_DECREF(__pyx_v_self->_text);
    __pyx_v_self->_text = __pyx_v_new_text;

    /* "src/pyglui/ui_elements.pxi":1055
 *         def __set__(self,basestring new_text):
 *             global should_redraw
 *             if self._text != new_text:             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *                 self._text = new_text
 */
  }

  /* "src/pyglui/ui_elements.pxi":1053
 *             return self._text
 * 
 *         def __set__(self,basestring new_text):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             if self._text != new_text:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.text.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1060
 * 
 *     property text_size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._text_size
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_9text_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_9text_size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_9text_size___get__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_9text_size___get__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1061
 *     property text_size:
 *         def __get__(self):
 *             return self._text_size             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, float new_text_size):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_text_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1060
 * 
 *     property text_size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._text_size
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Info_Text.text_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1063
 *             return self._text_size
 * 
 *         def __set__(self, float new_text_size):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             if self._text_size != new_text_size:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Info_Text_9text_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_new_text_size); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Info_Text_9text_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_new_text_size) {
  float __pyx_v_new_text_size;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_new_text_size); {
    __pyx_v_new_text_size = __pyx_PyFloat_AsFloat(__pyx_arg_new_text_size); if (unlikely((__pyx_v_new_text_size == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1063, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.text_size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_9text_size_2__set__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), ((float)__pyx_v_new_text_size));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Info_Text_9text_size_2__set__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, float __pyx_v_new_text_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":1065
 *         def __set__(self, float new_text_size):
 *             global should_redraw
 *             if self._text_size != new_text_size:             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *                 self._text_size = new_text_size
 */
  __pyx_t_1 = (__pyx_v_self->_text_size != __pyx_v_new_text_size);
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":1066
 *             global should_redraw
 *             if self._text_size != new_text_size:
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *                 self._text_size = new_text_size
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1067
 *             if self._text_size != new_text_size:
 *                 should_redraw = True
 *                 self._text_size = new_text_size             # <<<<<<<<<<<<<<
 * 
 *     property text_color:
 */
    __pyx_v_self->_text_size = __pyx_v_new_text_size;

    /* "src/pyglui/ui_elements.pxi":1065
 *         def __set__(self, float new_text_size):
 *             global should_redraw
 *             if self._text_size != new_text_size:             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *                 self._text_size = new_text_size
 */
  }

  /* "src/pyglui/ui_elements.pxi":1063
 *             return self._text_size
 * 
 *         def __set__(self, float new_text_size):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             if self._text_size != new_text_size:
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1070
 * 
 *     property text_color:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._text_color
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_10text_color_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_10text_color_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_10text_color___get__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_10text_color___get__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1071
 *     property text_color:
 *         def __get__(self):
 *             return self._text_color             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, RGBA new_text_color):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_text_color);
  __pyx_r = ((PyObject *)__pyx_v_self->_text_color);
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1070
 * 
 *     property text_color:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._text_color
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1073
 *             return self._text_color
 * 
 *         def __set__(self, RGBA new_text_color):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             if self._text_color != new_text_color:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Info_Text_10text_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_text_color); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Info_Text_10text_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_text_color) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_text_color), __pyx_ptype_6pyglui_4cygl_5utils_RGBA, 1, "new_text_color", 0))) __PYX_ERR(2, 1073, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_10text_color_2__set__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_v_new_text_color));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Info_Text_10text_color_2__set__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_new_text_color) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":1075
 *         def __set__(self, RGBA new_text_color):
 *             global should_redraw
 *             if self._text_color != new_text_color:             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *                 self._text_color = new_text_color
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self->_text_color), ((PyObject *)__pyx_v_new_text_color), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1075, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 1075, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyglui/ui_elements.pxi":1076
 *             global should_redraw
 *             if self._text_color != new_text_color:
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *                 self._text_color = new_text_color
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1077
 *             if self._text_color != new_text_color:
 *                 should_redraw = True
 *                 self._text_color = new_text_color             # <<<<<<<<<<<<<<
 * 
 *     property centered:
 */
    __Pyx_INCREF((PyObject *)__pyx_v_new_text_color);
    __Pyx_GIVEREF((PyObject *)__pyx_v_new_text_color);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_text_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_text_color);
    __pyx_v_self->_text_color = __pyx_v_new_text_color;

    /* "src/pyglui/ui_elements.pxi":1075
 *         def __set__(self, RGBA new_text_color):
 *             global should_redraw
 *             if self._text_color != new_text_color:             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *                 self._text_color = new_text_color
 */
  }

  /* "src/pyglui/ui_elements.pxi":1073
 *             return self._text_color
 * 
 *         def __set__(self, RGBA new_text_color):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             if self._text_color != new_text_color:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Info_Text.text_color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1081
 *     property centered:
 *         #TODO: Replace this property with full support for setting horizontal and vertical alignment
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._centered
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_8centered_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_8centered_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_8centered___get__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_8centered___get__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1082
 *         #TODO: Replace this property with full support for setting horizontal and vertical alignment
 *         def __get__(self):
 *             return self._centered             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, bint new_value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_centered); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1081
 *     property centered:
 *         #TODO: Replace this property with full support for setting horizontal and vertical alignment
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._centered
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Info_Text.centered.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1084
 *             return self._centered
 * 
 *         def __set__(self, bint new_value):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             if self._centered != new_value:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Info_Text_8centered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_new_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Info_Text_8centered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_new_value) {
  int __pyx_v_new_value;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_new_value); {
    __pyx_v_new_value = __Pyx_PyObject_IsTrue(__pyx_arg_new_value); if (unlikely((__pyx_v_new_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1084, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.centered.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_8centered_2__set__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), ((int)__pyx_v_new_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Info_Text_8centered_2__set__(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, int __pyx_v_new_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":1086
 *         def __set__(self, bint new_value):
 *             global should_redraw
 *             if self._centered != new_value:             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *                 self._centered = new_value
 */
  __pyx_t_1 = (__pyx_v_self->_centered != __pyx_v_new_value);
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":1087
 *             global should_redraw
 *             if self._centered != new_value:
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *                 self._centered = new_value
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1088
 *             if self._centered != new_value:
 *                 should_redraw = True
 *                 self._centered = new_value             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
    __pyx_v_self->_centered = __pyx_v_new_value;

    /* "src/pyglui/ui_elements.pxi":1086
 *         def __set__(self, bint new_value):
 *             global should_redraw
 *             if self._centered != new_value:             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 *                 self._centered = new_value
 */
  }

  /* "src/pyglui/ui_elements.pxi":1084
 *             return self._centered
 * 
 *         def __set__(self, bint new_value):             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             if self._centered != new_value:
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1090
 *                 self._centered = new_value
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Info_Text_draw(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Info_Text_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_text_origin = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_left_word = NULL;
  PyObject *__pyx_v_height = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  float __pyx_t_9;
  float __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1090, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Info_Text_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1090, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1090, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1090, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1092
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         #update appearance
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1093
 *         #update appearance
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color.as_tuple())
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->text_area->__pyx_vtab)->compute(__pyx_v_self->text_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1094
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(self.text_color.as_tuple())
 *         glfont.set_size(self.text_size*ui_scale)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1095
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color.as_tuple())             # <<<<<<<<<<<<<<
 *         glfont.set_size(self.text_size*ui_scale)
 *         if self.centered:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_as_tuple); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_1, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(2, 1095, __pyx_L1_error)
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_2), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1096
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color.as_tuple())
 *         glfont.set_size(self.text_size*ui_scale)             # <<<<<<<<<<<<<<
 *         if self.centered:
 *             glfont.set_align(fs.FONS_ALIGN_CENTER | fs.FONS_ALIGN_TOP)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1097
 *         glfont.set_color_float(self.text_color.as_tuple())
 *         glfont.set_size(self.text_size*ui_scale)
 *         if self.centered:             # <<<<<<<<<<<<<<
 *             glfont.set_align(fs.FONS_ALIGN_CENTER | fs.FONS_ALIGN_TOP)
 *             text_origin = (self.text_area.center[0], self.text_area.org.y)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_centered); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1097, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":1098
 *         glfont.set_size(self.text_size*ui_scale)
 *         if self.centered:
 *             glfont.set_align(fs.FONS_ALIGN_CENTER | fs.FONS_ALIGN_TOP)             # <<<<<<<<<<<<<<
 *             text_origin = (self.text_area.center[0], self.text_area.org.y)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_CENTER | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":1099
 *         if self.centered:
 *             glfont.set_align(fs.FONS_ALIGN_CENTER | fs.FONS_ALIGN_TOP)
 *             text_origin = (self.text_area.center[0], self.text_area.org.y)             # <<<<<<<<<<<<<<
 *         else:
 *             text_origin = (self.text_area.org.x, self.text_area.org.y)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->text_area), __pyx_n_s_center); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->text_area->org->y); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_2 = 0;
    __pyx_t_5 = 0;
    __pyx_v_text_origin = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "src/pyglui/ui_elements.pxi":1097
 *         glfont.set_color_float(self.text_color.as_tuple())
 *         glfont.set_size(self.text_size*ui_scale)
 *         if self.centered:             # <<<<<<<<<<<<<<
 *             glfont.set_align(fs.FONS_ALIGN_CENTER | fs.FONS_ALIGN_TOP)
 *             text_origin = (self.text_area.center[0], self.text_area.org.y)
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":1101
 *             text_origin = (self.text_area.center[0], self.text_area.org.y)
 *         else:
 *             text_origin = (self.text_area.org.x, self.text_area.org.y)             # <<<<<<<<<<<<<<
 *         left_word, height = glfont.draw_breaking_text(text_origin[0], text_origin[1], self._text, self.text_area.size.x,self.max_height )
 *         glfont.pop_state()
 */
  /*else*/ {
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->text_area->org->x); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->text_area->org->y); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_v_text_origin = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":1102
 *         else:
 *             text_origin = (self.text_area.org.x, self.text_area.org.y)
 *         left_word, height = glfont.draw_breaking_text(text_origin[0], text_origin[1], self._text, self.text_area.size.x,self.max_height )             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_text_origin, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_text_origin, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __pyx_v_self->_text;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_breaking_text(__pyx_v_6pyglui_2ui_glfont, __pyx_t_9, __pyx_t_10, __pyx_t_2, __pyx_v_self->text_area->size->x, __pyx_v_self->max_height, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
    PyObject* sequence = __pyx_t_5;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 1102, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_4), 2) < 0) __PYX_ERR(2, 1102, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 1102, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_left_word = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_height = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1103
 *             text_origin = (self.text_area.org.x, self.text_area.org.y)
 *         left_word, height = glfont.draw_breaking_text(text_origin[0], text_origin[1], self._text, self.text_area.size.x,self.max_height )
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1104
 *         left_word, height = glfont.draw_breaking_text(text_origin[0], text_origin[1], self._text, self.text_area.size.x,self.max_height )
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale             # <<<<<<<<<<<<<<
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2
 *         self.text_area.compute(self.outline)
 */
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->text_area->org->y); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_height, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->text_area->design_size->y = __pyx_t_10;

  /* "src/pyglui/ui_elements.pxi":1105
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2             # <<<<<<<<<<<<<<
 *         self.text_area.compute(self.outline)
 *         self.outline.compute(parent)
 */
  __pyx_v_self->__pyx_base.outline->design_size->y = (__pyx_v_self->text_area->design_size->y + 20.0);

  /* "src/pyglui/ui_elements.pxi":1106
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2
 *         self.text_area.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->text_area->__pyx_vtab)->compute(__pyx_v_self->text_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1107
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2
 *         self.text_area.compute(self.outline)
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef precompute(self,FitBox parent):
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1090
 *                 self._centered = new_value
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Info_Text.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_text_origin);
  __Pyx_XDECREF(__pyx_v_left_word);
  __Pyx_XDECREF(__pyx_v_height);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Info_Text_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Info_Text_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1090, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1090, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1090, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 1090, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1090, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1090, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 1090, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1090, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_4draw(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_4draw(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Info_Text->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Info_Text.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1109
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Info_Text_precompute(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PyObject *__pyx_v_left_word = NULL;
  PyObject *__pyx_v_height = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  float __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Info_Text_7precompute)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_parent)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1110
 * 
 *     cpdef precompute(self,FitBox parent):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1111
 *     cpdef precompute(self,FitBox parent):
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_size(self.text_size*ui_scale)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->text_area->__pyx_vtab)->compute(__pyx_v_self->text_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1112
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_size(self.text_size*ui_scale)
 *         left_word, height = glfont.compute_breaking_text(self.text_area.org.x, self.text_area.org.y, self._text, self.text_area.size.x,self.max_height )
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1113
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()
 *         glfont.set_size(self.text_size*ui_scale)             # <<<<<<<<<<<<<<
 *         left_word, height = glfont.compute_breaking_text(self.text_area.org.x, self.text_area.org.y, self._text, self.text_area.size.x,self.max_height )
 *         glfont.pop_state()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1114
 *         glfont.push_state()
 *         glfont.set_size(self.text_size*ui_scale)
 *         left_word, height = glfont.compute_breaking_text(self.text_area.org.x, self.text_area.org.y, self._text, self.text_area.size.x,self.max_height )             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 */
  __pyx_t_2 = __pyx_v_self->_text;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->compute_breaking_text(__pyx_v_6pyglui_2ui_glfont, __pyx_v_self->text_area->org->x, __pyx_v_self->text_area->org->y, __pyx_t_2, __pyx_v_self->text_area->size->x, __pyx_v_self->max_height, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 1114, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) __PYX_ERR(2, 1114, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 1114, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_left_word = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_height = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "src/pyglui/ui_elements.pxi":1115
 *         glfont.set_size(self.text_size*ui_scale)
 *         left_word, height = glfont.compute_breaking_text(self.text_area.org.x, self.text_area.org.y, self._text, self.text_area.size.x,self.max_height )
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1116
 *         left_word, height = glfont.compute_breaking_text(self.text_area.org.x, self.text_area.org.y, self._text, self.text_area.size.x,self.max_height )
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale             # <<<<<<<<<<<<<<
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2
 *         self.text_area.compute(self.outline)
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->text_area->org->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Subtract(__pyx_v_height, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->text_area->design_size->y = __pyx_t_8;

  /* "src/pyglui/ui_elements.pxi":1117
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2             # <<<<<<<<<<<<<<
 *         self.text_area.compute(self.outline)
 *         self.outline.compute(parent)
 */
  __pyx_v_self->__pyx_base.outline->design_size->y = (__pyx_v_self->text_area->design_size->y + 20.0);

  /* "src/pyglui/ui_elements.pxi":1118
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2
 *         self.text_area.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->text_area->__pyx_vtab)->compute(__pyx_v_self->text_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1119
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding * 2
 *         self.text_area.compute(self.outline)
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1109
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Info_Text.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_left_word);
  __Pyx_XDECREF(__pyx_v_height);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Info_Text_7precompute = {"precompute", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Info_Text_7precompute, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("precompute (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1109, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "precompute") < 0)) __PYX_ERR(2, 1109, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("precompute", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 1109, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1109, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_6precompute(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), __pyx_v_parent);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_6precompute(struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_9Info_Text_precompute(__pyx_v_self, __pyx_v_parent, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Info_Text.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Info_Text_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Info_Text_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_8__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Info_Text_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Info_Text_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Info_Text_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Info_Text_10__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Info_Text *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Info_Text_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Info_Text *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Info_Text.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1130
 *     cdef int max_height
 * 
 *     def __cinit__(self, object line_color, basestring text):             # <<<<<<<<<<<<<<
 *         self._text = text
 *         self.max_height = 200
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Color_Legend_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Color_Legend_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_line_color = 0;
  PyObject *__pyx_v_text = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line_color,&__pyx_n_s_text,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line_color,&__pyx_n_s_text,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line_color)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1130, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_text)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1130, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(2, 1130, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 1130, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    }
    __pyx_v_line_color = values[0];
    __pyx_v_text = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 1130, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyBaseString_Type), 1, "text", 1))) __PYX_ERR(2, 1130, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Color_Legend___cinit__(((struct __pyx_obj_6pyglui_2ui_Color_Legend *)__pyx_v_self), __pyx_v_line_color, __pyx_v_text);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Color_Legend___cinit__(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, PyObject *__pyx_v_line_color, PyObject *__pyx_v_text) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":1131
 * 
 *     def __cinit__(self, object line_color, basestring text):
 *         self._text = text             # <<<<<<<<<<<<<<
 *         self.max_height = 200
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 */
  __Pyx_INCREF(__pyx_v_text);
  __Pyx_GIVEREF(__pyx_v_text);
  __Pyx_GOTREF(__pyx_v_self->_text);
  __Pyx_DECREF(__pyx_v_self->_text);
  __pyx_v_self->_text = __pyx_v_text;

  /* "src/pyglui/ui_elements.pxi":1132
 *     def __cinit__(self, object line_color, basestring text):
 *         self._text = text
 *         self.max_height = 200             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 *         self.text_area = FitBox(
 */
  __pyx_v_self->max_height = 0xC8;

  /* "src/pyglui/ui_elements.pxi":1133
 *         self._text = text
 *         self.max_height = 200
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 *         self.text_area = FitBox(
 *             Vec2(outline_padding * 6, outline_padding),
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1135
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 *         self.text_area = FitBox(
 *             Vec2(outline_padding * 6, outline_padding),             # <<<<<<<<<<<<<<
 *             Vec2(-outline_padding, -outline_padding)
 *         )
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "src/pyglui/ui_elements.pxi":1136
 *         self.text_area = FitBox(
 *             Vec2(outline_padding * 6, outline_padding),
 *             Vec2(-outline_padding, -outline_padding)             # <<<<<<<<<<<<<<
 *         )
 *         self._text_size = size_text_info
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "src/pyglui/ui_elements.pxi":1134
 *         self.max_height = 200
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 *         self.text_area = FitBox(             # <<<<<<<<<<<<<<
 *             Vec2(outline_padding * 6, outline_padding),
 *             Vec2(-outline_padding, -outline_padding)
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->text_area);
  __Pyx_DECREF((PyObject *)__pyx_v_self->text_area);
  __pyx_v_self->text_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1138
 *             Vec2(-outline_padding, -outline_padding)
 *         )
 *         self._text_size = size_text_info             # <<<<<<<<<<<<<<
 *         self._text_color = RGBA(*color_text_info)
 *         self._line_color = RGBA(*line_color)
 */
  __pyx_v_self->_text_size = 18.0;

  /* "src/pyglui/ui_elements.pxi":1139
 *         )
 *         self._text_size = size_text_info
 *         self._text_color = RGBA(*color_text_info)             # <<<<<<<<<<<<<<
 *         self._line_color = RGBA(*line_color)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_text_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_text_color);
  __pyx_v_self->_text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1140
 *         self._text_size = size_text_info
 *         self._text_color = RGBA(*color_text_info)
 *         self._line_color = RGBA(*line_color)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, object line_color, basestring text):
 */
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_line_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_line_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_line_color);
  __pyx_v_self->_line_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1130
 *     cdef int max_height
 * 
 *     def __cinit__(self, object line_color, basestring text):             # <<<<<<<<<<<<<<
 *         self._text = text
 *         self.max_height = 200
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1142
 *         self._line_color = RGBA(*line_color)
 * 
 *     def __init__(self, object line_color, basestring text):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Color_Legend_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Color_Legend_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_line_color = 0;
  CYTHON_UNUSED PyObject *__pyx_v_text = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line_color,&__pyx_n_s_text,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line_color,&__pyx_n_s_text,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line_color)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1142, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_text)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1142, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(2, 1142, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(2, 1142, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    }
    __pyx_v_line_color = values[0];
    __pyx_v_text = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 1142, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_text), (&PyBaseString_Type), 1, "text", 1))) __PYX_ERR(2, 1142, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Color_Legend_2__init__(((struct __pyx_obj_6pyglui_2ui_Color_Legend *)__pyx_v_self), __pyx_v_line_color, __pyx_v_text);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Color_Legend_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_line_color, CYTHON_UNUSED PyObject *__pyx_v_text) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1145
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Color_Legend_draw(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_12Color_Legend_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  CYTHON_UNUSED PyObject *__pyx_v_left_word = NULL;
  PyObject *__pyx_v_height = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  float __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_12Color_Legend_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1145, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1145, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1145, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1146
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1148
 *         self.outline.compute(parent)
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x + ui_scale * outline_padding * 4,
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->x + 10.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyglui/ui_elements.pxi":1149
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,
 *                   self.outline.org.y + outline_padding),             # <<<<<<<<<<<<<<
 *              Vec2(self.outline.org.x + ui_scale * outline_padding * 4,
 *                   self.outline.org.y + outline_padding),
 */
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->y + 10.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "src/pyglui/ui_elements.pxi":1148
 *         self.outline.compute(parent)
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x + ui_scale * outline_padding * 4,
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1150
 *         line(Vec2(self.outline.org.x + outline_padding,
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x + ui_scale * outline_padding * 4,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              self._line_color)
 */
  __pyx_t_5 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->x + ((__pyx_v_6pyglui_2ui_ui_scale * 10.0) * 4.0))); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "src/pyglui/ui_elements.pxi":1151
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x + ui_scale * outline_padding * 4,
 *                   self.outline.org.y + outline_padding),             # <<<<<<<<<<<<<<
 *              self._line_color)
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->y + 10.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyglui/ui_elements.pxi":1150
 *         line(Vec2(self.outline.org.x + outline_padding,
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x + ui_scale * outline_padding * 4,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              self._line_color)
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_5 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1152
 *              Vec2(self.outline.org.x + ui_scale * outline_padding * 4,
 *                   self.outline.org.y + outline_padding),
 *              self._line_color)             # <<<<<<<<<<<<<<
 * 
 *         self.text_area.compute(self.outline)
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->_line_color);
  __Pyx_INCREF(__pyx_t_4);

  /* "src/pyglui/ui_elements.pxi":1148
 *         self.outline.compute(parent)
 * 
 *         line(Vec2(self.outline.org.x + outline_padding,             # <<<<<<<<<<<<<<
 *                   self.outline.org.y + outline_padding),
 *              Vec2(self.outline.org.x + ui_scale * outline_padding * 4,
 */
  __pyx_t_5 = __pyx_f_6pyglui_2ui_line(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1154
 *              self._line_color)
 * 
 *         self.text_area.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         glfont.push_state()
 */
  __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->text_area->__pyx_vtab)->compute(__pyx_v_self->text_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1156
 *         self.text_area.compute(self.outline)
 * 
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(self._text_color.as_tuple())
 *         glfont.set_size(self._text_size * ui_scale)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_1, };
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1157
 * 
 *         glfont.push_state()
 *         glfont.set_color_float(self._text_color.as_tuple())             # <<<<<<<<<<<<<<
 *         glfont.set_size(self._text_size * ui_scale)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_text_color), __pyx_n_s_as_tuple); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_1, };
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_4))) __PYX_ERR(2, 1157, __pyx_L1_error)
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1158
 *         glfont.push_state()
 *         glfont.set_color_float(self._text_color.as_tuple())
 *         glfont.set_size(self._text_size * ui_scale)             # <<<<<<<<<<<<<<
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 *         left_word, height = glfont.draw_breaking_text(
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_text_size * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1159
 *         glfont.set_color_float(self._text_color.as_tuple())
 *         glfont.set_size(self._text_size * ui_scale)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)             # <<<<<<<<<<<<<<
 *         left_word, height = glfont.draw_breaking_text(
 *             self.text_area.org.x,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1163
 *             self.text_area.org.x,
 *             self.text_area.org.y,
 *             self._text,             # <<<<<<<<<<<<<<
 *             self.text_area.size.x,
 *             self.max_height,
 */
  __pyx_t_5 = __pyx_v_self->_text;
  __Pyx_INCREF(__pyx_t_5);

  /* "src/pyglui/ui_elements.pxi":1160
 *         glfont.set_size(self._text_size * ui_scale)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 *         left_word, height = glfont.draw_breaking_text(             # <<<<<<<<<<<<<<
 *             self.text_area.org.x,
 *             self.text_area.org.y,
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_breaking_text(__pyx_v_6pyglui_2ui_glfont, __pyx_v_self->text_area->org->x, __pyx_v_self->text_area->org->y, __pyx_t_5, __pyx_v_self->text_area->size->x, __pyx_v_self->max_height, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 1160, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
    index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_2), 2) < 0) __PYX_ERR(2, 1160, __pyx_L1_error)
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 1160, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_left_word = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_height = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1167
 *             self.max_height,
 *         )
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1168
 *         )
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale             # <<<<<<<<<<<<<<
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding
 *         self.text_area.compute(self.outline)
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->text_area->org->y); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_height, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_self->text_area->design_size->y = __pyx_t_9;

  /* "src/pyglui/ui_elements.pxi":1169
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding             # <<<<<<<<<<<<<<
 *         self.text_area.compute(self.outline)
 *         self.outline.compute(parent)
 */
  __pyx_v_self->__pyx_base.outline->design_size->y = (__pyx_v_self->text_area->design_size->y + 10.0);

  /* "src/pyglui/ui_elements.pxi":1170
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding
 *         self.text_area.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->text_area->__pyx_vtab)->compute(__pyx_v_self->text_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1171
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding
 *         self.text_area.compute(self.outline)
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef precompute(self, FitBox parent):
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1145
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_left_word);
  __Pyx_XDECREF(__pyx_v_height);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Color_Legend_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Color_Legend_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1145, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1145, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1145, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 1145, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1145, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1145, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 1145, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1145, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Color_Legend_4draw(((struct __pyx_obj_6pyglui_2ui_Color_Legend *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Color_Legend_4draw(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Color_Legend->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1173
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self, FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 */

static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Color_Legend_precompute(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PyObject *__pyx_v_left_word = NULL;
  PyObject *__pyx_v_height = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  float __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_12Color_Legend_7precompute)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_parent)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1173, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1174
 * 
 *     cpdef precompute(self, FitBox parent):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1175
 *     cpdef precompute(self, FitBox parent):
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_size(self._text_size * ui_scale)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->text_area->__pyx_vtab)->compute(__pyx_v_self->text_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1176
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_size(self._text_size * ui_scale)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1177
 *         self.text_area.compute(self.outline)
 *         glfont.push_state()
 *         glfont.set_size(self._text_size * ui_scale)             # <<<<<<<<<<<<<<
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 *         left_word, height = glfont.compute_breaking_text(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->_text_size * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1178
 *         glfont.push_state()
 *         glfont.set_size(self._text_size * ui_scale)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)             # <<<<<<<<<<<<<<
 *         left_word, height = glfont.compute_breaking_text(
 *             self.text_area.org.x,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1182
 *             self.text_area.org.x,
 *             self.text_area.org.y,
 *             self._text,             # <<<<<<<<<<<<<<
 *             self.text_area.size.x,
 *             self.max_height
 */
  __pyx_t_2 = __pyx_v_self->_text;
  __Pyx_INCREF(__pyx_t_2);

  /* "src/pyglui/ui_elements.pxi":1179
 *         glfont.set_size(self._text_size * ui_scale)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 *         left_word, height = glfont.compute_breaking_text(             # <<<<<<<<<<<<<<
 *             self.text_area.org.x,
 *             self.text_area.org.y,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->compute_breaking_text(__pyx_v_6pyglui_2ui_glfont, __pyx_v_self->text_area->org->x, __pyx_v_self->text_area->org->y, __pyx_t_2, __pyx_v_self->text_area->size->x, __pyx_v_self->max_height, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 1179, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_4), 2) < 0) __PYX_ERR(2, 1179, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 1179, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_left_word = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_height = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1186
 *             self.max_height
 *         )
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1187
 *         )
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale             # <<<<<<<<<<<<<<
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding
 *         self.text_area.compute(self.outline)
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->text_area->org->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_height, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->text_area->design_size->y = __pyx_t_7;

  /* "src/pyglui/ui_elements.pxi":1188
 *         glfont.pop_state()
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding             # <<<<<<<<<<<<<<
 *         self.text_area.compute(self.outline)
 *         self.outline.compute(parent)
 */
  __pyx_v_self->__pyx_base.outline->design_size->y = (__pyx_v_self->text_area->design_size->y + 10.0);

  /* "src/pyglui/ui_elements.pxi":1189
 *         self.text_area.design_size.y  = (height - self.text_area.org.y) / ui_scale
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding
 *         self.text_area.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->text_area->__pyx_vtab)->compute(__pyx_v_self->text_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1190
 *         self.outline.design_size.y = self.text_area.design_size.y + outline_padding
 *         self.text_area.compute(self.outline)
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 * ########## Thumb ##########
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1173
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self, FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_left_word);
  __Pyx_XDECREF(__pyx_v_height);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Color_Legend_7precompute = {"precompute", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Color_Legend_7precompute, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_7precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("precompute (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1173, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "precompute") < 0)) __PYX_ERR(2, 1173, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("precompute", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 1173, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1173, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Color_Legend_6precompute(((struct __pyx_obj_6pyglui_2ui_Color_Legend *)__pyx_v_self), __pyx_v_parent);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Color_Legend_6precompute(struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_12Color_Legend_precompute(__pyx_v_self, __pyx_v_parent, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Color_Legend_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Color_Legend_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Color_Legend_8__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Color_Legend *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Color_Legend_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Color_Legend_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Color_Legend_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Color_Legend_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Color_Legend_10__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Color_Legend *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Color_Legend_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Color_Legend *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Color_Legend.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1211
 *     cdef object hotkey, label_getter
 * 
 *     def __cinit__(             # <<<<<<<<<<<<<<
 *         self,
 *         str attribute_name,
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_name = 0;
  PyObject *__pyx_v_attribute_context = 0;
  PyObject *__pyx_v_on_val = 0;
  PyObject *__pyx_v_off_val = 0;
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_label_font = 0;
  PyObject *__pyx_v_label_offset_x = 0;
  PyObject *__pyx_v_label_offset_y = 0;
  PyObject *__pyx_v_label_offset_size = 0;
  PyObject *__pyx_v_label_line_height = 0;
  PyObject *__pyx_v_setter = 0;
  PyObject *__pyx_v_getter = 0;
  PyObject *__pyx_v_hotkey = 0;
  PyObject *__pyx_v_on_color = 0;
  PyObject *__pyx_v_off_color = 0;
  PyObject *__pyx_v_label_getter = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_label,&__pyx_n_s_label_font,&__pyx_n_s_label_offset_x,&__pyx_n_s_label_offset_y,&__pyx_n_s_label_offset_size,&__pyx_n_s_label_line_height,&__pyx_n_s_setter,&__pyx_n_s_getter,&__pyx_n_s_hotkey,&__pyx_n_s_on_color,&__pyx_n_s_off_color,&__pyx_n_s_label_getter,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_label,&__pyx_n_s_label_font,&__pyx_n_s_label_offset_x,&__pyx_n_s_label_offset_y,&__pyx_n_s_label_offset_size,&__pyx_n_s_label_line_height,&__pyx_n_s_setter,&__pyx_n_s_getter,&__pyx_n_s_hotkey,&__pyx_n_s_on_color,&__pyx_n_s_off_color,&__pyx_n_s_label_getter,0};
    #endif
    PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

    /* "src/pyglui/ui_elements.pxi":1214
 *         self,
 *         str attribute_name,
 *         object attribute_context = None,             # <<<<<<<<<<<<<<
 *         on_val=True,
 *         off_val=False,
 */
    values[1] = ((PyObject *)Py_None);

    /* "src/pyglui/ui_elements.pxi":1215
 *         str attribute_name,
 *         object attribute_context = None,
 *         on_val=True,             # <<<<<<<<<<<<<<
 *         off_val=False,
 *         label=None,
 */
    values[2] = ((PyObject *)Py_True);

    /* "src/pyglui/ui_elements.pxi":1216
 *         object attribute_context = None,
 *         on_val=True,
 *         off_val=False,             # <<<<<<<<<<<<<<
 *         label=None,
 *         label_font='roboto',
 */
    values[3] = ((PyObject *)Py_False);

    /* "src/pyglui/ui_elements.pxi":1217
 *         on_val=True,
 *         off_val=False,
 *         label=None,             # <<<<<<<<<<<<<<
 *         label_font='roboto',
 *         label_offset_x=0,
 */
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)__pyx_n_u_roboto);
    values[6] = ((PyObject *)__pyx_int_0);
    values[7] = ((PyObject *)__pyx_int_0);
    values[8] = ((PyObject *)__pyx_int_0);
    values[9] = ((PyObject *)__pyx_float_1_0);

    /* "src/pyglui/ui_elements.pxi":1223
 *         label_offset_size=0,
 *         label_line_height=1.0,
 *         setter=None,             # <<<<<<<<<<<<<<
 *         getter=None,
 *         hotkey = None,
 */
    values[10] = ((PyObject *)Py_None);

    /* "src/pyglui/ui_elements.pxi":1224
 *         label_line_height=1.0,
 *         setter=None,
 *         getter=None,             # <<<<<<<<<<<<<<
 *         hotkey = None,
 *         on_color=thumb_color_on,
 */
    values[11] = ((PyObject *)Py_None);

    /* "src/pyglui/ui_elements.pxi":1225
 *         setter=None,
 *         getter=None,
 *         hotkey = None,             # <<<<<<<<<<<<<<
 *         on_color=thumb_color_on,
 *         off_color=thumb_color_off,
 */
    values[12] = ((PyObject *)Py_None);

    /* "src/pyglui/ui_elements.pxi":1226
 *         getter=None,
 *         hotkey = None,
 *         on_color=thumb_color_on,             # <<<<<<<<<<<<<<
 *         off_color=thumb_color_off,
 *         label_getter=None
 */
    values[13] = ((PyObject *)__pyx_tuple__15);

    /* "src/pyglui/ui_elements.pxi":1227
 *         hotkey = None,
 *         on_color=thumb_color_on,
 *         off_color=thumb_color_off,             # <<<<<<<<<<<<<<
 *         label_getter=None
 *     ):
 */
    values[14] = ((PyObject *)__pyx_tuple__41);

    /* "src/pyglui/ui_elements.pxi":1228
 *         on_color=thumb_color_on,
 *         off_color=thumb_color_off,
 *         label_getter=None             # <<<<<<<<<<<<<<
 *     ):
 *         self.uid = id(self)
 */
    values[15] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case 16: values[15] = __Pyx_Arg_VARARGS(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = __Pyx_Arg_VARARGS(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = __Pyx_Arg_VARARGS(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = __Pyx_Arg_VARARGS(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = __Pyx_Arg_VARARGS(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = __Pyx_Arg_VARARGS(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = __Pyx_Arg_VARARGS(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = __Pyx_Arg_VARARGS(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_on_val);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_off_val);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label_font);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label_offset_x);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label_offset_y);
          if (value) { values[7] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label_offset_size);
          if (value) { values[8] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label_line_height);
          if (value) { values[9] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[10] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[11] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hotkey);
          if (value) { values[12] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_on_color);
          if (value) { values[13] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_off_color);
          if (value) { values[14] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label_getter);
          if (value) { values[15] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 1211, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case 16: values[15] = __Pyx_Arg_VARARGS(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = __Pyx_Arg_VARARGS(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = __Pyx_Arg_VARARGS(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = __Pyx_Arg_VARARGS(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = __Pyx_Arg_VARARGS(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = __Pyx_Arg_VARARGS(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = __Pyx_Arg_VARARGS(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = __Pyx_Arg_VARARGS(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_on_val = values[2];
    __pyx_v_off_val = values[3];
    __pyx_v_label = values[4];
    __pyx_v_label_font = values[5];
    __pyx_v_label_offset_x = values[6];
    __pyx_v_label_offset_y = values[7];
    __pyx_v_label_offset_size = values[8];
    __pyx_v_label_line_height = values[9];
    __pyx_v_setter = values[10];
    __pyx_v_getter = values[11];
    __pyx_v_hotkey = values[12];
    __pyx_v_on_color = values[13];
    __pyx_v_off_color = values[14];
    __pyx_v_label_getter = values[15];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 16, __pyx_nargs); __PYX_ERR(2, 1211, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Thumb.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 1213, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb___cinit__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_on_val, __pyx_v_off_val, __pyx_v_label, __pyx_v_label_font, __pyx_v_label_offset_x, __pyx_v_label_offset_y, __pyx_v_label_offset_size, __pyx_v_label_line_height, __pyx_v_setter, __pyx_v_getter, __pyx_v_hotkey, __pyx_v_on_color, __pyx_v_off_color, __pyx_v_label_getter);

  /* "src/pyglui/ui_elements.pxi":1211
 *     cdef object hotkey, label_getter
 * 
 *     def __cinit__(             # <<<<<<<<<<<<<<
 *         self,
 *         str attribute_name,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb___cinit__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_on_val, PyObject *__pyx_v_off_val, PyObject *__pyx_v_label, PyObject *__pyx_v_label_font, PyObject *__pyx_v_label_offset_x, PyObject *__pyx_v_label_offset_y, PyObject *__pyx_v_label_offset_size, PyObject *__pyx_v_label_line_height, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter, PyObject *__pyx_v_hotkey, PyObject *__pyx_v_on_color, PyObject *__pyx_v_off_color, PyObject *__pyx_v_label_getter) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  float __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":1230
 *         label_getter=None
 *     ):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label_getter() if label_getter is not None else (label or attribute_name[0])
 *         self.label_font = label_font
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1231
 *     ):
 *         self.uid = id(self)
 *         self._label = label_getter() if label_getter is not None else (label or attribute_name[0])             # <<<<<<<<<<<<<<
 *         self.label_font = label_font
 *         self.label_getter = label_getter
 */
  __pyx_t_2 = (__pyx_v_label_getter != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_label_getter);
    __pyx_t_4 = __pyx_v_label_getter; __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_5, };
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_3))) __PYX_ERR(2, 1231, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_label); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(2, 1231, __pyx_L1_error)
    if (!__pyx_t_7) {
    } else {
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(2, 1231, __pyx_L1_error)
      __Pyx_INCREF(__pyx_v_label);
      __pyx_t_3 = __pyx_v_label;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_8 = __Pyx_GetItemInt_Unicode(__pyx_v_attribute_name, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == (Py_UCS4)-1)) __PYX_ERR(2, 1231, __pyx_L1_error)
    __pyx_t_4 = PyUnicode_FromOrdinal(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_4)) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_4))) __PYX_ERR(2, 1231, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_L3_bool_binop_done:;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._label);
  __pyx_v_self->__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1232
 *         self.uid = id(self)
 *         self._label = label_getter() if label_getter is not None else (label or attribute_name[0])
 *         self.label_font = label_font             # <<<<<<<<<<<<<<
 *         self.label_getter = label_getter
 *         self.offset_x = label_offset_x
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label_font))||((__pyx_v_label_font) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label_font))) __PYX_ERR(2, 1232, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_label_font;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->label_font);
  __Pyx_DECREF(__pyx_v_self->label_font);
  __pyx_v_self->label_font = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1233
 *         self._label = label_getter() if label_getter is not None else (label or attribute_name[0])
 *         self.label_font = label_font
 *         self.label_getter = label_getter             # <<<<<<<<<<<<<<
 *         self.offset_x = label_offset_x
 *         self.offset_y = label_offset_y
 */
  __Pyx_INCREF(__pyx_v_label_getter);
  __Pyx_GIVEREF(__pyx_v_label_getter);
  __Pyx_GOTREF(__pyx_v_self->label_getter);
  __Pyx_DECREF(__pyx_v_self->label_getter);
  __pyx_v_self->label_getter = __pyx_v_label_getter;

  /* "src/pyglui/ui_elements.pxi":1234
 *         self.label_font = label_font
 *         self.label_getter = label_getter
 *         self.offset_x = label_offset_x             # <<<<<<<<<<<<<<
 *         self.offset_y = label_offset_y
 *         self.offset_size = label_offset_size
 */
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_v_label_offset_x); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1234, __pyx_L1_error)
  __pyx_v_self->offset_x = __pyx_t_9;

  /* "src/pyglui/ui_elements.pxi":1235
 *         self.label_getter = label_getter
 *         self.offset_x = label_offset_x
 *         self.offset_y = label_offset_y             # <<<<<<<<<<<<<<
 *         self.offset_size = label_offset_size
 *         self.label_line_height = label_line_height
 */
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_v_label_offset_y); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1235, __pyx_L1_error)
  __pyx_v_self->offset_y = __pyx_t_9;

  /* "src/pyglui/ui_elements.pxi":1236
 *         self.offset_x = label_offset_x
 *         self.offset_y = label_offset_y
 *         self.offset_size = label_offset_size             # <<<<<<<<<<<<<<
 *         self.label_line_height = label_line_height
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 */
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_v_label_offset_size); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1236, __pyx_L1_error)
  __pyx_v_self->offset_size = __pyx_t_9;

  /* "src/pyglui/ui_elements.pxi":1237
 *         self.offset_y = label_offset_y
 *         self.offset_size = label_offset_size
 *         self.label_line_height = label_line_height             # <<<<<<<<<<<<<<
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val
 */
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_v_label_line_height); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1237, __pyx_L1_error)
  __pyx_v_self->label_line_height = __pyx_t_9;

  /* "src/pyglui/ui_elements.pxi":1238
 *         self.offset_size = label_offset_size
 *         self.label_line_height = label_line_height
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)             # <<<<<<<<<<<<<<
 *         self.on_val = on_val
 *         self.off_val = off_val
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_attribute_name);
  __Pyx_GIVEREF(__pyx_v_attribute_name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attribute_name);
  __Pyx_INCREF(__pyx_v_attribute_context);
  __Pyx_GIVEREF(__pyx_v_attribute_context);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attribute_context);
  __Pyx_INCREF(__pyx_v_getter);
  __Pyx_GIVEREF(__pyx_v_getter);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_getter);
  __Pyx_INCREF(__pyx_v_setter);
  __Pyx_GIVEREF(__pyx_v_setter);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_setter);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Synced_Value), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->sync_val);
  __Pyx_DECREF((PyObject *)__pyx_v_self->sync_val);
  __pyx_v_self->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1239
 *         self.label_line_height = label_line_height
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val             # <<<<<<<<<<<<<<
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(thumb_outline_size,thumb_outline_size))
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_on_val); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1239, __pyx_L1_error)
  __pyx_v_self->on_val = __pyx_t_6;

  /* "src/pyglui/ui_elements.pxi":1240
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val
 *         self.off_val = off_val             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(thumb_outline_size,thumb_outline_size))
 *         self.button = FitBox(Vec2(thumb_outline_pad,thumb_outline_pad),Vec2(-thumb_outline_pad,-thumb_outline_pad))
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_off_val); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1240, __pyx_L1_error)
  __pyx_v_self->off_val = __pyx_t_6;

  /* "src/pyglui/ui_elements.pxi":1241
 *         self.on_val = on_val
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(thumb_outline_size,thumb_outline_size))             # <<<<<<<<<<<<<<
 *         self.button = FitBox(Vec2(thumb_outline_pad,thumb_outline_pad),Vec2(-thumb_outline_pad,-thumb_outline_pad))
 *         self.selected = False
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1242
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(thumb_outline_size,thumb_outline_size))
 *         self.button = FitBox(Vec2(thumb_outline_pad,thumb_outline_pad),Vec2(-thumb_outline_pad,-thumb_outline_pad))             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         self._on_color = RGBA(*on_color)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button);
  __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1243
 *         self.outline = FitBox(Vec2(0,0),Vec2(thumb_outline_size,thumb_outline_size))
 *         self.button = FitBox(Vec2(thumb_outline_pad,thumb_outline_pad),Vec2(-thumb_outline_pad,-thumb_outline_pad))
 *         self.selected = False             # <<<<<<<<<<<<<<
 *         self._on_color = RGBA(*on_color)
 *         self._off_color = RGBA(*off_color)
 */
  __pyx_v_self->selected = 0;

  /* "src/pyglui/ui_elements.pxi":1244
 *         self.button = FitBox(Vec2(thumb_outline_pad,thumb_outline_pad),Vec2(-thumb_outline_pad,-thumb_outline_pad))
 *         self.selected = False
 *         self._on_color = RGBA(*on_color)             # <<<<<<<<<<<<<<
 *         self._off_color = RGBA(*off_color)
 *         self.hotkey = hotkey
 */
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_on_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_on_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_on_color);
  __pyx_v_self->_on_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1245
 *         self.selected = False
 *         self._on_color = RGBA(*on_color)
 *         self._off_color = RGBA(*off_color)             # <<<<<<<<<<<<<<
 *         self.hotkey = hotkey
 *         self._status_text = ''
 */
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_off_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_off_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_off_color);
  __pyx_v_self->_off_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1246
 *         self._on_color = RGBA(*on_color)
 *         self._off_color = RGBA(*off_color)
 *         self.hotkey = hotkey             # <<<<<<<<<<<<<<
 *         self._status_text = ''
 * 
 */
  __Pyx_INCREF(__pyx_v_hotkey);
  __Pyx_GIVEREF(__pyx_v_hotkey);
  __Pyx_GOTREF(__pyx_v_self->hotkey);
  __Pyx_DECREF(__pyx_v_self->hotkey);
  __pyx_v_self->hotkey = __pyx_v_hotkey;

  /* "src/pyglui/ui_elements.pxi":1247
 *         self._off_color = RGBA(*off_color)
 *         self.hotkey = hotkey
 *         self._status_text = ''             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args, **kwargs):
 */
  __Pyx_INCREF(__pyx_kp_u__34);
  __Pyx_GIVEREF(__pyx_kp_u__34);
  __Pyx_GOTREF(__pyx_v_self->_status_text);
  __Pyx_DECREF(__pyx_v_self->_status_text);
  __pyx_v_self->_status_text = ((PyObject*)__pyx_kp_u__34);

  /* "src/pyglui/ui_elements.pxi":1211
 *     cdef object hotkey, label_getter
 * 
 *     def __cinit__(             # <<<<<<<<<<<<<<
 *         self,
 *         str attribute_name,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Thumb.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1249
 *         self._status_text = ''
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_2__init__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1253
 * 
 *     property status_text:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._status_text
 *         def __set__(self,basestring new_status_text):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_11status_text_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_11status_text_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_11status_text___get__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_11status_text___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1254
 *     property status_text:
 *         def __get__(self):
 *             return self._status_text             # <<<<<<<<<<<<<<
 *         def __set__(self,basestring new_status_text):
 *             if self._status_text != new_status_text:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_status_text);
  __pyx_r = __pyx_v_self->_status_text;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1253
 * 
 *     property status_text:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._status_text
 *         def __set__(self,basestring new_status_text):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1255
 *         def __get__(self):
 *             return self._status_text
 *         def __set__(self,basestring new_status_text):             # <<<<<<<<<<<<<<
 *             if self._status_text != new_status_text:
 *                 global should_redraw
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_11status_text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_status_text); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_11status_text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_status_text) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_status_text), (&PyBaseString_Type), 1, "new_status_text", 1))) __PYX_ERR(2, 1255, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_11status_text_2__set__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), ((PyObject*)__pyx_v_new_status_text));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb_11status_text_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, PyObject *__pyx_v_new_status_text) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":1256
 *             return self._status_text
 *         def __set__(self,basestring new_status_text):
 *             if self._status_text != new_status_text:             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_status_text, __pyx_v_new_status_text, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 1256, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":1258
 *             if self._status_text != new_status_text:
 *                 global should_redraw
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *                 self._status_text = new_status_text
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1259
 *                 global should_redraw
 *                 should_redraw = True
 *                 self._status_text = new_status_text             # <<<<<<<<<<<<<<
 * 
 *     property on_color:
 */
    __Pyx_INCREF(__pyx_v_new_status_text);
    __Pyx_GIVEREF(__pyx_v_new_status_text);
    __Pyx_GOTREF(__pyx_v_self->_status_text);
    __Pyx_DECREF(__pyx_v_self->_status_text);
    __pyx_v_self->_status_text = __pyx_v_new_status_text;

    /* "src/pyglui/ui_elements.pxi":1256
 *             return self._status_text
 *         def __set__(self,basestring new_status_text):
 *             if self._status_text != new_status_text:             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
  }

  /* "src/pyglui/ui_elements.pxi":1255
 *         def __get__(self):
 *             return self._status_text
 *         def __set__(self,basestring new_status_text):             # <<<<<<<<<<<<<<
 *             if self._status_text != new_status_text:
 *                 global should_redraw
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Thumb.status_text.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1262
 * 
 *     property on_color:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._on_color
 *         def __set__(self, RGBA new_color):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_8on_color_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_8on_color_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_8on_color___get__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_8on_color___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1263
 *     property on_color:
 *         def __get__(self):
 *             return self._on_color             # <<<<<<<<<<<<<<
 *         def __set__(self, RGBA new_color):
 *             if self._on_color != new_color:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_on_color);
  __pyx_r = ((PyObject *)__pyx_v_self->_on_color);
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1262
 * 
 *     property on_color:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._on_color
 *         def __set__(self, RGBA new_color):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1264
 *         def __get__(self):
 *             return self._on_color
 *         def __set__(self, RGBA new_color):             # <<<<<<<<<<<<<<
 *             if self._on_color != new_color:
 *                 global should_redraw
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_8on_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_color); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_8on_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_color) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_color), __pyx_ptype_6pyglui_4cygl_5utils_RGBA, 1, "new_color", 0))) __PYX_ERR(2, 1264, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_8on_color_2__set__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_v_new_color));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb_8on_color_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_new_color) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":1265
 *             return self._on_color
 *         def __set__(self, RGBA new_color):
 *             if self._on_color != new_color:             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self->_on_color), ((PyObject *)__pyx_v_new_color), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1265, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 1265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyglui/ui_elements.pxi":1267
 *             if self._on_color != new_color:
 *                 global should_redraw
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *                 self._on_color = new_color
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1268
 *                 global should_redraw
 *                 should_redraw = True
 *                 self._on_color = new_color             # <<<<<<<<<<<<<<
 * 
 *     property off_color:
 */
    __Pyx_INCREF((PyObject *)__pyx_v_new_color);
    __Pyx_GIVEREF((PyObject *)__pyx_v_new_color);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_on_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_on_color);
    __pyx_v_self->_on_color = __pyx_v_new_color;

    /* "src/pyglui/ui_elements.pxi":1265
 *             return self._on_color
 *         def __set__(self, RGBA new_color):
 *             if self._on_color != new_color:             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
  }

  /* "src/pyglui/ui_elements.pxi":1264
 *         def __get__(self):
 *             return self._on_color
 *         def __set__(self, RGBA new_color):             # <<<<<<<<<<<<<<
 *             if self._on_color != new_color:
 *                 global should_redraw
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Thumb.on_color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1271
 * 
 *     property off_color:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._off_color
 *         def __set__(self, RGBA new_color):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_9off_color_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_9off_color_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_9off_color___get__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_9off_color___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1272
 *     property off_color:
 *         def __get__(self):
 *             return self._off_color             # <<<<<<<<<<<<<<
 *         def __set__(self, RGBA new_color):
 *             if self._off_color != new_color:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_off_color);
  __pyx_r = ((PyObject *)__pyx_v_self->_off_color);
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1271
 * 
 *     property off_color:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._off_color
 *         def __set__(self, RGBA new_color):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1273
 *         def __get__(self):
 *             return self._off_color
 *         def __set__(self, RGBA new_color):             # <<<<<<<<<<<<<<
 *             if self._off_color != new_color:
 *                 global should_redraw
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_9off_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_color); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_9off_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_color) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_color), __pyx_ptype_6pyglui_4cygl_5utils_RGBA, 1, "new_color", 0))) __PYX_ERR(2, 1273, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_9off_color_2__set__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_v_new_color));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb_9off_color_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_new_color) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":1274
 *             return self._off_color
 *         def __set__(self, RGBA new_color):
 *             if self._off_color != new_color:             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self->_off_color), ((PyObject *)__pyx_v_new_color), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1274, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 1274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyglui/ui_elements.pxi":1276
 *             if self._off_color != new_color:
 *                 global should_redraw
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *                 self._off_color = new_color
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1277
 *                 global should_redraw
 *                 should_redraw = True
 *                 self._off_color = new_color             # <<<<<<<<<<<<<<
 * 
 *     cpdef sync(self):
 */
    __Pyx_INCREF((PyObject *)__pyx_v_new_color);
    __Pyx_GIVEREF((PyObject *)__pyx_v_new_color);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->_off_color);
    __Pyx_DECREF((PyObject *)__pyx_v_self->_off_color);
    __pyx_v_self->_off_color = __pyx_v_new_color;

    /* "src/pyglui/ui_elements.pxi":1274
 *             return self._off_color
 *         def __set__(self, RGBA new_color):
 *             if self._off_color != new_color:             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
  }

  /* "src/pyglui/ui_elements.pxi":1273
 *         def __get__(self):
 *             return self._off_color
 *         def __set__(self, RGBA new_color):             # <<<<<<<<<<<<<<
 *             if self._off_color != new_color:
 *                 global should_redraw
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Thumb.off_color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1279
 *                 self._off_color = new_color
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         if self.label_getter is not None:
 *             # only redraws if label_getter returns a new value
 */

static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_5Thumb_sync(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1279, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_5Thumb_5sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1280
 * 
 *     cpdef sync(self):
 *         if self.label_getter is not None:             # <<<<<<<<<<<<<<
 *             # only redraws if label_getter returns a new value
 *             self.label = self.label_getter()
 */
  __pyx_t_6 = (__pyx_v_self->label_getter != Py_None);
  if (__pyx_t_6) {

    /* "src/pyglui/ui_elements.pxi":1282
 *         if self.label_getter is not None:
 *             # only redraws if label_getter returns a new value
 *             self.label = self.label_getter()             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
    __Pyx_INCREF(__pyx_v_self->label_getter);
    __pyx_t_2 = __pyx_v_self->label_getter; __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_3, };
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label, __pyx_t_1) < 0) __PYX_ERR(2, 1282, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":1280
 * 
 *     cpdef sync(self):
 *         if self.label_getter is not None:             # <<<<<<<<<<<<<<
 *             # only redraws if label_getter returns a new value
 *             self.label = self.label_getter()
 */
  }

  /* "src/pyglui/ui_elements.pxi":1283
 *             # only redraws if label_getter returns a new value
 *             self.label = self.label_getter()
 *         self.sync_val.sync()             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->sync_val->__pyx_vtab)->sync(__pyx_v_self->sync_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1279
 *                 self._off_color = new_color
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         if self.label_getter is not None:
 *             # only redraws if label_getter returns a new value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Thumb.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_5Thumb_5sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Thumb_5sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_4sync(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_4sync(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_5Thumb_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Thumb.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1285
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */

static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_5Thumb_draw(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_5Thumb_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  int __pyx_v_stroke_width;
  CYTHON_UNUSED int __pyx_v_stroke_width_half;
  CYTHON_UNUSED int __pyx_v_shadow_stroke_width;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_icon_color = 0;
  int __pyx_v_text_x;
  int __pyx_v_text_y;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  float __pyx_t_9;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_circle __pyx_t_10;
  long __pyx_t_11;
  struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_draw_multi_line_text __pyx_t_12;
  float __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_5Thumb_7draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1285, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1287
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         #update appearance
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.button.compute(self.outline)
 *         cdef int stroke_width = int(12 * ui_scale)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1288
 *         #update appearance
 *         self.outline.compute(parent)
 *         self.button.compute(self.outline)             # <<<<<<<<<<<<<<
 *         cdef int stroke_width = int(12 * ui_scale)
 *         cdef int stroke_width_half = int(stroke_width * 0.5)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->button->__pyx_vtab)->compute(__pyx_v_self->button, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1289
 *         self.outline.compute(parent)
 *         self.button.compute(self.outline)
 *         cdef int stroke_width = int(12 * ui_scale)             # <<<<<<<<<<<<<<
 *         cdef int stroke_width_half = int(stroke_width * 0.5)
 *         cdef int shadow_stroke_width = int(24 * ui_scale)
 */
  __pyx_v_stroke_width = ((int)(12.0 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/ui_elements.pxi":1290
 *         self.button.compute(self.outline)
 *         cdef int stroke_width = int(12 * ui_scale)
 *         cdef int stroke_width_half = int(stroke_width * 0.5)             # <<<<<<<<<<<<<<
 *         cdef int shadow_stroke_width = int(24 * ui_scale)
 *         cdef RGBA icon_color
 */
  __pyx_v_stroke_width_half = ((int)(__pyx_v_stroke_width * 0.5));

  /* "src/pyglui/ui_elements.pxi":1291
 *         cdef int stroke_width = int(12 * ui_scale)
 *         cdef int stroke_width_half = int(stroke_width * 0.5)
 *         cdef int shadow_stroke_width = int(24 * ui_scale)             # <<<<<<<<<<<<<<
 *         cdef RGBA icon_color
 * 
 */
  __pyx_v_shadow_stroke_width = ((int)(24.0 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/ui_elements.pxi":1294
 *         cdef RGBA icon_color
 * 
 *         if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *             icon_color = self.on_color
 *         elif self.selected:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":1295
 * 
 *         if self.sync_val.value == self.on_val:
 *             icon_color = self.on_color             # <<<<<<<<<<<<<<
 *         elif self.selected:
 *             icon_color = self.on_color
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_color); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(2, 1295, __pyx_L1_error)
    __pyx_v_icon_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":1294
 *         cdef RGBA icon_color
 * 
 *         if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *             icon_color = self.on_color
 *         elif self.selected:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":1296
 *         if self.sync_val.value == self.on_val:
 *             icon_color = self.on_color
 *         elif self.selected:             # <<<<<<<<<<<<<<
 *             icon_color = self.on_color
 *         else:
 */
  if (__pyx_v_self->selected) {

    /* "src/pyglui/ui_elements.pxi":1297
 *             icon_color = self.on_color
 *         elif self.selected:
 *             icon_color = self.on_color             # <<<<<<<<<<<<<<
 *         else:
 *             icon_color = self.off_color
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_color); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(2, 1297, __pyx_L1_error)
    __pyx_v_icon_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/pyglui/ui_elements.pxi":1296
 *         if self.sync_val.value == self.on_val:
 *             icon_color = self.on_color
 *         elif self.selected:             # <<<<<<<<<<<<<<
 *             icon_color = self.on_color
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":1299
 *             icon_color = self.on_color
 *         else:
 *             icon_color = self.off_color             # <<<<<<<<<<<<<<
 * 
 *         #utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.7)+stroke_width_half, stroke_width = shadow_stroke_width, color=RGBA(*thumb_color_shadow),sharpness=thumb_button_shadow_sharpness)
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_off_color); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(2, 1299, __pyx_L1_error)
    __pyx_v_icon_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":1302
 * 
 *         #utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.7)+stroke_width_half, stroke_width = shadow_stroke_width, color=RGBA(*thumb_color_shadow),sharpness=thumb_button_shadow_sharpness)
 *         utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.77), stroke_width = stroke_width, color=RGBA(*thumb_color_shadow),sharpness=thumb_button_shadow_sharpness)             # <<<<<<<<<<<<<<
 *         utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.77), stroke_width = stroke_width, color=icon_color,sharpness=thumb_button_sharpness)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_self->button->size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_float__77); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10.__pyx_n = 5;
  __pyx_t_10.center_position = __pyx_t_5;
  __pyx_t_10.radius = __pyx_t_9;
  __pyx_t_10.stroke_width = __pyx_v_stroke_width;
  __pyx_t_10.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_10.sharpness = 0.5;
  __pyx_t_2 = __pyx_f_6pyglui_4cygl_5utils_draw_circle(0, &__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1303
 *         #utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.7)+stroke_width_half, stroke_width = shadow_stroke_width, color=RGBA(*thumb_color_shadow),sharpness=thumb_button_shadow_sharpness)
 *         utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.77), stroke_width = stroke_width, color=RGBA(*thumb_color_shadow),sharpness=thumb_button_shadow_sharpness)
 *         utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.77), stroke_width = stroke_width, color=icon_color,sharpness=thumb_button_sharpness)             # <<<<<<<<<<<<<<
 * 
 *         if self.selected:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_self->button->size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_float__77); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10.__pyx_n = 5;
  __pyx_t_10.center_position = __pyx_t_2;
  __pyx_t_10.radius = __pyx_t_9;
  __pyx_t_10.stroke_width = __pyx_v_stroke_width;
  __pyx_t_10.color = __pyx_v_icon_color;
  __pyx_t_10.sharpness = 0.8;
  __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_circle(0, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1305
 *         utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.77), stroke_width = stroke_width, color=icon_color,sharpness=thumb_button_sharpness)
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             self.selected = False
 *             global should_redraw
 */
  if (__pyx_v_self->selected) {

    /* "src/pyglui/ui_elements.pxi":1306
 * 
 *         if self.selected:
 *             self.selected = False             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             should_redraw = True
 */
    __pyx_v_self->selected = 0;

    /* "src/pyglui/ui_elements.pxi":1308
 *             self.selected = False
 *             global should_redraw
 *             should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *         glfont.push_state()
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1305
 *         utils.draw_circle(self.button.center,radius=int(min(self.button.size)*.77), stroke_width = stroke_width, color=icon_color,sharpness=thumb_button_sharpness)
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             self.selected = False
 *             global should_redraw
 */
  }

  /* "src/pyglui/ui_elements.pxi":1310
 *             should_redraw = True
 * 
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_font(self.label_font)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1311
 * 
 *         glfont.push_state()
 *         glfont.set_font(self.label_font)             # <<<<<<<<<<<<<<
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 *         glfont.set_size(max(1,int(min(self.button.size)+self.offset_size*ui_scale)-thumb_font_padding*ui_scale))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_font); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->label_font};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1312
 *         glfont.push_state()
 *         glfont.set_font(self.label_font)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)             # <<<<<<<<<<<<<<
 *         glfont.set_size(max(1,int(min(self.button.size)+self.offset_size*ui_scale)-thumb_font_padding*ui_scale))
 *         glfont.set_color_float((0,0,0,0.5))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_CENTER)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1313
 *         glfont.set_font(self.label_font)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 *         glfont.set_size(max(1,int(min(self.button.size)+self.offset_size*ui_scale)-thumb_font_padding*ui_scale))             # <<<<<<<<<<<<<<
 *         glfont.set_color_float((0,0,0,0.5))
 *         glfont.set_blur(10.5)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_self->button->size)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_self->offset_size * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble((30.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_11 = 1;
  __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_8) {
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_3 = __pyx_t_5;
  } else {
    __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1314
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 *         glfont.set_size(max(1,int(min(self.button.size)+self.offset_size*ui_scale)-thumb_font_padding*ui_scale))
 *         glfont.set_color_float((0,0,0,0.5))             # <<<<<<<<<<<<<<
 *         glfont.set_blur(10.5)
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_tuple__44, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1315
 *         glfont.set_size(max(1,int(min(self.button.size)+self.offset_size*ui_scale)-thumb_font_padding*ui_scale))
 *         glfont.set_color_float((0,0,0,0.5))
 *         glfont.set_blur(10.5)             # <<<<<<<<<<<<<<
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_float_10_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1316
 *         glfont.set_color_float((0,0,0,0.5))
 *         glfont.set_blur(10.5)
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)             # <<<<<<<<<<<<<<
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_FromDouble((__pyx_v_self->offset_x * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_text_x = __pyx_t_7;

  /* "src/pyglui/ui_elements.pxi":1317
 *         glfont.set_blur(10.5)
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)             # <<<<<<<<<<<<<<
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.set_blur(0.5)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromDouble((__pyx_v_self->offset_y * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1317, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_text_y = __pyx_t_7;

  /* "src/pyglui/ui_elements.pxi":1318
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)             # <<<<<<<<<<<<<<
 *         glfont.set_blur(0.5)
 *         glfont.set_color_float(icon_color[:])
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base._label;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.line_height = __pyx_v_self->label_line_height;
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_multi_line_text(__pyx_v_6pyglui_2ui_glfont, __pyx_v_text_x, __pyx_v_text_y, __pyx_t_2, 0, &__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1319
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.set_blur(0.5)             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(icon_color[:])
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_float_0_5};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1320
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.set_blur(0.5)
 *         glfont.set_color_float(icon_color[:])             # <<<<<<<<<<<<<<
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.pop_state()
 */
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_icon_color), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(2, 1320, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1321
 *         glfont.set_blur(0.5)
 *         glfont.set_color_float(icon_color[:])
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 * 
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base._label;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.line_height = __pyx_v_self->label_line_height;
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_multi_line_text(__pyx_v_6pyglui_2ui_glfont, __pyx_v_text_x, __pyx_v_text_y, __pyx_t_2, 0, &__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1322
 *         glfont.set_color_float(icon_color[:])
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_1, };
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1326
 * 
 *         # draw status text.
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_font('roboto')
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_1, };
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1327
 *         # draw status text.
 *         glfont.push_state()
 *         glfont.set_font('roboto')             # <<<<<<<<<<<<<<
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 *         glfont.set_size( max(1, int( (min(self.button.size) )-thumb_font_padding*ui_scale)/2.) )
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_font); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_n_u_roboto};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1328
 *         glfont.push_state()
 *         glfont.set_font('roboto')
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)             # <<<<<<<<<<<<<<
 *         glfont.set_size( max(1, int( (min(self.button.size) )-thumb_font_padding*ui_scale)/2.) )
 *         glfont.set_color_float((0,0,0,1))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1329
 *         glfont.set_font('roboto')
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 *         glfont.set_size( max(1, int( (min(self.button.size) )-thumb_font_padding*ui_scale)/2.) )             # <<<<<<<<<<<<<<
 *         glfont.set_color_float((0,0,0,1))
 *         glfont.set_blur(10.5)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_self->button->size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyFloat_FromDouble((30.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Subtract(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_5, __pyx_float_2_, 2., 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_11 = 1;
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1330
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 *         glfont.set_size( max(1, int( (min(self.button.size) )-thumb_font_padding*ui_scale)/2.) )
 *         glfont.set_color_float((0,0,0,1))             # <<<<<<<<<<<<<<
 *         glfont.set_blur(10.5)
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_tuple__45, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1331
 *         glfont.set_size( max(1, int( (min(self.button.size) )-thumb_font_padding*ui_scale)/2.) )
 *         glfont.set_color_float((0,0,0,1))
 *         glfont.set_blur(10.5)             # <<<<<<<<<<<<<<
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)
 *         glfont.set_color_float(icon_color[:])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_float_10_5};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1332
 *         glfont.set_color_float((0,0,0,1))
 *         glfont.set_blur(10.5)
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(icon_color[:])
 *         glfont.set_blur(.1)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble((((double)__pyx_v_self->button->size->x) / 2.)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_v_self->_status_text;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_multi_line_text(__pyx_v_6pyglui_2ui_glfont, __pyx_t_9, __pyx_t_13, __pyx_t_3, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/ui_elements.pxi":1333
 *         glfont.set_blur(10.5)
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)
 *         glfont.set_color_float(icon_color[:])             # <<<<<<<<<<<<<<
 *         glfont.set_blur(.1)
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)
 */
  __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_icon_color), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(PyTuple_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_5))) __PYX_ERR(2, 1333, __pyx_L1_error)
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_5), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1334
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)
 *         glfont.set_color_float(icon_color[:])
 *         glfont.set_blur(.1)             # <<<<<<<<<<<<<<
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)
 *         glfont.pop_state()
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_float__1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1335
 *         glfont.set_color_float(icon_color[:])
 *         glfont.set_blur(.1)
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble((((double)__pyx_v_self->button->size->x) / 2.)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->button), __pyx_n_s_center); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_v_self->_status_text;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_multi_line_text(__pyx_v_6pyglui_2ui_glfont, __pyx_t_13, __pyx_t_9, __pyx_t_3, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1336
 *         glfont.set_blur(.1)
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1285
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Thumb.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_icon_color);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_5Thumb_7draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Thumb_7draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1285, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1285, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1285, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 1285, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1285, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1285, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 1285, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Thumb.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1285, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_6draw(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_6draw(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Thumb->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Thumb.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1339
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_5Thumb_handle_input(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_5Thumb_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_5Thumb_9handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1339, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1339, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1339, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1340
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  __pyx_t_9 = (!__pyx_t_8);
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":1343
 *             global should_redraw
 * 
 *             for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired:             # <<<<<<<<<<<<<<
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] in (1,2):
 */
    if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 1343, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_new_input->buttons, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 1343, __pyx_L1_error)
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":1344
 * 
 *             for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired:
 *                 if visible and self.button.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     if b[1] in (1,2):
 *                         self.selected = True
 */
      if (__pyx_v_visible) {
      } else {
        __pyx_t_9 = __pyx_v_visible;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_1 = ((PyObject *)__pyx_v_new_input->m);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_8 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->button->__pyx_vtab)->mouse_over(__pyx_v_self->button, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __pyx_t_8;
      __pyx_L9_bool_binop_done:;
      if (__pyx_t_9) {

        /* "src/pyglui/ui_elements.pxi":1345
 *             for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired:
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] in (1,2):             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1345, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1345, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1345, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (!__pyx_t_8) {
        } else {
          __pyx_t_9 = __pyx_t_8;
          goto __pyx_L12_bool_binop_done;
        }
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1345, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1345, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_9 = __pyx_t_8;
        __pyx_L12_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_8 = __pyx_t_9;
        if (__pyx_t_8) {

          /* "src/pyglui/ui_elements.pxi":1346
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] in (1,2):
 *                         self.selected = True             # <<<<<<<<<<<<<<
 *                         should_redraw = True
 *                         new_input.buttons.remove(b)
 */
          __pyx_v_self->selected = 1;

          /* "src/pyglui/ui_elements.pxi":1347
 *                     if b[1] in (1,2):
 *                         self.selected = True
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 *                         new_input.buttons.remove(b)
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.on_val):
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":1348
 *                         self.selected = True
 *                         should_redraw = True
 *                         new_input.buttons.remove(b)             # <<<<<<<<<<<<<<
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.on_val):
 *                     self.sync_val.value = self.off_val
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_input->buttons, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1348, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
              __pyx_t_7 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_b};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1348, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "src/pyglui/ui_elements.pxi":1345
 *             for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired:
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] in (1,2):             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
        }

        /* "src/pyglui/ui_elements.pxi":1344
 * 
 *             for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired:
 *                 if visible and self.button.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     if b[1] in (1,2):
 *                         self.selected = True
 */
      }

      /* "src/pyglui/ui_elements.pxi":1349
 *                         should_redraw = True
 *                         new_input.buttons.remove(b)
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.on_val):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = self.off_val
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.off_val):
 */
      if (__pyx_v_self->selected) {
      } else {
        __pyx_t_8 = __pyx_v_self->selected;
        goto __pyx_L15_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!__pyx_t_11) {
      } else {
        __pyx_t_9 = __pyx_t_11;
        goto __pyx_L18_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_9 = __pyx_t_11;
      __pyx_L18_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = __pyx_t_9;
      if (__pyx_t_11) {
      } else {
        __pyx_t_8 = __pyx_t_11;
        goto __pyx_L15_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(2, 1349, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __pyx_t_11;
      __pyx_L15_bool_binop_done:;
      if (__pyx_t_8) {

        /* "src/pyglui/ui_elements.pxi":1350
 *                         new_input.buttons.remove(b)
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.on_val):
 *                     self.sync_val.value = self.off_val             # <<<<<<<<<<<<<<
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.off_val):
 *                     self.sync_val.value = self.on_val
 */
        __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1350, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(2, 1350, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyglui/ui_elements.pxi":1349
 *                         should_redraw = True
 *                         new_input.buttons.remove(b)
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.on_val):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = self.off_val
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.off_val):
 */
      }

      /* "src/pyglui/ui_elements.pxi":1351
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.on_val):
 *                     self.sync_val.value = self.off_val
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.off_val):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = self.on_val
 * 
 */
      if (__pyx_v_self->selected) {
      } else {
        __pyx_t_8 = __pyx_v_self->selected;
        goto __pyx_L21_bool_binop_done;
      }
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!__pyx_t_9) {
      } else {
        __pyx_t_11 = __pyx_t_9;
        goto __pyx_L24_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = __pyx_t_9;
      __pyx_L24_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_9 = __pyx_t_11;
      if (__pyx_t_9) {
      } else {
        __pyx_t_8 = __pyx_t_9;
        goto __pyx_L21_bool_binop_done;
      }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1351, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __pyx_t_9;
      __pyx_L21_bool_binop_done:;
      if (__pyx_t_8) {

        /* "src/pyglui/ui_elements.pxi":1352
 *                     self.sync_val.value = self.off_val
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.off_val):
 *                     self.sync_val.value = self.on_val             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1352, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(2, 1352, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":1351
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.on_val):
 *                     self.sync_val.value = self.off_val
 *                 if self.selected and b[1] in (1,2) and (self.sync_val.value == self.off_val):             # <<<<<<<<<<<<<<
 *                     self.sync_val.value = self.on_val
 * 
 */
      }

      /* "src/pyglui/ui_elements.pxi":1343
 *             global should_redraw
 * 
 *             for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired:             # <<<<<<<<<<<<<<
 *                 if visible and self.button.mouse_over(new_input.m):
 *                     if b[1] in (1,2):
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":1355
 * 
 * 
 *             if self.hotkey is not None:             # <<<<<<<<<<<<<<
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:
 */
    __pyx_t_8 = (__pyx_v_self->hotkey != Py_None);
    if (__pyx_t_8) {

      /* "src/pyglui/ui_elements.pxi":1356
 * 
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:             # <<<<<<<<<<<<<<
 *                     if c == self.hotkey:
 *                         self.selected = True
 */
      if (unlikely(__pyx_v_new_input->chars == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(2, 1356, __pyx_L1_error)
      }
      __pyx_t_2 = __pyx_v_new_input->chars; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
      for (;;) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 1356, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1356, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":1357
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_c, __pyx_v_self->hotkey, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1357, __pyx_L1_error)
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1357, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_8) {

          /* "src/pyglui/ui_elements.pxi":1358
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:
 *                         self.selected = True             # <<<<<<<<<<<<<<
 *                         should_redraw = True
 *                         if self.sync_val.value == self.on_val:
 */
          __pyx_v_self->selected = 1;

          /* "src/pyglui/ui_elements.pxi":1359
 *                     if c == self.hotkey:
 *                         self.selected = True
 *                         should_redraw = True             # <<<<<<<<<<<<<<
 *                         if self.sync_val.value == self.on_val:
 *                             self.sync_val.value = self.off_val
 */
          __pyx_v_6pyglui_2ui_should_redraw = 1;

          /* "src/pyglui/ui_elements.pxi":1360
 *                         self.selected = True
 *                         should_redraw = True
 *                         if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *                             self.sync_val.value = self.off_val
 *                         elif self.sync_val.value == self.off_val:
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1360, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1360, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1360, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1360, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__pyx_t_8) {

            /* "src/pyglui/ui_elements.pxi":1361
 *                         should_redraw = True
 *                         if self.sync_val.value == self.on_val:
 *                             self.sync_val.value = self.off_val             # <<<<<<<<<<<<<<
 *                         elif self.sync_val.value == self.off_val:
 *                             self.sync_val.value = self.on_val
 */
            __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1361, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(2, 1361, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "src/pyglui/ui_elements.pxi":1360
 *                         self.selected = True
 *                         should_redraw = True
 *                         if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *                             self.sync_val.value = self.off_val
 *                         elif self.sync_val.value == self.off_val:
 */
            goto __pyx_L30;
          }

          /* "src/pyglui/ui_elements.pxi":1362
 *                         if self.sync_val.value == self.on_val:
 *                             self.sync_val.value = self.off_val
 *                         elif self.sync_val.value == self.off_val:             # <<<<<<<<<<<<<<
 *                             self.sync_val.value = self.on_val
 *                         break
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1362, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1362, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1362, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1362, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (__pyx_t_8) {

            /* "src/pyglui/ui_elements.pxi":1363
 *                             self.sync_val.value = self.off_val
 *                         elif self.sync_val.value == self.off_val:
 *                             self.sync_val.value = self.on_val             # <<<<<<<<<<<<<<
 *                         break
 * 
 */
            __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1363, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(2, 1363, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "src/pyglui/ui_elements.pxi":1362
 *                         if self.sync_val.value == self.on_val:
 *                             self.sync_val.value = self.off_val
 *                         elif self.sync_val.value == self.off_val:             # <<<<<<<<<<<<<<
 *                             self.sync_val.value = self.on_val
 *                         break
 */
          }
          __pyx_L30:;

          /* "src/pyglui/ui_elements.pxi":1364
 *                         elif self.sync_val.value == self.off_val:
 *                             self.sync_val.value = self.on_val
 *                         break             # <<<<<<<<<<<<<<
 * 
 *                 for k in new_input.keys:
 */
          goto __pyx_L28_break;

          /* "src/pyglui/ui_elements.pxi":1357
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:             # <<<<<<<<<<<<<<
 *                         self.selected = True
 *                         should_redraw = True
 */
        }

        /* "src/pyglui/ui_elements.pxi":1356
 * 
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:             # <<<<<<<<<<<<<<
 *                     if c == self.hotkey:
 *                         self.selected = True
 */
      }
      __pyx_L28_break:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/ui_elements.pxi":1366
 *                         break
 * 
 *                 for k in new_input.keys:             # <<<<<<<<<<<<<<
 *                     if k[2] in (1,2):  #keydown
 *                         if k[0] == self.hotkey:
 */
      if (unlikely(__pyx_v_new_input->keys == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(2, 1366, __pyx_L1_error)
      }
      __pyx_t_2 = __pyx_v_new_input->keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
      for (;;) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 1366, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "src/pyglui/ui_elements.pxi":1367
 * 
 *                 for k in new_input.keys:
 *                     if k[2] in (1,2):  #keydown             # <<<<<<<<<<<<<<
 *                         if k[0] == self.hotkey:
 *                             self.selected = True
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_k, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1367, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (!__pyx_t_9) {
        } else {
          __pyx_t_8 = __pyx_t_9;
          goto __pyx_L34_bool_binop_done;
        }
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1367, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_8 = __pyx_t_9;
        __pyx_L34_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = __pyx_t_8;
        if (__pyx_t_9) {

          /* "src/pyglui/ui_elements.pxi":1368
 *                 for k in new_input.keys:
 *                     if k[2] in (1,2):  #keydown
 *                         if k[0] == self.hotkey:             # <<<<<<<<<<<<<<
 *                             self.selected = True
 *                             should_redraw = True
 */
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_k, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1368, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_v_self->hotkey, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1368, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1368, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_9) {

            /* "src/pyglui/ui_elements.pxi":1369
 *                     if k[2] in (1,2):  #keydown
 *                         if k[0] == self.hotkey:
 *                             self.selected = True             # <<<<<<<<<<<<<<
 *                             should_redraw = True
 *                             if self.sync_val.value == self.on_val:
 */
            __pyx_v_self->selected = 1;

            /* "src/pyglui/ui_elements.pxi":1370
 *                         if k[0] == self.hotkey:
 *                             self.selected = True
 *                             should_redraw = True             # <<<<<<<<<<<<<<
 *                             if self.sync_val.value == self.on_val:
 *                                 self.sync_val.value = self.off_val
 */
            __pyx_v_6pyglui_2ui_should_redraw = 1;

            /* "src/pyglui/ui_elements.pxi":1371
 *                             self.selected = True
 *                             should_redraw = True
 *                             if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *                                 self.sync_val.value = self.off_val
 *                             elif self.sync_val.value == self.off_val:
 */
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1371, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1371, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1371, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1371, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (__pyx_t_9) {

              /* "src/pyglui/ui_elements.pxi":1372
 *                             should_redraw = True
 *                             if self.sync_val.value == self.on_val:
 *                                 self.sync_val.value = self.off_val             # <<<<<<<<<<<<<<
 *                             elif self.sync_val.value == self.off_val:
 *                                 self.sync_val.value = self.on_val
 */
              __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1372, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(2, 1372, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "src/pyglui/ui_elements.pxi":1371
 *                             self.selected = True
 *                             should_redraw = True
 *                             if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *                                 self.sync_val.value = self.off_val
 *                             elif self.sync_val.value == self.off_val:
 */
              goto __pyx_L37;
            }

            /* "src/pyglui/ui_elements.pxi":1373
 *                             if self.sync_val.value == self.on_val:
 *                                 self.sync_val.value = self.off_val
 *                             elif self.sync_val.value == self.off_val:             # <<<<<<<<<<<<<<
 *                                 self.sync_val.value = self.on_val
 *                             break
 */
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1373, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1373, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1373, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1373, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (__pyx_t_9) {

              /* "src/pyglui/ui_elements.pxi":1374
 *                                 self.sync_val.value = self.off_val
 *                             elif self.sync_val.value == self.off_val:
 *                                 self.sync_val.value = self.on_val             # <<<<<<<<<<<<<<
 *                             break
 * 
 */
              __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1374, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_5) < 0) __PYX_ERR(2, 1374, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

              /* "src/pyglui/ui_elements.pxi":1373
 *                             if self.sync_val.value == self.on_val:
 *                                 self.sync_val.value = self.off_val
 *                             elif self.sync_val.value == self.off_val:             # <<<<<<<<<<<<<<
 *                                 self.sync_val.value = self.on_val
 *                             break
 */
            }
            __pyx_L37:;

            /* "src/pyglui/ui_elements.pxi":1375
 *                             elif self.sync_val.value == self.off_val:
 *                                 self.sync_val.value = self.on_val
 *                             break             # <<<<<<<<<<<<<<
 * 
 * cdef class Icon(Thumb):
 */
            goto __pyx_L32_break;

            /* "src/pyglui/ui_elements.pxi":1368
 *                 for k in new_input.keys:
 *                     if k[2] in (1,2):  #keydown
 *                         if k[0] == self.hotkey:             # <<<<<<<<<<<<<<
 *                             self.selected = True
 *                             should_redraw = True
 */
          }

          /* "src/pyglui/ui_elements.pxi":1367
 * 
 *                 for k in new_input.keys:
 *                     if k[2] in (1,2):  #keydown             # <<<<<<<<<<<<<<
 *                         if k[0] == self.hotkey:
 *                             self.selected = True
 */
        }

        /* "src/pyglui/ui_elements.pxi":1366
 *                         break
 * 
 *                 for k in new_input.keys:             # <<<<<<<<<<<<<<
 *                     if k[2] in (1,2):  #keydown
 *                         if k[0] == self.hotkey:
 */
      }
      __pyx_L32_break:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/ui_elements.pxi":1355
 * 
 * 
 *             if self.hotkey is not None:             # <<<<<<<<<<<<<<
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:
 */
    }

    /* "src/pyglui/ui_elements.pxi":1340
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             global should_redraw
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":1339
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Thumb.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_5Thumb_9handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Thumb_9handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1339, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1339, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 1339, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1339, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 1339, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1339, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1339, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 1339, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Thumb.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 1339, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_8handle_input(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_8handle_input(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Thumb->__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Thumb.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1201
 *     It can also display status info via a overlay
 *     '''
 *     cdef public FitBox button             # <<<<<<<<<<<<<<
 *     cdef bint selected
 *     cdef int on_val,off_val
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_6button_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_6button_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_6button___get__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_6button___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->button);
  __pyx_r = ((PyObject *)__pyx_v_self->button);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_6button_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_6button_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_6button_2__set__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb_6button_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(2, 1201, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button);
  __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Thumb.button.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_6button_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_6button_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_6button_4__del__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb_6button_4__del__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->button);
  __Pyx_DECREF((PyObject *)__pyx_v_self->button);
  __pyx_v_self->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1205
 *     cdef int on_val,off_val
 *     cdef float offset_x, offset_y, offset_size, label_line_height
 *     cdef public basestring label_font             # <<<<<<<<<<<<<<
 *     cdef Synced_Value sync_val
 *     cdef RGBA _on_color, _off_color
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_10label_font_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_10label_font_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_10label_font___get__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_10label_font___get__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->label_font);
  __pyx_r = __pyx_v_self->label_font;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_10label_font_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_10label_font_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_10label_font_2__set__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb_10label_font_2__set__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_value))) __PYX_ERR(2, 1205, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->label_font);
  __Pyx_DECREF(__pyx_v_self->label_font);
  __pyx_v_self->label_font = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Thumb.label_font.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Thumb_10label_font_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Thumb_10label_font_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_10label_font_4__del__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Thumb_10label_font_4__del__(struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->label_font);
  __Pyx_DECREF(__pyx_v_self->label_font);
  __pyx_v_self->label_font = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_5Thumb_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Thumb_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_10__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Thumb.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_5Thumb_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Thumb_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_5Thumb_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Thumb.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Thumb_12__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Thumb *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Thumb_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Thumb *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Thumb.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1382
 *     cdef bint being_hovered
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._indicator_start = 0.
 *         self._indicator_stop = 0.
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Icon_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Icon_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon___cinit__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Icon___cinit__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":1383
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self._indicator_start = 0.             # <<<<<<<<<<<<<<
 *         self._indicator_stop = 0.
 *         self._tooltip = ''
 */
  __pyx_v_self->_indicator_start = 0.;

  /* "src/pyglui/ui_elements.pxi":1384
 *     def __cinit__(self, *args, **kwargs):
 *         self._indicator_start = 0.
 *         self._indicator_stop = 0.             # <<<<<<<<<<<<<<
 *         self._tooltip = ''
 *         self.being_hovered = False
 */
  __pyx_v_self->_indicator_stop = 0.;

  /* "src/pyglui/ui_elements.pxi":1385
 *         self._indicator_start = 0.
 *         self._indicator_stop = 0.
 *         self._tooltip = ''             # <<<<<<<<<<<<<<
 *         self.being_hovered = False
 *         self.outline = FitBox(Vec2(0,0),Vec2(icon_outline_size, icon_outline_size))
 */
  __Pyx_INCREF(__pyx_kp_u__34);
  __Pyx_GIVEREF(__pyx_kp_u__34);
  __Pyx_GOTREF(__pyx_v_self->_tooltip);
  __Pyx_DECREF(__pyx_v_self->_tooltip);
  __pyx_v_self->_tooltip = ((PyObject*)__pyx_kp_u__34);

  /* "src/pyglui/ui_elements.pxi":1386
 *         self._indicator_stop = 0.
 *         self._tooltip = ''
 *         self.being_hovered = False             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(icon_outline_size, icon_outline_size))
 * 
 */
  __pyx_v_self->being_hovered = 0;

  /* "src/pyglui/ui_elements.pxi":1387
 *         self._tooltip = ''
 *         self.being_hovered = False
 *         self.outline = FitBox(Vec2(0,0),Vec2(icon_outline_size, icon_outline_size))             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __pyx_v_self->__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1382
 *     cdef bint being_hovered
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._indicator_start = 0.
 *         self._indicator_stop = 0.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Icon.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1389
 *         self.outline = FitBox(Vec2(0,0),Vec2(icon_outline_size, icon_outline_size))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tooltip(self):
 *         return self._tooltip
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_7tooltip_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_7tooltip_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_7tooltip___get__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Icon_7tooltip___get__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1391
 *     @property
 *     def tooltip(self):
 *         return self._tooltip             # <<<<<<<<<<<<<<
 * 
 *     @tooltip.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_tooltip);
  __pyx_r = __pyx_v_self->_tooltip;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1389
 *         self.outline = FitBox(Vec2(0,0),Vec2(icon_outline_size, icon_outline_size))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tooltip(self):
 *         return self._tooltip
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1393
 *         return self._tooltip
 * 
 *     @tooltip.setter             # <<<<<<<<<<<<<<
 *     def tooltip(self, val):
 *         if self._tooltip != val:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Icon_7tooltip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Icon_7tooltip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_7tooltip_2__set__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Icon_7tooltip_2__set__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/ui_elements.pxi":1395
 *     @tooltip.setter
 *     def tooltip(self, val):
 *         if self._tooltip != val:             # <<<<<<<<<<<<<<
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_tooltip, __pyx_v_val, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 1395, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":1397
 *         if self._tooltip != val:
 *             global should_redraw_overlay
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *             self._tooltip = val
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/ui_elements.pxi":1398
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 *             self._tooltip = val             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_val))||((__pyx_v_val) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_val))) __PYX_ERR(2, 1398, __pyx_L1_error)
    __pyx_t_2 = __pyx_v_val;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_tooltip);
    __Pyx_DECREF(__pyx_v_self->_tooltip);
    __pyx_v_self->_tooltip = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":1395
 *     @tooltip.setter
 *     def tooltip(self, val):
 *         if self._tooltip != val:             # <<<<<<<<<<<<<<
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 */
  }

  /* "src/pyglui/ui_elements.pxi":1393
 *         return self._tooltip
 * 
 *     @tooltip.setter             # <<<<<<<<<<<<<<
 *     def tooltip(self, val):
 *         if self._tooltip != val:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Icon.tooltip.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1400
 *             self._tooltip = val
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def indicator_start(self):
 *         return self._indicator_start
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_15indicator_start_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_15indicator_start_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_15indicator_start___get__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Icon_15indicator_start___get__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1402
 *     @property
 *     def indicator_start(self):
 *         return self._indicator_start             # <<<<<<<<<<<<<<
 * 
 *     @indicator_start.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_indicator_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1400
 *             self._tooltip = val
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def indicator_start(self):
 *         return self._indicator_start
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Icon.indicator_start.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1404
 *         return self._indicator_start
 * 
 *     @indicator_start.setter             # <<<<<<<<<<<<<<
 *     def indicator_start(self, val):
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Icon_15indicator_start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Icon_15indicator_start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_15indicator_start_2__set__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Icon_15indicator_start_2__set__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  float __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "src/pyglui/ui_elements.pxi":1406
 *     @indicator_start.setter
 *     def indicator_start(self, val):
 *         assert isinstance(val, float), 'Indicator values are required to be floats'             # <<<<<<<<<<<<<<
 *         val %= 1.
 *         if self._indicator_start != val:
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = PyFloat_Check(__pyx_v_val); 
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_kp_u_Indicator_values_are_required_to, 0, 0);
      __PYX_ERR(2, 1406, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(2, 1406, __pyx_L1_error)
  #endif

  /* "src/pyglui/ui_elements.pxi":1407
 *     def indicator_start(self, val):
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 *         val %= 1.             # <<<<<<<<<<<<<<
 *         if self._indicator_start != val:
 *             global should_redraw_overlay
 */
  __pyx_t_2 = __Pyx_PyFloat_RemainderObjC(__pyx_v_val, __pyx_float_1_, 1., 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1408
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 *         val %= 1.
 *         if self._indicator_start != val:             # <<<<<<<<<<<<<<
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->_indicator_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 1408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":1410
 *         if self._indicator_start != val:
 *             global should_redraw_overlay
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *         self._indicator_start = val
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/ui_elements.pxi":1408
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 *         val %= 1.
 *         if self._indicator_start != val:             # <<<<<<<<<<<<<<
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 */
  }

  /* "src/pyglui/ui_elements.pxi":1411
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 *         self._indicator_start = val             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_v_val); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1411, __pyx_L1_error)
  __pyx_v_self->_indicator_start = __pyx_t_4;

  /* "src/pyglui/ui_elements.pxi":1404
 *         return self._indicator_start
 * 
 *     @indicator_start.setter             # <<<<<<<<<<<<<<
 *     def indicator_start(self, val):
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Icon.indicator_start.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1413
 *         self._indicator_start = val
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def indicator_stop(self):
 *         return self._indicator_stop
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_14indicator_stop_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_14indicator_stop_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_14indicator_stop___get__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Icon_14indicator_stop___get__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/ui_elements.pxi":1415
 *     @property
 *     def indicator_stop(self):
 *         return self._indicator_stop             # <<<<<<<<<<<<<<
 * 
 *     @indicator_stop.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_indicator_stop); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1413
 *         self._indicator_start = val
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def indicator_stop(self):
 *         return self._indicator_stop
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Icon.indicator_stop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1417
 *         return self._indicator_stop
 * 
 *     @indicator_stop.setter             # <<<<<<<<<<<<<<
 *     def indicator_stop(self, val):
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Icon_14indicator_stop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Icon_14indicator_stop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_14indicator_stop_2__set__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Icon_14indicator_stop_2__set__(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  float __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "src/pyglui/ui_elements.pxi":1419
 *     @indicator_stop.setter
 *     def indicator_stop(self, val):
 *         assert isinstance(val, float), 'Indicator values are required to be floats'             # <<<<<<<<<<<<<<
 *         val %= 1.
 *         if self._indicator_stop != val:
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = PyFloat_Check(__pyx_v_val); 
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_kp_u_Indicator_values_are_required_to, 0, 0);
      __PYX_ERR(2, 1419, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(2, 1419, __pyx_L1_error)
  #endif

  /* "src/pyglui/ui_elements.pxi":1420
 *     def indicator_stop(self, val):
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 *         val %= 1.             # <<<<<<<<<<<<<<
 *         if self._indicator_stop != val:
 *             global should_redraw_overlay
 */
  __pyx_t_2 = __Pyx_PyFloat_RemainderObjC(__pyx_v_val, __pyx_float_1_, 1., 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1421
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 *         val %= 1.
 *         if self._indicator_stop != val:             # <<<<<<<<<<<<<<
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->_indicator_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 1421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "src/pyglui/ui_elements.pxi":1423
 *         if self._indicator_stop != val:
 *             global should_redraw_overlay
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *         self._indicator_stop = val
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/ui_elements.pxi":1421
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 *         val %= 1.
 *         if self._indicator_stop != val:             # <<<<<<<<<<<<<<
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 */
  }

  /* "src/pyglui/ui_elements.pxi":1424
 *             global should_redraw_overlay
 *             should_redraw_overlay = True
 *         self._indicator_stop = val             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 */
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_v_val); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1424, __pyx_L1_error)
  __pyx_v_self->_indicator_stop = __pyx_t_4;

  /* "src/pyglui/ui_elements.pxi":1417
 *         return self._indicator_stop
 * 
 *     @indicator_stop.setter             # <<<<<<<<<<<<<<
 *     def indicator_stop(self, val):
 *         assert isinstance(val, float), 'Indicator values are required to be floats'
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Icon.indicator_stop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1426
 *         self._indicator_stop = val
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         unused = super(Icon, self).handle_input(new_input, visible, parent_read_only)
 *         global should_redraw_overlay
 */

static PyObject *__pyx_pw_6pyglui_2ui_4Icon_3handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_4Icon_handle_input(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_4Icon_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_unused = NULL;
  int __pyx_v_hovering;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_4Icon_3handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1426, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1427
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         unused = super(Icon, self).handle_input(new_input, visible, parent_read_only)             # <<<<<<<<<<<<<<
 *         global should_redraw_overlay
 *         cdef bint hovering = visible and self.button.mouse_over(new_input.m)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6pyglui_2ui_Icon);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6pyglui_2ui_Icon);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6pyglui_2ui_Icon));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_handle_input); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_new_input), __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_unused = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1429
 *         unused = super(Icon, self).handle_input(new_input, visible, parent_read_only)
 *         global should_redraw_overlay
 *         cdef bint hovering = visible and self.button.mouse_over(new_input.m)             # <<<<<<<<<<<<<<
 * 
 *         if hovering != self.being_hovered:
 */
  if (__pyx_v_visible) {
  } else {
    __pyx_t_8 = __pyx_v_visible;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_new_input->m);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_9 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.button->__pyx_vtab)->mouse_over(__pyx_v_self->__pyx_base.button, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_9;
  __pyx_L3_bool_binop_done:;
  __pyx_v_hovering = __pyx_t_8;

  /* "src/pyglui/ui_elements.pxi":1431
 *         cdef bint hovering = visible and self.button.mouse_over(new_input.m)
 * 
 *         if hovering != self.being_hovered:             # <<<<<<<<<<<<<<
 *             self.being_hovered = hovering
 *             should_redraw_overlay = True
 */
  __pyx_t_8 = (__pyx_v_hovering != __pyx_v_self->being_hovered);
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":1432
 * 
 *         if hovering != self.being_hovered:
 *             self.being_hovered = hovering             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 *         elif new_input.s.y > 0.:
 */
    __pyx_v_self->being_hovered = __pyx_v_hovering;

    /* "src/pyglui/ui_elements.pxi":1433
 *         if hovering != self.being_hovered:
 *             self.being_hovered = hovering
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *         elif new_input.s.y > 0.:
 *             should_redraw_overlay = True
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/ui_elements.pxi":1431
 *         cdef bint hovering = visible and self.button.mouse_over(new_input.m)
 * 
 *         if hovering != self.being_hovered:             # <<<<<<<<<<<<<<
 *             self.being_hovered = hovering
 *             should_redraw_overlay = True
 */
    goto __pyx_L5;
  }

  /* "src/pyglui/ui_elements.pxi":1434
 *             self.being_hovered = hovering
 *             should_redraw_overlay = True
 *         elif new_input.s.y > 0.:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 *         return unused
 */
  __pyx_t_8 = (__pyx_v_new_input->s->y > 0.);
  if (__pyx_t_8) {

    /* "src/pyglui/ui_elements.pxi":1435
 *             should_redraw_overlay = True
 *         elif new_input.s.y > 0.:
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *         return unused
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/ui_elements.pxi":1434
 *             self.being_hovered = hovering
 *             should_redraw_overlay = True
 *         elif new_input.s.y > 0.:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 *         return unused
 */
  }
  __pyx_L5:;

  /* "src/pyglui/ui_elements.pxi":1436
 *         elif new_input.s.y > 0.:
 *             should_redraw_overlay = True
 *         return unused             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_unused);
  __pyx_r = __pyx_v_unused;
  goto __pyx_L0;

  /* "src/pyglui/ui_elements.pxi":1426
 *         self._indicator_stop = val
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         unused = super(Icon, self).handle_input(new_input, visible, parent_read_only)
 *         global should_redraw_overlay
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Icon.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unused);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_3handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_4Icon_3handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Icon_3handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_3handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1426, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1426, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 1426, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1426, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 1426, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1426, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1426, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 1426, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Icon.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 1426, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_2handle_input(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Icon_2handle_input(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Icon->__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Icon.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1438
 *         return unused
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */

static PyObject *__pyx_pw_6pyglui_2ui_4Icon_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_4Icon_draw(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_4Icon_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_icon_color = 0;
  float __pyx_v_ref_size;
  double __pyx_v_bg_alpha;
  int __pyx_v_text_x;
  int __pyx_v_text_y;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  float __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  double __pyx_t_11;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points __pyx_t_12;
  long __pyx_t_13;
  struct __pyx_opt_args_6pyglui_11pyfontstash_9fontstash_7Context_draw_multi_line_text __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_4Icon_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1438, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1440
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         #update appearance
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.button.compute(self.outline)
 *         cdef tuple icon_color, bg_color
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1441
 *         #update appearance
 *         self.outline.compute(parent)
 *         self.button.compute(self.outline)             # <<<<<<<<<<<<<<
 *         cdef tuple icon_color, bg_color
 *         cdef float ref_size = min(self.button.size)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.button->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.button, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1443
 *         self.button.compute(self.outline)
 *         cdef tuple icon_color, bg_color
 *         cdef float ref_size = min(self.button.size)             # <<<<<<<<<<<<<<
 * 
 *         icon_color = 0, 0, 0, 1
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_self->__pyx_base.button->size)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ref_size = __pyx_t_8;

  /* "src/pyglui/ui_elements.pxi":1445
 *         cdef float ref_size = min(self.button.size)
 * 
 *         icon_color = 0, 0, 0, 1             # <<<<<<<<<<<<<<
 *         if self.sync_val.value == self.on_val or self.selected:
 *             bg_alpha = 1.
 */
  __Pyx_INCREF(__pyx_tuple__45);
  __pyx_v_icon_color = __pyx_tuple__45;

  /* "src/pyglui/ui_elements.pxi":1446
 * 
 *         icon_color = 0, 0, 0, 1
 *         if self.sync_val.value == self.on_val or self.selected:             # <<<<<<<<<<<<<<
 *             bg_alpha = 1.
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.on_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(2, 1446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_9 = __pyx_v_self->__pyx_base.selected;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":1447
 *         icon_color = 0, 0, 0, 1
 *         if self.sync_val.value == self.on_val or self.selected:
 *             bg_alpha = 1.             # <<<<<<<<<<<<<<
 *         else:
 *             bg_alpha = .6
 */
    __pyx_v_bg_alpha = 1.;

    /* "src/pyglui/ui_elements.pxi":1446
 * 
 *         icon_color = 0, 0, 0, 1
 *         if self.sync_val.value == self.on_val or self.selected:             # <<<<<<<<<<<<<<
 *             bg_alpha = 1.
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/ui_elements.pxi":1449
 *             bg_alpha = 1.
 *         else:
 *             bg_alpha = .6             # <<<<<<<<<<<<<<
 * 
 *         if self.selected:
 */
  /*else*/ {
    __pyx_v_bg_alpha = .6;
  }
  __pyx_L3:;

  /* "src/pyglui/ui_elements.pxi":1451
 *             bg_alpha = .6
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             self.selected = False
 *             global should_redraw
 */
  if (__pyx_v_self->__pyx_base.selected) {

    /* "src/pyglui/ui_elements.pxi":1452
 * 
 *         if self.selected:
 *             self.selected = False             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             should_redraw = True
 */
    __pyx_v_self->__pyx_base.selected = 0;

    /* "src/pyglui/ui_elements.pxi":1454
 *             self.selected = False
 *             global should_redraw
 *             should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *         utils.draw_points([self.button.center], size=int(ref_size*.7), color=RGBA(1., 1., 1., .3), sharpness=0.7)
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/ui_elements.pxi":1451
 *             bg_alpha = .6
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             self.selected = False
 *             global should_redraw
 */
  }

  /* "src/pyglui/ui_elements.pxi":1456
 *             should_redraw = True
 * 
 *         utils.draw_points([self.button.center], size=int(ref_size*.7), color=RGBA(1., 1., 1., .3), sharpness=0.7)             # <<<<<<<<<<<<<<
 *         utils.draw_points([self.button.center], size=int(ref_size*.7), color=RGBA(1., 1., 1., bg_alpha), sharpness=0.9)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.button), __pyx_n_s_center); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_11 = trunc((__pyx_v_ref_size * .7)); 
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12.__pyx_n = 3;
  __pyx_t_12.size = __pyx_t_11;
  __pyx_t_12.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5);
  __pyx_t_12.sharpness = 0.7;
  __pyx_t_2 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_1, 0, &__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1457
 * 
 *         utils.draw_points([self.button.center], size=int(ref_size*.7), color=RGBA(1., 1., 1., .3), sharpness=0.7)
 *         utils.draw_points([self.button.center], size=int(ref_size*.7), color=RGBA(1., 1., 1., bg_alpha), sharpness=0.9)             # <<<<<<<<<<<<<<
 * 
 *         glfont.push_state()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.button), __pyx_n_s_center); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_11 = trunc((__pyx_v_ref_size * .7)); 
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_bg_alpha); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_float_1_);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_float_1_);
  __Pyx_INCREF(__pyx_float_1_);
  __Pyx_GIVEREF(__pyx_float_1_);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_float_1_);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_12.__pyx_n = 3;
  __pyx_t_12.size = __pyx_t_11;
  __pyx_t_12.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
  __pyx_t_12.sharpness = 0.9;
  __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_5, 0, &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1459
 *         utils.draw_points([self.button.center], size=int(ref_size*.7), color=RGBA(1., 1., 1., bg_alpha), sharpness=0.9)
 * 
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_font(self.label_font)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1460
 * 
 *         glfont.push_state()
 *         glfont.set_font(self.label_font)             # <<<<<<<<<<<<<<
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 *         glfont.set_size(max(1,int(ref_size+self.offset_size*ui_scale)-icon_font_padding*ui_scale))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_font); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->__pyx_base.label_font};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1461
 *         glfont.push_state()
 *         glfont.set_font(self.label_font)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)             # <<<<<<<<<<<<<<
 *         glfont.set_size(max(1,int(ref_size+self.offset_size*ui_scale)-icon_font_padding*ui_scale))
 *         glfont.set_color_float((*icon_color[:3], 0.3))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_CENTER)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1462
 *         glfont.set_font(self.label_font)
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 *         glfont.set_size(max(1,int(ref_size+self.offset_size*ui_scale)-icon_font_padding*ui_scale))             # <<<<<<<<<<<<<<
 *         glfont.set_color_float((*icon_color[:3], 0.3))
 *         glfont.set_blur(3)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyInt_FromDouble((__pyx_v_ref_size + (__pyx_v_self->__pyx_base.offset_size * __pyx_v_6pyglui_2ui_ui_scale))); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyFloat_FromDouble((20.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_13 = 1;
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_9) {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1463
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 *         glfont.set_size(max(1,int(ref_size+self.offset_size*ui_scale)-icon_font_padding*ui_scale))
 *         glfont.set_color_float((*icon_color[:3], 0.3))             # <<<<<<<<<<<<<<
 *         glfont.set_blur(3)
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 */
  __pyx_t_2 = __Pyx_PyTuple_GetSlice(__pyx_v_icon_color, 0, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_ListComp_Append(__pyx_t_1, __pyx_float_0_3) < 0) __PYX_ERR(2, 1463, __pyx_L1_error)
  {
    PyObject *__pyx_temp = PyList_AsTuple(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_temp; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1464
 *         glfont.set_size(max(1,int(ref_size+self.offset_size*ui_scale)-icon_font_padding*ui_scale))
 *         glfont.set_color_float((*icon_color[:3], 0.3))
 *         glfont.set_blur(3)             # <<<<<<<<<<<<<<
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1465
 *         glfont.set_color_float((*icon_color[:3], 0.3))
 *         glfont.set_blur(3)
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)             # <<<<<<<<<<<<<<
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.button), __pyx_n_s_center); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_FromDouble((__pyx_v_self->__pyx_base.offset_x * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_text_x = __pyx_t_7;

  /* "src/pyglui/ui_elements.pxi":1466
 *         glfont.set_blur(3)
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)             # <<<<<<<<<<<<<<
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.set_blur(0.5)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.button), __pyx_n_s_center); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_FromDouble((__pyx_v_self->__pyx_base.offset_y * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_text_y = __pyx_t_7;

  /* "src/pyglui/ui_elements.pxi":1467
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)             # <<<<<<<<<<<<<<
 *         glfont.set_blur(0.5)
 *         glfont.set_color_float(icon_color)
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base._label;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_14.__pyx_n = 1;
  __pyx_t_14.line_height = __pyx_v_self->__pyx_base.label_line_height;
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_multi_line_text(__pyx_v_6pyglui_2ui_glfont, __pyx_v_text_x, __pyx_v_text_y, __pyx_t_1, 0, &__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1468
 *         cdef int text_y = self.button.center[1]+int(self.offset_y*ui_scale)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.set_blur(0.5)             # <<<<<<<<<<<<<<
 *         glfont.set_color_float(icon_color)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_float_0_5};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1469
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.set_blur(0.5)
 *         glfont.set_color_float(icon_color)             # <<<<<<<<<<<<<<
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.pop_state()
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_v_icon_color, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1470
 *         glfont.set_blur(0.5)
 *         glfont.set_color_float(icon_color)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)             # <<<<<<<<<<<<<<
 *         glfont.pop_state()
 * 
 */
  __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base._label;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_14.__pyx_n = 1;
  __pyx_t_14.line_height = __pyx_v_self->__pyx_base.label_line_height;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_multi_line_text(__pyx_v_6pyglui_2ui_glfont, __pyx_v_text_x, __pyx_v_text_y, __pyx_t_4, 0, &__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1471
 *         glfont.set_color_float(icon_color)
 *         glfont.draw_multi_line_text(text_x, text_y, self._label, self.label_line_height)
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1438
 *         return unused
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Icon.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_icon_color);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_4Icon_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Icon_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1438, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1438, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1438, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(2, 1438, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1438, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1438, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 1438, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Icon.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1438, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_4draw(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Icon_4draw(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Icon->__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Icon.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1473
 *         glfont.pop_state()
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef basestring T = self.tooltip
 *         cdef float ref_size = min(self.button.size)
 */

static PyObject *__pyx_pw_6pyglui_2ui_4Icon_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_4Icon_draw_overlay(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_4Icon_draw_overlay *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_T = 0;
  float __pyx_v_ref_size;
  float __pyx_v_text_height;
  float __pyx_v_pad_x;
  float __pyx_v_pad_y;
  float __pyx_v_tip_width;
  float __pyx_v_vert_loc;
  float __pyx_v_tip_loc_x;
  float __pyx_v_text_loc_x;
  float __pyx_v_text_width;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  float __pyx_t_8;
  int __pyx_t_9;
  float __pyx_t_10;
  double __pyx_t_11;
  double __pyx_t_12;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_progress __pyx_t_13;
  int __pyx_t_14;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_tooltip __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_4Icon_7draw_overlay)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1473, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1473, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1474
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         cdef basestring T = self.tooltip             # <<<<<<<<<<<<<<
 *         cdef float ref_size = min(self.button.size)
 *         if self.indicator_start != self.indicator_stop:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tooltip); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_1))) __PYX_ERR(2, 1474, __pyx_L1_error)
  __pyx_v_T = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1475
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         cdef basestring T = self.tooltip
 *         cdef float ref_size = min(self.button.size)             # <<<<<<<<<<<<<<
 *         if self.indicator_start != self.indicator_stop:
 *             utils.draw_progress(self.button.center, self.indicator_start,
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_self->__pyx_base.button->size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ref_size = __pyx_t_8;

  /* "src/pyglui/ui_elements.pxi":1476
 *         cdef basestring T = self.tooltip
 *         cdef float ref_size = min(self.button.size)
 *         if self.indicator_start != self.indicator_stop:             # <<<<<<<<<<<<<<
 *             utils.draw_progress(self.button.center, self.indicator_start,
 *                                 self.indicator_stop, inner_radius=int(ref_size*.625),
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indicator_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indicator_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1476, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1476, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":1477
 *         cdef float ref_size = min(self.button.size)
 *         if self.indicator_start != self.indicator_stop:
 *             utils.draw_progress(self.button.center, self.indicator_start,             # <<<<<<<<<<<<<<
 *                                 self.indicator_stop, inner_radius=int(ref_size*.625),
 *                                 outer_radius=int(ref_size*.9), color=RGBA(*icon_progress_color),
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.button), __pyx_n_s_center); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indicator_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1477, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/ui_elements.pxi":1478
 *         if self.indicator_start != self.indicator_stop:
 *             utils.draw_progress(self.button.center, self.indicator_start,
 *                                 self.indicator_stop, inner_radius=int(ref_size*.625),             # <<<<<<<<<<<<<<
 *                                 outer_radius=int(ref_size*.9), color=RGBA(*icon_progress_color),
 *                                 sharpness=0.9)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indicator_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1478, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = trunc((__pyx_v_ref_size * .625)); 

    /* "src/pyglui/ui_elements.pxi":1479
 *             utils.draw_progress(self.button.center, self.indicator_start,
 *                                 self.indicator_stop, inner_radius=int(ref_size*.625),
 *                                 outer_radius=int(ref_size*.9), color=RGBA(*icon_progress_color),             # <<<<<<<<<<<<<<
 *                                 sharpness=0.9)
 * 
 */
    __pyx_t_12 = trunc((__pyx_v_ref_size * .9)); 
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "src/pyglui/ui_elements.pxi":1477
 *         cdef float ref_size = min(self.button.size)
 *         if self.indicator_start != self.indicator_stop:
 *             utils.draw_progress(self.button.center, self.indicator_start,             # <<<<<<<<<<<<<<
 *                                 self.indicator_stop, inner_radius=int(ref_size*.625),
 *                                 outer_radius=int(ref_size*.9), color=RGBA(*icon_progress_color),
 */
    __pyx_t_13.__pyx_n = 4;
    __pyx_t_13.inner_radius = __pyx_t_11;
    __pyx_t_13.outer_radius = __pyx_t_12;
    __pyx_t_13.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_13.sharpness = 0.9;
    __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_progress(__pyx_t_5, __pyx_t_8, __pyx_t_10, 0, &__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/ui_elements.pxi":1476
 *         cdef basestring T = self.tooltip
 *         cdef float ref_size = min(self.button.size)
 *         if self.indicator_start != self.indicator_stop:             # <<<<<<<<<<<<<<
 *             utils.draw_progress(self.button.center, self.indicator_start,
 *                                 self.indicator_stop, inner_radius=int(ref_size*.625),
 */
  }

  /* "src/pyglui/ui_elements.pxi":1482
 *                                 sharpness=0.9)
 * 
 *         if self._tooltip == '' or not self.being_hovered:             # <<<<<<<<<<<<<<
 *             return # only draw tooltip when set
 * 
 */
  __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_tooltip, __pyx_kp_u__34, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(2, 1482, __pyx_L1_error)
  if (!__pyx_t_14) {
  } else {
    __pyx_t_9 = __pyx_t_14;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_14 = (!__pyx_v_self->being_hovered);
  __pyx_t_9 = __pyx_t_14;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":1483
 * 
 *         if self._tooltip == '' or not self.being_hovered:
 *             return # only draw tooltip when set             # <<<<<<<<<<<<<<
 * 
 *         cdef float text_height = tooltip_text_size * ui_scale
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "src/pyglui/ui_elements.pxi":1482
 *                                 sharpness=0.9)
 * 
 *         if self._tooltip == '' or not self.being_hovered:             # <<<<<<<<<<<<<<
 *             return # only draw tooltip when set
 * 
 */
  }

  /* "src/pyglui/ui_elements.pxi":1485
 *             return # only draw tooltip when set
 * 
 *         cdef float text_height = tooltip_text_size * ui_scale             # <<<<<<<<<<<<<<
 *         cdef float pad_x = 0.25*text_height
 *         cdef float pad_y = .5*pad_x
 */
  __pyx_v_text_height = (18.0 * __pyx_v_6pyglui_2ui_ui_scale);

  /* "src/pyglui/ui_elements.pxi":1486
 * 
 *         cdef float text_height = tooltip_text_size * ui_scale
 *         cdef float pad_x = 0.25*text_height             # <<<<<<<<<<<<<<
 *         cdef float pad_y = .5*pad_x
 *         cdef float tip_width = text_height + pad_x  # == 2* pad_y
 */
  __pyx_v_pad_x = (0.25 * __pyx_v_text_height);

  /* "src/pyglui/ui_elements.pxi":1487
 *         cdef float text_height = tooltip_text_size * ui_scale
 *         cdef float pad_x = 0.25*text_height
 *         cdef float pad_y = .5*pad_x             # <<<<<<<<<<<<<<
 *         cdef float tip_width = text_height + pad_x  # == 2* pad_y
 * 
 */
  __pyx_v_pad_y = (.5 * __pyx_v_pad_x);

  /* "src/pyglui/ui_elements.pxi":1488
 *         cdef float pad_x = 0.25*text_height
 *         cdef float pad_y = .5*pad_x
 *         cdef float tip_width = text_height + pad_x  # == 2* pad_y             # <<<<<<<<<<<<<<
 * 
 *         cdef float vert_loc = self.button.center[1]
 */
  __pyx_v_tip_width = (__pyx_v_text_height + __pyx_v_pad_x);

  /* "src/pyglui/ui_elements.pxi":1490
 *         cdef float tip_width = text_height + pad_x  # == 2* pad_y
 * 
 *         cdef float vert_loc = self.button.center[1]             # <<<<<<<<<<<<<<
 *         cdef float tip_loc_x = self.button.org.x + 10.*ui_scale
 *         cdef float text_loc_x = tip_loc_x - tip_width - pad_x
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.button), __pyx_n_s_center); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_vert_loc = __pyx_t_10;

  /* "src/pyglui/ui_elements.pxi":1491
 * 
 *         cdef float vert_loc = self.button.center[1]
 *         cdef float tip_loc_x = self.button.org.x + 10.*ui_scale             # <<<<<<<<<<<<<<
 *         cdef float text_loc_x = tip_loc_x - tip_width - pad_x
 *         glfont.push_state()
 */
  __pyx_v_tip_loc_x = (__pyx_v_self->__pyx_base.button->org->x + (10. * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/ui_elements.pxi":1492
 *         cdef float vert_loc = self.button.center[1]
 *         cdef float tip_loc_x = self.button.org.x + 10.*ui_scale
 *         cdef float text_loc_x = tip_loc_x - tip_width - pad_x             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_font('opensans')
 */
  __pyx_v_text_loc_x = ((__pyx_v_tip_loc_x - __pyx_v_tip_width) - __pyx_v_pad_x);

  /* "src/pyglui/ui_elements.pxi":1493
 *         cdef float tip_loc_x = self.button.org.x + 10.*ui_scale
 *         cdef float text_loc_x = tip_loc_x - tip_width - pad_x
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_font('opensans')
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_RIGHT)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1494
 *         cdef float text_loc_x = tip_loc_x - tip_width - pad_x
 *         glfont.push_state()
 *         glfont.set_font('opensans')             # <<<<<<<<<<<<<<
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_RIGHT)
 *         glfont.set_size(text_height)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_font); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_n_u_opensans};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1495
 *         glfont.push_state()
 *         glfont.set_font('opensans')
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_RIGHT)             # <<<<<<<<<<<<<<
 *         glfont.set_size(text_height)
 *         glfont.set_blur(.0)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_RIGHT)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1496
 *         glfont.set_font('opensans')
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_RIGHT)
 *         glfont.set_size(text_height)             # <<<<<<<<<<<<<<
 *         glfont.set_blur(.0)
 *         cdef float text_width = glfont.text_bounds(text_loc_x, vert_loc, T)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_text_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1497
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_RIGHT)
 *         glfont.set_size(text_height)
 *         glfont.set_blur(.0)             # <<<<<<<<<<<<<<
 *         cdef float text_width = glfont.text_bounds(text_loc_x, vert_loc, T)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_float__0};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1498
 *         glfont.set_size(text_height)
 *         glfont.set_blur(.0)
 *         cdef float text_width = glfont.text_bounds(text_loc_x, vert_loc, T)             # <<<<<<<<<<<<<<
 * 
 *         utils.draw_tooltip((tip_loc_x, vert_loc), (text_width, text_height),
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_text_bounds); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_text_loc_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vert_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_5, __pyx_t_4, __pyx_v_T};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 1498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_text_width = __pyx_t_10;

  /* "src/pyglui/ui_elements.pxi":1500
 *         cdef float text_width = glfont.text_bounds(text_loc_x, vert_loc, T)
 * 
 *         utils.draw_tooltip((tip_loc_x, vert_loc), (text_width, text_height),             # <<<<<<<<<<<<<<
 *                            padding=(pad_x, pad_y), tooltip_color=RGBA(.8, .8, .8, .9),
 *                            sharpness=.9)
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_tip_loc_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_vert_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_text_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_text_height); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1501
 * 
 *         utils.draw_tooltip((tip_loc_x, vert_loc), (text_width, text_height),
 *                            padding=(pad_x, pad_y), tooltip_color=RGBA(.8, .8, .8, .9),             # <<<<<<<<<<<<<<
 *                            sharpness=.9)
 * 
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_pad_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pad_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyglui/ui_elements.pxi":1500
 *         cdef float text_width = glfont.text_bounds(text_loc_x, vert_loc, T)
 * 
 *         utils.draw_tooltip((tip_loc_x, vert_loc), (text_width, text_height),             # <<<<<<<<<<<<<<
 *                            padding=(pad_x, pad_y), tooltip_color=RGBA(.8, .8, .8, .9),
 *                            sharpness=.9)
 */
  __pyx_t_15.__pyx_n = 3;
  __pyx_t_15.padding = __pyx_t_3;
  __pyx_t_15.tooltip_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_15.sharpness = .9;
  __pyx_t_2 = __pyx_f_6pyglui_4cygl_5utils_draw_tooltip(__pyx_t_4, __pyx_t_5, &__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1508
 *         # glfont.draw_text(text_loc_x, vert_loc, T)
 * 
 *         glfont.set_color_float((0., 0., 0., 8.))             # <<<<<<<<<<<<<<
 *         glfont.draw_text(text_loc_x, vert_loc, T)
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_tuple__49, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1509
 * 
 *         glfont.set_color_float((0., 0., 0., 8.))
 *         glfont.draw_text(text_loc_x, vert_loc, T)             # <<<<<<<<<<<<<<
 * 
 *         glfont.pop_state()
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, __pyx_v_text_loc_x, __pyx_v_vert_loc, __pyx_v_T, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1511
 *         glfont.draw_text(text_loc_x, vert_loc, T)
 * 
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/ui_elements.pxi":1473
 *         glfont.pop_state()
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef basestring T = self.tooltip
 *         cdef float ref_size = min(self.button.size)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Icon.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_T);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_4Icon_7draw_overlay = {"draw_overlay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Icon_7draw_overlay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_overlay (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1473, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1473, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1473, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_overlay") < 0)) __PYX_ERR(2, 1473, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1473, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1473, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_overlay", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 1473, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Icon.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(2, 1473, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_6draw_overlay(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Icon_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Icon->__pyx_base.__pyx_base.draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Icon.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_4Icon_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Icon_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_8__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Icon_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Icon.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_4Icon_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Icon_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_4Icon_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Icon.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Icon_10__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Icon_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Icon *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Icon.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1523
 *     cdef object hotkey
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, on_val=True, off_val=False, label=None, setter=None, getter=None, hotkey = None):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_7Hot_Key_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_7Hot_Key_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_name = 0;
  PyObject *__pyx_v_attribute_context = 0;
  PyObject *__pyx_v_on_val = 0;
  PyObject *__pyx_v_off_val = 0;
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_setter = 0;
  PyObject *__pyx_v_getter = 0;
  PyObject *__pyx_v_hotkey = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,&__pyx_n_s_hotkey,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_label,&__pyx_n_s_setter,&__pyx_n_s_getter,&__pyx_n_s_hotkey,0};
    #endif
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    values[3] = ((PyObject *)Py_False);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((PyObject *)Py_None);
    values[7] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1523, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_on_val);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_off_val);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hotkey);
          if (value) { values[7] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1523, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(2, 1523, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_on_val = values[2];
    __pyx_v_off_val = values[3];
    __pyx_v_label = values[4];
    __pyx_v_setter = values[5];
    __pyx_v_getter = values[6];
    __pyx_v_hotkey = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 8, __pyx_nargs); __PYX_ERR(2, 1523, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 1523, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key___cinit__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_on_val, __pyx_v_off_val, __pyx_v_label, __pyx_v_setter, __pyx_v_getter, __pyx_v_hotkey);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_7Hot_Key___cinit__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_on_val, PyObject *__pyx_v_off_val, PyObject *__pyx_v_label, PyObject *__pyx_v_setter, PyObject *__pyx_v_getter, PyObject *__pyx_v_hotkey) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/ui_elements.pxi":1524
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, on_val=True, off_val=False, label=None, setter=None, getter=None, hotkey = None):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1525
 *     def __cinit__(self,str attribute_name, object attribute_context = None, on_val=True, off_val=False, label=None, setter=None, getter=None, hotkey = None):
 *         self.uid = id(self)
 *         self._label = label or attribute_name             # <<<<<<<<<<<<<<
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_label); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 1525, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(2, 1525, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_label);
    __pyx_t_1 = __pyx_v_label;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_v_attribute_name);
  __pyx_t_1 = __pyx_v_attribute_name;
  __pyx_L3_bool_binop_done:;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._label);
  __pyx_v_self->__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1526
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)             # <<<<<<<<<<<<<<
 *         self.on_val = on_val
 *         self.off_val = off_val
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_attribute_name);
  __Pyx_GIVEREF(__pyx_v_attribute_name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attribute_name);
  __Pyx_INCREF(__pyx_v_attribute_context);
  __Pyx_GIVEREF(__pyx_v_attribute_context);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attribute_context);
  __Pyx_INCREF(__pyx_v_getter);
  __Pyx_GIVEREF(__pyx_v_getter);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_getter);
  __Pyx_INCREF(__pyx_v_setter);
  __Pyx_GIVEREF(__pyx_v_setter);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_setter);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Synced_Value), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->sync_val);
  __Pyx_DECREF((PyObject *)__pyx_v_self->sync_val);
  __pyx_v_self->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/ui_elements.pxi":1527
 *         self._label = label or attribute_name
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val             # <<<<<<<<<<<<<<
 *         self.off_val = off_val
 *         self.hotkey = hotkey
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_on_val); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1527, __pyx_L1_error)
  __pyx_v_self->on_val = __pyx_t_4;

  /* "src/pyglui/ui_elements.pxi":1528
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter)
 *         self.on_val = on_val
 *         self.off_val = off_val             # <<<<<<<<<<<<<<
 *         self.hotkey = hotkey
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0)) # we dont use it but we need to have it.
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_off_val); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1528, __pyx_L1_error)
  __pyx_v_self->off_val = __pyx_t_4;

  /* "src/pyglui/ui_elements.pxi":1529
 *         self.on_val = on_val
 *         self.off_val = off_val
 *         self.hotkey = hotkey             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0)) # we dont use it but we need to have it.
 * 
 */
  __Pyx_INCREF(__pyx_v_hotkey);
  __Pyx_GIVEREF(__pyx_v_hotkey);
  __Pyx_GOTREF(__pyx_v_self->hotkey);
  __Pyx_DECREF(__pyx_v_self->hotkey);
  __pyx_v_self->hotkey = __pyx_v_hotkey;

  /* "src/pyglui/ui_elements.pxi":1530
 *         self.off_val = off_val
 *         self.hotkey = hotkey
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0)) # we dont use it but we need to have it.             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1523
 *     cdef object hotkey
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, on_val=True, off_val=False, label=None, setter=None, getter=None, hotkey = None):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label or attribute_name
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1533
 * 
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None,label = None, on_val = True, off_val = False ,setter= None,getter= None, hotkey = None):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_7Hot_Key_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_7Hot_Key_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_attribute_name = 0;
  CYTHON_UNUSED PyObject *__pyx_v_attribute_context = 0;
  CYTHON_UNUSED PyObject *__pyx_v_label = 0;
  CYTHON_UNUSED PyObject *__pyx_v_on_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v_off_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v_setter = 0;
  CYTHON_UNUSED PyObject *__pyx_v_getter = 0;
  CYTHON_UNUSED PyObject *__pyx_v_hotkey = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_setter,&__pyx_n_s_getter,&__pyx_n_s_hotkey,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_label,&__pyx_n_s_on_val,&__pyx_n_s_off_val,&__pyx_n_s_setter,&__pyx_n_s_getter,&__pyx_n_s_hotkey,0};
    #endif
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_True);
    values[4] = ((PyObject *)Py_False);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((PyObject *)Py_None);
    values[7] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1533, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_on_val);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_off_val);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1533, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hotkey);
          if (value) { values[7] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1533, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(2, 1533, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_label = values[2];
    __pyx_v_on_val = values[3];
    __pyx_v_off_val = values[4];
    __pyx_v_setter = values[5];
    __pyx_v_getter = values[6];
    __pyx_v_hotkey = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 8, __pyx_nargs); __PYX_ERR(2, 1533, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(2, 1533, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_2__init__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_label, __pyx_v_on_val, __pyx_v_off_val, __pyx_v_setter, __pyx_v_getter, __pyx_v_hotkey);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_7Hot_Key_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_on_val, CYTHON_UNUSED PyObject *__pyx_v_off_val, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_getter, CYTHON_UNUSED PyObject *__pyx_v_hotkey) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1536
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_7Hot_Key_sync(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_7Hot_Key_5sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1536, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1537
 * 
 *     cpdef sync(self):
 *         self.sync_val.sync()             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->sync_val->__pyx_vtab)->sync(__pyx_v_self->sync_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/ui_elements.pxi":1536
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_7Hot_Key_5sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_7Hot_Key_5sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_4sync(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_4sync(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_7Hot_Key_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1539
 *         self.sync_val.sync()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):
 */

static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_7Hot_Key_handle_input(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, CYTHON_UNUSED int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_7Hot_Key_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_7Hot_Key_7handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1539, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/ui_elements.pxi":1541
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:
 */
  if (!__pyx_v_self->__pyx_base._read_only) {
  } else {
    __pyx_t_8 = __pyx_v_self->__pyx_base._read_only;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __pyx_v_parent_read_only;
  __pyx_L4_bool_binop_done:;
  __pyx_t_9 = (!__pyx_t_8);
  if (__pyx_t_9) {

    /* "src/pyglui/ui_elements.pxi":1542
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):
 *             if self.hotkey is not None:             # <<<<<<<<<<<<<<
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:
 */
    __pyx_t_9 = (__pyx_v_self->hotkey != Py_None);
    if (__pyx_t_9) {

      /* "src/pyglui/ui_elements.pxi":1543
 *         if not (self._read_only or parent_read_only):
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:             # <<<<<<<<<<<<<<
 *                     if c == self.hotkey:
 *                         if self.sync_val.value == self.on_val:
 */
      if (unlikely(__pyx_v_new_input->chars == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(2, 1543, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_new_input->chars; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
      for (;;) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 1543, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "src/pyglui/ui_elements.pxi":1544
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:             # <<<<<<<<<<<<<<
 *                         if self.sync_val.value == self.on_val:
 *                             self.sync_val.value = self.off_val
 */
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_c, __pyx_v_self->hotkey, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1544, __pyx_L1_error)
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1544, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_9) {

          /* "src/pyglui/ui_elements.pxi":1545
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:
 *                         if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *                             self.sync_val.value = self.off_val
 *                             should_redraw = True
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1545, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1545, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__pyx_t_9) {

            /* "src/pyglui/ui_elements.pxi":1546
 *                     if c == self.hotkey:
 *                         if self.sync_val.value == self.on_val:
 *                             self.sync_val.value = self.off_val             # <<<<<<<<<<<<<<
 *                             should_redraw = True
 *                         elif self.sync_val.value == self.off_val:
 */
            __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1546, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(2, 1546, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "src/pyglui/ui_elements.pxi":1547
 *                         if self.sync_val.value == self.on_val:
 *                             self.sync_val.value = self.off_val
 *                             should_redraw = True             # <<<<<<<<<<<<<<
 *                         elif self.sync_val.value == self.off_val:
 *                             self.sync_val.value = self.on_val
 */
            __pyx_v_6pyglui_2ui_should_redraw = 1;

            /* "src/pyglui/ui_elements.pxi":1545
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:
 *                         if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *                             self.sync_val.value = self.off_val
 *                             should_redraw = True
 */
            goto __pyx_L10;
          }

          /* "src/pyglui/ui_elements.pxi":1548
 *                             self.sync_val.value = self.off_val
 *                             should_redraw = True
 *                         elif self.sync_val.value == self.off_val:             # <<<<<<<<<<<<<<
 *                             self.sync_val.value = self.on_val
 *                             should_redraw = True
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1548, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1548, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1548, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 1548, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_9) {

            /* "src/pyglui/ui_elements.pxi":1549
 *                             should_redraw = True
 *                         elif self.sync_val.value == self.off_val:
 *                             self.sync_val.value = self.on_val             # <<<<<<<<<<<<<<
 *                             should_redraw = True
 *                         break
 */
            __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1549, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_2) < 0) __PYX_ERR(2, 1549, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "src/pyglui/ui_elements.pxi":1550
 *                         elif self.sync_val.value == self.off_val:
 *                             self.sync_val.value = self.on_val
 *                             should_redraw = True             # <<<<<<<<<<<<<<
 *                         break
 *                 for k in new_input.keys:
 */
            __pyx_v_6pyglui_2ui_should_redraw = 1;

            /* "src/pyglui/ui_elements.pxi":1548
 *                             self.sync_val.value = self.off_val
 *                             should_redraw = True
 *                         elif self.sync_val.value == self.off_val:             # <<<<<<<<<<<<<<
 *                             self.sync_val.value = self.on_val
 *                             should_redraw = True
 */
          }
          __pyx_L10:;

          /* "src/pyglui/ui_elements.pxi":1551
 *                             self.sync_val.value = self.on_val
 *                             should_redraw = True
 *                         break             # <<<<<<<<<<<<<<
 *                 for k in new_input.keys:
 *                     if k[2]  in (1,2):  #keydown
 */
          goto __pyx_L8_break;

          /* "src/pyglui/ui_elements.pxi":1544
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:             # <<<<<<<<<<<<<<
 *                         if self.sync_val.value == self.on_val:
 *                             self.sync_val.value = self.off_val
 */
        }

        /* "src/pyglui/ui_elements.pxi":1543
 *         if not (self._read_only or parent_read_only):
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:             # <<<<<<<<<<<<<<
 *                     if c == self.hotkey:
 *                         if self.sync_val.value == self.on_val:
 */
      }
      __pyx_L8_break:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":1552
 *                             should_redraw = True
 *                         break
 *                 for k in new_input.keys:             # <<<<<<<<<<<<<<
 *                     if k[2]  in (1,2):  #keydown
 *                         if k[0] == self.hotkey:
 */
      if (unlikely(__pyx_v_new_input->keys == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(2, 1552, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_new_input->keys; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
      for (;;) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 1552, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "src/pyglui/ui_elements.pxi":1553
 *                         break
 *                 for k in new_input.keys:
 *                     if k[2]  in (1,2):  #keydown             # <<<<<<<<<<<<<<
 *                         if k[0] == self.hotkey:
 *                             if self.sync_val.value == self.on_val:
 */
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_k, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1553, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (!__pyx_t_8) {
        } else {
          __pyx_t_9 = __pyx_t_8;
          goto __pyx_L14_bool_binop_done;
        }
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1553, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_9 = __pyx_t_8;
        __pyx_L14_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_8 = __pyx_t_9;
        if (__pyx_t_8) {

          /* "src/pyglui/ui_elements.pxi":1554
 *                 for k in new_input.keys:
 *                     if k[2]  in (1,2):  #keydown
 *                         if k[0] == self.hotkey:             # <<<<<<<<<<<<<<
 *                             if self.sync_val.value == self.on_val:
 *                                 self.sync_val.value = self.off_val
 */
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_k, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1554, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_v_self->hotkey, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1554, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1554, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_8) {

            /* "src/pyglui/ui_elements.pxi":1555
 *                     if k[2]  in (1,2):  #keydown
 *                         if k[0] == self.hotkey:
 *                             if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *                                 self.sync_val.value = self.off_val
 *                                 should_redraw = True
 */
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1555, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1555, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1555, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1555, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (__pyx_t_8) {

              /* "src/pyglui/ui_elements.pxi":1556
 *                         if k[0] == self.hotkey:
 *                             if self.sync_val.value == self.on_val:
 *                                 self.sync_val.value = self.off_val             # <<<<<<<<<<<<<<
 *                                 should_redraw = True
 *                             elif self.sync_val.value == self.off_val:
 */
              __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1556, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(2, 1556, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "src/pyglui/ui_elements.pxi":1557
 *                             if self.sync_val.value == self.on_val:
 *                                 self.sync_val.value = self.off_val
 *                                 should_redraw = True             # <<<<<<<<<<<<<<
 *                             elif self.sync_val.value == self.off_val:
 *                                 self.sync_val.value = self.on_val
 */
              __pyx_v_6pyglui_2ui_should_redraw = 1;

              /* "src/pyglui/ui_elements.pxi":1555
 *                     if k[2]  in (1,2):  #keydown
 *                         if k[0] == self.hotkey:
 *                             if self.sync_val.value == self.on_val:             # <<<<<<<<<<<<<<
 *                                 self.sync_val.value = self.off_val
 *                                 should_redraw = True
 */
              goto __pyx_L17;
            }

            /* "src/pyglui/ui_elements.pxi":1558
 *                                 self.sync_val.value = self.off_val
 *                                 should_redraw = True
 *                             elif self.sync_val.value == self.off_val:             # <<<<<<<<<<<<<<
 *                                 self.sync_val.value = self.on_val
 *                                 should_redraw = True
 */
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1558, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->off_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1558, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1558, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 1558, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (__pyx_t_8) {

              /* "src/pyglui/ui_elements.pxi":1559
 *                                 should_redraw = True
 *                             elif self.sync_val.value == self.off_val:
 *                                 self.sync_val.value = self.on_val             # <<<<<<<<<<<<<<
 *                                 should_redraw = True
 *                             break
 */
              __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->on_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1559, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->sync_val), __pyx_n_s_value, __pyx_t_5) < 0) __PYX_ERR(2, 1559, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

              /* "src/pyglui/ui_elements.pxi":1560
 *                             elif self.sync_val.value == self.off_val:
 *                                 self.sync_val.value = self.on_val
 *                                 should_redraw = True             # <<<<<<<<<<<<<<
 *                             break
 */
              __pyx_v_6pyglui_2ui_should_redraw = 1;

              /* "src/pyglui/ui_elements.pxi":1558
 *                                 self.sync_val.value = self.off_val
 *                                 should_redraw = True
 *                             elif self.sync_val.value == self.off_val:             # <<<<<<<<<<<<<<
 *                                 self.sync_val.value = self.on_val
 *                                 should_redraw = True
 */
            }
            __pyx_L17:;

            /* "src/pyglui/ui_elements.pxi":1561
 *                                 self.sync_val.value = self.on_val
 *                                 should_redraw = True
 *                             break             # <<<<<<<<<<<<<<
 */
            goto __pyx_L12_break;

            /* "src/pyglui/ui_elements.pxi":1554
 *                 for k in new_input.keys:
 *                     if k[2]  in (1,2):  #keydown
 *                         if k[0] == self.hotkey:             # <<<<<<<<<<<<<<
 *                             if self.sync_val.value == self.on_val:
 *                                 self.sync_val.value = self.off_val
 */
          }

          /* "src/pyglui/ui_elements.pxi":1553
 *                         break
 *                 for k in new_input.keys:
 *                     if k[2]  in (1,2):  #keydown             # <<<<<<<<<<<<<<
 *                         if k[0] == self.hotkey:
 *                             if self.sync_val.value == self.on_val:
 */
        }

        /* "src/pyglui/ui_elements.pxi":1552
 *                             should_redraw = True
 *                         break
 *                 for k in new_input.keys:             # <<<<<<<<<<<<<<
 *                     if k[2]  in (1,2):  #keydown
 *                         if k[0] == self.hotkey:
 */
      }
      __pyx_L12_break:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/ui_elements.pxi":1542
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):
 *             if self.hotkey is not None:             # <<<<<<<<<<<<<<
 *                 for c in new_input.chars:
 *                     if c == self.hotkey:
 */
    }

    /* "src/pyglui/ui_elements.pxi":1541
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):             # <<<<<<<<<<<<<<
 *             if self.hotkey is not None:
 *                 for c in new_input.chars:
 */
  }

  /* "src/pyglui/ui_elements.pxi":1539
 *         self.sync_val.sync()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_7Hot_Key_7handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_7Hot_Key_7handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_7handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1539, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1539, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(2, 1539, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1539, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(2, 1539, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1539, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1539, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 1539, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(2, 1539, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_6handle_input(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_6handle_input(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Hot_Key->__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/ui_elements.pxi":1520
 *     cdef int on_val,off_val
 *     cdef Synced_Value sync_val
 *     cdef public RGBA on_color,off_color             # <<<<<<<<<<<<<<
 *     cdef object hotkey
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_8on_color___get__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_8on_color___get__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->on_color);
  __pyx_r = ((PyObject *)__pyx_v_self->on_color);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_8on_color_2__set__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_7Hot_Key_8on_color_2__set__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(2, 1520, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->on_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->on_color);
  __pyx_v_self->on_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.on_color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_8on_color_4__del__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_7Hot_Key_8on_color_4__del__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->on_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->on_color);
  __pyx_v_self->on_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_9off_color___get__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_9off_color___get__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->off_color);
  __pyx_r = ((PyObject *)__pyx_v_self->off_color);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_9off_color_2__set__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_7Hot_Key_9off_color_2__set__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(2, 1520, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->off_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->off_color);
  __pyx_v_self->off_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.off_color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_9off_color_4__del__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_7Hot_Key_9off_color_4__del__(struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->off_color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->off_color);
  __pyx_v_self->off_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_7Hot_Key_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_7Hot_Key_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_8__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_7Hot_Key_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_7Hot_Key_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_7Hot_Key_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_7Hot_Key_10__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Hot_Key *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_7Hot_Key_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Hot_Key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Hot_Key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":27
 *     cdef Icon backwards, play, forwards
 * 
 *     def __cinit__(self, object sync_ctx,             # <<<<<<<<<<<<<<
 *                   double min_ts,
 *                   double max_ts,
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Seek_Bar_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Seek_Bar_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sync_ctx = 0;
  double __pyx_v_min_ts;
  double __pyx_v_max_ts;
  PyObject *__pyx_v_recent_idx_ts_getter = 0;
  PyObject *__pyx_v_playback_time_setter = 0;
  PyObject *__pyx_v_seeking_cb = 0;
  struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_handle_start_reference = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_v_args = __Pyx_ArgsSlice_VARARGS(__pyx_args, 7, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sync_ctx,&__pyx_n_s_min_ts,&__pyx_n_s_max_ts,&__pyx_n_s_recent_idx_ts_getter,&__pyx_n_s_playback_time_setter,&__pyx_n_s_seeking_cb,&__pyx_n_s_handle_start_reference,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sync_ctx,&__pyx_n_s_min_ts,&__pyx_n_s_max_ts,&__pyx_n_s_recent_idx_ts_getter,&__pyx_n_s_playback_time_setter,&__pyx_n_s_seeking_cb,&__pyx_n_s_handle_start_reference,0};
    #endif
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        default:
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sync_ctx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 27, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min_ts)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 27, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 7, 1); __PYX_ERR(6, 27, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_ts)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 27, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 7, 2); __PYX_ERR(6, 27, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_recent_idx_ts_getter)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 27, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 7, 3); __PYX_ERR(6, 27, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_playback_time_setter)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 27, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 7, 4); __PYX_ERR(6, 27, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_seeking_cb)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 27, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 7, 5); __PYX_ERR(6, 27, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_handle_start_reference)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 27, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 7, 6); __PYX_ERR(6, 27, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        const Py_ssize_t used_pos_args = (kwd_pos_args < 7) ? kwd_pos_args : 7;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "__cinit__") < 0)) __PYX_ERR(6, 27, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs < 7)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
      values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
      values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
      values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
      values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
      values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
    }
    __pyx_v_sync_ctx = values[0];
    __pyx_v_min_ts = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_min_ts == (double)-1) && PyErr_Occurred())) __PYX_ERR(6, 28, __pyx_L3_error)
    __pyx_v_max_ts = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_max_ts == (double)-1) && PyErr_Occurred())) __PYX_ERR(6, 29, __pyx_L3_error)
    __pyx_v_recent_idx_ts_getter = values[3];
    __pyx_v_playback_time_setter = values[4];
    __pyx_v_seeking_cb = values[5];
    __pyx_v_handle_start_reference = ((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)values[6]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 7, __pyx_nargs); __PYX_ERR(6, 27, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle_start_reference), __pyx_ptype_6pyglui_2ui_Timeline_Menu, 1, "handle_start_reference", 0))) __PYX_ERR(6, 33, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar___cinit__(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self), __pyx_v_sync_ctx, __pyx_v_min_ts, __pyx_v_max_ts, __pyx_v_recent_idx_ts_getter, __pyx_v_playback_time_setter, __pyx_v_seeking_cb, __pyx_v_handle_start_reference, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":69
 *         decr_pbs_icon = chr(0xE020)
 * 
 *         def set_play(_):             # <<<<<<<<<<<<<<
 *             sync_ctx.play = not sync_ctx.play
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___1set_play(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___1set_play = {"set_play", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___1set_play, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___1set_play(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v__ = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_play (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s__50,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__50,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s__50)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 69, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_play") < 0)) __PYX_ERR(6, 69, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v__ = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_play", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 69, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__cinit__.set_play", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_9__cinit___set_play(__pyx_self, __pyx_v__);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_9__cinit___set_play(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v__) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_cur_scope;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_play", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "src/pyglui/custom.pxi":70
 * 
 *         def set_play(_):
 *             sync_ctx.play = not sync_ctx.play             # <<<<<<<<<<<<<<
 * 
 *         self.backwards = Icon('backwards', sync_ctx, label_font='pupil_icons',
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_sync_ctx)) { __Pyx_RaiseClosureNameError("sync_ctx"); __PYX_ERR(6, 70, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sync_ctx, __pyx_n_s_play); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(6, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_sync_ctx)) { __Pyx_RaiseClosureNameError("sync_ctx"); __PYX_ERR(6, 70, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_sync_ctx, __pyx_n_s_play, __pyx_t_1) < 0) __PYX_ERR(6, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":69
 *         decr_pbs_icon = chr(0xE020)
 * 
 *         def set_play(_):             # <<<<<<<<<<<<<<
 *             sync_ctx.play = not sync_ctx.play
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__cinit__.set_play", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":73
 * 
 *         self.backwards = Icon('backwards', sync_ctx, label_font='pupil_icons',
 *                               label_getter=lambda: decr_pbs_icon if sync_ctx.play else step_bwd_icon,             # <<<<<<<<<<<<<<
 *                               getter=lambda: True,
 *                               hotkey=263)  # 263 = glfw.GLFW_KEY_LEFT
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___2lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___2lambda1 = {"lambda1", (PyCFunction)__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___2lambda1, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___2lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_cur_scope;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_sync_ctx)) { __Pyx_RaiseClosureNameError("sync_ctx"); __PYX_ERR(6, 73, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sync_ctx, __pyx_n_s_play); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(6, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    if (unlikely(!__pyx_cur_scope->__pyx_v_decr_pbs_icon)) { __Pyx_RaiseClosureNameError("decr_pbs_icon"); __PYX_ERR(6, 73, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_decr_pbs_icon);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_decr_pbs_icon;
  } else {
    if (unlikely(!__pyx_cur_scope->__pyx_v_step_bwd_icon)) { __Pyx_RaiseClosureNameError("step_bwd_icon"); __PYX_ERR(6, 73, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step_bwd_icon);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_step_bwd_icon;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__cinit__.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":74
 *         self.backwards = Icon('backwards', sync_ctx, label_font='pupil_icons',
 *                               label_getter=lambda: decr_pbs_icon if sync_ctx.play else step_bwd_icon,
 *                               getter=lambda: True,             # <<<<<<<<<<<<<<
 *                               hotkey=263)  # 263 = glfw.GLFW_KEY_LEFT
 *         self.forwards = Icon('forwards', sync_ctx, label_font='pupil_icons',
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___3lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___3lambda2 = {"lambda2", (PyCFunction)__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___3lambda2, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___3lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":77
 *                               hotkey=263)  # 263 = glfw.GLFW_KEY_LEFT
 *         self.forwards = Icon('forwards', sync_ctx, label_font='pupil_icons',
 *                              label_getter=lambda: incr_pbs_icon if sync_ctx.play else step_fwd_icon,             # <<<<<<<<<<<<<<
 *                              hotkey=262,  # 262 = glfw.GLFW_KEY_RIGHT
 *                              getter=lambda: True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___4lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___4lambda3 = {"lambda3", (PyCFunction)__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___4lambda3, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___4lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_cur_scope;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda3", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_sync_ctx)) { __Pyx_RaiseClosureNameError("sync_ctx"); __PYX_ERR(6, 77, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sync_ctx, __pyx_n_s_play); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(6, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    if (unlikely(!__pyx_cur_scope->__pyx_v_incr_pbs_icon)) { __Pyx_RaiseClosureNameError("incr_pbs_icon"); __PYX_ERR(6, 77, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_incr_pbs_icon);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_incr_pbs_icon;
  } else {
    if (unlikely(!__pyx_cur_scope->__pyx_v_step_fwd_icon)) { __Pyx_RaiseClosureNameError("step_fwd_icon"); __PYX_ERR(6, 77, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step_fwd_icon);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_step_fwd_icon;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__cinit__.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":79
 *                              label_getter=lambda: incr_pbs_icon if sync_ctx.play else step_fwd_icon,
 *                              hotkey=262,  # 262 = glfw.GLFW_KEY_RIGHT
 *                              getter=lambda: True)             # <<<<<<<<<<<<<<
 * 
 *         self.play = Icon('play', sync_ctx, label_font='pupil_icons',
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___5lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___5lambda4 = {"lambda4", (PyCFunction)__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___5lambda4, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___5lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":82
 * 
 *         self.play = Icon('play', sync_ctx, label_font='pupil_icons',
 *                          label_getter=lambda: pause_icon if sync_ctx.play else play_icon,             # <<<<<<<<<<<<<<
 *                          hotkey=32, # 32 = glfw.GLFW_KEY_SPACE
 *                          setter=set_play,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___6lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___6lambda5 = {"lambda5", (PyCFunction)__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___6lambda5, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___6lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda5(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_cur_scope;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda5", 0);
  __pyx_outer_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_sync_ctx)) { __Pyx_RaiseClosureNameError("sync_ctx"); __PYX_ERR(6, 82, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sync_ctx, __pyx_n_s_play); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(6, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    if (unlikely(!__pyx_cur_scope->__pyx_v_pause_icon)) { __Pyx_RaiseClosureNameError("pause_icon"); __PYX_ERR(6, 82, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pause_icon);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_pause_icon;
  } else {
    if (unlikely(!__pyx_cur_scope->__pyx_v_play_icon)) { __Pyx_RaiseClosureNameError("play_icon"); __PYX_ERR(6, 82, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_play_icon);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_play_icon;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__cinit__.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":85
 *                          hotkey=32, # 32 = glfw.GLFW_KEY_SPACE
 *                          setter=set_play,
 *                          getter=lambda: True)             # <<<<<<<<<<<<<<
 * 
 *         self.backwards.outline = FitBox(Vec2(5, 0),Vec2(40, 40))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___7lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___7lambda6 = {"lambda6", (PyCFunction)__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___7lambda6, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9__cinit___7lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda6 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda6(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda6", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":27
 *     cdef Icon backwards, play, forwards
 * 
 *     def __cinit__(self, object sync_ctx,             # <<<<<<<<<<<<<<
 *                   double min_ts,
 *                   double max_ts,
 */

static int __pyx_pf_6pyglui_2ui_8Seek_Bar___cinit__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, PyObject *__pyx_v_sync_ctx, double __pyx_v_min_ts, double __pyx_v_max_ts, PyObject *__pyx_v_recent_idx_ts_getter, PyObject *__pyx_v_playback_time_setter, PyObject *__pyx_v_seeking_cb, struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_handle_start_reference, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_cur_scope;
  PyObject *__pyx_v_set_play = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *)__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_3___cinit__(__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(6, 27, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_sync_ctx = __pyx_v_sync_ctx;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sync_ctx);

  /* "src/pyglui/custom.pxi":35
 *                   Timeline_Menu handle_start_reference,
 *                   *args, **kwargs):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self.trim_left = Synced_Value('trim_left_ts', sync_ctx, trigger_overlay_only=True)
 *         self.trim_right = Synced_Value('trim_right_ts', sync_ctx, trigger_overlay_only=True)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":36
 *                   *args, **kwargs):
 *         self.uid = id(self)
 *         self.trim_left = Synced_Value('trim_left_ts', sync_ctx, trigger_overlay_only=True)             # <<<<<<<<<<<<<<
 *         self.trim_right = Synced_Value('trim_right_ts', sync_ctx, trigger_overlay_only=True)
 *         self.playback_speed = Synced_Value('playback_speed', sync_ctx, trigger_overlay_only=True)
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_trim_left_ts);
  __Pyx_GIVEREF(__pyx_n_u_trim_left_ts);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_trim_left_ts);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_sync_ctx);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_trigger_overlay_only, Py_True) < 0) __PYX_ERR(6, 36, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Synced_Value), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->trim_left);
  __Pyx_DECREF((PyObject *)__pyx_v_self->trim_left);
  __pyx_v_self->trim_left = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/custom.pxi":37
 *         self.uid = id(self)
 *         self.trim_left = Synced_Value('trim_left_ts', sync_ctx, trigger_overlay_only=True)
 *         self.trim_right = Synced_Value('trim_right_ts', sync_ctx, trigger_overlay_only=True)             # <<<<<<<<<<<<<<
 *         self.playback_speed = Synced_Value('playback_speed', sync_ctx, trigger_overlay_only=True)
 *         self.recent_idx_ts_getter = recent_idx_ts_getter
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_u_trim_right_ts);
  __Pyx_GIVEREF(__pyx_n_u_trim_right_ts);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_trim_right_ts);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_sync_ctx);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_trigger_overlay_only, Py_True) < 0) __PYX_ERR(6, 37, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Synced_Value), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->trim_right);
  __Pyx_DECREF((PyObject *)__pyx_v_self->trim_right);
  __pyx_v_self->trim_right = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":38
 *         self.trim_left = Synced_Value('trim_left_ts', sync_ctx, trigger_overlay_only=True)
 *         self.trim_right = Synced_Value('trim_right_ts', sync_ctx, trigger_overlay_only=True)
 *         self.playback_speed = Synced_Value('playback_speed', sync_ctx, trigger_overlay_only=True)             # <<<<<<<<<<<<<<
 *         self.recent_idx_ts_getter = recent_idx_ts_getter
 *         self.playback_time_setter = playback_time_setter
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_playback_speed);
  __Pyx_GIVEREF(__pyx_n_u_playback_speed);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_playback_speed);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_sync_ctx);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_trigger_overlay_only, Py_True) < 0) __PYX_ERR(6, 38, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Synced_Value), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->playback_speed);
  __Pyx_DECREF((PyObject *)__pyx_v_self->playback_speed);
  __pyx_v_self->playback_speed = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/custom.pxi":39
 *         self.trim_right = Synced_Value('trim_right_ts', sync_ctx, trigger_overlay_only=True)
 *         self.playback_speed = Synced_Value('playback_speed', sync_ctx, trigger_overlay_only=True)
 *         self.recent_idx_ts_getter = recent_idx_ts_getter             # <<<<<<<<<<<<<<
 *         self.playback_time_setter = playback_time_setter
 *         self.seeking_cb = seeking_cb
 */
  __Pyx_INCREF(__pyx_v_recent_idx_ts_getter);
  __Pyx_GIVEREF(__pyx_v_recent_idx_ts_getter);
  __Pyx_GOTREF(__pyx_v_self->recent_idx_ts_getter);
  __Pyx_DECREF(__pyx_v_self->recent_idx_ts_getter);
  __pyx_v_self->recent_idx_ts_getter = __pyx_v_recent_idx_ts_getter;

  /* "src/pyglui/custom.pxi":40
 *         self.playback_speed = Synced_Value('playback_speed', sync_ctx, trigger_overlay_only=True)
 *         self.recent_idx_ts_getter = recent_idx_ts_getter
 *         self.playback_time_setter = playback_time_setter             # <<<<<<<<<<<<<<
 *         self.seeking_cb = seeking_cb
 * 
 */
  __Pyx_INCREF(__pyx_v_playback_time_setter);
  __Pyx_GIVEREF(__pyx_v_playback_time_setter);
  __Pyx_GOTREF(__pyx_v_self->playback_time_setter);
  __Pyx_DECREF(__pyx_v_self->playback_time_setter);
  __pyx_v_self->playback_time_setter = __pyx_v_playback_time_setter;

  /* "src/pyglui/custom.pxi":41
 *         self.recent_idx_ts_getter = recent_idx_ts_getter
 *         self.playback_time_setter = playback_time_setter
 *         self.seeking_cb = seeking_cb             # <<<<<<<<<<<<<<
 * 
 *         self.recent_ts = min_ts
 */
  __Pyx_INCREF(__pyx_v_seeking_cb);
  __Pyx_GIVEREF(__pyx_v_seeking_cb);
  __Pyx_GOTREF(__pyx_v_self->seeking_cb);
  __Pyx_DECREF(__pyx_v_self->seeking_cb);
  __pyx_v_self->seeking_cb = __pyx_v_seeking_cb;

  /* "src/pyglui/custom.pxi":43
 *         self.seeking_cb = seeking_cb
 * 
 *         self.recent_ts = min_ts             # <<<<<<<<<<<<<<
 *         self.recent_idx = 0
 * 
 */
  __pyx_v_self->recent_ts = __pyx_v_min_ts;

  /* "src/pyglui/custom.pxi":44
 * 
 *         self.recent_ts = min_ts
 *         self.recent_idx = 0             # <<<<<<<<<<<<<<
 * 
 *         self.min_ts = min_ts
 */
  __pyx_v_self->recent_idx = 0;

  /* "src/pyglui/custom.pxi":46
 *         self.recent_idx = 0
 * 
 *         self.min_ts = min_ts             # <<<<<<<<<<<<<<
 *         self.max_ts = max_ts
 *         self.mid_ts = (min_ts + max_ts) / 2
 */
  __pyx_v_self->min_ts = __pyx_v_min_ts;

  /* "src/pyglui/custom.pxi":47
 * 
 *         self.min_ts = min_ts
 *         self.max_ts = max_ts             # <<<<<<<<<<<<<<
 *         self.mid_ts = (min_ts + max_ts) / 2
 *         self.hovering = 0
 */
  __pyx_v_self->max_ts = __pyx_v_max_ts;

  /* "src/pyglui/custom.pxi":48
 *         self.min_ts = min_ts
 *         self.max_ts = max_ts
 *         self.mid_ts = (min_ts + max_ts) / 2             # <<<<<<<<<<<<<<
 *         self.hovering = 0
 *         self.seeking = False
 */
  __pyx_v_self->mid_ts = ((__pyx_v_min_ts + __pyx_v_max_ts) / 2.0);

  /* "src/pyglui/custom.pxi":49
 *         self.max_ts = max_ts
 *         self.mid_ts = (min_ts + max_ts) / 2
 *         self.hovering = 0             # <<<<<<<<<<<<<<
 *         self.seeking = False
 *         self.trimming_left = False
 */
  __pyx_v_self->hovering = 0;

  /* "src/pyglui/custom.pxi":50
 *         self.mid_ts = (min_ts + max_ts) / 2
 *         self.hovering = 0
 *         self.seeking = False             # <<<<<<<<<<<<<<
 *         self.trimming_left = False
 *         self.trimming_right = False
 */
  __pyx_v_self->seeking = 0;

  /* "src/pyglui/custom.pxi":51
 *         self.hovering = 0
 *         self.seeking = False
 *         self.trimming_left = False             # <<<<<<<<<<<<<<
 *         self.trimming_right = False
 *         self.handle_start_reference = handle_start_reference
 */
  __pyx_v_self->trimming_left = 0;

  /* "src/pyglui/custom.pxi":52
 *         self.seeking = False
 *         self.trimming_left = False
 *         self.trimming_right = False             # <<<<<<<<<<<<<<
 *         self.handle_start_reference = handle_start_reference
 * 
 */
  __pyx_v_self->trimming_right = 0;

  /* "src/pyglui/custom.pxi":53
 *         self.trimming_left = False
 *         self.trimming_right = False
 *         self.handle_start_reference = handle_start_reference             # <<<<<<<<<<<<<<
 * 
 *         self.point_click_seek_loc = Vec2(0., 0.)
 */
  __Pyx_INCREF((PyObject *)__pyx_v_handle_start_reference);
  __Pyx_GIVEREF((PyObject *)__pyx_v_handle_start_reference);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->handle_start_reference);
  __Pyx_DECREF((PyObject *)__pyx_v_self->handle_start_reference);
  __pyx_v_self->handle_start_reference = __pyx_v_handle_start_reference;

  /* "src/pyglui/custom.pxi":55
 *         self.handle_start_reference = handle_start_reference
 * 
 *         self.point_click_seek_loc = Vec2(0., 0.)             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0., -50.), Vec2(0., 0.))
 *         self.bar = FitBox(Vec2(130., 21.), Vec2(-30., 3.))
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->point_click_seek_loc);
  __Pyx_DECREF((PyObject *)__pyx_v_self->point_click_seek_loc);
  __pyx_v_self->point_click_seek_loc = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/custom.pxi":56
 * 
 *         self.point_click_seek_loc = Vec2(0., 0.)
 *         self.outline = FitBox(Vec2(0., -50.), Vec2(0., 0.))             # <<<<<<<<<<<<<<
 *         self.bar = FitBox(Vec2(130., 21.), Vec2(-30., 3.))
 *         self.seek_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":57
 *         self.point_click_seek_loc = Vec2(0., 0.)
 *         self.outline = FitBox(Vec2(0., -50.), Vec2(0., 0.))
 *         self.bar = FitBox(Vec2(130., 21.), Vec2(-30., 3.))             # <<<<<<<<<<<<<<
 *         self.seek_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 *         self.trim_left_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->bar);
  __Pyx_DECREF((PyObject *)__pyx_v_self->bar);
  __pyx_v_self->bar = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":58
 *         self.outline = FitBox(Vec2(0., -50.), Vec2(0., 0.))
 *         self.bar = FitBox(Vec2(130., 21.), Vec2(-30., 3.))
 *         self.seek_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))             # <<<<<<<<<<<<<<
 *         self.trim_left_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 *         self.trim_right_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->seek_handle);
  __Pyx_DECREF((PyObject *)__pyx_v_self->seek_handle);
  __pyx_v_self->seek_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/custom.pxi":59
 *         self.bar = FitBox(Vec2(130., 21.), Vec2(-30., 3.))
 *         self.seek_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 *         self.trim_left_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))             # <<<<<<<<<<<<<<
 *         self.trim_right_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->trim_left_handle);
  __Pyx_DECREF((PyObject *)__pyx_v_self->trim_left_handle);
  __pyx_v_self->trim_left_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":60
 *         self.seek_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 *         self.trim_left_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 *         self.trim_right_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))             # <<<<<<<<<<<<<<
 * 
 *         play_icon = chr(0xE037)
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->trim_right_handle);
  __Pyx_DECREF((PyObject *)__pyx_v_self->trim_right_handle);
  __pyx_v_self->trim_right_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":62
 *         self.trim_right_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 * 
 *         play_icon = chr(0xE037)             # <<<<<<<<<<<<<<
 *         pause_icon = chr(0xe034)
 *         step_fwd_icon = chr(0xe044)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_play_icon = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":63
 * 
 *         play_icon = chr(0xE037)
 *         pause_icon = chr(0xe034)             # <<<<<<<<<<<<<<
 *         step_fwd_icon = chr(0xe044)
 *         step_bwd_icon = chr(0xe045)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_pause_icon = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":64
 *         play_icon = chr(0xE037)
 *         pause_icon = chr(0xe034)
 *         step_fwd_icon = chr(0xe044)             # <<<<<<<<<<<<<<
 *         step_bwd_icon = chr(0xe045)
 *         incr_pbs_icon = chr(0xE01F)  # pbs: playback speed
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_step_fwd_icon = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":65
 *         pause_icon = chr(0xe034)
 *         step_fwd_icon = chr(0xe044)
 *         step_bwd_icon = chr(0xe045)             # <<<<<<<<<<<<<<
 *         incr_pbs_icon = chr(0xE01F)  # pbs: playback speed
 *         decr_pbs_icon = chr(0xE020)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_step_bwd_icon = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":66
 *         step_fwd_icon = chr(0xe044)
 *         step_bwd_icon = chr(0xe045)
 *         incr_pbs_icon = chr(0xE01F)  # pbs: playback speed             # <<<<<<<<<<<<<<
 *         decr_pbs_icon = chr(0xE020)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_incr_pbs_icon = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":67
 *         step_bwd_icon = chr(0xe045)
 *         incr_pbs_icon = chr(0xE01F)  # pbs: playback speed
 *         decr_pbs_icon = chr(0xE020)             # <<<<<<<<<<<<<<
 * 
 *         def set_play(_):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_decr_pbs_icon = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":69
 *         decr_pbs_icon = chr(0xE020)
 * 
 *         def set_play(_):             # <<<<<<<<<<<<<<
 *             sync_ctx.play = not sync_ctx.play
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___1set_play, 0, __pyx_n_s_cinit___locals_set_play, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_set_play = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":72
 *             sync_ctx.play = not sync_ctx.play
 * 
 *         self.backwards = Icon('backwards', sync_ctx, label_font='pupil_icons',             # <<<<<<<<<<<<<<
 *                               label_getter=lambda: decr_pbs_icon if sync_ctx.play else step_bwd_icon,
 *                               getter=lambda: True,
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_backwards);
  __Pyx_GIVEREF(__pyx_n_u_backwards);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_backwards);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_sync_ctx);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label_font, __pyx_n_u_pupil_icons) < 0) __PYX_ERR(6, 72, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":73
 * 
 *         self.backwards = Icon('backwards', sync_ctx, label_font='pupil_icons',
 *                               label_getter=lambda: decr_pbs_icon if sync_ctx.play else step_bwd_icon,             # <<<<<<<<<<<<<<
 *                               getter=lambda: True,
 *                               hotkey=263)  # 263 = glfw.GLFW_KEY_LEFT
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___2lambda1, 0, __pyx_n_s_cinit___locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyglui_ui, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label_getter, __pyx_t_2) < 0) __PYX_ERR(6, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":74
 *         self.backwards = Icon('backwards', sync_ctx, label_font='pupil_icons',
 *                               label_getter=lambda: decr_pbs_icon if sync_ctx.play else step_bwd_icon,
 *                               getter=lambda: True,             # <<<<<<<<<<<<<<
 *                               hotkey=263)  # 263 = glfw.GLFW_KEY_LEFT
 *         self.forwards = Icon('forwards', sync_ctx, label_font='pupil_icons',
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___3lambda2, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_pyglui_ui, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_getter, __pyx_t_2) < 0) __PYX_ERR(6, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hotkey, __pyx_int_263) < 0) __PYX_ERR(6, 72, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":72
 *             sync_ctx.play = not sync_ctx.play
 * 
 *         self.backwards = Icon('backwards', sync_ctx, label_font='pupil_icons',             # <<<<<<<<<<<<<<
 *                               label_getter=lambda: decr_pbs_icon if sync_ctx.play else step_bwd_icon,
 *                               getter=lambda: True,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Icon), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->backwards);
  __Pyx_DECREF((PyObject *)__pyx_v_self->backwards);
  __pyx_v_self->backwards = ((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":76
 *                               getter=lambda: True,
 *                               hotkey=263)  # 263 = glfw.GLFW_KEY_LEFT
 *         self.forwards = Icon('forwards', sync_ctx, label_font='pupil_icons',             # <<<<<<<<<<<<<<
 *                              label_getter=lambda: incr_pbs_icon if sync_ctx.play else step_fwd_icon,
 *                              hotkey=262,  # 262 = glfw.GLFW_KEY_RIGHT
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_forwards);
  __Pyx_GIVEREF(__pyx_n_u_forwards);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_forwards);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_sync_ctx);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label_font, __pyx_n_u_pupil_icons) < 0) __PYX_ERR(6, 76, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":77
 *                               hotkey=263)  # 263 = glfw.GLFW_KEY_LEFT
 *         self.forwards = Icon('forwards', sync_ctx, label_font='pupil_icons',
 *                              label_getter=lambda: incr_pbs_icon if sync_ctx.play else step_fwd_icon,             # <<<<<<<<<<<<<<
 *                              hotkey=262,  # 262 = glfw.GLFW_KEY_RIGHT
 *                              getter=lambda: True)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___4lambda3, 0, __pyx_n_s_cinit___locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyglui_ui, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label_getter, __pyx_t_1) < 0) __PYX_ERR(6, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hotkey, __pyx_int_262) < 0) __PYX_ERR(6, 76, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":79
 *                              label_getter=lambda: incr_pbs_icon if sync_ctx.play else step_fwd_icon,
 *                              hotkey=262,  # 262 = glfw.GLFW_KEY_RIGHT
 *                              getter=lambda: True)             # <<<<<<<<<<<<<<
 * 
 *         self.play = Icon('play', sync_ctx, label_font='pupil_icons',
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___5lambda4, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_pyglui_ui, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_getter, __pyx_t_1) < 0) __PYX_ERR(6, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":76
 *                               getter=lambda: True,
 *                               hotkey=263)  # 263 = glfw.GLFW_KEY_LEFT
 *         self.forwards = Icon('forwards', sync_ctx, label_font='pupil_icons',             # <<<<<<<<<<<<<<
 *                              label_getter=lambda: incr_pbs_icon if sync_ctx.play else step_fwd_icon,
 *                              hotkey=262,  # 262 = glfw.GLFW_KEY_RIGHT
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Icon), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->forwards);
  __Pyx_DECREF((PyObject *)__pyx_v_self->forwards);
  __pyx_v_self->forwards = ((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":81
 *                              getter=lambda: True)
 * 
 *         self.play = Icon('play', sync_ctx, label_font='pupil_icons',             # <<<<<<<<<<<<<<
 *                          label_getter=lambda: pause_icon if sync_ctx.play else play_icon,
 *                          hotkey=32, # 32 = glfw.GLFW_KEY_SPACE
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_play);
  __Pyx_GIVEREF(__pyx_n_u_play);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_play);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sync_ctx);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_sync_ctx);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label_font, __pyx_n_u_pupil_icons) < 0) __PYX_ERR(6, 81, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":82
 * 
 *         self.play = Icon('play', sync_ctx, label_font='pupil_icons',
 *                          label_getter=lambda: pause_icon if sync_ctx.play else play_icon,             # <<<<<<<<<<<<<<
 *                          hotkey=32, # 32 = glfw.GLFW_KEY_SPACE
 *                          setter=set_play,
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___6lambda5, 0, __pyx_n_s_cinit___locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyglui_ui, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label_getter, __pyx_t_2) < 0) __PYX_ERR(6, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hotkey, __pyx_int_32) < 0) __PYX_ERR(6, 81, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":84
 *                          label_getter=lambda: pause_icon if sync_ctx.play else play_icon,
 *                          hotkey=32, # 32 = glfw.GLFW_KEY_SPACE
 *                          setter=set_play,             # <<<<<<<<<<<<<<
 *                          getter=lambda: True)
 * 
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_setter, __pyx_v_set_play) < 0) __PYX_ERR(6, 81, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":85
 *                          hotkey=32, # 32 = glfw.GLFW_KEY_SPACE
 *                          setter=set_play,
 *                          getter=lambda: True)             # <<<<<<<<<<<<<<
 * 
 *         self.backwards.outline = FitBox(Vec2(5, 0),Vec2(40, 40))
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_9__cinit___7lambda6, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_pyglui_ui, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_getter, __pyx_t_2) < 0) __PYX_ERR(6, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":81
 *                              getter=lambda: True)
 * 
 *         self.play = Icon('play', sync_ctx, label_font='pupil_icons',             # <<<<<<<<<<<<<<
 *                          label_getter=lambda: pause_icon if sync_ctx.play else play_icon,
 *                          hotkey=32, # 32 = glfw.GLFW_KEY_SPACE
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Icon), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->play);
  __Pyx_DECREF((PyObject *)__pyx_v_self->play);
  __pyx_v_self->play = ((struct __pyx_obj_6pyglui_2ui_Icon *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":87
 *                          getter=lambda: True)
 * 
 *         self.backwards.outline = FitBox(Vec2(5, 0),Vec2(40, 40))             # <<<<<<<<<<<<<<
 *         self.play.outline = FitBox(Vec2(40, 0),Vec2(40, 40))
 *         self.forwards.outline = FitBox(Vec2(75, 0),Vec2(40, 40))
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->backwards->__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->backwards->__pyx_base.__pyx_base.outline);
  __pyx_v_self->backwards->__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/custom.pxi":88
 * 
 *         self.backwards.outline = FitBox(Vec2(5, 0),Vec2(40, 40))
 *         self.play.outline = FitBox(Vec2(40, 0),Vec2(40, 40))             # <<<<<<<<<<<<<<
 *         self.forwards.outline = FitBox(Vec2(75, 0),Vec2(40, 40))
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->play->__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->play->__pyx_base.__pyx_base.outline);
  __pyx_v_self->play->__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":89
 *         self.backwards.outline = FitBox(Vec2(5, 0),Vec2(40, 40))
 *         self.play.outline = FitBox(Vec2(40, 0),Vec2(40, 40))
 *         self.forwards.outline = FitBox(Vec2(75, 0),Vec2(40, 40))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args, **kwargs):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->forwards->__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->forwards->__pyx_base.__pyx_base.outline);
  __pyx_v_self->forwards->__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":27
 *     cdef Icon backwards, play, forwards
 * 
 *     def __cinit__(self, object sync_ctx,             # <<<<<<<<<<<<<<
 *                   double min_ts,
 *                   double max_ts,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_set_play);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":91
 *         self.forwards.outline = FitBox(Vec2(75, 0),Vec2(40, 40))
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Seek_Bar_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Seek_Bar_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_2__init__(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Seek_Bar_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":94
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw_overlay
 *         self.trim_left.sync()
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_sync(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_recent_idx = NULL;
  PyObject *__pyx_v_recent_ts = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  double __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 94, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Seek_Bar_5sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 94, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/custom.pxi":96
 *     cpdef sync(self):
 *         global should_redraw_overlay
 *         self.trim_left.sync()             # <<<<<<<<<<<<<<
 *         self.trim_right.sync()
 *         self.playback_speed.sync()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->trim_left->__pyx_vtab)->sync(__pyx_v_self->trim_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":97
 *         global should_redraw_overlay
 *         self.trim_left.sync()
 *         self.trim_right.sync()             # <<<<<<<<<<<<<<
 *         self.playback_speed.sync()
 *         self.backwards.sync()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->trim_right->__pyx_vtab)->sync(__pyx_v_self->trim_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":98
 *         self.trim_left.sync()
 *         self.trim_right.sync()
 *         self.playback_speed.sync()             # <<<<<<<<<<<<<<
 *         self.backwards.sync()
 *         self.play.sync()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->playback_speed->__pyx_vtab)->sync(__pyx_v_self->playback_speed); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":99
 *         self.trim_right.sync()
 *         self.playback_speed.sync()
 *         self.backwards.sync()             # <<<<<<<<<<<<<<
 *         self.play.sync()
 *         self.forwards.sync()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->backwards->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.sync(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->backwards), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":100
 *         self.playback_speed.sync()
 *         self.backwards.sync()
 *         self.play.sync()             # <<<<<<<<<<<<<<
 *         self.forwards.sync()
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->play->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.sync(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->play), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":101
 *         self.backwards.sync()
 *         self.play.sync()
 *         self.forwards.sync()             # <<<<<<<<<<<<<<
 * 
 *         # test for value changes
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->forwards->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.sync(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->forwards), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":104
 * 
 *         # test for value changes
 *         recent_idx, recent_ts = self.recent_idx_ts_getter()             # <<<<<<<<<<<<<<
 *         if self.recent_idx != recent_idx:
 *             should_redraw_overlay = True
 */
  __Pyx_INCREF(__pyx_v_self->recent_idx_ts_getter);
  __pyx_t_2 = __pyx_v_self->recent_idx_ts_getter; __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(6, 104, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_4), 2) < 0) __PYX_ERR(6, 104, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(6, 104, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_recent_idx = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_recent_ts = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "src/pyglui/custom.pxi":105
 *         # test for value changes
 *         recent_idx, recent_ts = self.recent_idx_ts_getter()
 *         if self.recent_idx != recent_idx:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->recent_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_recent_idx, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(6, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {

    /* "src/pyglui/custom.pxi":106
 *         recent_idx, recent_ts = self.recent_idx_ts_getter()
 *         if self.recent_idx != recent_idx:
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/custom.pxi":105
 *         # test for value changes
 *         recent_idx, recent_ts = self.recent_idx_ts_getter()
 *         if self.recent_idx != recent_idx:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts
 */
  }

  /* "src/pyglui/custom.pxi":107
 *         if self.recent_idx != recent_idx:
 *             should_redraw_overlay = True
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_recent_idx); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 107, __pyx_L1_error)
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_recent_ts); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(6, 107, __pyx_L1_error)
  __pyx_v_self->recent_idx = __pyx_t_5;
  __pyx_v_self->recent_ts = __pyx_t_8;

  /* "src/pyglui/custom.pxi":94
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw_overlay
 *         self.trim_left.sync()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_recent_idx);
  __Pyx_XDECREF(__pyx_v_recent_ts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_5sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_5sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_5sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_4sync(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_4sync(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_8Seek_Bar_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":109
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_draw(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Seek_Bar_7draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 109, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 109, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/custom.pxi":110
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))
 *         self.bar.compute(self.outline)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":111
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         self.outline.compute(parent)
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))             # <<<<<<<<<<<<<<
 *         self.bar.compute(self.outline)
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->sketch(__pyx_v_self->__pyx_base.outline, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":112
 *         self.outline.compute(parent)
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))
 *         self.bar.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->bar->__pyx_vtab)->compute(__pyx_v_self->bar, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":113
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))
 *         self.bar.compute(self.outline)
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->bar->__pyx_vtab)->sketch(__pyx_v_self->bar, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":109
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_7draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_7draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 109, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 109, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 109, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(6, 109, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 109, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 109, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(6, 109, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(6, 109, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_6draw(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_6draw(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Seek_Bar->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":115
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         self.backwards.draw(self.outline, nested=True, parent_read_only=False)
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_draw_overlay(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_draw_overlay *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_handle = 0;
  double __pyx_v_trim_left_val;
  double __pyx_v_trim_right_val;
  double __pyx_v_seek_x;
  double __pyx_v_top_ext;
  double __pyx_v_bot_ext;
  double __pyx_v_selection_height;
  double __pyx_v_trim_l_x;
  double __pyx_v_trim_r_x;
  PyObject *__pyx_v_speed_str = 0;
  PyObject *__pyx_v_current_ts_str = 0;
  PyObject *__pyx_v_trim_left_str = 0;
  PyObject *__pyx_v_trim_right_str = 0;
  double __pyx_v_trim_num_offset;
  double __pyx_v_time_y;
  double __pyx_v_nums_y;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_8;
  double __pyx_t_9;
  float __pyx_t_10;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_11 = NULL;
  int __pyx_t_12;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Seek_Bar_9draw_overlay)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 115, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 115, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 115, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/custom.pxi":117
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 * 
 *         self.backwards.draw(self.outline, nested=True, parent_read_only=False)             # <<<<<<<<<<<<<<
 *         self.play.draw(self.outline, nested=True, parent_read_only=False)
 *         self.forwards.draw(self.outline, nested=True, parent_read_only=False)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.nested = 1;
  __pyx_t_8.parent_read_only = 0;
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->backwards->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->backwards), ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":118
 * 
 *         self.backwards.draw(self.outline, nested=True, parent_read_only=False)
 *         self.play.draw(self.outline, nested=True, parent_read_only=False)             # <<<<<<<<<<<<<<
 *         self.forwards.draw(self.outline, nested=True, parent_read_only=False)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.nested = 1;
  __pyx_t_8.parent_read_only = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->play->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->play), ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":119
 *         self.backwards.draw(self.outline, nested=True, parent_read_only=False)
 *         self.play.draw(self.outline, nested=True, parent_read_only=False)
 *         self.forwards.draw(self.outline, nested=True, parent_read_only=False)             # <<<<<<<<<<<<<<
 * 
 *         cdef FitBox handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.nested = 1;
  __pyx_t_8.parent_read_only = 0;
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->forwards->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->forwards), ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":121
 *         self.forwards.draw(self.outline, nested=True, parent_read_only=False)
 * 
 *         cdef FitBox handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))             # <<<<<<<<<<<<<<
 * 
 *         cdef double trim_left_val = self.trim_left.value
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":123
 *         cdef FitBox handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 * 
 *         cdef double trim_left_val = self.trim_left.value             # <<<<<<<<<<<<<<
 *         cdef double trim_right_val = self.trim_right.value
 *         cdef double seek_x = clampmap(self.recent_ts, self.min_ts, self.max_ts, 0, self.bar.size.x)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->trim_left), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(6, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_trim_left_val = __pyx_t_9;

  /* "src/pyglui/custom.pxi":124
 * 
 *         cdef double trim_left_val = self.trim_left.value
 *         cdef double trim_right_val = self.trim_right.value             # <<<<<<<<<<<<<<
 *         cdef double seek_x = clampmap(self.recent_ts, self.min_ts, self.max_ts, 0, self.bar.size.x)
 *         cdef double top_ext = self.handle_start_reference.element_space.org.y
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->trim_right), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(6, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_trim_right_val = __pyx_t_9;

  /* "src/pyglui/custom.pxi":125
 *         cdef double trim_left_val = self.trim_left.value
 *         cdef double trim_right_val = self.trim_right.value
 *         cdef double seek_x = clampmap(self.recent_ts, self.min_ts, self.max_ts, 0, self.bar.size.x)             # <<<<<<<<<<<<<<
 *         cdef double top_ext = self.handle_start_reference.element_space.org.y
 *         cdef double bot_ext = self.bar.org.y + self.bar.size.y + 20 * ui_scale
 */
  __pyx_v_seek_x = __pyx_f_6pyglui_2ui_clampmap(__pyx_v_self->recent_ts, __pyx_v_self->min_ts, __pyx_v_self->max_ts, 0.0, __pyx_v_self->bar->size->x);

  /* "src/pyglui/custom.pxi":126
 *         cdef double trim_right_val = self.trim_right.value
 *         cdef double seek_x = clampmap(self.recent_ts, self.min_ts, self.max_ts, 0, self.bar.size.x)
 *         cdef double top_ext = self.handle_start_reference.element_space.org.y             # <<<<<<<<<<<<<<
 *         cdef double bot_ext = self.bar.org.y + self.bar.size.y + 20 * ui_scale
 *         cdef double selection_height = 5 * self.bar.size.y
 */
  __pyx_t_10 = __pyx_v_self->handle_start_reference->__pyx_base.__pyx_base.__pyx_base.element_space->org->y;
  __pyx_v_top_ext = __pyx_t_10;

  /* "src/pyglui/custom.pxi":127
 *         cdef double seek_x = clampmap(self.recent_ts, self.min_ts, self.max_ts, 0, self.bar.size.x)
 *         cdef double top_ext = self.handle_start_reference.element_space.org.y
 *         cdef double bot_ext = self.bar.org.y + self.bar.size.y + 20 * ui_scale             # <<<<<<<<<<<<<<
 *         cdef double selection_height = 5 * self.bar.size.y
 * 
 */
  __pyx_v_bot_ext = ((__pyx_v_self->bar->org->y + __pyx_v_self->bar->size->y) + (20.0 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/custom.pxi":128
 *         cdef double top_ext = self.handle_start_reference.element_space.org.y
 *         cdef double bot_ext = self.bar.org.y + self.bar.size.y + 20 * ui_scale
 *         cdef double selection_height = 5 * self.bar.size.y             # <<<<<<<<<<<<<<
 * 
 *         cdef double trim_l_x = clampmap(trim_left_val, self.min_ts, self.max_ts, 0, self.bar.size.x)
 */
  __pyx_v_selection_height = (5.0 * __pyx_v_self->bar->size->y);

  /* "src/pyglui/custom.pxi":130
 *         cdef double selection_height = 5 * self.bar.size.y
 * 
 *         cdef double trim_l_x = clampmap(trim_left_val, self.min_ts, self.max_ts, 0, self.bar.size.x)             # <<<<<<<<<<<<<<
 *         handle.org.x = int(self.bar.org.x + trim_l_x - selection_height)
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2
 */
  __pyx_v_trim_l_x = __pyx_f_6pyglui_2ui_clampmap(__pyx_v_trim_left_val, __pyx_v_self->min_ts, __pyx_v_self->max_ts, 0.0, __pyx_v_self->bar->size->x);

  /* "src/pyglui/custom.pxi":131
 * 
 *         cdef double trim_l_x = clampmap(trim_left_val, self.min_ts, self.max_ts, 0, self.bar.size.x)
 *         handle.org.x = int(self.bar.org.x + trim_l_x - selection_height)             # <<<<<<<<<<<<<<
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2
 *         handle.size.x = selection_height
 */
  __pyx_t_9 = trunc(((__pyx_v_self->bar->org->x + __pyx_v_trim_l_x) - __pyx_v_selection_height)); 
  __pyx_v_handle->org->x = __pyx_t_9;

  /* "src/pyglui/custom.pxi":132
 *         cdef double trim_l_x = clampmap(trim_left_val, self.min_ts, self.max_ts, 0, self.bar.size.x)
 *         handle.org.x = int(self.bar.org.x + trim_l_x - selection_height)
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2             # <<<<<<<<<<<<<<
 *         handle.size.x = selection_height
 *         handle.size.y = selection_height
 */
  __pyx_v_handle->org->y = ((__pyx_v_self->bar->org->y + (__pyx_v_self->bar->size->y / 2.0)) - (__pyx_v_selection_height / 2.0));

  /* "src/pyglui/custom.pxi":133
 *         handle.org.x = int(self.bar.org.x + trim_l_x - selection_height)
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2
 *         handle.size.x = selection_height             # <<<<<<<<<<<<<<
 *         handle.size.y = selection_height
 *         self.trim_left_handle = draw_trim_handle(handle, 0.25, RGBA(*seekbar_trim_color_hover if self.hovering == 3 else seekbar_trim_color))
 */
  __pyx_v_handle->size->x = __pyx_v_selection_height;

  /* "src/pyglui/custom.pxi":134
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2
 *         handle.size.x = selection_height
 *         handle.size.y = selection_height             # <<<<<<<<<<<<<<
 *         self.trim_left_handle = draw_trim_handle(handle, 0.25, RGBA(*seekbar_trim_color_hover if self.hovering == 3 else seekbar_trim_color))
 * 
 */
  __pyx_v_handle->size->y = __pyx_v_selection_height;

  /* "src/pyglui/custom.pxi":135
 *         handle.size.x = selection_height
 *         handle.size.y = selection_height
 *         self.trim_left_handle = draw_trim_handle(handle, 0.25, RGBA(*seekbar_trim_color_hover if self.hovering == 3 else seekbar_trim_color))             # <<<<<<<<<<<<<<
 * 
 *         cdef double trim_r_x = clampmap(trim_right_val, self.min_ts, self.max_ts, 0, self.bar.size.x)
 */
  if ((__pyx_v_self->hovering == 3)) {
    __Pyx_INCREF(__pyx_tuple__66);
    __pyx_t_1 = __pyx_tuple__66;
  } else {
    __Pyx_INCREF(__pyx_tuple__15);
    __pyx_t_1 = __pyx_tuple__15;
  }
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(6, 135, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_6pyglui_2ui_draw_trim_handle(__pyx_v_handle, 0.25, ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->trim_left_handle);
  __Pyx_DECREF((PyObject *)__pyx_v_self->trim_left_handle);
  __pyx_v_self->trim_left_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":137
 *         self.trim_left_handle = draw_trim_handle(handle, 0.25, RGBA(*seekbar_trim_color_hover if self.hovering == 3 else seekbar_trim_color))
 * 
 *         cdef double trim_r_x = clampmap(trim_right_val, self.min_ts, self.max_ts, 0, self.bar.size.x)             # <<<<<<<<<<<<<<
 *         handle.org.x = int(self.bar.org.x + trim_r_x)
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2
 */
  __pyx_v_trim_r_x = __pyx_f_6pyglui_2ui_clampmap(__pyx_v_trim_right_val, __pyx_v_self->min_ts, __pyx_v_self->max_ts, 0.0, __pyx_v_self->bar->size->x);

  /* "src/pyglui/custom.pxi":138
 * 
 *         cdef double trim_r_x = clampmap(trim_right_val, self.min_ts, self.max_ts, 0, self.bar.size.x)
 *         handle.org.x = int(self.bar.org.x + trim_r_x)             # <<<<<<<<<<<<<<
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2
 *         self.trim_right_handle = draw_trim_handle(handle, 0.75, RGBA(*seekbar_trim_color_hover if self.hovering == 2 else seekbar_trim_color))
 */
  __pyx_t_9 = trunc((__pyx_v_self->bar->org->x + __pyx_v_trim_r_x)); 
  __pyx_v_handle->org->x = __pyx_t_9;

  /* "src/pyglui/custom.pxi":139
 *         cdef double trim_r_x = clampmap(trim_right_val, self.min_ts, self.max_ts, 0, self.bar.size.x)
 *         handle.org.x = int(self.bar.org.x + trim_r_x)
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2             # <<<<<<<<<<<<<<
 *         self.trim_right_handle = draw_trim_handle(handle, 0.75, RGBA(*seekbar_trim_color_hover if self.hovering == 2 else seekbar_trim_color))
 * 
 */
  __pyx_v_handle->org->y = ((__pyx_v_self->bar->org->y + (__pyx_v_self->bar->size->y / 2.0)) - (__pyx_v_selection_height / 2.0));

  /* "src/pyglui/custom.pxi":140
 *         handle.org.x = int(self.bar.org.x + trim_r_x)
 *         handle.org.y = self.bar.org.y + self.bar.size.y / 2 - selection_height / 2
 *         self.trim_right_handle = draw_trim_handle(handle, 0.75, RGBA(*seekbar_trim_color_hover if self.hovering == 2 else seekbar_trim_color))             # <<<<<<<<<<<<<<
 * 
 *         # draw region between trim marks
 */
  if ((__pyx_v_self->hovering == 2)) {
    __Pyx_INCREF(__pyx_tuple__66);
    __pyx_t_1 = __pyx_tuple__66;
  } else {
    __Pyx_INCREF(__pyx_tuple__15);
    __pyx_t_1 = __pyx_tuple__15;
  }
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(6, 140, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_6pyglui_2ui_draw_trim_handle(__pyx_v_handle, 0.75, ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->trim_right_handle);
  __Pyx_DECREF((PyObject *)__pyx_v_self->trim_right_handle);
  __pyx_v_self->trim_right_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":143
 * 
 *         # draw region between trim marks
 *         handle.size.x = handle.org.x - int(self.bar.org.x + trim_l_x)             # <<<<<<<<<<<<<<
 *         handle.org.x = int(self.bar.org.x + trim_l_x)
 *         handle.size.y = self.bar.size.y
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_handle->org->x); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_FromDouble((__pyx_v_self->bar->org->x + __pyx_v_trim_l_x)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(6, 143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_handle->size->x = __pyx_t_10;

  /* "src/pyglui/custom.pxi":144
 *         # draw region between trim marks
 *         handle.size.x = handle.org.x - int(self.bar.org.x + trim_l_x)
 *         handle.org.x = int(self.bar.org.x + trim_l_x)             # <<<<<<<<<<<<<<
 *         handle.size.y = self.bar.size.y
 *         rect(handle.org, handle.size, RGBA(*seekbar_trim_color))
 */
  __pyx_t_9 = trunc((__pyx_v_self->bar->org->x + __pyx_v_trim_l_x)); 
  __pyx_v_handle->org->x = __pyx_t_9;

  /* "src/pyglui/custom.pxi":145
 *         handle.size.x = handle.org.x - int(self.bar.org.x + trim_l_x)
 *         handle.org.x = int(self.bar.org.x + trim_l_x)
 *         handle.size.y = self.bar.size.y             # <<<<<<<<<<<<<<
 *         rect(handle.org, handle.size, RGBA(*seekbar_trim_color))
 * 
 */
  __pyx_t_10 = __pyx_v_self->bar->size->y;
  __pyx_v_handle->size->y = __pyx_t_10;

  /* "src/pyglui/custom.pxi":146
 *         handle.org.x = int(self.bar.org.x + trim_l_x)
 *         handle.size.y = self.bar.size.y
 *         rect(handle.org, handle.size, RGBA(*seekbar_trim_color))             # <<<<<<<<<<<<<<
 * 
 *         handle.org.y += selection_height - handle.size.y
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_handle->org);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = ((PyObject *)__pyx_v_handle->size);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_f_6pyglui_2ui_rect(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_5), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/custom.pxi":148
 *         rect(handle.org, handle.size, RGBA(*seekbar_trim_color))
 * 
 *         handle.org.y += selection_height - handle.size.y             # <<<<<<<<<<<<<<
 *         rect(handle.org, handle.size, RGBA(*seekbar_trim_color))
 * 
 */
  __Pyx_INCREF((PyObject *)__pyx_v_handle->org);
  __pyx_t_11 = __pyx_v_handle->org;
  __pyx_t_11->y = (__pyx_t_11->y + (__pyx_v_selection_height - __pyx_v_handle->size->y));
  __Pyx_DECREF((PyObject *)__pyx_t_11); __pyx_t_11 = 0;

  /* "src/pyglui/custom.pxi":149
 * 
 *         handle.org.y += selection_height - handle.size.y
 *         rect(handle.org, handle.size, RGBA(*seekbar_trim_color))             # <<<<<<<<<<<<<<
 * 
 *         handle.org = Vec2(int(self.bar.org.x + seek_x - self.bar.size.y / 4), top_ext)
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_handle->org);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = ((PyObject *)__pyx_v_handle->size);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __pyx_f_6pyglui_2ui_rect(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_4), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":151
 *         rect(handle.org, handle.size, RGBA(*seekbar_trim_color))
 * 
 *         handle.org = Vec2(int(self.bar.org.x + seek_x - self.bar.size.y / 4), top_ext)             # <<<<<<<<<<<<<<
 *         handle.size = Vec2(self.bar.size.y / 2, bot_ext - top_ext)
 *         self.seek_handle = draw_seek_handle(handle, RGBA(*seekbar_seek_color_hover if self.hovering == 1 else seekbar_seek_color))
 */
  __pyx_t_2 = __Pyx_PyInt_FromDouble(((__pyx_v_self->bar->org->x + __pyx_v_seek_x) - (__pyx_v_self->bar->size->y / 4.0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_top_ext); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF((PyObject *)__pyx_v_handle->org);
  __Pyx_DECREF((PyObject *)__pyx_v_handle->org);
  __pyx_v_handle->org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "src/pyglui/custom.pxi":152
 * 
 *         handle.org = Vec2(int(self.bar.org.x + seek_x - self.bar.size.y / 4), top_ext)
 *         handle.size = Vec2(self.bar.size.y / 2, bot_ext - top_ext)             # <<<<<<<<<<<<<<
 *         self.seek_handle = draw_seek_handle(handle, RGBA(*seekbar_seek_color_hover if self.hovering == 1 else seekbar_seek_color))
 * 
 */
  __pyx_t_5 = PyFloat_FromDouble((__pyx_v_self->bar->size->y / 2.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_bot_ext - __pyx_v_top_ext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_5 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_handle->size);
  __Pyx_DECREF((PyObject *)__pyx_v_handle->size);
  __pyx_v_handle->size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":153
 *         handle.org = Vec2(int(self.bar.org.x + seek_x - self.bar.size.y / 4), top_ext)
 *         handle.size = Vec2(self.bar.size.y / 2, bot_ext - top_ext)
 *         self.seek_handle = draw_seek_handle(handle, RGBA(*seekbar_seek_color_hover if self.hovering == 1 else seekbar_seek_color))             # <<<<<<<<<<<<<<
 * 
 *         if self.hovering == 4:
 */
  if ((__pyx_v_self->hovering == 1)) {
    __Pyx_INCREF(__pyx_tuple__66);
    __pyx_t_1 = __pyx_tuple__66;
  } else {
    __Pyx_INCREF(__pyx_tuple__15);
    __pyx_t_1 = __pyx_tuple__15;
  }
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(6, 153, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_6pyglui_2ui_draw_seek_handle(__pyx_v_handle, ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->seek_handle);
  __Pyx_DECREF((PyObject *)__pyx_v_self->seek_handle);
  __pyx_v_self->seek_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":155
 *         self.seek_handle = draw_seek_handle(handle, RGBA(*seekbar_seek_color_hover if self.hovering == 1 else seekbar_seek_color))
 * 
 *         if self.hovering == 4:             # <<<<<<<<<<<<<<
 *             utils.draw_points([self.point_click_seek_loc],
 *                               size=4*self.bar.size.y,
 */
  __pyx_t_12 = (__pyx_v_self->hovering == 4);
  if (__pyx_t_12) {

    /* "src/pyglui/custom.pxi":156
 * 
 *         if self.hovering == 4:
 *             utils.draw_points([self.point_click_seek_loc],             # <<<<<<<<<<<<<<
 *                               size=4*self.bar.size.y,
 *                               color=RGBA(*seekbar_seek_color_hover))
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF((PyObject *)__pyx_v_self->point_click_seek_loc);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->point_click_seek_loc);
    PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->point_click_seek_loc));

    /* "src/pyglui/custom.pxi":158
 *             utils.draw_points([self.point_click_seek_loc],
 *                               size=4*self.bar.size.y,
 *                               color=RGBA(*seekbar_seek_color_hover))             # <<<<<<<<<<<<<<
 * 
 *         # debug draggable areas
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "src/pyglui/custom.pxi":156
 * 
 *         if self.hovering == 4:
 *             utils.draw_points([self.point_click_seek_loc],             # <<<<<<<<<<<<<<
 *                               size=4*self.bar.size.y,
 *                               color=RGBA(*seekbar_seek_color_hover))
 */
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.size = (4.0 * __pyx_v_self->bar->size->y);
    __pyx_t_13.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
    __pyx_t_5 = __pyx_f_6pyglui_4cygl_5utils_draw_points(__pyx_t_1, 0, &__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/custom.pxi":155
 *         self.seek_handle = draw_seek_handle(handle, RGBA(*seekbar_seek_color_hover if self.hovering == 1 else seekbar_seek_color))
 * 
 *         if self.hovering == 4:             # <<<<<<<<<<<<<<
 *             utils.draw_points([self.point_click_seek_loc],
 *                               size=4*self.bar.size.y,
 */
  }

  /* "src/pyglui/custom.pxi":165
 *         # rect(self.trim_right_handle.org, self.trim_right_handle.size, RGBA(1., 0., 0., 0.2))
 * 
 *         cdef basestring speed_str = '{}x'.format(self.playback_speed.value)             # <<<<<<<<<<<<<<
 *         cdef basestring current_ts_str = self.format_ts(self.recent_ts)
 *         cdef basestring trim_left_str = self.format_ts(trim_left_val)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_x_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->playback_speed), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_5))) __PYX_ERR(6, 165, __pyx_L1_error)
  __pyx_v_speed_str = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "src/pyglui/custom.pxi":166
 * 
 *         cdef basestring speed_str = '{}x'.format(self.playback_speed.value)
 *         cdef basestring current_ts_str = self.format_ts(self.recent_ts)             # <<<<<<<<<<<<<<
 *         cdef basestring trim_left_str = self.format_ts(trim_left_val)
 *         cdef basestring trim_right_str = self.format_ts(trim_right_val)
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_Seek_Bar *)__pyx_v_self->__pyx_base.__pyx_vtab)->format_ts(__pyx_v_self, __pyx_v_self->recent_ts); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_5))) __PYX_ERR(6, 166, __pyx_L1_error)
  __pyx_v_current_ts_str = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "src/pyglui/custom.pxi":167
 *         cdef basestring speed_str = '{}x'.format(self.playback_speed.value)
 *         cdef basestring current_ts_str = self.format_ts(self.recent_ts)
 *         cdef basestring trim_left_str = self.format_ts(trim_left_val)             # <<<<<<<<<<<<<<
 *         cdef basestring trim_right_str = self.format_ts(trim_right_val)
 * 
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_Seek_Bar *)__pyx_v_self->__pyx_base.__pyx_vtab)->format_ts(__pyx_v_self, __pyx_v_trim_left_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_5))) __PYX_ERR(6, 167, __pyx_L1_error)
  __pyx_v_trim_left_str = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "src/pyglui/custom.pxi":168
 *         cdef basestring current_ts_str = self.format_ts(self.recent_ts)
 *         cdef basestring trim_left_str = self.format_ts(trim_left_val)
 *         cdef basestring trim_right_str = self.format_ts(trim_right_val)             # <<<<<<<<<<<<<<
 * 
 *         current_ts_str += '  {:d}'.format(self.recent_idx)
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_Seek_Bar *)__pyx_v_self->__pyx_base.__pyx_vtab)->format_ts(__pyx_v_self, __pyx_v_trim_right_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_5))) __PYX_ERR(6, 168, __pyx_L1_error)
  __pyx_v_trim_right_str = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "src/pyglui/custom.pxi":170
 *         cdef basestring trim_right_str = self.format_ts(trim_right_val)
 * 
 *         current_ts_str += '  {:d}'.format(self.recent_idx)             # <<<<<<<<<<<<<<
 * 
 *         cdef double trim_num_offset = 3. * ui_scale
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_d, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->recent_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_current_ts_str, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_2))) __PYX_ERR(6, 170, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_current_ts_str, ((PyObject*)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":172
 *         current_ts_str += '  {:d}'.format(self.recent_idx)
 * 
 *         cdef double trim_num_offset = 3. * ui_scale             # <<<<<<<<<<<<<<
 *         cdef double time_y = self.bar.org.y - selection_height / 2 + 2*ui_scale
 *         cdef double nums_y = self.play.button.org.y + self.play.button.size.y - seekbar_number_size * ui_scale / 3
 */
  __pyx_v_trim_num_offset = (3. * __pyx_v_6pyglui_2ui_ui_scale);

  /* "src/pyglui/custom.pxi":173
 * 
 *         cdef double trim_num_offset = 3. * ui_scale
 *         cdef double time_y = self.bar.org.y - selection_height / 2 + 2*ui_scale             # <<<<<<<<<<<<<<
 *         cdef double nums_y = self.play.button.org.y + self.play.button.size.y - seekbar_number_size * ui_scale / 3
 *         # if self.hovering or self.seeking or self.trimming_left or self.trimming_right:
 */
  __pyx_v_time_y = ((__pyx_v_self->bar->org->y - (__pyx_v_selection_height / 2.0)) + (2.0 * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/custom.pxi":174
 *         cdef double trim_num_offset = 3. * ui_scale
 *         cdef double time_y = self.bar.org.y - selection_height / 2 + 2*ui_scale
 *         cdef double nums_y = self.play.button.org.y + self.play.button.size.y - seekbar_number_size * ui_scale / 3             # <<<<<<<<<<<<<<
 *         # if self.hovering or self.seeking or self.trimming_left or self.trimming_right:
 *         glfont.push_state()
 */
  __pyx_v_nums_y = ((__pyx_v_self->play->__pyx_base.button->org->y + __pyx_v_self->play->__pyx_base.button->size->y) - ((15.0 * __pyx_v_6pyglui_2ui_ui_scale) / 3.0));

  /* "src/pyglui/custom.pxi":176
 *         cdef double nums_y = self.play.button.org.y + self.play.button.size.y - seekbar_number_size * ui_scale / 3
 *         # if self.hovering or self.seeking or self.trimming_left or self.trimming_right:
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_font('opensans')
 *         glfont.set_size(seekbar_number_size * ui_scale)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_1, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":177
 *         # if self.hovering or self.seeking or self.trimming_left or self.trimming_right:
 *         glfont.push_state()
 *         glfont.set_font('opensans')             # <<<<<<<<<<<<<<
 *         glfont.set_size(seekbar_number_size * ui_scale)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_font); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_n_u_opensans};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":178
 *         glfont.push_state()
 *         glfont.set_font('opensans')
 *         glfont.set_size(seekbar_number_size * ui_scale)             # <<<<<<<<<<<<<<
 * 
 *         # draw actual text
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyFloat_FromDouble((15.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":181
 * 
 *         # draw actual text
 *         glfont.set_blur(.1)             # <<<<<<<<<<<<<<
 *         glfont.set_color_float((1., 1., 1., 1.))
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_float__1};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":182
 *         # draw actual text
 *         glfont.set_blur(.1)
 *         glfont.set_color_float((1., 1., 1., 1.))             # <<<<<<<<<<<<<<
 * 
 *         if self.recent_ts < self.mid_ts:
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_tuple__9, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":184
 *         glfont.set_color_float((1., 1., 1., 1.))
 * 
 *         if self.recent_ts < self.mid_ts:             # <<<<<<<<<<<<<<
 *             glfont.set_align(fs.FONS_ALIGN_BOTTOM | fs.FONS_ALIGN_LEFT)
 *             glfont.draw_text(self.bar.org.x + seek_x + 5*ui_scale, time_y, current_ts_str)
 */
  __pyx_t_12 = (__pyx_v_self->recent_ts < __pyx_v_self->mid_ts);
  if (__pyx_t_12) {

    /* "src/pyglui/custom.pxi":185
 * 
 *         if self.recent_ts < self.mid_ts:
 *             glfont.set_align(fs.FONS_ALIGN_BOTTOM | fs.FONS_ALIGN_LEFT)             # <<<<<<<<<<<<<<
 *             glfont.draw_text(self.bar.org.x + seek_x + 5*ui_scale, time_y, current_ts_str)
 *         else:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BOTTOM | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/custom.pxi":186
 *         if self.recent_ts < self.mid_ts:
 *             glfont.set_align(fs.FONS_ALIGN_BOTTOM | fs.FONS_ALIGN_LEFT)
 *             glfont.draw_text(self.bar.org.x + seek_x + 5*ui_scale, time_y, current_ts_str)             # <<<<<<<<<<<<<<
 *         else:
 *             glfont.set_align(fs.FONS_ALIGN_BOTTOM | fs.FONS_ALIGN_RIGHT)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, ((__pyx_v_self->bar->org->x + __pyx_v_seek_x) + (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), __pyx_v_time_y, __pyx_v_current_ts_str, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/custom.pxi":184
 *         glfont.set_color_float((1., 1., 1., 1.))
 * 
 *         if self.recent_ts < self.mid_ts:             # <<<<<<<<<<<<<<
 *             glfont.set_align(fs.FONS_ALIGN_BOTTOM | fs.FONS_ALIGN_LEFT)
 *             glfont.draw_text(self.bar.org.x + seek_x + 5*ui_scale, time_y, current_ts_str)
 */
    goto __pyx_L4;
  }

  /* "src/pyglui/custom.pxi":188
 *             glfont.draw_text(self.bar.org.x + seek_x + 5*ui_scale, time_y, current_ts_str)
 *         else:
 *             glfont.set_align(fs.FONS_ALIGN_BOTTOM | fs.FONS_ALIGN_RIGHT)             # <<<<<<<<<<<<<<
 *             glfont.draw_text(self.bar.org.x + seek_x - 5*ui_scale, time_y, current_ts_str)
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BOTTOM | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_RIGHT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/custom.pxi":189
 *         else:
 *             glfont.set_align(fs.FONS_ALIGN_BOTTOM | fs.FONS_ALIGN_RIGHT)
 *             glfont.draw_text(self.bar.org.x + seek_x - 5*ui_scale, time_y, current_ts_str)             # <<<<<<<<<<<<<<
 * 
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_CENTER)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, ((__pyx_v_self->bar->org->x + __pyx_v_seek_x) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)), __pyx_v_time_y, __pyx_v_current_ts_str, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "src/pyglui/custom.pxi":191
 *             glfont.draw_text(self.bar.org.x + seek_x - 5*ui_scale, time_y, current_ts_str)
 * 
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_CENTER)             # <<<<<<<<<<<<<<
 *         # glfont.draw_text(self.seek_handle.org.x+self.seek_handle.size.x/2,
 *         #                  self.seek_handle.org.y+self.seek_handle.size.y + 3. * ui_scale,
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_CENTER)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":195
 *         #                  self.seek_handle.org.y+self.seek_handle.size.y + 3. * ui_scale,
 *         #                  speed_str)
 *         glfont.draw_text(self.play.button.center[0], nums_y, speed_str)             # <<<<<<<<<<<<<<
 * 
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_RIGHT)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->play->__pyx_base.button), __pyx_n_s_center); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(6, 195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, __pyx_t_10, __pyx_v_nums_y, __pyx_v_speed_str, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/custom.pxi":197
 *         glfont.draw_text(self.play.button.center[0], nums_y, speed_str)
 * 
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_RIGHT)             # <<<<<<<<<<<<<<
 *         glfont.draw_text(self.trim_left_handle.center[0] - trim_num_offset, nums_y, trim_left_str)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_RIGHT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/custom.pxi":198
 * 
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_RIGHT)
 *         glfont.draw_text(self.trim_left_handle.center[0] - trim_num_offset, nums_y, trim_left_str)             # <<<<<<<<<<<<<<
 * 
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_LEFT)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->trim_left_handle), __pyx_n_s_center); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_trim_num_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(6, 198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, __pyx_t_10, __pyx_v_nums_y, __pyx_v_trim_left_str, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":200
 *         glfont.draw_text(self.trim_left_handle.center[0] - trim_num_offset, nums_y, trim_left_str)
 * 
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_LEFT)             # <<<<<<<<<<<<<<
 *         glfont.draw_text(self.trim_right_handle.center[0] + trim_num_offset, nums_y, trim_right_str)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":201
 * 
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_LEFT)
 *         glfont.draw_text(self.trim_right_handle.center[0] + trim_num_offset, nums_y, trim_right_str)             # <<<<<<<<<<<<<<
 * 
 *         glfont.pop_state()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->trim_right_handle), __pyx_n_s_center); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_trim_num_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(6, 201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, __pyx_t_10, __pyx_v_nums_y, __pyx_v_trim_right_str, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":203
 *         glfont.draw_text(self.trim_right_handle.center[0] + trim_num_offset, nums_y, trim_right_str)
 * 
 *         glfont.pop_state()             # <<<<<<<<<<<<<<
 * 
 *     @cython.cdivision(True)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_pop_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/custom.pxi":115
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         self.backwards.draw(self.outline, nested=True, parent_read_only=False)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF((PyObject *)__pyx_t_11);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  __Pyx_XDECREF(__pyx_v_speed_str);
  __Pyx_XDECREF(__pyx_v_current_ts_str);
  __Pyx_XDECREF(__pyx_v_trim_left_str);
  __Pyx_XDECREF(__pyx_v_trim_right_str);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_9draw_overlay = {"draw_overlay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_9draw_overlay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_9draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_overlay (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 115, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 115, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 115, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_overlay") < 0)) __PYX_ERR(6, 115, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 115, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 115, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_overlay", 0, 1, 3, __pyx_nargs); __PYX_ERR(6, 115, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(6, 115, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_8draw_overlay(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_8draw_overlay(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Seek_Bar->__pyx_base.draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":206
 * 
 *     @cython.cdivision(True)
 *     cdef format_ts(self, double ts):             # <<<<<<<<<<<<<<
 *         cdef double minutes, seconds
 *         ts -= self.min_ts
 */

static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_format_ts(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, double __pyx_v_ts) {
  double __pyx_v_minutes;
  double __pyx_v_seconds;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("format_ts", 0);

  /* "src/pyglui/custom.pxi":208
 *     cdef format_ts(self, double ts):
 *         cdef double minutes, seconds
 *         ts -= self.min_ts             # <<<<<<<<<<<<<<
 *         minutes = floor(ts / 60)
 *         seconds = ts - (minutes * 60.)
 */
  __pyx_v_ts = (__pyx_v_ts - __pyx_v_self->min_ts);

  /* "src/pyglui/custom.pxi":209
 *         cdef double minutes, seconds
 *         ts -= self.min_ts
 *         minutes = floor(ts / 60)             # <<<<<<<<<<<<<<
 *         seconds = ts - (minutes * 60.)
 *         return '{:02.0f}:{:06.3f}'.format(minutes, seconds)
 */
  __pyx_v_minutes = floor((__pyx_v_ts / 60.0));

  /* "src/pyglui/custom.pxi":210
 *         ts -= self.min_ts
 *         minutes = floor(ts / 60)
 *         seconds = ts - (minutes * 60.)             # <<<<<<<<<<<<<<
 *         return '{:02.0f}:{:06.3f}'.format(minutes, seconds)
 * 
 */
  __pyx_v_seconds = (__pyx_v_ts - (__pyx_v_minutes * 60.));

  /* "src/pyglui/custom.pxi":211
 *         minutes = floor(ts / 60)
 *         seconds = ts - (minutes * 60.)
 *         return '{:02.0f}:{:06.3f}'.format(minutes, seconds)             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self,Input new_input, bint visible, bint parent_read_only = False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_02_0f_06_3f, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_minutes); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_seconds); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/custom.pxi":206
 * 
 *     @cython.cdivision(True)
 *     cdef format_ts(self, double ts):             # <<<<<<<<<<<<<<
 *         cdef double minutes, seconds
 *         ts -= self.min_ts
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.format_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":213
 *         return '{:02.0f}:{:06.3f}'.format(minutes, seconds)
 * 
 *     cpdef handle_input(self,Input new_input, bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.backwards.handle_input(new_input, True, parent_read_only=False)
 *         self.play.handle_input(new_input, True, parent_read_only=False)
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Seek_Bar_handle_input(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, CYTHON_UNUSED int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Seek_Bar_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  double __pyx_v_val;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 213, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Seek_Bar_11handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 213, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/custom.pxi":214
 * 
 *     cpdef handle_input(self,Input new_input, bint visible, bint parent_read_only = False):
 *         self.backwards.handle_input(new_input, True, parent_read_only=False)             # <<<<<<<<<<<<<<
 *         self.play.handle_input(new_input, True, parent_read_only=False)
 *         self.forwards.handle_input(new_input, True, parent_read_only=False)
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.parent_read_only = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->backwards->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->backwards), __pyx_v_new_input, 1, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":215
 *     cpdef handle_input(self,Input new_input, bint visible, bint parent_read_only = False):
 *         self.backwards.handle_input(new_input, True, parent_read_only=False)
 *         self.play.handle_input(new_input, True, parent_read_only=False)             # <<<<<<<<<<<<<<
 *         self.forwards.handle_input(new_input, True, parent_read_only=False)
 * 
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.parent_read_only = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->play->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->play), __pyx_v_new_input, 1, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":216
 *         self.backwards.handle_input(new_input, True, parent_read_only=False)
 *         self.play.handle_input(new_input, True, parent_read_only=False)
 *         self.forwards.handle_input(new_input, True, parent_read_only=False)             # <<<<<<<<<<<<<<
 * 
 *         global should_redraw_overlay
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.parent_read_only = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Icon *)__pyx_v_self->forwards->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self->forwards), __pyx_v_new_input, 1, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":219
 * 
 *         global should_redraw_overlay
 *         if self.seeking and new_input.dm:             # <<<<<<<<<<<<<<
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 */
  if (__pyx_v_self->seeking) {
  } else {
    __pyx_t_9 = __pyx_v_self->seeking;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_10 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_new_input->dm)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(6, 219, __pyx_L1_error)
  __pyx_t_9 = __pyx_t_10;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/custom.pxi":220
 *         global should_redraw_overlay
 *         if self.seeking and new_input.dm:
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,             # <<<<<<<<<<<<<<
 *                            self.min_ts, self.max_ts)
 *             self.playback_time_setter(val)
 */
    __pyx_v_val = __pyx_f_6pyglui_2ui_clampmap((__pyx_v_new_input->m->x - __pyx_v_self->bar->org->x), 0.0, __pyx_v_self->bar->size->x, __pyx_v_self->min_ts, __pyx_v_self->max_ts);

    /* "src/pyglui/custom.pxi":222
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 *             self.playback_time_setter(val)             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 *         elif self.trimming_right and new_input.dm:
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_self->playback_time_setter);
    __pyx_t_5 = __pyx_v_self->playback_time_setter; __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/custom.pxi":223
 *                            self.min_ts, self.max_ts)
 *             self.playback_time_setter(val)
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *         elif self.trimming_right and new_input.dm:
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/custom.pxi":219
 * 
 *         global should_redraw_overlay
 *         if self.seeking and new_input.dm:             # <<<<<<<<<<<<<<
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/custom.pxi":224
 *             self.playback_time_setter(val)
 *             should_redraw_overlay = True
 *         elif self.trimming_right and new_input.dm:             # <<<<<<<<<<<<<<
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 */
  if (__pyx_v_self->trimming_right) {
  } else {
    __pyx_t_9 = __pyx_v_self->trimming_right;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_10 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_new_input->dm)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(6, 224, __pyx_L1_error)
  __pyx_t_9 = __pyx_t_10;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/custom.pxi":225
 *             should_redraw_overlay = True
 *         elif self.trimming_right and new_input.dm:
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,             # <<<<<<<<<<<<<<
 *                            self.min_ts, self.max_ts)
 *             self.trim_right.value = val
 */
    __pyx_v_val = __pyx_f_6pyglui_2ui_clampmap((__pyx_v_new_input->m->x - __pyx_v_self->bar->org->x), 0.0, __pyx_v_self->bar->size->x, __pyx_v_self->min_ts, __pyx_v_self->max_ts);

    /* "src/pyglui/custom.pxi":227
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 *             self.trim_right.value = val             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 *         elif self.trimming_left and new_input.dm:
 */
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->trim_right), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(6, 227, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/custom.pxi":228
 *                            self.min_ts, self.max_ts)
 *             self.trim_right.value = val
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *         elif self.trimming_left and new_input.dm:
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/custom.pxi":224
 *             self.playback_time_setter(val)
 *             should_redraw_overlay = True
 *         elif self.trimming_right and new_input.dm:             # <<<<<<<<<<<<<<
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/custom.pxi":229
 *             self.trim_right.value = val
 *             should_redraw_overlay = True
 *         elif self.trimming_left and new_input.dm:             # <<<<<<<<<<<<<<
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 */
  if (__pyx_v_self->trimming_left) {
  } else {
    __pyx_t_9 = __pyx_v_self->trimming_left;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_10 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_new_input->dm)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(6, 229, __pyx_L1_error)
  __pyx_t_9 = __pyx_t_10;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/custom.pxi":230
 *             should_redraw_overlay = True
 *         elif self.trimming_left and new_input.dm:
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,             # <<<<<<<<<<<<<<
 *                            self.min_ts, self.max_ts)
 *             self.trim_left.value = val
 */
    __pyx_v_val = __pyx_f_6pyglui_2ui_clampmap((__pyx_v_new_input->m->x - __pyx_v_self->bar->org->x), 0.0, __pyx_v_self->bar->size->x, __pyx_v_self->min_ts, __pyx_v_self->max_ts);

    /* "src/pyglui/custom.pxi":232
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 *             self.trim_left.value = val             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = True
 * 
 */
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->trim_left), __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(6, 232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/custom.pxi":233
 *                            self.min_ts, self.max_ts)
 *             self.trim_left.value = val
 *             should_redraw_overlay = True             # <<<<<<<<<<<<<<
 * 
 *         if self.seek_handle.mouse_over(new_input.m) or self.seeking:
 */
    __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

    /* "src/pyglui/custom.pxi":229
 *             self.trim_right.value = val
 *             should_redraw_overlay = True
 *         elif self.trimming_left and new_input.dm:             # <<<<<<<<<<<<<<
 *             val = clampmap(new_input.m.x-self.bar.org.x, 0, self.bar.size.x,
 *                            self.min_ts, self.max_ts)
 */
  }
  __pyx_L3:;

  /* "src/pyglui/custom.pxi":235
 *             should_redraw_overlay = True
 * 
 *         if self.seek_handle.mouse_over(new_input.m) or self.seeking:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 1
 *             self.hovering = 1
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_new_input->m);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_10 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->seek_handle->__pyx_vtab)->mouse_over(__pyx_v_self->seek_handle, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_9 = __pyx_v_self->seeking;
  __pyx_L11_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/custom.pxi":236
 * 
 *         if self.seek_handle.mouse_over(new_input.m) or self.seeking:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 1             # <<<<<<<<<<<<<<
 *             self.hovering = 1
 *         elif self.trim_right_handle.mouse_over(new_input.m) or self.trimming_right:
 */
    if (!__pyx_v_6pyglui_2ui_should_redraw_overlay) {
    } else {
      __pyx_t_9 = __pyx_v_6pyglui_2ui_should_redraw_overlay;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_10 = (__pyx_v_self->hovering != 1);
    __pyx_t_9 = __pyx_t_10;
    __pyx_L13_bool_binop_done:;
    __pyx_v_6pyglui_2ui_should_redraw_overlay = __pyx_t_9;

    /* "src/pyglui/custom.pxi":237
 *         if self.seek_handle.mouse_over(new_input.m) or self.seeking:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 1
 *             self.hovering = 1             # <<<<<<<<<<<<<<
 *         elif self.trim_right_handle.mouse_over(new_input.m) or self.trimming_right:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 2
 */
    __pyx_v_self->hovering = 1;

    /* "src/pyglui/custom.pxi":235
 *             should_redraw_overlay = True
 * 
 *         if self.seek_handle.mouse_over(new_input.m) or self.seeking:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 1
 *             self.hovering = 1
 */
    goto __pyx_L10;
  }

  /* "src/pyglui/custom.pxi":238
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 1
 *             self.hovering = 1
 *         elif self.trim_right_handle.mouse_over(new_input.m) or self.trimming_right:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 2
 *             self.hovering = 2
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_new_input->m);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_10 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->trim_right_handle->__pyx_vtab)->mouse_over(__pyx_v_self->trim_right_handle, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_9 = __pyx_v_self->trimming_right;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/custom.pxi":239
 *             self.hovering = 1
 *         elif self.trim_right_handle.mouse_over(new_input.m) or self.trimming_right:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 2             # <<<<<<<<<<<<<<
 *             self.hovering = 2
 *         elif self.trim_left_handle.mouse_over(new_input.m) or self.trimming_left:
 */
    if (!__pyx_v_6pyglui_2ui_should_redraw_overlay) {
    } else {
      __pyx_t_9 = __pyx_v_6pyglui_2ui_should_redraw_overlay;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_t_10 = (__pyx_v_self->hovering != 2);
    __pyx_t_9 = __pyx_t_10;
    __pyx_L17_bool_binop_done:;
    __pyx_v_6pyglui_2ui_should_redraw_overlay = __pyx_t_9;

    /* "src/pyglui/custom.pxi":240
 *         elif self.trim_right_handle.mouse_over(new_input.m) or self.trimming_right:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 2
 *             self.hovering = 2             # <<<<<<<<<<<<<<
 *         elif self.trim_left_handle.mouse_over(new_input.m) or self.trimming_left:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 3
 */
    __pyx_v_self->hovering = 2;

    /* "src/pyglui/custom.pxi":238
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 1
 *             self.hovering = 1
 *         elif self.trim_right_handle.mouse_over(new_input.m) or self.trimming_right:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 2
 *             self.hovering = 2
 */
    goto __pyx_L10;
  }

  /* "src/pyglui/custom.pxi":241
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 2
 *             self.hovering = 2
 *         elif self.trim_left_handle.mouse_over(new_input.m) or self.trimming_left:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 3
 *             self.hovering = 3
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_new_input->m);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_10 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->trim_left_handle->__pyx_vtab)->mouse_over(__pyx_v_self->trim_left_handle, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_9 = __pyx_v_self->trimming_left;
  __pyx_L19_bool_binop_done:;
  if (__pyx_t_9) {

    /* "src/pyglui/custom.pxi":242
 *             self.hovering = 2
 *         elif self.trim_left_handle.mouse_over(new_input.m) or self.trimming_left:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 3             # <<<<<<<<<<<<<<
 *             self.hovering = 3
 *         elif self.bar.mouse_over_margin(new_input.m, Vec2(0, 10 * ui_scale)):
 */
    if (!__pyx_v_6pyglui_2ui_should_redraw_overlay) {
    } else {
      __pyx_t_9 = __pyx_v_6pyglui_2ui_should_redraw_overlay;
      goto __pyx_L21_bool_binop_done;
    }
    __pyx_t_10 = (__pyx_v_self->hovering != 3);
    __pyx_t_9 = __pyx_t_10;
    __pyx_L21_bool_binop_done:;
    __pyx_v_6pyglui_2ui_should_redraw_overlay = __pyx_t_9;

    /* "src/pyglui/custom.pxi":243
 *         elif self.trim_left_handle.mouse_over(new_input.m) or self.trimming_left:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 3
 *             self.hovering = 3             # <<<<<<<<<<<<<<
 *         elif self.bar.mouse_over_margin(new_input.m, Vec2(0, 10 * ui_scale)):
 *             self.point_click_seek_loc = Vec2(new_input.m.x, self.bar.center[1])
 */
    __pyx_v_self->hovering = 3;

    /* "src/pyglui/custom.pxi":241
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 2
 *             self.hovering = 2
 *         elif self.trim_left_handle.mouse_over(new_input.m) or self.trimming_left:             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 3
 *             self.hovering = 3
 */
    goto __pyx_L10;
  }

  /* "src/pyglui/custom.pxi":244
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 3
 *             self.hovering = 3
 *         elif self.bar.mouse_over_margin(new_input.m, Vec2(0, 10 * ui_scale)):             # <<<<<<<<<<<<<<
 *             self.point_click_seek_loc = Vec2(new_input.m.x, self.bar.center[1])
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 4 or new_input.dm.x != 0
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_new_input->m);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = PyFloat_FromDouble((10.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->bar->__pyx_vtab)->mouse_over_margin(__pyx_v_self->bar, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_5), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_9) {

    /* "src/pyglui/custom.pxi":245
 *             self.hovering = 3
 *         elif self.bar.mouse_over_margin(new_input.m, Vec2(0, 10 * ui_scale)):
 *             self.point_click_seek_loc = Vec2(new_input.m.x, self.bar.center[1])             # <<<<<<<<<<<<<<
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 4 or new_input.dm.x != 0
 *             self.hovering = 4
 */
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_new_input->m->x); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->bar), __pyx_n_s_center); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->point_click_seek_loc);
    __Pyx_DECREF((PyObject *)__pyx_v_self->point_click_seek_loc);
    __pyx_v_self->point_click_seek_loc = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/custom.pxi":246
 *         elif self.bar.mouse_over_margin(new_input.m, Vec2(0, 10 * ui_scale)):
 *             self.point_click_seek_loc = Vec2(new_input.m.x, self.bar.center[1])
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 4 or new_input.dm.x != 0             # <<<<<<<<<<<<<<
 *             self.hovering = 4
 *         else:
 */
    if (!__pyx_v_6pyglui_2ui_should_redraw_overlay) {
    } else {
      __pyx_t_9 = __pyx_v_6pyglui_2ui_should_redraw_overlay;
      goto __pyx_L23_bool_binop_done;
    }
    __pyx_t_10 = (__pyx_v_self->hovering != 4);
    if (!__pyx_t_10) {
    } else {
      __pyx_t_9 = __pyx_t_10;
      goto __pyx_L23_bool_binop_done;
    }
    __pyx_t_10 = (__pyx_v_new_input->dm->x != 0.0);
    __pyx_t_9 = __pyx_t_10;
    __pyx_L23_bool_binop_done:;
    __pyx_v_6pyglui_2ui_should_redraw_overlay = __pyx_t_9;

    /* "src/pyglui/custom.pxi":247
 *             self.point_click_seek_loc = Vec2(new_input.m.x, self.bar.center[1])
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 4 or new_input.dm.x != 0
 *             self.hovering = 4             # <<<<<<<<<<<<<<
 *         else:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 0
 */
    __pyx_v_self->hovering = 4;

    /* "src/pyglui/custom.pxi":244
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 3
 *             self.hovering = 3
 *         elif self.bar.mouse_over_margin(new_input.m, Vec2(0, 10 * ui_scale)):             # <<<<<<<<<<<<<<
 *             self.point_click_seek_loc = Vec2(new_input.m.x, self.bar.center[1])
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 4 or new_input.dm.x != 0
 */
    goto __pyx_L10;
  }

  /* "src/pyglui/custom.pxi":249
 *             self.hovering = 4
 *         else:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 0             # <<<<<<<<<<<<<<
 *             self.hovering = 0
 * 
 */
  /*else*/ {
    if (!__pyx_v_6pyglui_2ui_should_redraw_overlay) {
    } else {
      __pyx_t_9 = __pyx_v_6pyglui_2ui_should_redraw_overlay;
      goto __pyx_L26_bool_binop_done;
    }
    __pyx_t_10 = (__pyx_v_self->hovering != 0);
    __pyx_t_9 = __pyx_t_10;
    __pyx_L26_bool_binop_done:;
    __pyx_v_6pyglui_2ui_should_redraw_overlay = __pyx_t_9;

    /* "src/pyglui/custom.pxi":250
 *         else:
 *             should_redraw_overlay = should_redraw_overlay or self.hovering != 0
 *             self.hovering = 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_self->hovering = 0;
  }
  __pyx_L10:;

  /* "src/pyglui/custom.pxi":253
 * 
 * 
 *         for b in new_input.buttons[:]: # list copy for remove to work             # <<<<<<<<<<<<<<
 *             if b[1] == 1:
 *                 if self.hovering == 4:
 */
  if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(6, 253, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_new_input->buttons, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(6, 253, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/custom.pxi":254
 * 
 *         for b in new_input.buttons[:]: # list copy for remove to work
 *             if b[1] == 1:             # <<<<<<<<<<<<<<
 *                 if self.hovering == 4:
 *                     val = clampmap(new_input.m.x-self.bar.org.x, 0,
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(6, 254, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_9) {

      /* "src/pyglui/custom.pxi":255
 *         for b in new_input.buttons[:]: # list copy for remove to work
 *             if b[1] == 1:
 *                 if self.hovering == 4:             # <<<<<<<<<<<<<<
 *                     val = clampmap(new_input.m.x-self.bar.org.x, 0,
 *                                    self.bar.size.x, self.min_ts, self.max_ts)
 */
      __pyx_t_9 = (__pyx_v_self->hovering == 4);
      if (__pyx_t_9) {

        /* "src/pyglui/custom.pxi":256
 *             if b[1] == 1:
 *                 if self.hovering == 4:
 *                     val = clampmap(new_input.m.x-self.bar.org.x, 0,             # <<<<<<<<<<<<<<
 *                                    self.bar.size.x, self.min_ts, self.max_ts)
 *                     self.seeking = True
 */
        __pyx_v_val = __pyx_f_6pyglui_2ui_clampmap((__pyx_v_new_input->m->x - __pyx_v_self->bar->org->x), 0.0, __pyx_v_self->bar->size->x, __pyx_v_self->min_ts, __pyx_v_self->max_ts);

        /* "src/pyglui/custom.pxi":258
 *                     val = clampmap(new_input.m.x-self.bar.org.x, 0,
 *                                    self.bar.size.x, self.min_ts, self.max_ts)
 *                     self.seeking = True             # <<<<<<<<<<<<<<
 *                     self.seeking_cb(True)
 *                     self.playback_time_setter(val)
 */
        __pyx_v_self->seeking = 1;

        /* "src/pyglui/custom.pxi":259
 *                                    self.bar.size.x, self.min_ts, self.max_ts)
 *                     self.seeking = True
 *                     self.seeking_cb(True)             # <<<<<<<<<<<<<<
 *                     self.playback_time_setter(val)
 *                     self.hovering = 1
 */
        __Pyx_INCREF(__pyx_v_self->seeking_cb);
        __pyx_t_2 = __pyx_v_self->seeking_cb; __pyx_t_4 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, Py_True};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 259, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "src/pyglui/custom.pxi":260
 *                     self.seeking = True
 *                     self.seeking_cb(True)
 *                     self.playback_time_setter(val)             # <<<<<<<<<<<<<<
 *                     self.hovering = 1
 *                     should_redraw_overlay = True
 */
        __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 260, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_self->playback_time_setter);
        __pyx_t_4 = __pyx_v_self->playback_time_setter; __pyx_t_3 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 260, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "src/pyglui/custom.pxi":261
 *                     self.seeking_cb(True)
 *                     self.playback_time_setter(val)
 *                     self.hovering = 1             # <<<<<<<<<<<<<<
 *                     should_redraw_overlay = True
 * 
 */
        __pyx_v_self->hovering = 1;

        /* "src/pyglui/custom.pxi":262
 *                     self.playback_time_setter(val)
 *                     self.hovering = 1
 *                     should_redraw_overlay = True             # <<<<<<<<<<<<<<
 * 
 *                 if self.hovering == 1:
 */
        __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

        /* "src/pyglui/custom.pxi":255
 *         for b in new_input.buttons[:]: # list copy for remove to work
 *             if b[1] == 1:
 *                 if self.hovering == 4:             # <<<<<<<<<<<<<<
 *                     val = clampmap(new_input.m.x-self.bar.org.x, 0,
 *                                    self.bar.size.x, self.min_ts, self.max_ts)
 */
      }

      /* "src/pyglui/custom.pxi":264
 *                     should_redraw_overlay = True
 * 
 *                 if self.hovering == 1:             # <<<<<<<<<<<<<<
 *                     new_input.buttons.remove(b)
 *                     should_redraw_overlay = True
 */
      switch (__pyx_v_self->hovering) {
        case 1:

        /* "src/pyglui/custom.pxi":265
 * 
 *                 if self.hovering == 1:
 *                     new_input.buttons.remove(b)             # <<<<<<<<<<<<<<
 *                     should_redraw_overlay = True
 *                     if not self.seeking:  # do not call seeking_cb twice
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_input->buttons, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 265, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 265, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "src/pyglui/custom.pxi":266
 *                 if self.hovering == 1:
 *                     new_input.buttons.remove(b)
 *                     should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *                     if not self.seeking:  # do not call seeking_cb twice
 *                         self.seeking = True
 */
        __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

        /* "src/pyglui/custom.pxi":267
 *                     new_input.buttons.remove(b)
 *                     should_redraw_overlay = True
 *                     if not self.seeking:  # do not call seeking_cb twice             # <<<<<<<<<<<<<<
 *                         self.seeking = True
 *                         self.seeking_cb(True)
 */
        __pyx_t_9 = (!__pyx_v_self->seeking);
        if (__pyx_t_9) {

          /* "src/pyglui/custom.pxi":268
 *                     should_redraw_overlay = True
 *                     if not self.seeking:  # do not call seeking_cb twice
 *                         self.seeking = True             # <<<<<<<<<<<<<<
 *                         self.seeking_cb(True)
 *                 elif self.hovering == 2:
 */
          __pyx_v_self->seeking = 1;

          /* "src/pyglui/custom.pxi":269
 *                     if not self.seeking:  # do not call seeking_cb twice
 *                         self.seeking = True
 *                         self.seeking_cb(True)             # <<<<<<<<<<<<<<
 *                 elif self.hovering == 2:
 *                     new_input.buttons.remove(b)
 */
          __Pyx_INCREF(__pyx_v_self->seeking_cb);
          __pyx_t_4 = __pyx_v_self->seeking_cb; __pyx_t_2 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_7 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, Py_True};
            __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 269, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "src/pyglui/custom.pxi":267
 *                     new_input.buttons.remove(b)
 *                     should_redraw_overlay = True
 *                     if not self.seeking:  # do not call seeking_cb twice             # <<<<<<<<<<<<<<
 *                         self.seeking = True
 *                         self.seeking_cb(True)
 */
        }

        /* "src/pyglui/custom.pxi":264
 *                     should_redraw_overlay = True
 * 
 *                 if self.hovering == 1:             # <<<<<<<<<<<<<<
 *                     new_input.buttons.remove(b)
 *                     should_redraw_overlay = True
 */
        break;
        case 2:

        /* "src/pyglui/custom.pxi":271
 *                         self.seeking_cb(True)
 *                 elif self.hovering == 2:
 *                     new_input.buttons.remove(b)             # <<<<<<<<<<<<<<
 *                     self.trimming_right = True
 *                     should_redraw_overlay = True
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_input->buttons, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 271, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 271, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "src/pyglui/custom.pxi":272
 *                 elif self.hovering == 2:
 *                     new_input.buttons.remove(b)
 *                     self.trimming_right = True             # <<<<<<<<<<<<<<
 *                     should_redraw_overlay = True
 *                 elif self.hovering == 3:
 */
        __pyx_v_self->trimming_right = 1;

        /* "src/pyglui/custom.pxi":273
 *                     new_input.buttons.remove(b)
 *                     self.trimming_right = True
 *                     should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *                 elif self.hovering == 3:
 *                     new_input.buttons.remove(b)
 */
        __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

        /* "src/pyglui/custom.pxi":270
 *                         self.seeking = True
 *                         self.seeking_cb(True)
 *                 elif self.hovering == 2:             # <<<<<<<<<<<<<<
 *                     new_input.buttons.remove(b)
 *                     self.trimming_right = True
 */
        break;
        case 3:

        /* "src/pyglui/custom.pxi":275
 *                     should_redraw_overlay = True
 *                 elif self.hovering == 3:
 *                     new_input.buttons.remove(b)             # <<<<<<<<<<<<<<
 *                     self.trimming_left = True
 *                     should_redraw_overlay = True
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_input->buttons, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 275, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "src/pyglui/custom.pxi":276
 *                 elif self.hovering == 3:
 *                     new_input.buttons.remove(b)
 *                     self.trimming_left = True             # <<<<<<<<<<<<<<
 *                     should_redraw_overlay = True
 * 
 */
        __pyx_v_self->trimming_left = 1;

        /* "src/pyglui/custom.pxi":277
 *                     new_input.buttons.remove(b)
 *                     self.trimming_left = True
 *                     should_redraw_overlay = True             # <<<<<<<<<<<<<<
 * 
 *             if self.seeking and b[1] == 0:
 */
        __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

        /* "src/pyglui/custom.pxi":274
 *                     self.trimming_right = True
 *                     should_redraw_overlay = True
 *                 elif self.hovering == 3:             # <<<<<<<<<<<<<<
 *                     new_input.buttons.remove(b)
 *                     self.trimming_left = True
 */
        break;
        default: break;
      }

      /* "src/pyglui/custom.pxi":254
 * 
 *         for b in new_input.buttons[:]: # list copy for remove to work
 *             if b[1] == 1:             # <<<<<<<<<<<<<<
 *                 if self.hovering == 4:
 *                     val = clampmap(new_input.m.x-self.bar.org.x, 0,
 */
    }

    /* "src/pyglui/custom.pxi":279
 *                     should_redraw_overlay = True
 * 
 *             if self.seeking and b[1] == 0:             # <<<<<<<<<<<<<<
 *                 self.seeking = False
 *                 should_redraw_overlay = True
 */
    if (__pyx_v_self->seeking) {
    } else {
      __pyx_t_9 = __pyx_v_self->seeking;
      goto __pyx_L34_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(6, 279, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __pyx_t_10;
    __pyx_L34_bool_binop_done:;
    if (__pyx_t_9) {

      /* "src/pyglui/custom.pxi":280
 * 
 *             if self.seeking and b[1] == 0:
 *                 self.seeking = False             # <<<<<<<<<<<<<<
 *                 should_redraw_overlay = True
 *                 self.seeking_cb(False)
 */
      __pyx_v_self->seeking = 0;

      /* "src/pyglui/custom.pxi":281
 *             if self.seeking and b[1] == 0:
 *                 self.seeking = False
 *                 should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *                 self.seeking_cb(False)
 *             elif self.trimming_right and b[1] == 0:
 */
      __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

      /* "src/pyglui/custom.pxi":282
 *                 self.seeking = False
 *                 should_redraw_overlay = True
 *                 self.seeking_cb(False)             # <<<<<<<<<<<<<<
 *             elif self.trimming_right and b[1] == 0:
 *                 self.trimming_right = False
 */
      __Pyx_INCREF(__pyx_v_self->seeking_cb);
      __pyx_t_5 = __pyx_v_self->seeking_cb; __pyx_t_2 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, Py_False};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 282, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/custom.pxi":279
 *                     should_redraw_overlay = True
 * 
 *             if self.seeking and b[1] == 0:             # <<<<<<<<<<<<<<
 *                 self.seeking = False
 *                 should_redraw_overlay = True
 */
      goto __pyx_L33;
    }

    /* "src/pyglui/custom.pxi":283
 *                 should_redraw_overlay = True
 *                 self.seeking_cb(False)
 *             elif self.trimming_right and b[1] == 0:             # <<<<<<<<<<<<<<
 *                 self.trimming_right = False
 *                 should_redraw_overlay = True
 */
    if (__pyx_v_self->trimming_right) {
    } else {
      __pyx_t_9 = __pyx_v_self->trimming_right;
      goto __pyx_L36_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(6, 283, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __pyx_t_10;
    __pyx_L36_bool_binop_done:;
    if (__pyx_t_9) {

      /* "src/pyglui/custom.pxi":284
 *                 self.seeking_cb(False)
 *             elif self.trimming_right and b[1] == 0:
 *                 self.trimming_right = False             # <<<<<<<<<<<<<<
 *                 should_redraw_overlay = True
 *             elif self.trimming_left and b[1] == 0:
 */
      __pyx_v_self->trimming_right = 0;

      /* "src/pyglui/custom.pxi":285
 *             elif self.trimming_right and b[1] == 0:
 *                 self.trimming_right = False
 *                 should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *             elif self.trimming_left and b[1] == 0:
 *                 self.trimming_left = False
 */
      __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

      /* "src/pyglui/custom.pxi":283
 *                 should_redraw_overlay = True
 *                 self.seeking_cb(False)
 *             elif self.trimming_right and b[1] == 0:             # <<<<<<<<<<<<<<
 *                 self.trimming_right = False
 *                 should_redraw_overlay = True
 */
      goto __pyx_L33;
    }

    /* "src/pyglui/custom.pxi":286
 *                 self.trimming_right = False
 *                 should_redraw_overlay = True
 *             elif self.trimming_left and b[1] == 0:             # <<<<<<<<<<<<<<
 *                 self.trimming_left = False
 *                 should_redraw_overlay = True
 */
    if (__pyx_v_self->trimming_left) {
    } else {
      __pyx_t_9 = __pyx_v_self->trimming_left;
      goto __pyx_L38_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(6, 286, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __pyx_t_10;
    __pyx_L38_bool_binop_done:;
    if (__pyx_t_9) {

      /* "src/pyglui/custom.pxi":287
 *                 should_redraw_overlay = True
 *             elif self.trimming_left and b[1] == 0:
 *                 self.trimming_left = False             # <<<<<<<<<<<<<<
 *                 should_redraw_overlay = True
 */
      __pyx_v_self->trimming_left = 0;

      /* "src/pyglui/custom.pxi":288
 *             elif self.trimming_left and b[1] == 0:
 *                 self.trimming_left = False
 *                 should_redraw_overlay = True             # <<<<<<<<<<<<<<
 */
      __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

      /* "src/pyglui/custom.pxi":286
 *                 self.trimming_right = False
 *                 should_redraw_overlay = True
 *             elif self.trimming_left and b[1] == 0:             # <<<<<<<<<<<<<<
 *                 self.trimming_left = False
 *                 should_redraw_overlay = True
 */
    }
    __pyx_L33:;

    /* "src/pyglui/custom.pxi":253
 * 
 * 
 *         for b in new_input.buttons[:]: # list copy for remove to work             # <<<<<<<<<<<<<<
 *             if b[1] == 1:
 *                 if self.hovering == 4:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/custom.pxi":213
 *         return '{:02.0f}:{:06.3f}'.format(minutes, seconds)
 * 
 *     cpdef handle_input(self,Input new_input, bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.backwards.handle_input(new_input, True, parent_read_only=False)
 *         self.play.handle_input(new_input, True, parent_read_only=False)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_11handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_11handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 213, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 213, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(6, 213, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 213, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(6, 213, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 213, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 213, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(6, 213, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(6, 213, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_10handle_input(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_10handle_input(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Seek_Bar->__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":19
 *     cdef double recent_ts, min_ts, mid_ts, max_ts
 *     cdef Vec2 point_click_seek_loc
 *     cdef readonly int hovering             # <<<<<<<<<<<<<<
 *     cdef FitBox bar, seek_handle, trim_left_handle, trim_right_handle
 *     cdef readonly bint seeking, trimming_left, trimming_right
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_8hovering_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_8hovering_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_8hovering___get__(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_8hovering___get__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hovering); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.hovering.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/custom.pxi":21
 *     cdef readonly int hovering
 *     cdef FitBox bar, seek_handle, trim_left_handle, trim_right_handle
 *     cdef readonly bint seeking, trimming_left, trimming_right             # <<<<<<<<<<<<<<
 *     cdef Synced_Value trim_left, trim_right, playback_speed
 *     cdef object recent_idx_ts_getter, playback_time_setter, seeking_cb
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_7seeking_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_7seeking_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_7seeking___get__(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_7seeking___get__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->seeking); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.seeking.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_13trimming_left_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_13trimming_left_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_13trimming_left___get__(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_13trimming_left___get__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->trimming_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.trimming_left.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_14trimming_right_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_14trimming_right_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_14trimming_right___get__(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_14trimming_right___get__(struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->trimming_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.trimming_right.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_12__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Seek_Bar_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Seek_Bar_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Seek_Bar_14__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Seek_Bar_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Seek_Bar *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Seek_Bar.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":7
 *     cdef FitBox data_area
 * 
 *     def __cinit__(self, basestring label, object draw_data_callback,             # <<<<<<<<<<<<<<
 *                   object draw_label_callback=None, double content_height=30.,
 *                   xpad=Vec2(130, 30), ypad=5., *args, **kwargs):
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_draw_data_callback = 0;
  PyObject *__pyx_v_draw_label_callback = 0;
  double __pyx_v_content_height;
  PyObject *__pyx_v_xpad = 0;
  PyObject *__pyx_v_ypad = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_v_args = __Pyx_ArgsSlice_VARARGS(__pyx_args, 6, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_draw_data_callback,&__pyx_n_s_draw_label_callback,&__pyx_n_s_content_height,&__pyx_n_s_xpad,&__pyx_n_s_ypad,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_draw_data_callback,&__pyx_n_s_draw_label_callback,&__pyx_n_s_content_height,&__pyx_n_s_xpad,&__pyx_n_s_ypad,0};
    #endif
    PyObject* values[6] = {0,0,0,0,0,0};

    /* "src/pyglui/timelines.pxi":8
 * 
 *     def __cinit__(self, basestring label, object draw_data_callback,
 *                   object draw_label_callback=None, double content_height=30.,             # <<<<<<<<<<<<<<
 *                   xpad=Vec2(130, 30), ypad=5., *args, **kwargs):
 *         self.uid = id(self)
 */
    values[2] = ((PyObject *)Py_None);
    values[4] = __pyx_k__67;
    values[5] = ((PyObject *)__pyx_float_5_);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        default:
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 7, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_draw_data_callback)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 7, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 6, 1); __PYX_ERR(7, 7, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_draw_label_callback);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 7, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_content_height);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 7, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xpad);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 7, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ypad);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 7, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        const Py_ssize_t used_pos_args = (kwd_pos_args < 6) ? kwd_pos_args : 6;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "__cinit__") < 0)) __PYX_ERR(7, 7, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        default:
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        case  1:
        case  0:
        goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = ((PyObject*)values[0]);
    __pyx_v_draw_data_callback = values[1];
    __pyx_v_draw_label_callback = values[2];
    if (values[3]) {
      __pyx_v_content_height = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_content_height == (double)-1) && PyErr_Occurred())) __PYX_ERR(7, 8, __pyx_L3_error)
    } else {
      __pyx_v_content_height = ((double)30.);
    }
    __pyx_v_xpad = values[4];
    __pyx_v_ypad = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 6, __pyx_nargs); __PYX_ERR(7, 7, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("pyglui.ui.Timeline.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_label), (&PyBaseString_Type), 1, "label", 1))) __PYX_ERR(7, 7, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline___cinit__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), __pyx_v_label, __pyx_v_draw_data_callback, __pyx_v_draw_label_callback, __pyx_v_content_height, __pyx_v_xpad, __pyx_v_ypad, __pyx_v_args, __pyx_v_kwargs);

  /* "src/pyglui/timelines.pxi":7
 *     cdef FitBox data_area
 * 
 *     def __cinit__(self, basestring label, object draw_data_callback,             # <<<<<<<<<<<<<<
 *                   object draw_label_callback=None, double content_height=30.,
 *                   xpad=Vec2(130, 30), ypad=5., *args, **kwargs):
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline___cinit__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_draw_data_callback, PyObject *__pyx_v_draw_label_callback, double __pyx_v_content_height, PyObject *__pyx_v_xpad, PyObject *__pyx_v_ypad, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/timelines.pxi":10
 *                   object draw_label_callback=None, double content_height=30.,
 *                   xpad=Vec2(130, 30), ypad=5., *args, **kwargs):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self.label = label
 *         self.draw_data = draw_data_callback
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.uid);
  __pyx_v_self->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":11
 *                   xpad=Vec2(130, 30), ypad=5., *args, **kwargs):
 *         self.uid = id(self)
 *         self.label = label             # <<<<<<<<<<<<<<
 *         self.draw_data = draw_data_callback
 *         self.draw_label = draw_label_callback
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label, __pyx_v_label) < 0) __PYX_ERR(7, 11, __pyx_L1_error)

  /* "src/pyglui/timelines.pxi":12
 *         self.uid = id(self)
 *         self.label = label
 *         self.draw_data = draw_data_callback             # <<<<<<<<<<<<<<
 *         self.draw_label = draw_label_callback
 *         self.ypad = ypad
 */
  __Pyx_INCREF(__pyx_v_draw_data_callback);
  __Pyx_GIVEREF(__pyx_v_draw_data_callback);
  __Pyx_GOTREF(__pyx_v_self->draw_data);
  __Pyx_DECREF(__pyx_v_self->draw_data);
  __pyx_v_self->draw_data = __pyx_v_draw_data_callback;

  /* "src/pyglui/timelines.pxi":13
 *         self.label = label
 *         self.draw_data = draw_data_callback
 *         self.draw_label = draw_label_callback             # <<<<<<<<<<<<<<
 *         self.ypad = ypad
 *         self.outline = FitBox(Vec2(0, 0.), Vec2(0, content_height + 2*self.ypad))
 */
  __Pyx_INCREF(__pyx_v_draw_label_callback);
  __Pyx_GIVEREF(__pyx_v_draw_label_callback);
  __Pyx_GOTREF(__pyx_v_self->draw_label);
  __Pyx_DECREF(__pyx_v_self->draw_label);
  __pyx_v_self->draw_label = __pyx_v_draw_label_callback;

  /* "src/pyglui/timelines.pxi":14
 *         self.draw_data = draw_data_callback
 *         self.draw_label = draw_label_callback
 *         self.ypad = ypad             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(0, 0.), Vec2(0, content_height + 2*self.ypad))
 *         self.data_area = FitBox(Vec2(xpad[0], self.ypad), Vec2(-xpad[1], -self.ypad))
 */
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_ypad); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(7, 14, __pyx_L1_error)
  __pyx_v_self->ypad = __pyx_t_2;

  /* "src/pyglui/timelines.pxi":15
 *         self.draw_label = draw_label_callback
 *         self.ypad = ypad
 *         self.outline = FitBox(Vec2(0, 0.), Vec2(0, content_height + 2*self.ypad))             # <<<<<<<<<<<<<<
 *         self.data_area = FitBox(Vec2(xpad[0], self.ypad), Vec2(-xpad[1], -self.ypad))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_content_height + (2.0 * __pyx_v_self->ypad))); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __pyx_v_self->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/timelines.pxi":16
 *         self.ypad = ypad
 *         self.outline = FitBox(Vec2(0, 0.), Vec2(0, content_height + 2*self.ypad))
 *         self.data_area = FitBox(Vec2(xpad[0], self.ypad), Vec2(-xpad[1], -self.ypad))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args, **kwargs):
 */
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_xpad, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->ypad); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_xpad, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble((-__pyx_v_self->ypad)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->data_area);
  __Pyx_DECREF((PyObject *)__pyx_v_self->data_area);
  __pyx_v_self->data_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":7
 *     cdef FitBox data_area
 * 
 *     def __cinit__(self, basestring label, object draw_data_callback,             # <<<<<<<<<<<<<<
 *                   object draw_label_callback=None, double content_height=30.,
 *                   xpad=Vec2(130, 30), ypad=5., *args, **kwargs):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Timeline.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":18
 *         self.data_area = FitBox(Vec2(xpad[0], self.ypad), Vec2(-xpad[1], -self.ypad))
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_2__init__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":21
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.data_area.compute(self.outline)
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Timeline_draw(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_8Timeline_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  int __pyx_v_width;
  int __pyx_v_height;
  int __pyx_v_vp[4];
  int __pyx_v_org_y;
  PyObject *__pyx_v_seperator = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_polyline __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 21, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Timeline_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 21, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 21, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 21, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/timelines.pxi":22
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.data_area.compute(self.outline)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":23
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         self.outline.compute(parent)
 *         self.data_area.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         cdef int width, height
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->data_area->__pyx_vtab)->compute(__pyx_v_self->data_area, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/timelines.pxi":26
 * 
 *         cdef int width, height
 *         width = int(self.data_area.size.x)             # <<<<<<<<<<<<<<
 *         height = int(self.data_area.size.y)
 *         if width < 1 or height < 1:
 */
  __pyx_v_width = ((int)__pyx_v_self->data_area->size->x);

  /* "src/pyglui/timelines.pxi":27
 *         cdef int width, height
 *         width = int(self.data_area.size.x)
 *         height = int(self.data_area.size.y)             # <<<<<<<<<<<<<<
 *         if width < 1 or height < 1:
 *             return
 */
  __pyx_v_height = ((int)__pyx_v_self->data_area->size->y);

  /* "src/pyglui/timelines.pxi":28
 *         width = int(self.data_area.size.x)
 *         height = int(self.data_area.size.y)
 *         if width < 1 or height < 1:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_9 = (__pyx_v_width < 1);
  if (!__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_9 = (__pyx_v_height < 1);
  __pyx_t_8 = __pyx_t_9;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "src/pyglui/timelines.pxi":29
 *         height = int(self.data_area.size.y)
 *         if width < 1 or height < 1:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef int vp[4]  # current view port data
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "src/pyglui/timelines.pxi":28
 *         width = int(self.data_area.size.x)
 *         height = int(self.data_area.size.y)
 *         if width < 1 or height < 1:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "src/pyglui/timelines.pxi":32
 * 
 *         cdef int vp[4]  # current view port data
 *         gl.glGetIntegerv(gl.GL_VIEWPORT, &vp[0])             # <<<<<<<<<<<<<<
 *         gl.glPushAttrib(gl.GL_VIEWPORT_BIT)
 *         cdef int org_y = vp[3] - int(self.data_area.org.y) - int(self.data_area.size.y)
 */
  glGetIntegerv(GL_VIEWPORT, (&(__pyx_v_vp[0])));

  /* "src/pyglui/timelines.pxi":33
 *         cdef int vp[4]  # current view port data
 *         gl.glGetIntegerv(gl.GL_VIEWPORT, &vp[0])
 *         gl.glPushAttrib(gl.GL_VIEWPORT_BIT)             # <<<<<<<<<<<<<<
 *         cdef int org_y = vp[3] - int(self.data_area.org.y) - int(self.data_area.size.y)
 * 
 */
  glPushAttrib(GL_VIEWPORT_BIT);

  /* "src/pyglui/timelines.pxi":34
 *         gl.glGetIntegerv(gl.GL_VIEWPORT, &vp[0])
 *         gl.glPushAttrib(gl.GL_VIEWPORT_BIT)
 *         cdef int org_y = vp[3] - int(self.data_area.org.y) - int(self.data_area.size.y)             # <<<<<<<<<<<<<<
 * 
 *         # setup gl
 */
  __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_vp[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_FromDouble(__pyx_v_self->data_area->org->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_FromDouble(__pyx_v_self->data_area->size->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_org_y = __pyx_t_7;

  /* "src/pyglui/timelines.pxi":37
 * 
 *         # setup gl
 *         gl.glViewport(int(self.data_area.org.x), org_y, width, height)             # <<<<<<<<<<<<<<
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPushMatrix()
 */
  glViewport(((GLint)__pyx_v_self->data_area->org->x), __pyx_v_org_y, __pyx_v_width, __pyx_v_height);

  /* "src/pyglui/timelines.pxi":38
 *         # setup gl
 *         gl.glViewport(int(self.data_area.org.x), org_y, width, height)
 *         gl.glMatrixMode(gl.GL_PROJECTION)             # <<<<<<<<<<<<<<
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()
 */
  glMatrixMode(GL_PROJECTION);

  /* "src/pyglui/timelines.pxi":39
 *         gl.glViewport(int(self.data_area.org.x), org_y, width, height)
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glLoadIdentity()
 *         gl.glOrtho(0, width, height, 0, -1, 1)
 */
  glPushMatrix();

  /* "src/pyglui/timelines.pxi":40
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()             # <<<<<<<<<<<<<<
 *         gl.glOrtho(0, width, height, 0, -1, 1)
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 */
  glLoadIdentity();

  /* "src/pyglui/timelines.pxi":41
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()
 *         gl.glOrtho(0, width, height, 0, -1, 1)             # <<<<<<<<<<<<<<
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPushMatrix()
 */
  glOrtho(0.0, __pyx_v_width, __pyx_v_height, 0.0, -1.0, 1.0);

  /* "src/pyglui/timelines.pxi":42
 *         gl.glLoadIdentity()
 *         gl.glOrtho(0, width, height, 0, -1, 1)
 *         gl.glMatrixMode(gl.GL_MODELVIEW)             # <<<<<<<<<<<<<<
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()
 */
  glMatrixMode(GL_MODELVIEW);

  /* "src/pyglui/timelines.pxi":43
 *         gl.glOrtho(0, width, height, 0, -1, 1)
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glLoadIdentity()
 * 
 */
  glPushMatrix();

  /* "src/pyglui/timelines.pxi":44
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()             # <<<<<<<<<<<<<<
 * 
 *         self.draw_data(width, height, ui_scale)
 */
  glLoadIdentity();

  /* "src/pyglui/timelines.pxi":46
 *         gl.glLoadIdentity()
 * 
 *         self.draw_data(width, height, ui_scale)             # <<<<<<<<<<<<<<
 * 
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->draw_data);
  __pyx_t_3 = __pyx_v_self->draw_data; __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_t_1, __pyx_t_5, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/timelines.pxi":48
 *         self.draw_data(width, height, ui_scale)
 * 
 *         gl.glMatrixMode(gl.GL_PROJECTION)             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 */
  glMatrixMode(GL_PROJECTION);

  /* "src/pyglui/timelines.pxi":49
 * 
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPopMatrix()
 */
  glPopMatrix();

  /* "src/pyglui/timelines.pxi":50
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPopMatrix()
 *         gl.glMatrixMode(gl.GL_MODELVIEW)             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 *         gl.glPopAttrib()
 */
  glMatrixMode(GL_MODELVIEW);

  /* "src/pyglui/timelines.pxi":51
 *         gl.glPopMatrix()
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 *         gl.glPopAttrib()
 * 
 */
  glPopMatrix();

  /* "src/pyglui/timelines.pxi":52
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPopMatrix()
 *         gl.glPopAttrib()             # <<<<<<<<<<<<<<
 * 
 *         width = int(self.data_area.org.x - self.outline.org.x - x_spacer * ui_scale)
 */
  glPopAttrib();

  /* "src/pyglui/timelines.pxi":54
 *         gl.glPopAttrib()
 * 
 *         width = int(self.data_area.org.x - self.outline.org.x - x_spacer * ui_scale)             # <<<<<<<<<<<<<<
 *         gl.glPushAttrib(gl.GL_VIEWPORT_BIT)
 *         gl.glViewport(int(self.outline.org.x), org_y, width, height)
 */
  __pyx_v_width = ((int)((__pyx_v_self->data_area->org->x - __pyx_v_self->__pyx_base.outline->org->x) - (5.0 * __pyx_v_6pyglui_2ui_ui_scale)));

  /* "src/pyglui/timelines.pxi":55
 * 
 *         width = int(self.data_area.org.x - self.outline.org.x - x_spacer * ui_scale)
 *         gl.glPushAttrib(gl.GL_VIEWPORT_BIT)             # <<<<<<<<<<<<<<
 *         gl.glViewport(int(self.outline.org.x), org_y, width, height)
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 */
  glPushAttrib(GL_VIEWPORT_BIT);

  /* "src/pyglui/timelines.pxi":56
 *         width = int(self.data_area.org.x - self.outline.org.x - x_spacer * ui_scale)
 *         gl.glPushAttrib(gl.GL_VIEWPORT_BIT)
 *         gl.glViewport(int(self.outline.org.x), org_y, width, height)             # <<<<<<<<<<<<<<
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPushMatrix()
 */
  glViewport(((GLint)__pyx_v_self->__pyx_base.outline->org->x), __pyx_v_org_y, __pyx_v_width, __pyx_v_height);

  /* "src/pyglui/timelines.pxi":57
 *         gl.glPushAttrib(gl.GL_VIEWPORT_BIT)
 *         gl.glViewport(int(self.outline.org.x), org_y, width, height)
 *         gl.glMatrixMode(gl.GL_PROJECTION)             # <<<<<<<<<<<<<<
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()
 */
  glMatrixMode(GL_PROJECTION);

  /* "src/pyglui/timelines.pxi":58
 *         gl.glViewport(int(self.outline.org.x), org_y, width, height)
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glLoadIdentity()
 *         gl.glOrtho(0, width, height, 0, -1, 1)
 */
  glPushMatrix();

  /* "src/pyglui/timelines.pxi":59
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()             # <<<<<<<<<<<<<<
 *         gl.glOrtho(0, width, height, 0, -1, 1)
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 */
  glLoadIdentity();

  /* "src/pyglui/timelines.pxi":60
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()
 *         gl.glOrtho(0, width, height, 0, -1, 1)             # <<<<<<<<<<<<<<
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPushMatrix()
 */
  glOrtho(0.0, __pyx_v_width, __pyx_v_height, 0.0, -1.0, 1.0);

  /* "src/pyglui/timelines.pxi":61
 *         gl.glLoadIdentity()
 *         gl.glOrtho(0, width, height, 0, -1, 1)
 *         gl.glMatrixMode(gl.GL_MODELVIEW)             # <<<<<<<<<<<<<<
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()
 */
  glMatrixMode(GL_MODELVIEW);

  /* "src/pyglui/timelines.pxi":62
 *         gl.glOrtho(0, width, height, 0, -1, 1)
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPushMatrix()             # <<<<<<<<<<<<<<
 *         gl.glLoadIdentity()
 * 
 */
  glPushMatrix();

  /* "src/pyglui/timelines.pxi":63
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPushMatrix()
 *         gl.glLoadIdentity()             # <<<<<<<<<<<<<<
 * 
 *         if self.draw_label is None:
 */
  glLoadIdentity();

  /* "src/pyglui/timelines.pxi":65
 *         gl.glLoadIdentity()
 * 
 *         if self.draw_label is None:             # <<<<<<<<<<<<<<
 *             self.draw_label_default(width, height, ui_scale)
 *         else:
 */
  __pyx_t_8 = (__pyx_v_self->draw_label == Py_None);
  if (__pyx_t_8) {

    /* "src/pyglui/timelines.pxi":66
 * 
 *         if self.draw_label is None:
 *             self.draw_label_default(width, height, ui_scale)             # <<<<<<<<<<<<<<
 *         else:
 *             self.draw_label(width, height, ui_scale)
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_width); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_Timeline *)__pyx_v_self->__pyx_base.__pyx_vtab)->draw_label_default(__pyx_v_self, __pyx_t_2, __pyx_t_3, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/timelines.pxi":65
 *         gl.glLoadIdentity()
 * 
 *         if self.draw_label is None:             # <<<<<<<<<<<<<<
 *             self.draw_label_default(width, height, ui_scale)
 *         else:
 */
    goto __pyx_L6;
  }

  /* "src/pyglui/timelines.pxi":68
 *             self.draw_label_default(width, height, ui_scale)
 *         else:
 *             self.draw_label(width, height, ui_scale)             # <<<<<<<<<<<<<<
 * 
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_self->draw_label);
    __pyx_t_1 = __pyx_v_self->draw_label; __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_3, __pyx_t_2};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 68, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L6:;

  /* "src/pyglui/timelines.pxi":70
 *             self.draw_label(width, height, ui_scale)
 * 
 *         gl.glMatrixMode(gl.GL_PROJECTION)             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 */
  glMatrixMode(GL_PROJECTION);

  /* "src/pyglui/timelines.pxi":71
 * 
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPopMatrix()
 */
  glPopMatrix();

  /* "src/pyglui/timelines.pxi":72
 *         gl.glMatrixMode(gl.GL_PROJECTION)
 *         gl.glPopMatrix()
 *         gl.glMatrixMode(gl.GL_MODELVIEW)             # <<<<<<<<<<<<<<
 *         gl.glPopMatrix()
 *         gl.glPopAttrib()
 */
  glMatrixMode(GL_MODELVIEW);

  /* "src/pyglui/timelines.pxi":73
 *         gl.glPopMatrix()
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPopMatrix()             # <<<<<<<<<<<<<<
 *         gl.glPopAttrib()
 * 
 */
  glPopMatrix();

  /* "src/pyglui/timelines.pxi":74
 *         gl.glMatrixMode(gl.GL_MODELVIEW)
 *         gl.glPopMatrix()
 *         gl.glPopAttrib()             # <<<<<<<<<<<<<<
 * 
 *         cdef tuple seperator = ((self.outline.org.x,
 */
  glPopAttrib();

  /* "src/pyglui/timelines.pxi":76
 *         gl.glPopAttrib()
 * 
 *         cdef tuple seperator = ((self.outline.org.x,             # <<<<<<<<<<<<<<
 *                                  self.outline.org.y + self.outline.size.y),
 *                                 (self.outline.org.x + self.outline.size.x,
 */
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->__pyx_base.outline->org->x); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "src/pyglui/timelines.pxi":77
 * 
 *         cdef tuple seperator = ((self.outline.org.x,
 *                                  self.outline.org.y + self.outline.size.y),             # <<<<<<<<<<<<<<
 *                                 (self.outline.org.x + self.outline.size.x,
 *                                  self.outline.org.y + self.outline.size.y))
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->y + __pyx_v_self->__pyx_base.outline->size->y)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyglui/timelines.pxi":76
 *         gl.glPopAttrib()
 * 
 *         cdef tuple seperator = ((self.outline.org.x,             # <<<<<<<<<<<<<<
 *                                  self.outline.org.y + self.outline.size.y),
 *                                 (self.outline.org.x + self.outline.size.x,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_5 = 0;
  __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":78
 *         cdef tuple seperator = ((self.outline.org.x,
 *                                  self.outline.org.y + self.outline.size.y),
 *                                 (self.outline.org.x + self.outline.size.x,             # <<<<<<<<<<<<<<
 *                                  self.outline.org.y + self.outline.size.y))
 *         utils.draw_polyline(seperator, color=RGBA(*color_line_default),
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->x + __pyx_v_self->__pyx_base.outline->size->x)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyglui/timelines.pxi":79
 *                                  self.outline.org.y + self.outline.size.y),
 *                                 (self.outline.org.x + self.outline.size.x,
 *                                  self.outline.org.y + self.outline.size.y))             # <<<<<<<<<<<<<<
 *         utils.draw_polyline(seperator, color=RGBA(*color_line_default),
 *                             line_type=gl.GL_LINES, thickness=ui_scale)
 */
  __pyx_t_5 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->org->y + __pyx_v_self->__pyx_base.outline->size->y)); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "src/pyglui/timelines.pxi":78
 *         cdef tuple seperator = ((self.outline.org.x,
 *                                  self.outline.org.y + self.outline.size.y),
 *                                 (self.outline.org.x + self.outline.size.x,             # <<<<<<<<<<<<<<
 *                                  self.outline.org.y + self.outline.size.y))
 *         utils.draw_polyline(seperator, color=RGBA(*color_line_default),
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;

  /* "src/pyglui/timelines.pxi":76
 *         gl.glPopAttrib()
 * 
 *         cdef tuple seperator = ((self.outline.org.x,             # <<<<<<<<<<<<<<
 *                                  self.outline.org.y + self.outline.size.y),
 *                                 (self.outline.org.x + self.outline.size.x,
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_seperator = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "src/pyglui/timelines.pxi":80
 *                                 (self.outline.org.x + self.outline.size.x,
 *                                  self.outline.org.y + self.outline.size.y))
 *         utils.draw_polyline(seperator, color=RGBA(*color_line_default),             # <<<<<<<<<<<<<<
 *                             line_type=gl.GL_LINES, thickness=ui_scale)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "src/pyglui/timelines.pxi":81
 *                                  self.outline.org.y + self.outline.size.y))
 *         utils.draw_polyline(seperator, color=RGBA(*color_line_default),
 *                             line_type=gl.GL_LINES, thickness=ui_scale)             # <<<<<<<<<<<<<<
 * 
 *     cpdef refresh(self):
 */
  __pyx_t_3 = ((PyObject *)__pyx_t_5);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_int(GL_LINES); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "src/pyglui/timelines.pxi":80
 *                                 (self.outline.org.x + self.outline.size.x,
 *                                  self.outline.org.y + self.outline.size.y))
 *         utils.draw_polyline(seperator, color=RGBA(*color_line_default),             # <<<<<<<<<<<<<<
 *                             line_type=gl.GL_LINES, thickness=ui_scale)
 * 
 */
  __pyx_t_10.__pyx_n = 3;
  __pyx_t_10.thickness = __pyx_v_6pyglui_2ui_ui_scale;
  __pyx_t_10.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
  __pyx_t_10.line_type = __pyx_t_2;
  __pyx_t_1 = __pyx_f_6pyglui_4cygl_5utils_draw_polyline(__pyx_v_seperator, 0, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  (void)(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":21
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.data_area.compute(self.outline)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Timeline.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seperator);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Timeline_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Timeline_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 21, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 21, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 21, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(7, 21, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 21, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 21, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(7, 21, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(7, 21, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_4draw(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_4draw(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Timeline->__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":83
 *                             line_type=gl.GL_LINES, thickness=ui_scale)
 * 
 *     cpdef refresh(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_7refresh(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Timeline_refresh(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("refresh", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_refresh); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 83, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Timeline_7refresh)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 83, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/timelines.pxi":85
 *     cpdef refresh(self):
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/timelines.pxi":83
 *                             line_type=gl.GL_LINES, thickness=ui_scale)
 * 
 *     cpdef refresh(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Timeline.refresh", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_7refresh(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Timeline_7refresh = {"refresh", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Timeline_7refresh, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_7refresh(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("refresh (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("refresh", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "refresh", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_6refresh(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_6refresh(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("refresh", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_8Timeline_refresh(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.refresh", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":87
 *         should_redraw = True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def content_height(self):
 *         '''gets scale-independent timeline height excluding vertical padding'''
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_14content_height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_14content_height_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_14content_height___get__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_14content_height___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/timelines.pxi":90
 *     def content_height(self):
 *         '''gets scale-independent timeline height excluding vertical padding'''
 *         return self.outline.design_size.y - 2 * self.ypad             # <<<<<<<<<<<<<<
 * 
 *     @content_height.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->__pyx_base.outline->design_size->y - (2.0 * __pyx_v_self->ypad))); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/timelines.pxi":87
 *         should_redraw = True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def content_height(self):
 *         '''gets scale-independent timeline height excluding vertical padding'''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.content_height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":92
 *         return self.outline.design_size.y - 2 * self.ypad
 * 
 *     @content_height.setter             # <<<<<<<<<<<<<<
 *     def content_height(self, val):
 *         '''sets scale-independent timeline height excluding vertical padding'''
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_14content_height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_14content_height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_14content_height_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_14content_height_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  float __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/timelines.pxi":95
 *     def content_height(self, val):
 *         '''sets scale-independent timeline height excluding vertical padding'''
 *         if val != self.content_height:             # <<<<<<<<<<<<<<
 *             self.outline.design_size.y = val + 2 * self.ypad
 *             self.refresh()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_content_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(7, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/pyglui/timelines.pxi":96
 *         '''sets scale-independent timeline height excluding vertical padding'''
 *         if val != self.content_height:
 *             self.outline.design_size.y = val + 2 * self.ypad             # <<<<<<<<<<<<<<
 *             self.refresh()
 * 
 */
    __pyx_t_2 = PyFloat_FromDouble((2.0 * __pyx_v_self->ypad)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_Add(__pyx_v_val, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(7, 96, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->__pyx_base.outline->design_size->y = __pyx_t_4;

    /* "src/pyglui/timelines.pxi":97
 *         if val != self.content_height:
 *             self.outline.design_size.y = val + 2 * self.ypad
 *             self.refresh()             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_label_default(self, width, height, scale):
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Timeline *)__pyx_v_self->__pyx_base.__pyx_vtab)->refresh(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/timelines.pxi":95
 *     def content_height(self, val):
 *         '''sets scale-independent timeline height excluding vertical padding'''
 *         if val != self.content_height:             # <<<<<<<<<<<<<<
 *             self.outline.design_size.y = val + 2 * self.ypad
 *             self.refresh()
 */
  }

  /* "src/pyglui/timelines.pxi":92
 *         return self.outline.design_size.y - 2 * self.ypad
 * 
 *     @content_height.setter             # <<<<<<<<<<<<<<
 *     def content_height(self, val):
 *         '''sets scale-independent timeline height excluding vertical padding'''
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Timeline.content_height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":99
 *             self.refresh()
 * 
 *     cpdef draw_label_default(self, width, height, scale):             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_font('opensans')
 */

static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_9draw_label_default(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_8Timeline_draw_label_default(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_width, CYTHON_UNUSED PyObject *__pyx_v_height, PyObject *__pyx_v_scale, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  float __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_label_default", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_label_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 99, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_8Timeline_9draw_label_default)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_width, __pyx_v_height, __pyx_v_scale};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 99, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/timelines.pxi":100
 * 
 *     cpdef draw_label_default(self, width, height, scale):
 *         glfont.push_state()             # <<<<<<<<<<<<<<
 *         glfont.set_font('opensans')
 *         glfont.set_size(timeline_label_size * scale)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_push_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":101
 *     cpdef draw_label_default(self, width, height, scale):
 *         glfont.push_state()
 *         glfont.set_font('opensans')             # <<<<<<<<<<<<<<
 *         glfont.set_size(timeline_label_size * scale)
 *         glfont.set_blur(.1)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_font); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_u_opensans};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":102
 *         glfont.push_state()
 *         glfont.set_font('opensans')
 *         glfont.set_size(timeline_label_size * scale)             # <<<<<<<<<<<<<<
 *         glfont.set_blur(.1)
 *         glfont.set_color_float((1., 1., 1., .8))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_float_18_0, __pyx_v_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":103
 *         glfont.set_font('opensans')
 *         glfont.set_size(timeline_label_size * scale)
 *         glfont.set_blur(.1)             # <<<<<<<<<<<<<<
 *         glfont.set_color_float((1., 1., 1., .8))
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_RIGHT)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_blur); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_float__1};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":104
 *         glfont.set_size(timeline_label_size * scale)
 *         glfont.set_blur(.1)
 *         glfont.set_color_float((1., 1., 1., .8))             # <<<<<<<<<<<<<<
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_RIGHT)
 *         glfont.draw_text(width, 0, self.label)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->set_color_float(__pyx_v_6pyglui_2ui_glfont, __pyx_tuple__38, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":105
 *         glfont.set_blur(.1)
 *         glfont.set_color_float((1., 1., 1., .8))
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_RIGHT)             # <<<<<<<<<<<<<<
 *         glfont.draw_text(width, 0, self.label)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_6pyglui_2ui_glfont), __pyx_n_s_set_align); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP | __pyx_v_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_RIGHT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/timelines.pxi":106
 *         glfont.set_color_float((1., 1., 1., .8))
 *         glfont.set_align(fs.FONS_ALIGN_TOP | fs.FONS_ALIGN_RIGHT)
 *         glfont.draw_text(width, 0, self.label)             # <<<<<<<<<<<<<<
 */
  __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_v_width); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(7, 106, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, __pyx_t_6, 0.0, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/timelines.pxi":99
 *             self.refresh()
 * 
 *     cpdef draw_label_default(self, width, height, scale):             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_font('opensans')
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Timeline.draw_label_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_9draw_label_default(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Timeline_9draw_label_default = {"draw_label_default", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Timeline_9draw_label_default, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_9draw_label_default(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  PyObject *__pyx_v_scale = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_label_default (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_scale,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_scale,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_width)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 99, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_height)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 99, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("draw_label_default", 1, 3, 3, 1); __PYX_ERR(7, 99, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scale)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 99, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("draw_label_default", 1, 3, 3, 2); __PYX_ERR(7, 99, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_label_default") < 0)) __PYX_ERR(7, 99, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
    __pyx_v_scale = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_label_default", 1, 3, 3, __pyx_nargs); __PYX_ERR(7, 99, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.draw_label_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_8draw_label_default(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), __pyx_v_width, __pyx_v_height, __pyx_v_scale);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_8draw_label_default(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_scale) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_label_default", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_8Timeline_draw_label_default(__pyx_v_self, __pyx_v_width, __pyx_v_height, __pyx_v_scale, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.draw_label_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":2
 * cdef class Timeline(UI_element):
 *     cdef public RGBA color             # <<<<<<<<<<<<<<
 *     cdef public double point_size, xstart, xstop, ystart, ystop, ypad
 *     cdef object draw_data, draw_label
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5color_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5color_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_5color___get__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_5color___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->color);
  __pyx_r = ((PyObject *)__pyx_v_self->color);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_5color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_5color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_5color_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_5color_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(7, 2, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->color);
  __pyx_v_self->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_5color_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_5color_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_5color_4__del__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_5color_4__del__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->color);
  __pyx_v_self->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/timelines.pxi":3
 * cdef class Timeline(UI_element):
 *     cdef public RGBA color
 *     cdef public double point_size, xstart, xstop, ystart, ystop, ypad             # <<<<<<<<<<<<<<
 *     cdef object draw_data, draw_label
 *     cdef FitBox data_area
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_10point_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_10point_size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_10point_size___get__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_10point_size___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->point_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.point_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_10point_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_10point_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_10point_size_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_10point_size_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(7, 3, __pyx_L1_error)
  __pyx_v_self->point_size = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.point_size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_6xstart_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_6xstart_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_6xstart___get__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_6xstart___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->xstart); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.xstart.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_6xstart_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_6xstart_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_6xstart_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_6xstart_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(7, 3, __pyx_L1_error)
  __pyx_v_self->xstart = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.xstart.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5xstop_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5xstop_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_5xstop___get__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_5xstop___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->xstop); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.xstop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_5xstop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_5xstop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_5xstop_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_5xstop_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(7, 3, __pyx_L1_error)
  __pyx_v_self->xstop = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.xstop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_6ystart_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_6ystart_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_6ystart___get__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_6ystart___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ystart); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.ystart.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_6ystart_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_6ystart_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_6ystart_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_6ystart_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(7, 3, __pyx_L1_error)
  __pyx_v_self->ystart = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.ystart.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5ystop_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_5ystop_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_5ystop___get__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_5ystop___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ystop); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.ystop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_5ystop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_5ystop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_5ystop_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_5ystop_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(7, 3, __pyx_L1_error)
  __pyx_v_self->ystop = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.ystop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_4ypad_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_4ypad_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_4ypad___get__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_4ypad___get__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ypad); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline.ypad.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_8Timeline_4ypad_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_8Timeline_4ypad_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_4ypad_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_8Timeline_4ypad_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(7, 3, __pyx_L1_error)
  __pyx_v_self->ypad = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.ypad.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Timeline_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Timeline_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_10__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_8Timeline_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Timeline_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_8Timeline_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_8Timeline_12__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Timeline *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_8Timeline_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":3
 * 
 * 
 * cdef float sort_key(UI_element elm):             # <<<<<<<<<<<<<<
 *         return elm._order
 * 
 */

static float __pyx_f_6pyglui_2ui_sort_key(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_elm) {
  float __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sort_key", 0);

  /* "src/pyglui/menus.pxi":4
 * 
 * cdef float sort_key(UI_element elm):
 *         return elm._order             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_elm->_order;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":3
 * 
 * 
 * cdef float sort_key(UI_element elm):             # <<<<<<<<<<<<<<
 *         return elm._order
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":19
 *     cdef public RGBA color
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             for e in self.elements:
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_1sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Base_Menu_sync(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sync); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 19, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Base_Menu_1sync)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 19, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":20
 * 
 *     cpdef sync(self):
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.sync()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->element_space->__pyx_vtab)->has_area(__pyx_v_self->element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "src/pyglui/menus.pxi":21
 *     cpdef sync(self):
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.sync()
 * 
 */
    if (unlikely(__pyx_v_self->elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 21, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
    for (;;) {
      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(3, 21, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 21, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":22
 *         if self.element_space.has_area():
 *             for e in self.elements:
 *                 e.sync()             # <<<<<<<<<<<<<<
 * 
 *     def append(self, obj):
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_sync); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 22, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_4, };
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 22, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":21
 *     cpdef sync(self):
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.sync()
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":20
 * 
 *     cpdef sync(self):
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.sync()
 */
  }

  /* "src/pyglui/menus.pxi":19
 *     cdef public RGBA color
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             for e in self.elements:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_1sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Base_Menu_1sync = {"sync", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_1sync, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_1sync(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("sync", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sync", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_sync(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_sync(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_9Base_Menu_sync(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":24
 *                 e.sync()
 * 
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_3append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Base_Menu_3append = {"append", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_3append, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_3append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 24, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "append") < 0)) __PYX_ERR(3, 24, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 24, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_2append(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_2append(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);

  /* "src/pyglui/menus.pxi":25
 * 
 *     def append(self, obj):
 *         if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.append(obj)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsSubclass(__pyx_t_1, ((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (unlikely(__pyx_t_3)) {

    /* "src/pyglui/menus.pxi":26
 *     def append(self, obj):
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )             # <<<<<<<<<<<<<<
 *         self.elements.append(obj)
 *         global should_redraw
 */
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Can_only_append_UI_elements_not, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 26, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 26, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(3, 26, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":25
 * 
 *     def append(self, obj):
 *         if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.append(obj)
 */
  }

  /* "src/pyglui/menus.pxi":27
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.append(obj)             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(3, 27, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->elements, __pyx_v_obj); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 27, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":29
 *         self.elements.append(obj)
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     def insert(self,idx, obj):
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/menus.pxi":24
 *                 e.sync()
 * 
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":31
 *         should_redraw = True
 * 
 *     def insert(self,idx, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_5insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Base_Menu_5insert = {"insert", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_5insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_5insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_idx = 0;
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_idx,&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_idx,&__pyx_n_s_obj,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 31, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 31, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); __PYX_ERR(3, 31, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "insert") < 0)) __PYX_ERR(3, 31, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_idx = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, __pyx_nargs); __PYX_ERR(3, 31, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_4insert(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), __pyx_v_idx, __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_4insert(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);

  /* "src/pyglui/menus.pxi":32
 * 
 *     def insert(self,idx, obj):
 *         if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.insert(idx,obj)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsSubclass(__pyx_t_1, ((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (unlikely(__pyx_t_3)) {

    /* "src/pyglui/menus.pxi":33
 *     def insert(self,idx, obj):
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )             # <<<<<<<<<<<<<<
 *         self.elements.insert(idx,obj)
 *         global should_redraw
 */
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Can_only_append_UI_elements_not, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(3, 33, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":32
 * 
 *     def insert(self,idx, obj):
 *         if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.insert(idx,obj)
 */
  }

  /* "src/pyglui/menus.pxi":34
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.insert(idx,obj)             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert");
    __PYX_ERR(3, 34, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 34, __pyx_L1_error)
  __pyx_t_6 = PyList_Insert(__pyx_v_self->elements, __pyx_t_5, __pyx_v_obj); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 34, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":36
 *         self.elements.insert(idx,obj)
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     def extend(self, objs):
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/menus.pxi":31
 *         should_redraw = True
 * 
 *     def insert(self,idx, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":38
 *         should_redraw = True
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_7extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Base_Menu_7extend = {"extend", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_7extend, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_7extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_objs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objs,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objs,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_objs)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 38, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "extend") < 0)) __PYX_ERR(3, 38, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_objs = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extend", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 38, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_6extend(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), __pyx_v_objs);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_6extend(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_objs) {
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);

  /* "src/pyglui/menus.pxi":39
 * 
 *     def extend(self, objs):
 *         for obj in objs:             # <<<<<<<<<<<<<<
 *             if not issubclass(obj.__class__,UI_element):
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  if (likely(PyList_CheckExact(__pyx_v_objs)) || PyTuple_CheckExact(__pyx_v_objs)) {
    __pyx_t_1 = __pyx_v_objs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_objs); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 39, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 39, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(3, 39, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 39, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(3, 39, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 39, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(3, 39, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":40
 *     def extend(self, objs):
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.extend(objs)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsSubclass(__pyx_t_4, ((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 40, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = (!__pyx_t_5);
    if (unlikely(__pyx_t_6)) {

      /* "src/pyglui/menus.pxi":41
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )             # <<<<<<<<<<<<<<
 *         self.elements.extend(objs)
 *         global should_redraw
 */
      __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Can_only_append_UI_elements_not, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 41, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 41, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(3, 41, __pyx_L1_error)

      /* "src/pyglui/menus.pxi":40
 *     def extend(self, objs):
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):             # <<<<<<<<<<<<<<
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.extend(objs)
 */
    }

    /* "src/pyglui/menus.pxi":39
 * 
 *     def extend(self, objs):
 *         for obj in objs:             # <<<<<<<<<<<<<<
 *             if not issubclass(obj.__class__,UI_element):
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":42
 *             if not issubclass(obj.__class__,UI_element):
 *                 raise Exception("Can only append UI elements, not: '%s'"%obj )
 *         self.elements.extend(objs)             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend");
    __PYX_ERR(3, 42, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyList_Extend(__pyx_v_self->elements, __pyx_v_objs); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 42, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":44
 *         self.elements.extend(objs)
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     def remove(self, obj):
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/menus.pxi":38
 *         should_redraw = True
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":46
 *         should_redraw = True
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_9remove(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Base_Menu_9remove = {"remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_9remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_9remove(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 46, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove") < 0)) __PYX_ERR(3, 46, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("remove", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 46, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_8remove(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_8remove(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);

  /* "src/pyglui/menus.pxi":47
 * 
 *     def remove(self, obj):
 *         del self.elements[self.elements.index(obj)]             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 47, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->elements, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (unlikely((PyObject_DelItem(__pyx_v_self->elements, __pyx_t_1) < 0))) __PYX_ERR(3, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":49
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     def __len__ (self):
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/menus.pxi":46
 *         should_redraw = True
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":51
 *         should_redraw = True
 * 
 *     def __len__ (self):             # <<<<<<<<<<<<<<
 *         return len(self.elements)
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_6pyglui_2ui_9Base_Menu_11__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_6pyglui_2ui_9Base_Menu_11__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_10__len__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_6pyglui_2ui_9Base_Menu_10__len__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "src/pyglui/menus.pxi":52
 * 
 *     def __len__ (self):
 *         return len(self.elements)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__ (self,x):
 */
  __pyx_t_1 = __pyx_v_self->elements;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 52, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":51
 *         should_redraw = True
 * 
 *     def __len__ (self):             # <<<<<<<<<<<<<<
 *         return len(self.elements)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":54
 *         return len(self.elements)
 * 
 *     def __getitem__ (self,x):             # <<<<<<<<<<<<<<
 *         return self.elements[x]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_13__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_13__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_12__getitem__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_12__getitem__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "src/pyglui/menus.pxi":55
 * 
 *     def __getitem__ (self,x):
 *         return self.elements[x]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__ (self,x,obj):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 55, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->elements, __pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":54
 *         return len(self.elements)
 * 
 *     def __getitem__ (self,x):             # <<<<<<<<<<<<<<
 *         return self.elements[x]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":57
 *         return self.elements[x]
 * 
 *     def __setitem__ (self,x,obj):             # <<<<<<<<<<<<<<
 *         self.elements[x] = obj
 *         global should_redraw
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Base_Menu_15__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_obj); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Base_Menu_15__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_14__setitem__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_obj));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Base_Menu_14__setitem__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "src/pyglui/menus.pxi":58
 * 
 *     def __setitem__ (self,x,obj):
 *         self.elements[x] = obj             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 58, __pyx_L1_error)
  }
  if (unlikely((PyObject_SetItem(__pyx_v_self->elements, __pyx_v_x, __pyx_v_obj) < 0))) __PYX_ERR(3, 58, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":60
 *         self.elements[x] = obj
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__ (self,x):
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/menus.pxi":57
 *         return self.elements[x]
 * 
 *     def __setitem__ (self,x,obj):             # <<<<<<<<<<<<<<
 *         self.elements[x] = obj
 *         global should_redraw
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":62
 *         should_redraw = True
 * 
 *     def __delitem__ (self,x):             # <<<<<<<<<<<<<<
 *         del self.elements[x]
 *         global should_redraw
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Base_Menu_17__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Base_Menu_17__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_16__delitem__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Base_Menu_16__delitem__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_x) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "src/pyglui/menus.pxi":63
 * 
 *     def __delitem__ (self,x):
 *         del self.elements[x]             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(3, 63, __pyx_L1_error)
  }
  if (unlikely((PyObject_DelItem(__pyx_v_self->elements, __pyx_v_x) < 0))) __PYX_ERR(3, 63, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":65
 *         del self.elements[x]
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *     def __contains__ (self,obj):
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/menus.pxi":62
 *         should_redraw = True
 * 
 *     def __delitem__ (self,x):             # <<<<<<<<<<<<<<
 *         del self.elements[x]
 *         global should_redraw
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":67
 *         should_redraw = True
 * 
 *     def __contains__ (self,obj):             # <<<<<<<<<<<<<<
 *         return obj in self.elements
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Base_Menu_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Base_Menu_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_18__contains__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_obj));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Base_Menu_18__contains__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "src/pyglui/menus.pxi":68
 * 
 *     def __contains__ (self,obj):
 *         return obj in self.elements             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_obj, __pyx_v_self->elements, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 68, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":67
 *         should_redraw = True
 * 
 *     def __contains__ (self,obj):             # <<<<<<<<<<<<<<
 *         return obj in self.elements
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":70
 *         return obj in self.elements
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Base_Menu_21__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Base_Menu_21__bool__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_20__bool__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Base_Menu_20__bool__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__", 0);

  /* "src/pyglui/menus.pxi":71
 * 
 *     def __bool__(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":70
 *         return obj in self.elements
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":74
 * 
 * 
 *     cdef get_submenu_config(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Menus are sometimes emebedded in Other menues. We load their configurations recursively.
 */

static PyObject *__pyx_f_6pyglui_2ui_9Base_Menu_get_submenu_config(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  PyObject *__pyx_v_submenus = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_submenu_config", 0);

  /* "src/pyglui/menus.pxi":78
 *         Menus are sometimes emebedded in Other menues. We load their configurations recursively.
 *         '''
 *         cdef dict submenus = {}             # <<<<<<<<<<<<<<
 *         for e in self.elements:
 *             if isinstance(e,(Growing_Menu, Scrolling_Menu, Stretching_Menu, Container)):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_submenus = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":79
 *         '''
 *         cdef dict submenus = {}
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             if isinstance(e,(Growing_Menu, Scrolling_Menu, Stretching_Menu, Container)):
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 */
  if (unlikely(__pyx_v_self->elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(3, 79, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(3, 79, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":80
 *         cdef dict submenus = {}
 *         for e in self.elements:
 *             if isinstance(e,(Growing_Menu, Scrolling_Menu, Stretching_Menu, Container)):             # <<<<<<<<<<<<<<
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 *         return submenus
 */
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Growing_Menu); 
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Scrolling_Menu); 
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Stretching_Menu); 
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Container); 
    __pyx_t_4 = __pyx_t_5;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "src/pyglui/menus.pxi":81
 *         for e in self.elements:
 *             if isinstance(e,(Growing_Menu, Scrolling_Menu, Stretching_Menu, Container)):
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu             # <<<<<<<<<<<<<<
 *         return submenus
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_submenus, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_configuration); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely((PyDict_SetItem(__pyx_v_submenus, __pyx_t_3, __pyx_t_6) < 0))) __PYX_ERR(3, 81, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/pyglui/menus.pxi":80
 *         cdef dict submenus = {}
 *         for e in self.elements:
 *             if isinstance(e,(Growing_Menu, Scrolling_Menu, Stretching_Menu, Container)):             # <<<<<<<<<<<<<<
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 *         return submenus
 */
    }

    /* "src/pyglui/menus.pxi":79
 *         '''
 *         cdef dict submenus = {}
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             if isinstance(e,(Growing_Menu, Scrolling_Menu, Stretching_Menu, Container)):
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":82
 *             if isinstance(e,(Growing_Menu, Scrolling_Menu, Stretching_Menu, Container)):
 *                 submenus[e.label] = submenus.get(e.label,[]) + [e.configuration] #we could have two submenues with same label so we use a list for each submenu label cotaining the conf dicts for each menu
 *         return submenus             # <<<<<<<<<<<<<<
 * 
 *     cdef set_submenu_config(self,dict submenus):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_submenus);
  __pyx_r = __pyx_v_submenus;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":74
 * 
 * 
 *     cdef get_submenu_config(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Menus are sometimes emebedded in Other menues. We load their configurations recursively.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.get_submenu_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_submenus);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":84
 *         return submenus
 * 
 *     cdef set_submenu_config(self,dict submenus):             # <<<<<<<<<<<<<<
 *         '''
 *         Growing menus are sometimes emebedded in Other menues. We save their configurations recursively.
 */

static PyObject *__pyx_f_6pyglui_2ui_9Base_Menu_set_submenu_config(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_submenus) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_submenu_config", 0);

  /* "src/pyglui/menus.pxi":88
 *         Growing menus are sometimes emebedded in Other menues. We save their configurations recursively.
 *         '''
 *         if submenus:             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_submenus); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 88, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":89
 *         '''
 *         if submenus:
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.
 */
    if (unlikely(__pyx_v_self->elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 89, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(3, 89, __pyx_L1_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 89, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":90
 *         if submenus:
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):             # <<<<<<<<<<<<<<
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.
 * 
 */
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Growing_Menu); 
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Scrolling_Menu); 
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Stretching_Menu); 
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_e, __pyx_ptype_6pyglui_2ui_Container); 
      __pyx_t_1 = __pyx_t_5;
      __pyx_L7_bool_binop_done:;
      if (__pyx_t_1) {

        /* "src/pyglui/menus.pxi":91
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.             # <<<<<<<<<<<<<<
 * 
 * 
 */
        if (unlikely(__pyx_v_submenus == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
          __PYX_ERR(3, 91, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_label); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 91, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 91, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 91, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6);
        PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_submenus, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 91, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_PopIndex(__pyx_t_6, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 91, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_configuration, __pyx_t_7) < 0) __PYX_ERR(3, 91, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "src/pyglui/menus.pxi":90
 *         if submenus:
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):             # <<<<<<<<<<<<<<
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.
 * 
 */
      }

      /* "src/pyglui/menus.pxi":89
 *         '''
 *         if submenus:
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 *                     e.configuration = submenus.get(e.label,[{}]).pop(0) #pop of the first menu conf dict in the list.
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":88
 *         Growing menus are sometimes emebedded in Other menues. We save their configurations recursively.
 *         '''
 *         if submenus:             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 if isinstance(e,(Growing_Menu,Scrolling_Menu,Stretching_Menu,Container)):
 */
  }

  /* "src/pyglui/menus.pxi":84
 *         return submenus
 * 
 *     cdef set_submenu_config(self,dict submenus):             # <<<<<<<<<<<<<<
 *         '''
 *         Growing menus are sometimes emebedded in Other menues. We save their configurations recursively.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.set_submenu_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":94
 * 
 * 
 *     cdef draw_menu(self,bint nested):             # <<<<<<<<<<<<<<
 *         #draw translucent background
 *         cdef Vec2 tripple_h_size = Vec2(menu_move_corner_width*ui_scale,menu_move_corner_height*ui_scale)
 */

static PyObject *__pyx_f_6pyglui_2ui_9Base_Menu_draw_menu(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, int __pyx_v_nested) {
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_tripple_h_size = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_tripple_v_size = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_menu_offset = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size = NULL;
  PyObject *__pyx_v_org = NULL;
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_border_color = NULL;
  double __pyx_v_line_w;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_4 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  GLfloat __pyx_t_8;
  GLfloat __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_menu", 0);

  /* "src/pyglui/menus.pxi":96
 *     cdef draw_menu(self,bint nested):
 *         #draw translucent background
 *         cdef Vec2 tripple_h_size = Vec2(menu_move_corner_width*ui_scale,menu_move_corner_height*ui_scale)             # <<<<<<<<<<<<<<
 *         cdef Vec2 tripple_v_size = Vec2(menu_move_corner_height*ui_scale,menu_move_corner_width*ui_scale)
 *         cdef Vec2 menu_offset = Vec2(menu_pad*ui_scale,menu_pad*ui_scale)
 */
  __pyx_t_1 = PyFloat_FromDouble((18.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((18.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tripple_h_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":97
 *         #draw translucent background
 *         cdef Vec2 tripple_h_size = Vec2(menu_move_corner_width*ui_scale,menu_move_corner_height*ui_scale)
 *         cdef Vec2 tripple_v_size = Vec2(menu_move_corner_height*ui_scale,menu_move_corner_width*ui_scale)             # <<<<<<<<<<<<<<
 *         cdef Vec2 menu_offset = Vec2(menu_pad*ui_scale,menu_pad*ui_scale)
 *         if nested:
 */
  __pyx_t_2 = PyFloat_FromDouble((18.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble((18.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_tripple_v_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/menus.pxi":98
 *         cdef Vec2 tripple_h_size = Vec2(menu_move_corner_width*ui_scale,menu_move_corner_height*ui_scale)
 *         cdef Vec2 tripple_v_size = Vec2(menu_move_corner_height*ui_scale,menu_move_corner_width*ui_scale)
 *         cdef Vec2 menu_offset = Vec2(menu_pad*ui_scale,menu_pad*ui_scale)             # <<<<<<<<<<<<<<
 *         if nested:
 *             pass
 */
  __pyx_t_3 = PyFloat_FromDouble((10.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble((10.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_menu_offset = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":99
 *         cdef Vec2 tripple_v_size = Vec2(menu_move_corner_height*ui_scale,menu_move_corner_width*ui_scale)
 *         cdef Vec2 menu_offset = Vec2(menu_pad*ui_scale,menu_pad*ui_scale)
 *         if nested:             # <<<<<<<<<<<<<<
 *             pass
 *         else:
 */
  if (__pyx_v_nested) {
    goto __pyx_L3;
  }

  /* "src/pyglui/menus.pxi":102
 *             pass
 *         else:
 *             gl.glColor4f(self.color.r,self.color.g,self.color.b,self.color.a)             # <<<<<<<<<<<<<<
 * 
 *             if self.header_pos_id == 2: #left
 */
  /*else*/ {
    glColor4f(__pyx_v_self->color->r, __pyx_v_self->color->g, __pyx_v_self->color->b, __pyx_v_self->color->a);

    /* "src/pyglui/menus.pxi":104
 *             gl.glColor4f(self.color.r,self.color.g,self.color.b,self.color.a)
 * 
 *             if self.header_pos_id == 2: #left             # <<<<<<<<<<<<<<
 *                 self.outline.org.x += menu_sidebar_pad*ui_scale
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale
 */
    switch (__pyx_v_self->header_pos_id) {
      case 2:

      /* "src/pyglui/menus.pxi":105
 * 
 *             if self.header_pos_id == 2: #left
 *                 self.outline.org.x += menu_sidebar_pad*ui_scale             # <<<<<<<<<<<<<<
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale
 *                 self.outline.sketch(self.color)
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.outline->org);
      __pyx_t_4 = __pyx_v_self->__pyx_base.outline->org;
      __pyx_t_4->x = (__pyx_t_4->x + (38.0 * __pyx_v_6pyglui_2ui_ui_scale));
      __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":106
 *             if self.header_pos_id == 2: #left
 *                 self.outline.org.x += menu_sidebar_pad*ui_scale
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale             # <<<<<<<<<<<<<<
 *                 self.outline.sketch(self.color)
 *                 self.outline.org.x -= menu_sidebar_pad*ui_scale
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.outline->size);
      __pyx_t_4 = __pyx_v_self->__pyx_base.outline->size;
      __pyx_t_4->x = (__pyx_t_4->x - (38.0 * __pyx_v_6pyglui_2ui_ui_scale));
      __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":107
 *                 self.outline.org.x += menu_sidebar_pad*ui_scale
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale
 *                 self.outline.sketch(self.color)             # <<<<<<<<<<<<<<
 *                 self.outline.org.x -= menu_sidebar_pad*ui_scale
 *                 self.outline.size.x += menu_sidebar_pad*ui_scale
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->color);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5.__pyx_n = 1;
      __pyx_t_5.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
      __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->sketch(__pyx_v_self->__pyx_base.outline, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":108
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale
 *                 self.outline.sketch(self.color)
 *                 self.outline.org.x -= menu_sidebar_pad*ui_scale             # <<<<<<<<<<<<<<
 *                 self.outline.size.x += menu_sidebar_pad*ui_scale
 * 
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.outline->org);
      __pyx_t_4 = __pyx_v_self->__pyx_base.outline->org;
      __pyx_t_4->x = (__pyx_t_4->x - (38.0 * __pyx_v_6pyglui_2ui_ui_scale));
      __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":109
 *                 self.outline.sketch(self.color)
 *                 self.outline.org.x -= menu_sidebar_pad*ui_scale
 *                 self.outline.size.x += menu_sidebar_pad*ui_scale             # <<<<<<<<<<<<<<
 * 
 *             elif self.header_pos_id == 3: #right
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.outline->size);
      __pyx_t_4 = __pyx_v_self->__pyx_base.outline->size;
      __pyx_t_4->x = (__pyx_t_4->x + (38.0 * __pyx_v_6pyglui_2ui_ui_scale));
      __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":104
 *             gl.glColor4f(self.color.r,self.color.g,self.color.b,self.color.a)
 * 
 *             if self.header_pos_id == 2: #left             # <<<<<<<<<<<<<<
 *                 self.outline.org.x += menu_sidebar_pad*ui_scale
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale
 */
      break;
      case 3:

      /* "src/pyglui/menus.pxi":112
 * 
 *             elif self.header_pos_id == 3: #right
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale             # <<<<<<<<<<<<<<
 *                 self.outline.sketch(self.color)
 *                 self.outline.size.x += menu_sidebar_pad*ui_scale
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.outline->size);
      __pyx_t_4 = __pyx_v_self->__pyx_base.outline->size;
      __pyx_t_4->x = (__pyx_t_4->x - (38.0 * __pyx_v_6pyglui_2ui_ui_scale));
      __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":113
 *             elif self.header_pos_id == 3: #right
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale
 *                 self.outline.sketch(self.color)             # <<<<<<<<<<<<<<
 *                 self.outline.size.x += menu_sidebar_pad*ui_scale
 *             else:
 */
      __pyx_t_2 = ((PyObject *)__pyx_v_self->color);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5.__pyx_n = 1;
      __pyx_t_5.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
      __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->sketch(__pyx_v_self->__pyx_base.outline, &__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/menus.pxi":114
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale
 *                 self.outline.sketch(self.color)
 *                 self.outline.size.x += menu_sidebar_pad*ui_scale             # <<<<<<<<<<<<<<
 *             else:
 *                 self.outline.sketch(self.color)
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.outline->size);
      __pyx_t_4 = __pyx_v_self->__pyx_base.outline->size;
      __pyx_t_4->x = (__pyx_t_4->x + (38.0 * __pyx_v_6pyglui_2ui_ui_scale));
      __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":111
 *                 self.outline.size.x += menu_sidebar_pad*ui_scale
 * 
 *             elif self.header_pos_id == 3: #right             # <<<<<<<<<<<<<<
 *                 self.outline.size.x -= menu_sidebar_pad*ui_scale
 *                 self.outline.sketch(self.color)
 */
      break;
      default:

      /* "src/pyglui/menus.pxi":116
 *                 self.outline.size.x += menu_sidebar_pad*ui_scale
 *             else:
 *                 self.outline.sketch(self.color)             # <<<<<<<<<<<<<<
 * 
 *         if self.resize_corner is not None:
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->color);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5.__pyx_n = 1;
      __pyx_t_5.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
      __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.outline->__pyx_vtab)->sketch(__pyx_v_self->__pyx_base.outline, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      break;
    }
  }
  __pyx_L3:;

  /* "src/pyglui/menus.pxi":118
 *                 self.outline.sketch(self.color)
 * 
 *         if self.resize_corner is not None:             # <<<<<<<<<<<<<<
 *             self.resize_corner.outline.compute(self.outline)
 *             tripple_d(self.resize_corner.outline.org,self.resize_corner.outline.size)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->resize_corner) != Py_None);
  if (__pyx_t_6) {

    /* "src/pyglui/menus.pxi":119
 * 
 *         if self.resize_corner is not None:
 *             self.resize_corner.outline.compute(self.outline)             # <<<<<<<<<<<<<<
 *             tripple_d(self.resize_corner.outline.org,self.resize_corner.outline.size)
 * 
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->resize_corner->outline->__pyx_vtab)->compute(__pyx_v_self->resize_corner->outline, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":120
 *         if self.resize_corner is not None:
 *             self.resize_corner.outline.compute(self.outline)
 *             tripple_d(self.resize_corner.outline.org,self.resize_corner.outline.size)             # <<<<<<<<<<<<<<
 * 
 *         if self.menu_bar is not None:
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->resize_corner->outline->org);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = ((PyObject *)__pyx_v_self->resize_corner->outline->size);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_6pyglui_2ui_tripple_d(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":118
 *                 self.outline.sketch(self.color)
 * 
 *         if self.resize_corner is not None:             # <<<<<<<<<<<<<<
 *             self.resize_corner.outline.compute(self.outline)
 *             tripple_d(self.resize_corner.outline.org,self.resize_corner.outline.size)
 */
  }

  /* "src/pyglui/menus.pxi":122
 *             tripple_d(self.resize_corner.outline.org,self.resize_corner.outline.size)
 * 
 *         if self.menu_bar is not None:             # <<<<<<<<<<<<<<
 *             self.menu_bar.outline.compute(self.outline)
 *             if self.minimize_corner is not None:
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->menu_bar) != Py_None);
  if (__pyx_t_6) {

    /* "src/pyglui/menus.pxi":123
 * 
 *         if self.menu_bar is not None:
 *             self.menu_bar.outline.compute(self.outline)             # <<<<<<<<<<<<<<
 *             if self.minimize_corner is not None:
 *                 self.minimize_corner.outline.compute(self.menu_bar.outline)
 */
    __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base.outline);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->menu_bar->outline->__pyx_vtab)->compute(__pyx_v_self->menu_bar->outline, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":124
 *         if self.menu_bar is not None:
 *             self.menu_bar.outline.compute(self.outline)
 *             if self.minimize_corner is not None:             # <<<<<<<<<<<<<<
 *                 self.minimize_corner.outline.compute(self.menu_bar.outline)
 *             #self.minimize_corner.outline.sketch()
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->minimize_corner) != Py_None);
    if (__pyx_t_6) {

      /* "src/pyglui/menus.pxi":125
 *             self.menu_bar.outline.compute(self.outline)
 *             if self.minimize_corner is not None:
 *                 self.minimize_corner.outline.compute(self.menu_bar.outline)             # <<<<<<<<<<<<<<
 *             #self.minimize_corner.outline.sketch()
 *             if 2 == self.header_pos_id: #left
 */
      __pyx_t_2 = ((PyObject *)__pyx_v_self->menu_bar->outline);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->minimize_corner->outline->__pyx_vtab)->compute(__pyx_v_self->minimize_corner->outline, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":124
 *         if self.menu_bar is not None:
 *             self.menu_bar.outline.compute(self.outline)
 *             if self.minimize_corner is not None:             # <<<<<<<<<<<<<<
 *                 self.minimize_corner.outline.compute(self.menu_bar.outline)
 *             #self.minimize_corner.outline.sketch()
 */
    }

    /* "src/pyglui/menus.pxi":127
 *                 self.minimize_corner.outline.compute(self.menu_bar.outline)
 *             #self.minimize_corner.outline.sketch()
 *             if 2 == self.header_pos_id: #left             # <<<<<<<<<<<<<<
 *                 if self.element_space.has_area():
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 */
    __pyx_t_6 = (2 == __pyx_v_self->header_pos_id);
    if (__pyx_t_6) {

      /* "src/pyglui/menus.pxi":128
 *             #self.minimize_corner.outline.sketch()
 *             if 2 == self.header_pos_id: #left
 *                 if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *                 # else:
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->element_space->__pyx_vtab)->has_area(__pyx_v_self->element_space); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 128, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "src/pyglui/menus.pxi":129
 *             if 2 == self.header_pos_id: #left
 *                 if self.element_space.has_area():
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)             # <<<<<<<<<<<<<<
 *                 # else:
 *                 #     triangle_right(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 */
        __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_self->menu_bar->outline->org), ((PyObject *)__pyx_v_menu_offset)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 129, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(3, 129, __pyx_L1_error)
        __pyx_t_2 = __pyx_f_6pyglui_2ui_tripple_v(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3), __pyx_v_tripple_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 129, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "src/pyglui/menus.pxi":128
 *             #self.minimize_corner.outline.sketch()
 *             if 2 == self.header_pos_id: #left
 *                 if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *                 # else:
 */
      }

      /* "src/pyglui/menus.pxi":127
 *                 self.minimize_corner.outline.compute(self.menu_bar.outline)
 *             #self.minimize_corner.outline.sketch()
 *             if 2 == self.header_pos_id: #left             # <<<<<<<<<<<<<<
 *                 if self.element_space.has_area():
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 */
      goto __pyx_L7;
    }

    /* "src/pyglui/menus.pxi":132
 *                 # else:
 *                 #     triangle_right(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *             elif 3 == self.header_pos_id: #right             # <<<<<<<<<<<<<<
 *                 if self.element_space.has_area():
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 */
    __pyx_t_6 = (3 == __pyx_v_self->header_pos_id);
    if (__pyx_t_6) {

      /* "src/pyglui/menus.pxi":133
 *                 #     triangle_right(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *             elif 3 == self.header_pos_id: #right
 *                 if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *                 else:
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->element_space->__pyx_vtab)->has_area(__pyx_v_self->element_space); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 133, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_6) {

        /* "src/pyglui/menus.pxi":134
 *             elif 3 == self.header_pos_id: #right
 *                 if self.element_space.has_area():
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)             # <<<<<<<<<<<<<<
 *                 else:
 *                     triangle_left(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 */
        __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_self->menu_bar->outline->org), ((PyObject *)__pyx_v_menu_offset)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(3, 134, __pyx_L1_error)
        __pyx_t_3 = __pyx_f_6pyglui_2ui_tripple_v(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), __pyx_v_tripple_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "src/pyglui/menus.pxi":133
 *                 #     triangle_right(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *             elif 3 == self.header_pos_id: #right
 *                 if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *                 else:
 */
        goto __pyx_L9;
      }

      /* "src/pyglui/menus.pxi":136
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *                 else:
 *                     triangle_left(self.menu_bar.outline.org+menu_offset,tripple_v_size)             # <<<<<<<<<<<<<<
 *             elif 0 == self.header_pos_id:  #top (botton not implemented)
 *                 if nested:
 */
      /*else*/ {
        __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_self->menu_bar->outline->org), ((PyObject *)__pyx_v_menu_offset)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 136, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(3, 136, __pyx_L1_error)
        __pyx_t_2 = __pyx_f_6pyglui_2ui_triangle_left(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3), __pyx_v_tripple_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 136, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_L9:;

      /* "src/pyglui/menus.pxi":132
 *                 # else:
 *                 #     triangle_right(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *             elif 3 == self.header_pos_id: #right             # <<<<<<<<<<<<<<
 *                 if self.element_space.has_area():
 *                     tripple_v(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 */
      goto __pyx_L7;
    }

    /* "src/pyglui/menus.pxi":137
 *                 else:
 *                     triangle_left(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *             elif 0 == self.header_pos_id:  #top (botton not implemented)             # <<<<<<<<<<<<<<
 *                 if nested:
 *                     menu_offset.x = 0
 */
    __pyx_t_6 = (0 == __pyx_v_self->header_pos_id);
    if (__pyx_t_6) {

      /* "src/pyglui/menus.pxi":138
 *                     triangle_left(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *             elif 0 == self.header_pos_id:  #top (botton not implemented)
 *                 if nested:             # <<<<<<<<<<<<<<
 *                     menu_offset.x = 0
 *                 if self.element_space.has_area():
 */
      if (__pyx_v_nested) {

        /* "src/pyglui/menus.pxi":139
 *             elif 0 == self.header_pos_id:  #top (botton not implemented)
 *                 if nested:
 *                     menu_offset.x = 0             # <<<<<<<<<<<<<<
 *                 if self.element_space.has_area():
 *                     tripple_h(self.menu_bar.outline.org+menu_offset,tripple_h_size)
 */
        __pyx_v_menu_offset->x = 0.0;

        /* "src/pyglui/menus.pxi":138
 *                     triangle_left(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *             elif 0 == self.header_pos_id:  #top (botton not implemented)
 *                 if nested:             # <<<<<<<<<<<<<<
 *                     menu_offset.x = 0
 *                 if self.element_space.has_area():
 */
      }

      /* "src/pyglui/menus.pxi":140
 *                 if nested:
 *                     menu_offset.x = 0
 *                 if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                     tripple_h(self.menu_bar.outline.org+menu_offset,tripple_h_size)
 *                 else:
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->element_space->__pyx_vtab)->has_area(__pyx_v_self->element_space); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 140, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_6) {

        /* "src/pyglui/menus.pxi":141
 *                     menu_offset.x = 0
 *                 if self.element_space.has_area():
 *                     tripple_h(self.menu_bar.outline.org+menu_offset,tripple_h_size)             # <<<<<<<<<<<<<<
 *                 else:
 *                     triangle_h(self.menu_bar.outline.org+menu_offset,tripple_h_size,RGBA(*color_line_default))
 */
        __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_self->menu_bar->outline->org), ((PyObject *)__pyx_v_menu_offset)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 141, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(3, 141, __pyx_L1_error)
        __pyx_t_3 = __pyx_f_6pyglui_2ui_tripple_h(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), __pyx_v_tripple_h_size, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 141, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "src/pyglui/menus.pxi":140
 *                 if nested:
 *                     menu_offset.x = 0
 *                 if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                     tripple_h(self.menu_bar.outline.org+menu_offset,tripple_h_size)
 *                 else:
 */
        goto __pyx_L11;
      }

      /* "src/pyglui/menus.pxi":143
 *                     tripple_h(self.menu_bar.outline.org+menu_offset,tripple_h_size)
 *                 else:
 *                     triangle_h(self.menu_bar.outline.org+menu_offset,tripple_h_size,RGBA(*color_line_default))             # <<<<<<<<<<<<<<
 * 
 *                 glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x+menu_topbar_text_x_org*ui_scale,
 */
      /*else*/ {
        __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_self->menu_bar->outline->org), ((PyObject *)__pyx_v_menu_offset)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(3, 143, __pyx_L1_error)
        __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __pyx_f_6pyglui_2ui_triangle_h(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3), __pyx_v_tripple_h_size, ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L11:;

      /* "src/pyglui/menus.pxi":146
 * 
 *                 glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x+menu_topbar_text_x_org*ui_scale,
 *                                  self.outline.org.y+menu_offset.y,self._label)             # <<<<<<<<<<<<<<
 *                 line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                      Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 */
      __pyx_t_1 = __pyx_v_self->__pyx_base._label;
      __Pyx_INCREF(__pyx_t_1);

      /* "src/pyglui/menus.pxi":145
 *                     triangle_h(self.menu_bar.outline.org+menu_offset,tripple_h_size,RGBA(*color_line_default))
 * 
 *                 glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x+menu_topbar_text_x_org*ui_scale,             # <<<<<<<<<<<<<<
 *                                  self.outline.org.y+menu_offset.y,self._label)
 *                 line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, ((__pyx_v_self->menu_bar->outline->org->x + __pyx_v_menu_offset->x) + (23.0 * __pyx_v_6pyglui_2ui_ui_scale)), (__pyx_v_self->__pyx_base.outline->org->y + __pyx_v_menu_offset->y), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":147
 *                 glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x+menu_topbar_text_x_org*ui_scale,
 *                                  self.outline.org.y+menu_offset.y,self._label)
 *                 line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),             # <<<<<<<<<<<<<<
 *                      Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                      RGBA(*menu_line))
 */
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->menu_bar->outline->org->x + __pyx_v_menu_offset->x)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->menu_bar->outline->org->y + __pyx_v_self->menu_bar->outline->size->y)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
      __pyx_t_2 = 0;
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":148
 *                                  self.outline.org.y+menu_offset.y,self._label)
 *                 line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                      Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),             # <<<<<<<<<<<<<<
 *                      RGBA(*menu_line))
 *             elif isinstance(self, Timeline_Menu):
 */
      __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_self->menu_bar->outline->org->x + __pyx_v_self->menu_bar->outline->size->x) - __pyx_v_menu_offset->x)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->menu_bar->outline->org->y + __pyx_v_self->menu_bar->outline->size->y)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "src/pyglui/menus.pxi":149
 *                 line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                      Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                      RGBA(*menu_line))             # <<<<<<<<<<<<<<
 *             elif isinstance(self, Timeline_Menu):
 *                 size = Vec2(2. * timelines_draggable_size * ui_scale, timelines_draggable_size * ui_scale)
 */
      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "src/pyglui/menus.pxi":147
 *                 glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x+menu_topbar_text_x_org*ui_scale,
 *                                  self.outline.org.y+menu_offset.y,self._label)
 *                 line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),             # <<<<<<<<<<<<<<
 *                      Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                      RGBA(*menu_line))
 */
      __pyx_t_3 = __pyx_f_6pyglui_2ui_line(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":137
 *                 else:
 *                     triangle_left(self.menu_bar.outline.org+menu_offset,tripple_v_size)
 *             elif 0 == self.header_pos_id:  #top (botton not implemented)             # <<<<<<<<<<<<<<
 *                 if nested:
 *                     menu_offset.x = 0
 */
      goto __pyx_L7;
    }

    /* "src/pyglui/menus.pxi":150
 *                      Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                      RGBA(*menu_line))
 *             elif isinstance(self, Timeline_Menu):             # <<<<<<<<<<<<<<
 *                 size = Vec2(2. * timelines_draggable_size * ui_scale, timelines_draggable_size * ui_scale)
 *                 org = Vec2(*self.menu_bar.outline.center) - size / 2.
 */
    __pyx_t_6 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6pyglui_2ui_Timeline_Menu); 
    if (__pyx_t_6) {

      /* "src/pyglui/menus.pxi":151
 *                      RGBA(*menu_line))
 *             elif isinstance(self, Timeline_Menu):
 *                 size = Vec2(2. * timelines_draggable_size * ui_scale, timelines_draggable_size * ui_scale)             # <<<<<<<<<<<<<<
 *                 org = Vec2(*self.menu_bar.outline.center) - size / 2.
 *                 border_color = RGBA(*color_line_default)
 */
      __pyx_t_3 = PyFloat_FromDouble(((2. * 20.0) * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = PyFloat_FromDouble((20.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
      __pyx_t_3 = 0;
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "src/pyglui/menus.pxi":152
 *             elif isinstance(self, Timeline_Menu):
 *                 size = Vec2(2. * timelines_draggable_size * ui_scale, timelines_draggable_size * ui_scale)
 *                 org = Vec2(*self.menu_bar.outline.center) - size / 2.             # <<<<<<<<<<<<<<
 *                 border_color = RGBA(*color_line_default)
 * 
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->menu_bar->outline), __pyx_n_s_center); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyNumber_Divide(((PyObject *)__pyx_v_size), __pyx_float_2_); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Subtract(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_org = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":153
 *                 size = Vec2(2. * timelines_draggable_size * ui_scale, timelines_draggable_size * ui_scale)
 *                 org = Vec2(*self.menu_bar.outline.center) - size / 2.
 *                 border_color = RGBA(*color_line_default)             # <<<<<<<<<<<<<<
 * 
 *                 gl.glColor4f(border_color.r, border_color.g, border_color.b, border_color.a)
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_border_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":155
 *                 border_color = RGBA(*color_line_default)
 * 
 *                 gl.glColor4f(border_color.r, border_color.g, border_color.b, border_color.a)             # <<<<<<<<<<<<<<
 * 
 *                 line_w = 2. * ui_scale
 */
      glColor4f(__pyx_v_border_color->r, __pyx_v_border_color->g, __pyx_v_border_color->b, __pyx_v_border_color->a);

      /* "src/pyglui/menus.pxi":157
 *                 gl.glColor4f(border_color.r, border_color.g, border_color.b, border_color.a)
 * 
 *                 line_w = 2. * ui_scale             # <<<<<<<<<<<<<<
 *                 gl.glLineWidth(line_w)
 *                 gl.glBegin(gl.GL_LINES)
 */
      __pyx_v_line_w = (2. * __pyx_v_6pyglui_2ui_ui_scale);

      /* "src/pyglui/menus.pxi":158
 * 
 *                 line_w = 2. * ui_scale
 *                 gl.glLineWidth(line_w)             # <<<<<<<<<<<<<<
 *                 gl.glBegin(gl.GL_LINES)
 *                 gl.glVertex3f(org.x, org.y + size.y / 4, 0)
 */
      glLineWidth(__pyx_v_line_w);

      /* "src/pyglui/menus.pxi":159
 *                 line_w = 2. * ui_scale
 *                 gl.glLineWidth(line_w)
 *                 gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *                 gl.glVertex3f(org.x, org.y + size.y / 4, 0)
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 4, 0)
 */
      glBegin(GL_LINES);

      /* "src/pyglui/menus.pxi":160
 *                 gl.glLineWidth(line_w)
 *                 gl.glBegin(gl.GL_LINES)
 *                 gl.glVertex3f(org.x, org.y + size.y / 4, 0)             # <<<<<<<<<<<<<<
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 4, 0)
 *                 gl.glVertex3f(org.x, org.y + size.y / 2, 0)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_org, __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_8 == ((GLfloat)-1)) && PyErr_Occurred())) __PYX_ERR(3, 160, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_org, __pyx_n_s_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_size->y / 4.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_9 == ((GLfloat)-1)) && PyErr_Occurred())) __PYX_ERR(3, 160, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      glVertex3f(__pyx_t_8, __pyx_t_9, 0.0);

      /* "src/pyglui/menus.pxi":161
 *                 gl.glBegin(gl.GL_LINES)
 *                 gl.glVertex3f(org.x, org.y + size.y / 4, 0)
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 4, 0)             # <<<<<<<<<<<<<<
 *                 gl.glVertex3f(org.x, org.y + size.y / 2, 0)
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 2, 0)
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_org, __pyx_n_s_x); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_size->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_9 == ((GLfloat)-1)) && PyErr_Occurred())) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_org, __pyx_n_s_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_size->y / 4.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_8 == ((GLfloat)-1)) && PyErr_Occurred())) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      glVertex3f(__pyx_t_9, __pyx_t_8, 0.0);

      /* "src/pyglui/menus.pxi":162
 *                 gl.glVertex3f(org.x, org.y + size.y / 4, 0)
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 4, 0)
 *                 gl.glVertex3f(org.x, org.y + size.y / 2, 0)             # <<<<<<<<<<<<<<
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 2, 0)
 *                 gl.glEnd()
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_org, __pyx_n_s_x); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_8 == ((GLfloat)-1)) && PyErr_Occurred())) __PYX_ERR(3, 162, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_org, __pyx_n_s_y); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_size->y / 2.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_9 == ((GLfloat)-1)) && PyErr_Occurred())) __PYX_ERR(3, 162, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      glVertex3f(__pyx_t_8, __pyx_t_9, 0.0);

      /* "src/pyglui/menus.pxi":163
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 4, 0)
 *                 gl.glVertex3f(org.x, org.y + size.y / 2, 0)
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 2, 0)             # <<<<<<<<<<<<<<
 *                 gl.glEnd()
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_org, __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_size->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_9 == ((GLfloat)-1)) && PyErr_Occurred())) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_org, __pyx_n_s_y); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_size->y / 2.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_8 == ((GLfloat)-1)) && PyErr_Occurred())) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      glVertex3f(__pyx_t_9, __pyx_t_8, 0.0);

      /* "src/pyglui/menus.pxi":164
 *                 gl.glVertex3f(org.x, org.y + size.y / 2, 0)
 *                 gl.glVertex3f(org.x + size.x, org.y + size.y / 2, 0)
 *                 gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 *                 line_w *= 2
 */
      glEnd();

      /* "src/pyglui/menus.pxi":166
 *                 gl.glEnd()
 * 
 *                 line_w *= 2             # <<<<<<<<<<<<<<
 *                 gl.glLineWidth(line_w)
 *                 gl.glBegin(gl.GL_LINES)
 */
      __pyx_v_line_w = (__pyx_v_line_w * 2.0);

      /* "src/pyglui/menus.pxi":167
 * 
 *                 line_w *= 2
 *                 gl.glLineWidth(line_w)             # <<<<<<<<<<<<<<
 *                 gl.glBegin(gl.GL_LINES)
 *                 gl.glVertex3f(self.element_space.org.x, self.element_space.org.y - line_w / 2, 0)
 */
      glLineWidth(__pyx_v_line_w);

      /* "src/pyglui/menus.pxi":168
 *                 line_w *= 2
 *                 gl.glLineWidth(line_w)
 *                 gl.glBegin(gl.GL_LINES)             # <<<<<<<<<<<<<<
 *                 gl.glVertex3f(self.element_space.org.x, self.element_space.org.y - line_w / 2, 0)
 *                 gl.glVertex3f(self.element_space.org.x + self.element_space.size.x,
 */
      glBegin(GL_LINES);

      /* "src/pyglui/menus.pxi":169
 *                 gl.glLineWidth(line_w)
 *                 gl.glBegin(gl.GL_LINES)
 *                 gl.glVertex3f(self.element_space.org.x, self.element_space.org.y - line_w / 2, 0)             # <<<<<<<<<<<<<<
 *                 gl.glVertex3f(self.element_space.org.x + self.element_space.size.x,
 *                               self.element_space.org.y - line_w / 2, 0)
 */
      glVertex3f(__pyx_v_self->element_space->org->x, (__pyx_v_self->element_space->org->y - (__pyx_v_line_w / 2.0)), 0.0);

      /* "src/pyglui/menus.pxi":170
 *                 gl.glBegin(gl.GL_LINES)
 *                 gl.glVertex3f(self.element_space.org.x, self.element_space.org.y - line_w / 2, 0)
 *                 gl.glVertex3f(self.element_space.org.x + self.element_space.size.x,             # <<<<<<<<<<<<<<
 *                               self.element_space.org.y - line_w / 2, 0)
 *                 gl.glEnd()
 */
      glVertex3f((__pyx_v_self->element_space->org->x + __pyx_v_self->element_space->size->x), (__pyx_v_self->element_space->org->y - (__pyx_v_line_w / 2.0)), 0.0);

      /* "src/pyglui/menus.pxi":172
 *                 gl.glVertex3f(self.element_space.org.x + self.element_space.size.x,
 *                               self.element_space.org.y - line_w / 2, 0)
 *                 gl.glEnd()             # <<<<<<<<<<<<<<
 * 
 * 
 */
      glEnd();

      /* "src/pyglui/menus.pxi":150
 *                      Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                      RGBA(*menu_line))
 *             elif isinstance(self, Timeline_Menu):             # <<<<<<<<<<<<<<
 *                 size = Vec2(2. * timelines_draggable_size * ui_scale, timelines_draggable_size * ui_scale)
 *                 org = Vec2(*self.menu_bar.outline.center) - size / 2.
 */
      goto __pyx_L7;
    }

    /* "src/pyglui/menus.pxi":175
 * 
 * 
 *             elif 5 == self.header_pos_id:  #headline             # <<<<<<<<<<<<<<
 *                 if not self.collapsed:
 *                     glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x,
 */
    __pyx_t_6 = (5 == __pyx_v_self->header_pos_id);
    if (__pyx_t_6) {

      /* "src/pyglui/menus.pxi":176
 * 
 *             elif 5 == self.header_pos_id:  #headline
 *                 if not self.collapsed:             # <<<<<<<<<<<<<<
 *                     glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x,
 *                                      self.outline.org.y+menu_offset.y,self._label)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 176, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = (!__pyx_t_6);
      if (__pyx_t_10) {

        /* "src/pyglui/menus.pxi":178
 *                 if not self.collapsed:
 *                     glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x,
 *                                      self.outline.org.y+menu_offset.y,self._label)             # <<<<<<<<<<<<<<
 *                     line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                          Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 */
        __pyx_t_3 = __pyx_v_self->__pyx_base._label;
        __Pyx_INCREF(__pyx_t_3);

        /* "src/pyglui/menus.pxi":177
 *             elif 5 == self.header_pos_id:  #headline
 *                 if not self.collapsed:
 *                     glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x,             # <<<<<<<<<<<<<<
 *                                      self.outline.org.y+menu_offset.y,self._label)
 *                     line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 */
        __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context *)__pyx_v_6pyglui_2ui_glfont->__pyx_vtab)->draw_text(__pyx_v_6pyglui_2ui_glfont, (__pyx_v_self->menu_bar->outline->org->x + __pyx_v_menu_offset->x), (__pyx_v_self->__pyx_base.outline->org->y + __pyx_v_menu_offset->y), __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 177, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "src/pyglui/menus.pxi":179
 *                     glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x,
 *                                      self.outline.org.y+menu_offset.y,self._label)
 *                     line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),             # <<<<<<<<<<<<<<
 *                          Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                          RGBA(*menu_line))
 */
        __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->menu_bar->outline->org->x + __pyx_v_menu_offset->x)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->menu_bar->outline->org->y + __pyx_v_self->menu_bar->outline->size->y)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
        __pyx_t_2 = 0;
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "src/pyglui/menus.pxi":180
 *                                      self.outline.org.y+menu_offset.y,self._label)
 *                     line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                          Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),             # <<<<<<<<<<<<<<
 *                          RGBA(*menu_line))
 * 
 */
        __pyx_t_7 = PyFloat_FromDouble(((__pyx_v_self->menu_bar->outline->org->x + __pyx_v_self->menu_bar->outline->size->x) - __pyx_v_menu_offset->x)); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 180, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->menu_bar->outline->org->y + __pyx_v_self->menu_bar->outline->size->y)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 180, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 180, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
        __pyx_t_7 = 0;
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 180, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "src/pyglui/menus.pxi":181
 *                     line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                          Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                          RGBA(*menu_line))             # <<<<<<<<<<<<<<
 * 
 *             # (botton not implemented)
 */
        __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "src/pyglui/menus.pxi":179
 *                     glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x,
 *                                      self.outline.org.y+menu_offset.y,self._label)
 *                     line(Vec2(self.menu_bar.outline.org.x+menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),             # <<<<<<<<<<<<<<
 *                          Vec2(self.menu_bar.outline.org.x+self.menu_bar.outline.size.x-menu_offset.x,self.menu_bar.outline.org.y+self.menu_bar.outline.size.y),
 *                          RGBA(*menu_line))
 */
        __pyx_t_7 = __pyx_f_6pyglui_2ui_line(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "src/pyglui/menus.pxi":176
 * 
 *             elif 5 == self.header_pos_id:  #headline
 *                 if not self.collapsed:             # <<<<<<<<<<<<<<
 *                     glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x,
 *                                      self.outline.org.y+menu_offset.y,self._label)
 */
      }

      /* "src/pyglui/menus.pxi":175
 * 
 * 
 *             elif 5 == self.header_pos_id:  #headline             # <<<<<<<<<<<<<<
 *                 if not self.collapsed:
 *                     glfont.draw_text(self.menu_bar.outline.org.x+menu_offset.x,
 */
    }
    __pyx_L7:;

    /* "src/pyglui/menus.pxi":122
 *             tripple_d(self.resize_corner.outline.org,self.resize_corner.outline.size)
 * 
 *         if self.menu_bar is not None:             # <<<<<<<<<<<<<<
 *             self.menu_bar.outline.compute(self.outline)
 *             if self.minimize_corner is not None:
 */
  }

  /* "src/pyglui/menus.pxi":94
 * 
 * 
 *     cdef draw_menu(self,bint nested):             # <<<<<<<<<<<<<<
 *         #draw translucent background
 *         cdef Vec2 tripple_h_size = Vec2(menu_move_corner_width*ui_scale,menu_move_corner_height*ui_scale)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF((PyObject *)__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.draw_menu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tripple_h_size);
  __Pyx_XDECREF((PyObject *)__pyx_v_tripple_v_size);
  __Pyx_XDECREF((PyObject *)__pyx_v_menu_offset);
  __Pyx_XDECREF((PyObject *)__pyx_v_size);
  __Pyx_XDECREF(__pyx_v_org);
  __Pyx_XDECREF((PyObject *)__pyx_v_border_color);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":184
 * 
 *             # (botton not implemented)
 *     def collect_in_window(self,FitBox window):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if self.outline.design_org.x > 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_23collect_in_window(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Base_Menu_23collect_in_window = {"collect_in_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_23collect_in_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_23collect_in_window(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_window = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("collect_in_window (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_window,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_window,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 184, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "collect_in_window") < 0)) __PYX_ERR(3, 184, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_window = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("collect_in_window", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 184, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.collect_in_window", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), __pyx_ptype_6pyglui_2ui_FitBox, 1, "window", 0))) __PYX_ERR(3, 184, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_22collect_in_window(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), __pyx_v_window);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_22collect_in_window(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_window) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  double __pyx_t_2;
  float __pyx_t_3;
  double __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("collect_in_window", 0);

  /* "src/pyglui/menus.pxi":186
 *     def collect_in_window(self,FitBox window):
 *         global should_redraw
 *         if self.outline.design_org.x > 0:             # <<<<<<<<<<<<<<
 *             self.outline.design_org.x = min(self.outline.design_org.x, window.size.x/ui_scale-100)
 *             should_redraw = True
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.outline->design_org->x > 0.0);
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":187
 *         global should_redraw
 *         if self.outline.design_org.x > 0:
 *             self.outline.design_org.x = min(self.outline.design_org.x, window.size.x/ui_scale-100)             # <<<<<<<<<<<<<<
 *             should_redraw = True
 *         if self.outline.design_org.y > 0:
 */
    if (unlikely(__pyx_v_6pyglui_2ui_ui_scale == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(3, 187, __pyx_L1_error)
    }
    __pyx_t_2 = ((((double)__pyx_v_window->size->x) / __pyx_v_6pyglui_2ui_ui_scale) - 100.0);
    __pyx_t_3 = __pyx_v_self->__pyx_base.outline->design_org->x;
    if ((__pyx_t_2 < __pyx_t_3)) {
      __pyx_t_4 = __pyx_t_2;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_v_self->__pyx_base.outline->design_org->x = __pyx_t_4;

    /* "src/pyglui/menus.pxi":188
 *         if self.outline.design_org.x > 0:
 *             self.outline.design_org.x = min(self.outline.design_org.x, window.size.x/ui_scale-100)
 *             should_redraw = True             # <<<<<<<<<<<<<<
 *         if self.outline.design_org.y > 0:
 *             self.outline.design_org.y = min(self.outline.design_org.y, window.size.y/ui_scale-100)
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/menus.pxi":186
 *     def collect_in_window(self,FitBox window):
 *         global should_redraw
 *         if self.outline.design_org.x > 0:             # <<<<<<<<<<<<<<
 *             self.outline.design_org.x = min(self.outline.design_org.x, window.size.x/ui_scale-100)
 *             should_redraw = True
 */
  }

  /* "src/pyglui/menus.pxi":189
 *             self.outline.design_org.x = min(self.outline.design_org.x, window.size.x/ui_scale-100)
 *             should_redraw = True
 *         if self.outline.design_org.y > 0:             # <<<<<<<<<<<<<<
 *             self.outline.design_org.y = min(self.outline.design_org.y, window.size.y/ui_scale-100)
 *             should_redraw = True
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.outline->design_org->y > 0.0);
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":190
 *             should_redraw = True
 *         if self.outline.design_org.y > 0:
 *             self.outline.design_org.y = min(self.outline.design_org.y, window.size.y/ui_scale-100)             # <<<<<<<<<<<<<<
 *             should_redraw = True
 *         if self.outline.design_org.x < 0:
 */
    if (unlikely(__pyx_v_6pyglui_2ui_ui_scale == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(3, 190, __pyx_L1_error)
    }
    __pyx_t_4 = ((((double)__pyx_v_window->size->y) / __pyx_v_6pyglui_2ui_ui_scale) - 100.0);
    __pyx_t_3 = __pyx_v_self->__pyx_base.outline->design_org->y;
    if ((__pyx_t_4 < __pyx_t_3)) {
      __pyx_t_2 = __pyx_t_4;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    __pyx_v_self->__pyx_base.outline->design_org->y = __pyx_t_2;

    /* "src/pyglui/menus.pxi":191
 *         if self.outline.design_org.y > 0:
 *             self.outline.design_org.y = min(self.outline.design_org.y, window.size.y/ui_scale-100)
 *             should_redraw = True             # <<<<<<<<<<<<<<
 *         if self.outline.design_org.x < 0:
 *             self.outline.design_org.x = max(self.outline.design_org.x, -1* window.size.x/ui_scale-100)
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/menus.pxi":189
 *             self.outline.design_org.x = min(self.outline.design_org.x, window.size.x/ui_scale-100)
 *             should_redraw = True
 *         if self.outline.design_org.y > 0:             # <<<<<<<<<<<<<<
 *             self.outline.design_org.y = min(self.outline.design_org.y, window.size.y/ui_scale-100)
 *             should_redraw = True
 */
  }

  /* "src/pyglui/menus.pxi":192
 *             self.outline.design_org.y = min(self.outline.design_org.y, window.size.y/ui_scale-100)
 *             should_redraw = True
 *         if self.outline.design_org.x < 0:             # <<<<<<<<<<<<<<
 *             self.outline.design_org.x = max(self.outline.design_org.x, -1* window.size.x/ui_scale-100)
 *             should_redraw = True
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.outline->design_org->x < 0.0);
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":193
 *             should_redraw = True
 *         if self.outline.design_org.x < 0:
 *             self.outline.design_org.x = max(self.outline.design_org.x, -1* window.size.x/ui_scale-100)             # <<<<<<<<<<<<<<
 *             should_redraw = True
 *         if self.outline.design_org.y < 0:
 */
    __pyx_t_3 = (-1.0 * __pyx_v_window->size->x);
    if (unlikely(__pyx_v_6pyglui_2ui_ui_scale == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(3, 193, __pyx_L1_error)
    }
    __pyx_t_2 = ((((double)__pyx_t_3) / __pyx_v_6pyglui_2ui_ui_scale) - 100.0);
    __pyx_t_3 = __pyx_v_self->__pyx_base.outline->design_org->x;
    if ((__pyx_t_2 > __pyx_t_3)) {
      __pyx_t_4 = __pyx_t_2;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_v_self->__pyx_base.outline->design_org->x = __pyx_t_4;

    /* "src/pyglui/menus.pxi":194
 *         if self.outline.design_org.x < 0:
 *             self.outline.design_org.x = max(self.outline.design_org.x, -1* window.size.x/ui_scale-100)
 *             should_redraw = True             # <<<<<<<<<<<<<<
 *         if self.outline.design_org.y < 0:
 *             self.outline.design_org.y = min(self.outline.design_org.y, -1* window.size.y/ui_scale-100)
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/menus.pxi":192
 *             self.outline.design_org.y = min(self.outline.design_org.y, window.size.y/ui_scale-100)
 *             should_redraw = True
 *         if self.outline.design_org.x < 0:             # <<<<<<<<<<<<<<
 *             self.outline.design_org.x = max(self.outline.design_org.x, -1* window.size.x/ui_scale-100)
 *             should_redraw = True
 */
  }

  /* "src/pyglui/menus.pxi":195
 *             self.outline.design_org.x = max(self.outline.design_org.x, -1* window.size.x/ui_scale-100)
 *             should_redraw = True
 *         if self.outline.design_org.y < 0:             # <<<<<<<<<<<<<<
 *             self.outline.design_org.y = min(self.outline.design_org.y, -1* window.size.y/ui_scale-100)
 *             should_redraw = True
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.outline->design_org->y < 0.0);
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":196
 *             should_redraw = True
 *         if self.outline.design_org.y < 0:
 *             self.outline.design_org.y = min(self.outline.design_org.y, -1* window.size.y/ui_scale-100)             # <<<<<<<<<<<<<<
 *             should_redraw = True
 * 
 */
    __pyx_t_3 = (-1.0 * __pyx_v_window->size->y);
    if (unlikely(__pyx_v_6pyglui_2ui_ui_scale == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(3, 196, __pyx_L1_error)
    }
    __pyx_t_4 = ((((double)__pyx_t_3) / __pyx_v_6pyglui_2ui_ui_scale) - 100.0);
    __pyx_t_3 = __pyx_v_self->__pyx_base.outline->design_org->y;
    if ((__pyx_t_4 < __pyx_t_3)) {
      __pyx_t_2 = __pyx_t_4;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    __pyx_v_self->__pyx_base.outline->design_org->y = __pyx_t_2;

    /* "src/pyglui/menus.pxi":197
 *         if self.outline.design_org.y < 0:
 *             self.outline.design_org.y = min(self.outline.design_org.y, -1* window.size.y/ui_scale-100)
 *             should_redraw = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/menus.pxi":195
 *             self.outline.design_org.x = max(self.outline.design_org.x, -1* window.size.x/ui_scale-100)
 *             should_redraw = True
 *         if self.outline.design_org.y < 0:             # <<<<<<<<<<<<<<
 *             self.outline.design_org.y = min(self.outline.design_org.y, -1* window.size.y/ui_scale-100)
 *             should_redraw = True
 */
  }

  /* "src/pyglui/menus.pxi":184
 * 
 *             # (botton not implemented)
 *     def collect_in_window(self,FitBox window):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if self.outline.design_org.x > 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.collect_in_window", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":13
 *     """
 * 
 *     cdef public list elements             # <<<<<<<<<<<<<<
 *     cdef FitBox element_space
 *     cdef readonly int header_pos_id
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_8elements_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_8elements_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_8elements___get__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_8elements___get__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->elements);
  __pyx_r = __pyx_v_self->elements;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Base_Menu_8elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Base_Menu_8elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_8elements_2__set__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Base_Menu_8elements_2__set__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(3, 13, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->elements);
  __Pyx_DECREF(__pyx_v_self->elements);
  __pyx_v_self->elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.elements.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Base_Menu_8elements_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Base_Menu_8elements_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_8elements_4__del__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Base_Menu_8elements_4__del__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->elements);
  __Pyx_DECREF(__pyx_v_self->elements);
  __pyx_v_self->elements = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":15
 *     cdef public list elements
 *     cdef FitBox element_space
 *     cdef readonly int header_pos_id             # <<<<<<<<<<<<<<
 *     cdef Draggable menu_bar,minimize_corner, resize_corner
 *     cdef public RGBA color
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_13header_pos_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_13header_pos_id_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_13header_pos_id___get__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_13header_pos_id___get__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->header_pos_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.header_pos_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":17
 *     cdef readonly int header_pos_id
 *     cdef Draggable menu_bar,minimize_corner, resize_corner
 *     cdef public RGBA color             # <<<<<<<<<<<<<<
 * 
 *     cpdef sync(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_5color_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_5color_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_5color___get__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_5color___get__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->color);
  __pyx_r = ((PyObject *)__pyx_v_self->color);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Base_Menu_5color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Base_Menu_5color_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_5color_2__set__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Base_Menu_5color_2__set__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(3, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->color);
  __pyx_v_self->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.color.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Base_Menu_5color_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Base_Menu_5color_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_5color_4__del__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Base_Menu_5color_4__del__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->color);
  __pyx_v_self->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Base_Menu_25__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_24__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_24__reduce_cython__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._label, self._order, self._read_only, self.color, self.element_space, self.elements, self.header_pos_id, self.menu_bar, self.minimize_corner, self.outline, self.resize_corner, self.uid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->__pyx_base._order); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base._read_only); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->header_pos_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(12); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._label);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._label);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->__pyx_base._label);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->color);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->color);
  PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_v_self->color));
  __Pyx_INCREF((PyObject *)__pyx_v_self->element_space);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->element_space);
  PyTuple_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_v_self->element_space));
  __Pyx_INCREF(__pyx_v_self->elements);
  __Pyx_GIVEREF(__pyx_v_self->elements);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->elements);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_t_3);
  __Pyx_INCREF((PyObject *)__pyx_v_self->menu_bar);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->menu_bar);
  PyTuple_SET_ITEM(__pyx_t_4, 7, ((PyObject *)__pyx_v_self->menu_bar));
  __Pyx_INCREF((PyObject *)__pyx_v_self->minimize_corner);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->minimize_corner);
  PyTuple_SET_ITEM(__pyx_t_4, 8, ((PyObject *)__pyx_v_self->minimize_corner));
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.outline);
  PyTuple_SET_ITEM(__pyx_t_4, 9, ((PyObject *)__pyx_v_self->__pyx_base.outline));
  __Pyx_INCREF((PyObject *)__pyx_v_self->resize_corner);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->resize_corner);
  PyTuple_SET_ITEM(__pyx_t_4, 10, ((PyObject *)__pyx_v_self->resize_corner));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.uid);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.uid);
  PyTuple_SET_ITEM(__pyx_t_4, 11, __pyx_v_self->__pyx_base.uid);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._label, self._order, self._read_only, self.color, self.element_space, self.elements, self.header_pos_id, self.menu_bar, self.minimize_corner, self.outline, self.resize_corner, self.uid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v__dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":7
 *     state = (self._label, self._order, self._read_only, self.color, self.element_space, self.elements, self.header_pos_id, self.menu_bar, self.minimize_corner, self.outline, self.resize_corner, self.uid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_5 = (__pyx_v__dict != Py_None);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._label, self._order, self._read_only, self.color, self.element_space, self.elements, self.header_pos_id, self.menu_bar, self.minimize_corner, self.outline, self.resize_corner, self.uid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, None), state
 */
  /*else*/ {
    __pyx_t_6 = (__pyx_v_self->__pyx_base._label != ((PyObject*)Py_None));
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->color) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->element_space) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->elements != ((PyObject*)Py_None));
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->menu_bar) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->minimize_corner) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.outline) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->resize_corner) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->__pyx_base.uid != Py_None);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Base_Menu); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_150088119);
    __Pyx_GIVEREF(__pyx_int_150088119);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_150088119);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, None), state
 *     else:
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Base_Menu__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Base_Menu); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_150088119);
    __Pyx_GIVEREF(__pyx_int_150088119);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_150088119);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Base_Menu__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Base_Menu_27__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Base_Menu_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Base_Menu_26__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Base_Menu_26__setstate_cython__(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Base_Menu__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pyglui_2ui___pyx_unpickle_Base_Menu__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Base_Menu__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Base_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":207
 * 
 *     property header_pos:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             header_pos_list = ['top','bottom','left','right','hidden','headline']
 *             return header_pos_list[self.header_pos_id]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Movable_Menu_10header_pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_12Movable_Menu_10header_pos_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Movable_Menu_10header_pos___get__(((struct __pyx_obj_6pyglui_2ui_Movable_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Movable_Menu_10header_pos___get__(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v_self) {
  PyObject *__pyx_v_header_pos_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":208
 *     property header_pos:
 *         def __get__(self):
 *             header_pos_list = ['top','bottom','left','right','hidden','headline']             # <<<<<<<<<<<<<<
 *             return header_pos_list[self.header_pos_id]
 * 
 */
  __pyx_t_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_top);
  __Pyx_GIVEREF(__pyx_n_u_top);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_top);
  __Pyx_INCREF(__pyx_n_u_bottom);
  __Pyx_GIVEREF(__pyx_n_u_bottom);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_bottom);
  __Pyx_INCREF(__pyx_n_u_left);
  __Pyx_GIVEREF(__pyx_n_u_left);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_left);
  __Pyx_INCREF(__pyx_n_u_right);
  __Pyx_GIVEREF(__pyx_n_u_right);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_right);
  __Pyx_INCREF(__pyx_n_u_hidden);
  __Pyx_GIVEREF(__pyx_n_u_hidden);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_u_hidden);
  __Pyx_INCREF(__pyx_n_u_headline);
  __Pyx_GIVEREF(__pyx_n_u_headline);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_u_headline);
  __pyx_v_header_pos_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":209
 *         def __get__(self):
 *             header_pos_list = ['top','bottom','left','right','hidden','headline']
 *             return header_pos_list[self.header_pos_id]             # <<<<<<<<<<<<<<
 * 
 *         def __set__(self, header_pos):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_header_pos_list, __pyx_v_self->__pyx_base.header_pos_id, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":207
 * 
 *     property header_pos:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             header_pos_list = ['top','bottom','left','right','hidden','headline']
 *             return header_pos_list[self.header_pos_id]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Movable_Menu.header_pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_header_pos_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":211
 *             return header_pos_list[self.header_pos_id]
 * 
 *         def __set__(self, header_pos):             # <<<<<<<<<<<<<<
 *             #if the menu position is user changable we want the dragable to catch the input. This is good of user interaction
 *             cdef bint catch_input =  bool(self.outline.design_org.x or self.outline.design_org.y)
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Movable_Menu_10header_pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_header_pos); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Movable_Menu_10header_pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_header_pos) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Movable_Menu_10header_pos_2__set__(((struct __pyx_obj_6pyglui_2ui_Movable_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_header_pos));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Movable_Menu_10header_pos_2__set__(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v_self, PyObject *__pyx_v_header_pos) {
  int __pyx_v_catch_input;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":213
 *         def __set__(self, header_pos):
 *             #if the menu position is user changable we want the dragable to catch the input. This is good of user interaction
 *             cdef bint catch_input =  bool(self.outline.design_org.x or self.outline.design_org.y)             # <<<<<<<<<<<<<<
 * 
 *             if header_pos == 'top':
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.outline->design_org->x != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.outline->design_org->y != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_v_catch_input = (!(!__pyx_t_1));

  /* "src/pyglui/menus.pxi":215
 *             cdef bint catch_input =  bool(self.outline.design_org.x or self.outline.design_org.y)
 * 
 *             if header_pos == 'top':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_topbar_pad),Vec2(-menu_pad,-menu_pad- menu_bottom_pad))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_header_pos, __pyx_n_u_top, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 215, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":216
 * 
 *             if header_pos == 'top':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_topbar_pad),Vec2(-menu_pad,-menu_pad- menu_bottom_pad))             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                             self.outline.design_org,
 */
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyFloat_FromDouble((-10.0 - 20.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_float_neg_10_0);
    __Pyx_GIVEREF(__pyx_float_neg_10_0);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_float_neg_10_0);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":217
 *             if header_pos == 'top':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_topbar_pad),Vec2(-menu_pad,-menu_pad- menu_bottom_pad))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "src/pyglui/menus.pxi":218
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_topbar_pad),Vec2(-menu_pad,-menu_pad- menu_bottom_pad))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                             self.outline.design_org,             # <<<<<<<<<<<<<<
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input )
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org));
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":219
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,             # <<<<<<<<<<<<<<
 *                                             catch_input = catch_input )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 */
    __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 219, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 219, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":220
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input )             # <<<<<<<<<<<<<<
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,
 */
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_catch_input, __pyx_t_4) < 0) __PYX_ERR(3, 219, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":217
 *             if header_pos == 'top':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_topbar_pad),Vec2(-menu_pad,-menu_pad- menu_bottom_pad))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __pyx_v_self->__pyx_base.menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":221
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "src/pyglui/menus.pxi":222
 *                                             catch_input = catch_input )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,             # <<<<<<<<<<<<<<
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org));
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":223
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,             # <<<<<<<<<<<<<<
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 if self.outline.design_size.x:
 */
    __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 223, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 223, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":224
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )             # <<<<<<<<<<<<<<
 *                 if self.outline.design_size.x:
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toggle_iconified); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_click_cb, __pyx_t_4) < 0) __PYX_ERR(3, 223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_catch_input, __pyx_t_4) < 0) __PYX_ERR(3, 223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":221
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
    __pyx_v_self->__pyx_base.minimize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":225
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 if self.outline.design_size.x:             # <<<<<<<<<<<<<<
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 *                                                 self.outline.design_size,
 */
    __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base.outline->design_size->x != 0);
    if (__pyx_t_1) {

      /* "src/pyglui/menus.pxi":226
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 if self.outline.design_size.x:
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                                 self.outline.design_size,
 *                                                 arrest_axis=0,zero_crossing = False)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "src/pyglui/menus.pxi":227
 *                 if self.outline.design_size.x:
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 *                                                 self.outline.design_size,             # <<<<<<<<<<<<<<
 *                                                 arrest_axis=0,zero_crossing = False)
 *                 else:
 */
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size);
      PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size));
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":228
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 *                                                 self.outline.design_size,
 *                                                 arrest_axis=0,zero_crossing = False)             # <<<<<<<<<<<<<<
 *                 else:
 *                     self.resize_corner = None
 */
      __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 228, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 228, __pyx_L1_error)

      /* "src/pyglui/menus.pxi":226
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 if self.outline.design_size.x:
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                                 self.outline.design_size,
 *                                                 arrest_axis=0,zero_crossing = False)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
      __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
      __pyx_v_self->__pyx_base.resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":225
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 if self.outline.design_size.x:             # <<<<<<<<<<<<<<
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 *                                                 self.outline.design_size,
 */
      goto __pyx_L6;
    }

    /* "src/pyglui/menus.pxi":230
 *                                                 arrest_axis=0,zero_crossing = False)
 *                 else:
 *                     self.resize_corner = None             # <<<<<<<<<<<<<<
 * 
 *             elif header_pos == 'bottom':
 */
    /*else*/ {
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
      __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
      __pyx_v_self->__pyx_base.resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None);
    }
    __pyx_L6:;

    /* "src/pyglui/menus.pxi":215
 *             cdef bint catch_input =  bool(self.outline.design_org.x or self.outline.design_org.y)
 * 
 *             if header_pos == 'top':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_topbar_pad),Vec2(-menu_pad,-menu_pad- menu_bottom_pad))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 */
    goto __pyx_L5;
  }

  /* "src/pyglui/menus.pxi":232
 *                     self.resize_corner = None
 * 
 *             elif header_pos == 'bottom':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_bottom_pad + menu_pad),Vec2(-menu_pad,-menu_pad- menu_topbar_pad))
 *                 self.menu_bar = Draggable(Vec2(0,-menu_pad),Vec2(0,0),
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_header_pos, __pyx_n_u_bottom, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 232, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":233
 * 
 *             elif header_pos == 'bottom':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_bottom_pad + menu_pad),Vec2(-menu_pad,-menu_pad- menu_topbar_pad))             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(0,-menu_pad),Vec2(0,0),
 *                                             self.outline.design_size,
 */
    __pyx_t_4 = PyFloat_FromDouble((20.0 + 10.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_float_10_0);
    __Pyx_GIVEREF(__pyx_float_10_0);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_float_10_0);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyFloat_FromDouble((-10.0 - 38.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_float_neg_10_0);
    __Pyx_GIVEREF(__pyx_float_neg_10_0);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_float_neg_10_0);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":234
 *             elif header_pos == 'bottom':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_bottom_pad + menu_pad),Vec2(-menu_pad,-menu_pad- menu_topbar_pad))
 *                 self.menu_bar = Draggable(Vec2(0,-menu_pad),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "src/pyglui/menus.pxi":235
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_bottom_pad + menu_pad),Vec2(-menu_pad,-menu_pad- menu_topbar_pad))
 *                 self.menu_bar = Draggable(Vec2(0,-menu_pad),Vec2(0,0),
 *                                             self.outline.design_size,             # <<<<<<<<<<<<<<
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 */
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size);
    PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size));
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":236
 *                 self.menu_bar = Draggable(Vec2(0,-menu_pad),Vec2(0,0),
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,             # <<<<<<<<<<<<<<
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 236, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 236, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":237
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )             # <<<<<<<<<<<<<<
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,
 */
    __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_catch_input, __pyx_t_5) < 0) __PYX_ERR(3, 236, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":234
 *             elif header_pos == 'bottom':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_bottom_pad + menu_pad),Vec2(-menu_pad,-menu_pad- menu_topbar_pad))
 *                 self.menu_bar = Draggable(Vec2(0,-menu_pad),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __pyx_v_self->__pyx_base.menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":238
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "src/pyglui/menus.pxi":239
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,             # <<<<<<<<<<<<<<
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 */
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org));
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":240
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,             # <<<<<<<<<<<<<<
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 self.resize_corner = None
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 240, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 240, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":241
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )             # <<<<<<<<<<<<<<
 *                 self.resize_corner = None
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toggle_iconified); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_click_cb, __pyx_t_5) < 0) __PYX_ERR(3, 240, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_catch_input, __pyx_t_5) < 0) __PYX_ERR(3, 240, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":238
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
    __pyx_v_self->__pyx_base.minimize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":242
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 self.resize_corner = None             # <<<<<<<<<<<<<<
 * 
 *             elif header_pos == 'right':
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
    __pyx_v_self->__pyx_base.resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None);

    /* "src/pyglui/menus.pxi":232
 *                     self.resize_corner = None
 * 
 *             elif header_pos == 'bottom':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_bottom_pad + menu_pad),Vec2(-menu_pad,-menu_pad- menu_topbar_pad))
 *                 self.menu_bar = Draggable(Vec2(0,-menu_pad),Vec2(0,0),
 */
    goto __pyx_L5;
  }

  /* "src/pyglui/menus.pxi":244
 *                 self.resize_corner = None
 * 
 *             elif header_pos == 'right':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(menu_pad,0),Vec2(-menu_pad-menu_sidebar_pad,0))
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_header_pos, __pyx_n_u_right, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 244, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":245
 * 
 *             elif header_pos == 'right':
 *                 self.element_space = FitBox(Vec2(menu_pad,0),Vec2(-menu_pad-menu_sidebar_pad,0))             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),
 *                                             self.outline.design_size,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyFloat_FromDouble((-10.0 - 38.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":246
 *             elif header_pos == 'right':
 *                 self.element_space = FitBox(Vec2(menu_pad,0),Vec2(-menu_pad-menu_sidebar_pad,0))
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "src/pyglui/menus.pxi":247
 *                 self.element_space = FitBox(Vec2(menu_pad,0),Vec2(-menu_pad-menu_sidebar_pad,0))
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),
 *                                             self.outline.design_size,             # <<<<<<<<<<<<<<
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 */
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size);
    PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size));
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":248
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,             # <<<<<<<<<<<<<<
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 */
    __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 248, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 248, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":249
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )             # <<<<<<<<<<<<<<
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,
 */
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_catch_input, __pyx_t_3) < 0) __PYX_ERR(3, 248, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":246
 *             elif header_pos == 'right':
 *                 self.element_space = FitBox(Vec2(menu_pad,0),Vec2(-menu_pad-menu_sidebar_pad,0))
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __pyx_v_self->__pyx_base.menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":250
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "src/pyglui/menus.pxi":251
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,             # <<<<<<<<<<<<<<
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 */
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org));
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":252
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,             # <<<<<<<<<<<<<<
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 self.resize_corner = None
 */
    __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 252, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 252, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":253
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )             # <<<<<<<<<<<<<<
 *                 self.resize_corner = None
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toggle_iconified); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_click_cb, __pyx_t_3) < 0) __PYX_ERR(3, 252, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_catch_input, __pyx_t_3) < 0) __PYX_ERR(3, 252, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":250
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
    __pyx_v_self->__pyx_base.minimize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":254
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 self.resize_corner = None             # <<<<<<<<<<<<<<
 * 
 *             elif header_pos == 'left':
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
    __pyx_v_self->__pyx_base.resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None);

    /* "src/pyglui/menus.pxi":244
 *                 self.resize_corner = None
 * 
 *             elif header_pos == 'right':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(menu_pad,0),Vec2(-menu_pad-menu_sidebar_pad,0))
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),
 */
    goto __pyx_L5;
  }

  /* "src/pyglui/menus.pxi":256
 *                 self.resize_corner = None
 * 
 *             elif header_pos == 'left':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(menu_sidebar_pad+menu_pad,0),Vec2(-menu_pad,0))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(menu_sidebar_pad,0),
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_header_pos, __pyx_n_u_left, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 256, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":257
 * 
 *             elif header_pos == 'left':
 *                 self.element_space = FitBox(Vec2(menu_sidebar_pad+menu_pad,0),Vec2(-menu_pad,0))             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(menu_sidebar_pad,0),
 *                                             self.outline.design_org,
 */
    __pyx_t_3 = PyFloat_FromDouble((38.0 + 10.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":258
 *             elif header_pos == 'left':
 *                 self.element_space = FitBox(Vec2(menu_sidebar_pad+menu_pad,0),Vec2(-menu_pad,0))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(menu_sidebar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "src/pyglui/menus.pxi":259
 *                 self.element_space = FitBox(Vec2(menu_sidebar_pad+menu_pad,0),Vec2(-menu_pad,0))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(menu_sidebar_pad,0),
 *                                             self.outline.design_org,             # <<<<<<<<<<<<<<
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org));
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":260
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(menu_sidebar_pad,0),
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,             # <<<<<<<<<<<<<<
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 */
    __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 260, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 260, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":261
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )             # <<<<<<<<<<<<<<
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                                  self.outline.design_org, arrest_axis=0,
 */
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_catch_input, __pyx_t_4) < 0) __PYX_ERR(3, 260, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":258
 *             elif header_pos == 'left':
 *                 self.element_space = FitBox(Vec2(menu_sidebar_pad+menu_pad,0),Vec2(-menu_pad,0))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(menu_sidebar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __pyx_v_self->__pyx_base.menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":262
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),             # <<<<<<<<<<<<<<
 *                                                  self.outline.design_org, arrest_axis=0,
 *                                                  zero_crossing = False, catch_input = catch_input)
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "src/pyglui/menus.pxi":263
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                                  self.outline.design_org, arrest_axis=0,             # <<<<<<<<<<<<<<
 *                                                  zero_crossing = False, catch_input = catch_input)
 *                 # remove click_cb to prevent interaction conflict in new Pupil ui
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org));
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arrest_axis, __pyx_int_0) < 0) __PYX_ERR(3, 263, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":264
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                                  self.outline.design_org, arrest_axis=0,
 *                                                  zero_crossing = False, catch_input = catch_input)             # <<<<<<<<<<<<<<
 *                 # remove click_cb to prevent interaction conflict in new Pupil ui
 * 
 */
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 263, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_catch_input, __pyx_t_4) < 0) __PYX_ERR(3, 263, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":262
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input  )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),             # <<<<<<<<<<<<<<
 *                                                  self.outline.design_org, arrest_axis=0,
 *                                                  zero_crossing = False, catch_input = catch_input)
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
    __pyx_v_self->__pyx_base.minimize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":267
 *                 # remove click_cb to prevent interaction conflict in new Pupil ui
 * 
 *                 if self.outline.design_size.x > 0:             # <<<<<<<<<<<<<<
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 *                                                     self.outline.design_size,
 */
    __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base.outline->design_size->x > 0.0);
    if (__pyx_t_1) {

      /* "src/pyglui/menus.pxi":268
 * 
 *                 if self.outline.design_size.x > 0:
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                                     self.outline.design_size,
 *                                                     arrest_axis=2,zero_crossing = False)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "src/pyglui/menus.pxi":269
 *                 if self.outline.design_size.x > 0:
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 *                                                     self.outline.design_size,             # <<<<<<<<<<<<<<
 *                                                     arrest_axis=2,zero_crossing = False)
 * 
 */
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size);
      PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size));
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":270
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 *                                                     self.outline.design_size,
 *                                                     arrest_axis=2,zero_crossing = False)             # <<<<<<<<<<<<<<
 * 
 *             elif header_pos == 'hidden':
 */
      __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arrest_axis, __pyx_int_2) < 0) __PYX_ERR(3, 270, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 270, __pyx_L1_error)

      /* "src/pyglui/menus.pxi":268
 * 
 *                 if self.outline.design_size.x > 0:
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                                     self.outline.design_size,
 *                                                     arrest_axis=2,zero_crossing = False)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
      __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
      __pyx_v_self->__pyx_base.resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "src/pyglui/menus.pxi":267
 *                 # remove click_cb to prevent interaction conflict in new Pupil ui
 * 
 *                 if self.outline.design_size.x > 0:             # <<<<<<<<<<<<<<
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),
 *                                                     self.outline.design_size,
 */
    }

    /* "src/pyglui/menus.pxi":256
 *                 self.resize_corner = None
 * 
 *             elif header_pos == 'left':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(menu_sidebar_pad+menu_pad,0),Vec2(-menu_pad,0))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(menu_sidebar_pad,0),
 */
    goto __pyx_L5;
  }

  /* "src/pyglui/menus.pxi":272
 *                                                     arrest_axis=2,zero_crossing = False)
 * 
 *             elif header_pos == 'hidden':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(0,0),Vec2(0,0))
 *                 self.resize_corner = None
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_header_pos, __pyx_n_u_hidden, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 272, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyglui/menus.pxi":273
 * 
 *             elif header_pos == 'hidden':
 *                 self.element_space = FitBox(Vec2(0,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 *                 self.resize_corner = None
 *                 self.menu_bar = None
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":274
 *             elif header_pos == 'hidden':
 *                 self.element_space = FitBox(Vec2(0,0),Vec2(0,0))
 *                 self.resize_corner = None             # <<<<<<<<<<<<<<
 *                 self.menu_bar = None
 *             elif header_pos == 'headline':
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
    __pyx_v_self->__pyx_base.resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None);

    /* "src/pyglui/menus.pxi":275
 *                 self.element_space = FitBox(Vec2(0,0),Vec2(0,0))
 *                 self.resize_corner = None
 *                 self.menu_bar = None             # <<<<<<<<<<<<<<
 *             elif header_pos == 'headline':
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __pyx_v_self->__pyx_base.menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None);

    /* "src/pyglui/menus.pxi":272
 *                                                     arrest_axis=2,zero_crossing = False)
 * 
 *             elif header_pos == 'hidden':             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(0,0),Vec2(0,0))
 *                 self.resize_corner = None
 */
    goto __pyx_L5;
  }

  /* "src/pyglui/menus.pxi":276
 *                 self.resize_corner = None
 *                 self.menu_bar = None
 *             elif header_pos == 'headline':             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                             self.outline.design_org,
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_header_pos, __pyx_n_u_headline, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 276, __pyx_L1_error)
  if (likely(__pyx_t_1)) {

    /* "src/pyglui/menus.pxi":277
 *                 self.menu_bar = None
 *             elif header_pos == 'headline':
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=1,zero_crossing = False,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "src/pyglui/menus.pxi":278
 *             elif header_pos == 'headline':
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                             self.outline.design_org,             # <<<<<<<<<<<<<<
 *                                             arrest_axis=1,zero_crossing = False,
 *                                             catch_input = catch_input  )
 */
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org);
    PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org));
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":279
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                             self.outline.design_org,
 *                                             arrest_axis=1,zero_crossing = False,             # <<<<<<<<<<<<<<
 *                                             catch_input = catch_input  )
 *                 self.element_space = FitBox(Vec2(0,menu_topbar_pad),Vec2(0,0))
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arrest_axis, __pyx_int_1) < 0) __PYX_ERR(3, 279, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_zero_crossing, Py_False) < 0) __PYX_ERR(3, 279, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":280
 *                                             self.outline.design_org,
 *                                             arrest_axis=1,zero_crossing = False,
 *                                             catch_input = catch_input  )             # <<<<<<<<<<<<<<
 *                 self.element_space = FitBox(Vec2(0,menu_topbar_pad),Vec2(0,0))
 *                 self.resize_corner = None
 */
    __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_catch_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_catch_input, __pyx_t_5) < 0) __PYX_ERR(3, 279, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":277
 *                 self.menu_bar = None
 *             elif header_pos == 'headline':
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=1,zero_crossing = False,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
    __pyx_v_self->__pyx_base.menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":281
 *                                             arrest_axis=1,zero_crossing = False,
 *                                             catch_input = catch_input  )
 *                 self.element_space = FitBox(Vec2(0,menu_topbar_pad),Vec2(0,0))             # <<<<<<<<<<<<<<
 *                 self.resize_corner = None
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
    __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":282
 *                                             catch_input = catch_input  )
 *                 self.element_space = FitBox(Vec2(0,menu_topbar_pad),Vec2(0,0))
 *                 self.resize_corner = None             # <<<<<<<<<<<<<<
 * 
 *             else:
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
    __pyx_v_self->__pyx_base.resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None);

    /* "src/pyglui/menus.pxi":276
 *                 self.resize_corner = None
 *                 self.menu_bar = None
 *             elif header_pos == 'headline':             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                             self.outline.design_org,
 */
    goto __pyx_L5;
  }

  /* "src/pyglui/menus.pxi":285
 * 
 *             else:
 *                 raise Exception("Header Positon argument needs to be one of 'top,right,left,bottom','headline' was %s "%header_pos)             # <<<<<<<<<<<<<<
 * 
 *             self.header_pos_id = ['top','bottom','left','right','hidden','headline'].index(header_pos)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Header_Positon_argument_needs_to, __pyx_v_header_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(3, 285, __pyx_L1_error)
  }
  __pyx_L5:;

  /* "src/pyglui/menus.pxi":287
 *                 raise Exception("Header Positon argument needs to be one of 'top,right,left,bottom','headline' was %s "%header_pos)
 * 
 *             self.header_pos_id = ['top','bottom','left','right','hidden','headline'].index(header_pos)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_u_top);
  __Pyx_GIVEREF(__pyx_n_u_top);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_top);
  __Pyx_INCREF(__pyx_n_u_bottom);
  __Pyx_GIVEREF(__pyx_n_u_bottom);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_bottom);
  __Pyx_INCREF(__pyx_n_u_left);
  __Pyx_GIVEREF(__pyx_n_u_left);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_u_left);
  __Pyx_INCREF(__pyx_n_u_right);
  __Pyx_GIVEREF(__pyx_n_u_right);
  PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_u_right);
  __Pyx_INCREF(__pyx_n_u_hidden);
  __Pyx_GIVEREF(__pyx_n_u_hidden);
  PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_u_hidden);
  __Pyx_INCREF(__pyx_n_u_headline);
  __Pyx_GIVEREF(__pyx_n_u_headline);
  PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_u_headline);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_header_pos};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_self->__pyx_base.header_pos_id = __pyx_t_6;

  /* "src/pyglui/menus.pxi":211
 *             return header_pos_list[self.header_pos_id]
 * 
 *         def __set__(self, header_pos):             # <<<<<<<<<<<<<<
 *             #if the menu position is user changable we want the dragable to catch the input. This is good of user interaction
 *             cdef bint catch_input =  bool(self.outline.design_org.x or self.outline.design_org.y)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Movable_Menu.header_pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Movable_Menu_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Movable_Menu_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Movable_Menu_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Movable_Menu_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Movable_Menu___reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Movable_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Movable_Menu___reduce_cython__(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._label, self._order, self._read_only, self.color, self.element_space, self.elements, self.header_pos_id, self.menu_bar, self.minimize_corner, self.outline, self.resize_corner, self.uid)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->__pyx_base.__pyx_base._order); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.header_pos_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(12); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base._label);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base._label);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->__pyx_base.__pyx_base._label);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.color);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.color);
  PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_v_self->__pyx_base.color));
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
  PyTuple_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_v_self->__pyx_base.element_space));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.elements);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.elements);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->__pyx_base.elements);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_t_3);
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.menu_bar);
  PyTuple_SET_ITEM(__pyx_t_4, 7, ((PyObject *)__pyx_v_self->__pyx_base.menu_bar));
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.minimize_corner);
  PyTuple_SET_ITEM(__pyx_t_4, 8, ((PyObject *)__pyx_v_self->__pyx_base.minimize_corner));
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  PyTuple_SET_ITEM(__pyx_t_4, 9, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline));
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.resize_corner);
  PyTuple_SET_ITEM(__pyx_t_4, 10, ((PyObject *)__pyx_v_self->__pyx_base.resize_corner));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.uid);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.uid);
  PyTuple_SET_ITEM(__pyx_t_4, 11, __pyx_v_self->__pyx_base.__pyx_base.uid);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._label, self._order, self._read_only, self.color, self.element_space, self.elements, self.header_pos_id, self.menu_bar, self.minimize_corner, self.outline, self.resize_corner, self.uid)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v__dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":7
 *     state = (self._label, self._order, self._read_only, self.color, self.element_space, self.elements, self.header_pos_id, self.menu_bar, self.minimize_corner, self.outline, self.resize_corner, self.uid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_5 = (__pyx_v__dict != Py_None);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._label, self._order, self._read_only, self.color, self.element_space, self.elements, self.header_pos_id, self.menu_bar, self.minimize_corner, self.outline, self.resize_corner, self.uid)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, None), state
 */
  /*else*/ {
    __pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base._label != ((PyObject*)Py_None));
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.color) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.element_space) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->__pyx_base.elements != ((PyObject*)Py_None));
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.menu_bar) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.minimize_corner) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.resize_corner) != Py_None);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.uid != Py_None);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Movable_Menu); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_150088119);
    __Pyx_GIVEREF(__pyx_int_150088119);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_150088119);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._label is not None or self.color is not None or self.element_space is not None or self.elements is not None or self.menu_bar is not None or self.minimize_corner is not None or self.outline is not None or self.resize_corner is not None or self.uid is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, None), state
 *     else:
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Movable_Menu__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Movable_Menu); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_150088119);
    __Pyx_GIVEREF(__pyx_int_150088119);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_150088119);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Movable_Menu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Movable_Menu__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Movable_Menu_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Movable_Menu_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Movable_Menu_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Movable_Menu_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Movable_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Movable_Menu_2__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Movable_Menu *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Movable_Menu_2__setstate_cython__(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Movable_Menu__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pyglui_2ui___pyx_unpickle_Movable_Menu__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Movable_Menu__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Movable_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":300
 *     cdef public bint collapsed
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_15Stretching_Menu_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_15Stretching_Menu_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_size = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__5);
    values[2] = ((PyObject *)__pyx_tuple__77);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 300, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 300, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 300, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(3, 300, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_pos = values[1];
    __pyx_v_size = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 300, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu___cinit__(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self), __pyx_v_label, __pyx_v_pos, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_15Stretching_Menu___cinit__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_pos, PyObject *__pyx_v_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/menus.pxi":301
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.uid);
  __pyx_v_self->__pyx_base.__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":302
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):
 *         self.uid = id(self)
 *         self._label = label             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(3, 302, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_label;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base._label);
  __pyx_v_self->__pyx_base.__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":303
 *         self.uid = id(self)
 *         self._label = label
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))             # <<<<<<<<<<<<<<
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))
 *         self.elements = []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_t_3) < 0) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_2) < 0) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_min_size, __pyx_t_2) < 0) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __pyx_v_self->__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":304
 *         self._label = label
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))             # <<<<<<<<<<<<<<
 *         self.elements = []
 *         self.color = RGBA(*rect_color_default)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_t_1) < 0) __PYX_ERR(3, 304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size, __pyx_t_1) < 0) __PYX_ERR(3, 304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
  __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":305
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))
 *         self.elements = []             # <<<<<<<<<<<<<<
 *         self.color = RGBA(*rect_color_default)
 *         self.collapsed = False
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.elements);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.elements);
  __pyx_v_self->__pyx_base.elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":306
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))
 *         self.elements = []
 *         self.color = RGBA(*rect_color_default)             # <<<<<<<<<<<<<<
 *         self.collapsed = False
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.color);
  __pyx_v_self->__pyx_base.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":307
 *         self.elements = []
 *         self.color = RGBA(*rect_color_default)
 *         self.collapsed = False             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,label,pos=(0,0),size=(200,100)):
 */
  __pyx_v_self->collapsed = 0;

  /* "src/pyglui/menus.pxi":300
 *     cdef public bint collapsed
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":309
 *         self.collapsed = False
 * 
 *     def __init__(self,label,pos=(0,0),size=(200,100)):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_15Stretching_Menu_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_15Stretching_Menu_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_label = 0;
  CYTHON_UNUSED PyObject *__pyx_v_pos = 0;
  CYTHON_UNUSED PyObject *__pyx_v_size = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__5);
    values[2] = ((PyObject *)__pyx_tuple__77);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 309, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 309, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 309, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(3, 309, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_pos = values[1];
    __pyx_v_size = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 309, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_2__init__(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self), __pyx_v_label, __pyx_v_pos, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_15Stretching_Menu_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_pos, CYTHON_UNUSED PyObject *__pyx_v_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":312
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float h = 0,y_spacing=0,org_y=0
 *         if not self.collapsed:
 */

static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_15Stretching_Menu_draw(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  float __pyx_v_h;
  float __pyx_v_y_spacing;
  float __pyx_v_org_y;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  float __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_15Stretching_Menu_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 312, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 312, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 312, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":313
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         cdef float h = 0,y_spacing=0,org_y=0             # <<<<<<<<<<<<<<
 *         if not self.collapsed:
 *             self.elements.sort(key=sort_key)
 */
  __pyx_v_h = 0.0;
  __pyx_v_y_spacing = 0.0;
  __pyx_v_org_y = 0.0;

  /* "src/pyglui/menus.pxi":314
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         cdef float h = 0,y_spacing=0,org_y=0
 *         if not self.collapsed:             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             self.outline.compute(parent)
 */
  __pyx_t_8 = (!__pyx_v_self->collapsed);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":315
 *         cdef float h = 0,y_spacing=0,org_y=0
 *         if not self.collapsed:
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             self.outline.compute(parent)
 *             self.element_space.compute(self.outline)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(3, 315, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":316
 *         if not self.collapsed:
 *             self.elements.sort(key=sort_key)
 *             self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *             self.element_space.compute(self.outline)
 * 
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":317
 *             self.elements.sort(key=sort_key)
 *             self.outline.compute(parent)
 *             self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *             for e in self.elements:
 */
    __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":319
 *             self.element_space.compute(self.outline)
 * 
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.precompute(self.element_space)
 *                 h += e.height
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 319, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 319, __pyx_L1_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":320
 * 
 *             for e in self.elements:
 *                 e.precompute(self.element_space)             # <<<<<<<<<<<<<<
 *                 h += e.height
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->__pyx_base.element_space)};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 320, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":321
 *             for e in self.elements:
 *                 e.precompute(self.element_space)
 *                 h += e.height             # <<<<<<<<<<<<<<
 * 
 *             y_spacing  = (self.element_space.size.y-h)/(len(self.elements)+1)
 */
      __pyx_t_5 = PyFloat_FromDouble(__pyx_v_h); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 321, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_h = __pyx_t_10;

      /* "src/pyglui/menus.pxi":319
 *             self.element_space.compute(self.outline)
 * 
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.precompute(self.element_space)
 *                 h += e.height
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":323
 *                 h += e.height
 * 
 *             y_spacing  = (self.element_space.size.y-h)/(len(self.elements)+1)             # <<<<<<<<<<<<<<
 *             org_y = self.element_space.org.y
 *             #if elements are not visible, no need to draw them.
 */
    __pyx_t_10 = (__pyx_v_self->__pyx_base.element_space->size->y - __pyx_v_h);
    __pyx_t_2 = __pyx_v_self->__pyx_base.elements;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(3, 323, __pyx_L1_error)
    }
    __pyx_t_9 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 323, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = (__pyx_t_9 + 1);
    if (unlikely(__pyx_t_11 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(3, 323, __pyx_L1_error)
    }
    __pyx_v_y_spacing = (__pyx_t_10 / ((float)__pyx_t_11));

    /* "src/pyglui/menus.pxi":324
 * 
 *             y_spacing  = (self.element_space.size.y-h)/(len(self.elements)+1)
 *             org_y = self.element_space.org.y             # <<<<<<<<<<<<<<
 *             #if elements are not visible, no need to draw them.
 *             if self.element_space.has_area():
 */
    __pyx_t_10 = __pyx_v_self->__pyx_base.element_space->org->y;
    __pyx_v_org_y = __pyx_t_10;

    /* "src/pyglui/menus.pxi":326
 *             org_y = self.element_space.org.y
 *             #if elements are not visible, no need to draw them.
 *             if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                 self.element_space.org.y+= y_spacing
 *                 for e in self.elements:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_8) {

      /* "src/pyglui/menus.pxi":327
 *             #if elements are not visible, no need to draw them.
 *             if self.element_space.has_area():
 *                 self.element_space.org.y+= y_spacing             # <<<<<<<<<<<<<<
 *                 for e in self.elements:
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.element_space->org);
      __pyx_t_12 = __pyx_v_self->__pyx_base.element_space->org;
      __pyx_t_12->y = (__pyx_t_12->y + __pyx_v_y_spacing);
      __Pyx_DECREF((PyObject *)__pyx_t_12); __pyx_t_12 = 0;

      /* "src/pyglui/menus.pxi":328
 *             if self.element_space.has_area():
 *                 self.element_space.org.y+= y_spacing
 *                 for e in self.elements:             # <<<<<<<<<<<<<<
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 *                     self.element_space.org.y+= e.height + y_spacing
 */
      if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(3, 328, __pyx_L1_error)
      }
      __pyx_t_2 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
      for (;;) {
        if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 328, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "src/pyglui/menus.pxi":329
 *                 self.element_space.org.y+= y_spacing
 *                 for e in self.elements:
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 *                     self.element_space.org.y+= e.height + y_spacing
 *                 self.outline.org.y = org_y
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
        __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.element_space));
        __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nested, Py_False) < 0) __PYX_ERR(3, 329, __pyx_L1_error)
        if (!__pyx_v_parent_read_only) {
        } else {
          __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 329, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = __pyx_t_6;
          __pyx_t_6 = 0;
          goto __pyx_L9_bool_binop_done;
        }
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        __pyx_L9_bool_binop_done:;
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_parent_read_only, __pyx_t_3) < 0) __PYX_ERR(3, 329, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "src/pyglui/menus.pxi":330
 *                 for e in self.elements:
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 *                     self.element_space.org.y+= e.height + y_spacing             # <<<<<<<<<<<<<<
 *                 self.outline.org.y = org_y
 * 
 */
        __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.element_space->org);
        __pyx_t_12 = __pyx_v_self->__pyx_base.element_space->org;
        __pyx_t_3 = PyFloat_FromDouble(__pyx_t_12->y); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyFloat_FromDouble(__pyx_v_y_spacing); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 330, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12->y = __pyx_t_10;
        __Pyx_DECREF((PyObject *)__pyx_t_12); __pyx_t_12 = 0;

        /* "src/pyglui/menus.pxi":328
 *             if self.element_space.has_area():
 *                 self.element_space.org.y+= y_spacing
 *                 for e in self.elements:             # <<<<<<<<<<<<<<
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 *                     self.element_space.org.y+= e.height + y_spacing
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":331
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 *                     self.element_space.org.y+= e.height + y_spacing
 *                 self.outline.org.y = org_y             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
      __pyx_v_self->__pyx_base.__pyx_base.outline->org->y = __pyx_v_org_y;

      /* "src/pyglui/menus.pxi":326
 *             org_y = self.element_space.org.y
 *             #if elements are not visible, no need to draw them.
 *             if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                 self.element_space.org.y+= y_spacing
 *                 for e in self.elements:
 */
    }

    /* "src/pyglui/menus.pxi":314
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         cdef float h = 0,y_spacing=0,org_y=0
 *         if not self.collapsed:             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             self.outline.compute(parent)
 */
  }

  /* "src/pyglui/menus.pxi":312
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float h = 0,y_spacing=0,org_y=0
 *         if not self.collapsed:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF((PyObject *)__pyx_t_12);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_15Stretching_Menu_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_15Stretching_Menu_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 312, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 312, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 312, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(3, 312, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 312, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 312, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 312, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 312, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_4draw(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_4draw(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Stretching_Menu->__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":333
 *                 self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_15Stretching_Menu_draw_overlay(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_draw_overlay *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_15Stretching_Menu_7draw_overlay)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 333, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":334
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if not self.collapsed and self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  __pyx_t_9 = (!__pyx_v_self->collapsed);
  if (__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(3, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_9;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":335
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(3, 335, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":336
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 336, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(3, 336, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 336, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":337
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,             # <<<<<<<<<<<<<<
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 */
      __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.element_space);
      __Pyx_INCREF(__pyx_t_2);

      /* "src/pyglui/menus.pxi":338
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 */
      if (!__pyx_v_parent_read_only) {
      } else {
        __pyx_t_8 = __pyx_v_parent_read_only;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_8 = __pyx_v_self->__pyx_base.__pyx_base._read_only;
      __pyx_L8_bool_binop_done:;

      /* "src/pyglui/menus.pxi":337
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,             # <<<<<<<<<<<<<<
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 */
      __pyx_t_11.__pyx_n = 2;
      __pyx_t_11.nested = 0;
      __pyx_t_11.parent_read_only = __pyx_t_8;
      __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI_element *)((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_e)->__pyx_vtab)->draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_e), ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2), 0, &__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/menus.pxi":336
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":334
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if not self.collapsed and self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  }

  /* "src/pyglui/menus.pxi":333
 *                 self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_15Stretching_Menu_7draw_overlay = {"draw_overlay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_15Stretching_Menu_7draw_overlay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_overlay (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 333, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 333, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 333, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_overlay") < 0)) __PYX_ERR(3, 333, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 333, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 333, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_overlay", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 333, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 333, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_6draw_overlay(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Stretching_Menu->__pyx_base.__pyx_base.draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":340
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */

static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_15Stretching_Menu_handle_input(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_15Stretching_Menu_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_15Stretching_Menu_9handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 340, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 340, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 340, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":342
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":343
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 343, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 343, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":344
 *         if self.element_space.has_area():
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_handle_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!__pyx_v_self->__pyx_base.__pyx_base._read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 344, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L6_bool_binop_done:;
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 344, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":343
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":342
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 */
  }

  /* "src/pyglui/menus.pxi":340
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_15Stretching_Menu_9handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_15Stretching_Menu_9handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 340, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 340, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(3, 340, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 340, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(3, 340, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 340, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 340, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(3, 340, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(3, 340, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_8handle_input(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_8handle_input(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Stretching_Menu->__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":347
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_13configuration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_13configuration_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_13configuration___get__(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self) {
  PyObject *__pyx_v_submenus = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":349
 *     @property
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()             # <<<<<<<<<<<<<<
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'collapsed':self.collapsed,'submenus':submenus}
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Stretching_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.get_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 349, __pyx_L1_error)
  __pyx_v_submenus = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":350
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'collapsed':self.collapsed,'submenus':submenus}             # <<<<<<<<<<<<<<
 * 
 *     @configuration.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pos, __pyx_t_2) < 0) __PYX_ERR(3, 350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_size, __pyx_t_2) < 0) __PYX_ERR(3, 350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->collapsed); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_collapsed, __pyx_t_2) < 0) __PYX_ERR(3, 350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_submenus, __pyx_v_submenus) < 0) __PYX_ERR(3, 350, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":347
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.configuration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_submenus);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":352
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'collapsed':self.collapsed,'submenus':submenus}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_15Stretching_Menu_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf); /*proto*/
static int __pyx_pw_6pyglui_2ui_15Stretching_Menu_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_13configuration_2__set__(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_new_conf));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_15Stretching_Menu_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":354
 *     @configuration.setter
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])             # <<<<<<<<<<<<<<
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_pos, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":355
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])             # <<<<<<<<<<<<<<
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_size, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":356
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)             # <<<<<<<<<<<<<<
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->collapsed); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_collapsed, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->collapsed = __pyx_t_6;

  /* "src/pyglui/menus.pxi":357
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 *         self.set_submenu_config(new_conf.get('submenus',{}))             # <<<<<<<<<<<<<<
 * 
 * cdef class Horizontally_Stretching_Menu(Base_Menu):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_submenus, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 357, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Stretching_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.set_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":352
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'collapsed':self.collapsed,'submenus':submenus}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.configuration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":298
 *     It will space its content evenenly in y.
 *     '''
 *     cdef public bint collapsed             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_9collapsed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_9collapsed_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_9collapsed___get__(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.collapsed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_15Stretching_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_15Stretching_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_9collapsed_2__set__(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_15Stretching_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 298, __pyx_L1_error)
  __pyx_v_self->collapsed = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.collapsed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_15Stretching_Menu_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_15Stretching_Menu_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_10__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_15Stretching_Menu_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_15Stretching_Menu_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_15Stretching_Menu_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_15Stretching_Menu_12__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_15Stretching_Menu_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Stretching_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":367
 *     cdef public bint collapsed
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_size = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__5);
    values[2] = ((PyObject *)__pyx_tuple__77);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 367, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 367, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(3, 367, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_pos = values[1];
    __pyx_v_size = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 367, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu___cinit__(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self), __pyx_v_label, __pyx_v_pos, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu___cinit__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_pos, PyObject *__pyx_v_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/menus.pxi":368
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.uid);
  __pyx_v_self->__pyx_base.__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":369
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):
 *         self.uid = id(self)
 *         self._label = label             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(3, 369, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_label;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base._label);
  __pyx_v_self->__pyx_base.__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":370
 *         self.uid = id(self)
 *         self._label = label
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))             # <<<<<<<<<<<<<<
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))
 *         self.elements = []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_t_3) < 0) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_2) < 0) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_min_size, __pyx_t_2) < 0) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __pyx_v_self->__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":371
 *         self._label = label
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))             # <<<<<<<<<<<<<<
 *         self.elements = []
 *         self.color = RGBA(*rect_color_default)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_t_1) < 0) __PYX_ERR(3, 371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size, __pyx_t_1) < 0) __PYX_ERR(3, 371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
  __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":372
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))
 *         self.elements = []             # <<<<<<<<<<<<<<
 *         self.color = RGBA(*rect_color_default)
 *         self.collapsed = False
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.elements);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.elements);
  __pyx_v_self->__pyx_base.elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":373
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))
 *         self.elements = []
 *         self.color = RGBA(*rect_color_default)             # <<<<<<<<<<<<<<
 *         self.collapsed = False
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.color);
  __pyx_v_self->__pyx_base.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":374
 *         self.elements = []
 *         self.color = RGBA(*rect_color_default)
 *         self.collapsed = False             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,label,pos=(0,0),size=(200,100)):
 */
  __pyx_v_self->collapsed = 0;

  /* "src/pyglui/menus.pxi":367
 *     cdef public bint collapsed
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":376
 *         self.collapsed = False
 * 
 *     def __init__(self,label,pos=(0,0),size=(200,100)):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_label = 0;
  CYTHON_UNUSED PyObject *__pyx_v_pos = 0;
  CYTHON_UNUSED PyObject *__pyx_v_size = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__5);
    values[2] = ((PyObject *)__pyx_tuple__77);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 376, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 376, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 376, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(3, 376, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_pos = values[1];
    __pyx_v_size = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 376, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_2__init__(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self), __pyx_v_label, __pyx_v_pos, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_pos, CYTHON_UNUSED PyObject *__pyx_v_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":379
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float w=0, x_spacing=0, org_x=0
 *         if not self.collapsed:
 */

static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_draw(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  float __pyx_v_w;
  float __pyx_v_x_spacing;
  float __pyx_v_org_x;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  float __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":380
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         cdef float w=0, x_spacing=0, org_x=0             # <<<<<<<<<<<<<<
 *         if not self.collapsed:
 *             self.elements.sort(key=sort_key)
 */
  __pyx_v_w = 0.0;
  __pyx_v_x_spacing = 0.0;
  __pyx_v_org_x = 0.0;

  /* "src/pyglui/menus.pxi":381
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         cdef float w=0, x_spacing=0, org_x=0
 *         if not self.collapsed:             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             self.outline.compute(parent)
 */
  __pyx_t_8 = (!__pyx_v_self->collapsed);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":382
 *         cdef float w=0, x_spacing=0, org_x=0
 *         if not self.collapsed:
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             self.outline.compute(parent)
 *             self.element_space.compute(self.outline)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(3, 382, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":383
 *         if not self.collapsed:
 *             self.elements.sort(key=sort_key)
 *             self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *             self.element_space.compute(self.outline)
 * 
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":384
 *             self.elements.sort(key=sort_key)
 *             self.outline.compute(parent)
 *             self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *             for e in self.elements:
 */
    __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":386
 *             self.element_space.compute(self.outline)
 * 
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.precompute(self.element_space)
 *                 w += e.width
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 386, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 386, __pyx_L1_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":387
 * 
 *             for e in self.elements:
 *                 e.precompute(self.element_space)             # <<<<<<<<<<<<<<
 *                 w += e.width
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->__pyx_base.element_space)};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":388
 *             for e in self.elements:
 *                 e.precompute(self.element_space)
 *                 w += e.width             # <<<<<<<<<<<<<<
 * 
 *             x_spacing  = (self.element_space.size.x-w)/(len(self.elements)+1)
 */
      __pyx_t_5 = PyFloat_FromDouble(__pyx_v_w); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 388, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_w = __pyx_t_10;

      /* "src/pyglui/menus.pxi":386
 *             self.element_space.compute(self.outline)
 * 
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.precompute(self.element_space)
 *                 w += e.width
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":390
 *                 w += e.width
 * 
 *             x_spacing  = (self.element_space.size.x-w)/(len(self.elements)+1)             # <<<<<<<<<<<<<<
 *             org_x = self.element_space.org.x
 *             #if elements are not visible, no need to draw them.
 */
    __pyx_t_10 = (__pyx_v_self->__pyx_base.element_space->size->x - __pyx_v_w);
    __pyx_t_2 = __pyx_v_self->__pyx_base.elements;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(3, 390, __pyx_L1_error)
    }
    __pyx_t_9 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 390, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = (__pyx_t_9 + 1);
    if (unlikely(__pyx_t_11 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(3, 390, __pyx_L1_error)
    }
    __pyx_v_x_spacing = (__pyx_t_10 / ((float)__pyx_t_11));

    /* "src/pyglui/menus.pxi":391
 * 
 *             x_spacing  = (self.element_space.size.x-w)/(len(self.elements)+1)
 *             org_x = self.element_space.org.x             # <<<<<<<<<<<<<<
 *             #if elements are not visible, no need to draw them.
 *             if self.element_space.has_area():
 */
    __pyx_t_10 = __pyx_v_self->__pyx_base.element_space->org->x;
    __pyx_v_org_x = __pyx_t_10;

    /* "src/pyglui/menus.pxi":393
 *             org_x = self.element_space.org.x
 *             #if elements are not visible, no need to draw them.
 *             if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                 self.element_space.org.x+= x_spacing
 *                 for e in self.elements:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 393, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_8) {

      /* "src/pyglui/menus.pxi":394
 *             #if elements are not visible, no need to draw them.
 *             if self.element_space.has_area():
 *                 self.element_space.org.x+= x_spacing             # <<<<<<<<<<<<<<
 *                 for e in self.elements:
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.element_space->org);
      __pyx_t_12 = __pyx_v_self->__pyx_base.element_space->org;
      __pyx_t_12->x = (__pyx_t_12->x + __pyx_v_x_spacing);
      __Pyx_DECREF((PyObject *)__pyx_t_12); __pyx_t_12 = 0;

      /* "src/pyglui/menus.pxi":395
 *             if self.element_space.has_area():
 *                 self.element_space.org.x+= x_spacing
 *                 for e in self.elements:             # <<<<<<<<<<<<<<
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 *                     self.element_space.org.x+= e.width + x_spacing
 */
      if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(3, 395, __pyx_L1_error)
      }
      __pyx_t_2 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
      for (;;) {
        if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 395, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "src/pyglui/menus.pxi":396
 *                 self.element_space.org.x+= x_spacing
 *                 for e in self.elements:
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 *                     self.element_space.org.x+= e.width + x_spacing
 *                 self.outline.org.x = org_x
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
        __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.element_space));
        __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nested, Py_False) < 0) __PYX_ERR(3, 396, __pyx_L1_error)
        if (!__pyx_v_parent_read_only) {
        } else {
          __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 396, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = __pyx_t_6;
          __pyx_t_6 = 0;
          goto __pyx_L9_bool_binop_done;
        }
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        __pyx_L9_bool_binop_done:;
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_parent_read_only, __pyx_t_3) < 0) __PYX_ERR(3, 396, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "src/pyglui/menus.pxi":397
 *                 for e in self.elements:
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 *                     self.element_space.org.x+= e.width + x_spacing             # <<<<<<<<<<<<<<
 *                 self.outline.org.x = org_x
 * 
 */
        __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.element_space->org);
        __pyx_t_12 = __pyx_v_self->__pyx_base.element_space->org;
        __pyx_t_3 = PyFloat_FromDouble(__pyx_t_12->x); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x_spacing); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 397, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12->x = __pyx_t_10;
        __Pyx_DECREF((PyObject *)__pyx_t_12); __pyx_t_12 = 0;

        /* "src/pyglui/menus.pxi":395
 *             if self.element_space.has_area():
 *                 self.element_space.org.x+= x_spacing
 *                 for e in self.elements:             # <<<<<<<<<<<<<<
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 *                     self.element_space.org.x+= e.width + x_spacing
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":398
 *                     e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 *                     self.element_space.org.x+= e.width + x_spacing
 *                 self.outline.org.x = org_x             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
      __pyx_v_self->__pyx_base.__pyx_base.outline->org->x = __pyx_v_org_x;

      /* "src/pyglui/menus.pxi":393
 *             org_x = self.element_space.org.x
 *             #if elements are not visible, no need to draw them.
 *             if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *                 self.element_space.org.x+= x_spacing
 *                 for e in self.elements:
 */
    }

    /* "src/pyglui/menus.pxi":381
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         cdef float w=0, x_spacing=0, org_x=0
 *         if not self.collapsed:             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             self.outline.compute(parent)
 */
  }

  /* "src/pyglui/menus.pxi":379
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float w=0, x_spacing=0, org_x=0
 *         if not self.collapsed:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF((PyObject *)__pyx_t_12);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 379, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 379, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 379, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(3, 379, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 379, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 379, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 379, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 379, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_4draw(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_4draw(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Horizontally_Stretching_Menu->__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":400
 *                 self.outline.org.x = org_x
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_draw_overlay(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_draw_overlay *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_7draw_overlay)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 400, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 400, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 400, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":401
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if not self.collapsed and self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  __pyx_t_9 = (!__pyx_v_self->collapsed);
  if (__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(3, 401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_9;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":402
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(3, 402, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":403
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 403, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(3, 403, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":404
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,             # <<<<<<<<<<<<<<
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 */
      __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.element_space);
      __Pyx_INCREF(__pyx_t_2);

      /* "src/pyglui/menus.pxi":405
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 */
      if (!__pyx_v_parent_read_only) {
      } else {
        __pyx_t_8 = __pyx_v_parent_read_only;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_8 = __pyx_v_self->__pyx_base.__pyx_base._read_only;
      __pyx_L8_bool_binop_done:;

      /* "src/pyglui/menus.pxi":404
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,             # <<<<<<<<<<<<<<
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 */
      __pyx_t_11.__pyx_n = 2;
      __pyx_t_11.nested = 0;
      __pyx_t_11.parent_read_only = __pyx_t_8;
      __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI_element *)((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_e)->__pyx_vtab)->draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_e), ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2), 0, &__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 404, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/menus.pxi":403
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":401
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if not self.collapsed and self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  }

  /* "src/pyglui/menus.pxi":400
 *                 self.outline.org.x = org_x
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_7draw_overlay = {"draw_overlay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_7draw_overlay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_overlay (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 400, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 400, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 400, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_overlay") < 0)) __PYX_ERR(3, 400, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 400, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 400, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_overlay", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 400, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 400, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_6draw_overlay(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Horizontally_Stretching_Menu->__pyx_base.__pyx_base.draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":407
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */

static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_handle_input(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_28Horizontally_Stretching_Menu_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 407, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":409
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":410
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 410, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 410, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 410, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":411
 *         if self.element_space.has_area():
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_handle_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!__pyx_v_self->__pyx_base.__pyx_base._read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L6_bool_binop_done:;
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":410
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":409
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 */
  }

  /* "src/pyglui/menus.pxi":407
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_9handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 407, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 407, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(3, 407, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 407, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(3, 407, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 407, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 407, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(3, 407, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(3, 407, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_8handle_input(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_8handle_input(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Horizontally_Stretching_Menu->__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":414
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration___get__(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self) {
  PyObject *__pyx_v_submenus = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":416
 *     @property
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()             # <<<<<<<<<<<<<<
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'collapsed':self.collapsed,'submenus':submenus}
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.get_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 416, __pyx_L1_error)
  __pyx_v_submenus = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":417
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'collapsed':self.collapsed,'submenus':submenus}             # <<<<<<<<<<<<<<
 * 
 *     @configuration.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pos, __pyx_t_2) < 0) __PYX_ERR(3, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_size, __pyx_t_2) < 0) __PYX_ERR(3, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->collapsed); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_collapsed, __pyx_t_2) < 0) __PYX_ERR(3, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_submenus, __pyx_v_submenus) < 0) __PYX_ERR(3, 417, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":414
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.configuration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_submenus);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":419
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'collapsed':self.collapsed,'submenus':submenus}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf); /*proto*/
static int __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_2__set__(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_new_conf));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":421
 *     @configuration.setter
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])             # <<<<<<<<<<<<<<
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_pos, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":422
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])             # <<<<<<<<<<<<<<
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_size, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":423
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)             # <<<<<<<<<<<<<<
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->collapsed); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_collapsed, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->collapsed = __pyx_t_6;

  /* "src/pyglui/menus.pxi":424
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 *         self.set_submenu_config(new_conf.get('submenus',{}))             # <<<<<<<<<<<<<<
 * 
 * cdef class Growing_Menu(Movable_Menu):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_submenus, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 424, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.set_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":419
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'collapsed':self.collapsed,'submenus':submenus}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.configuration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":365
 *     It will space its content evenenly in x.
 *     '''
 *     cdef public bint collapsed             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed___get__(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.collapsed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_2__set__(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 365, __pyx_L1_error)
  __pyx_v_self->collapsed = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.collapsed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_10__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_12__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_28Horizontally_Stretching_Menu_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Horizontally_Stretching_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":442
 * 
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(0,0),header_pos = 'top'):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Growing_Menu_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Growing_Menu_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_header_pos = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_header_pos,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_header_pos,0};
    #endif
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__5);
    values[2] = ((PyObject *)__pyx_tuple__5);
    values[3] = ((PyObject *)__pyx_n_u_top);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 442, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 442, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 442, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_pos);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 442, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(3, 442, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_pos = values[1];
    __pyx_v_size = values[2];
    __pyx_v_header_pos = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 4, __pyx_nargs); __PYX_ERR(3, 442, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu___cinit__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), __pyx_v_label, __pyx_v_pos, __pyx_v_size, __pyx_v_header_pos);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Growing_Menu___cinit__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_pos, PyObject *__pyx_v_size, PyObject *__pyx_v_header_pos) {
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_min_size = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/menus.pxi":443
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(0,0),header_pos = 'top'):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label
 *         #design height will be overwritten in draw.
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.uid);
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":444
 *     def __cinit__(self,label,pos=(0,0),size=(0,0),header_pos = 'top'):
 *         self.uid = id(self)
 *         self._label = label             # <<<<<<<<<<<<<<
 *         #design height will be overwritten in draw.
 *         if header_pos in ('top','bottom'):
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(3, 444, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_label;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._label);
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":446
 *         self._label = label
 *         #design height will be overwritten in draw.
 *         if header_pos in ('top','bottom'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('left','right'):
 */
  __Pyx_INCREF(__pyx_v_header_pos);
  __pyx_t_1 = __pyx_v_header_pos;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_top, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 446, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_bottom, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 446, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_2;
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":447
 *         #design height will be overwritten in draw.
 *         if header_pos in ('top','bottom'):
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)             # <<<<<<<<<<<<<<
 *         elif header_pos in ('left','right'):
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":446
 *         self._label = label
 *         #design height will be overwritten in draw.
 *         if header_pos in ('top','bottom'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('left','right'):
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/menus.pxi":448
 *         if header_pos in ('top','bottom'):
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('left','right'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         else:
 */
  __Pyx_INCREF(__pyx_v_header_pos);
  __pyx_t_1 = __pyx_v_header_pos;
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_left, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 448, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_right, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 448, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __pyx_t_3;
  if (__pyx_t_2) {

    /* "src/pyglui/menus.pxi":449
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('left','right'):
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)             # <<<<<<<<<<<<<<
 *         else:
 *             min_size = Vec2(0,0)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":448
 *         if header_pos in ('top','bottom'):
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('left','right'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/menus.pxi":451
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         else:
 *             min_size = Vec2(0,0)             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=min_size)
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/menus.pxi":452
 *         else:
 *             min_size = Vec2(0,0)
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=min_size)             # <<<<<<<<<<<<<<
 * 
 *         self.elements = []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_t_5) < 0) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_4) < 0) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_min_size, ((PyObject *)__pyx_v_min_size)) < 0) __PYX_ERR(3, 452, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":454
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=min_size)
 * 
 *         self.elements = []             # <<<<<<<<<<<<<<
 *         self.header_pos = header_pos
 *         self.color = RGBA(*rect_color_default)
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.elements);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.elements);
  __pyx_v_self->__pyx_base.__pyx_base.elements = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":455
 * 
 *         self.elements = []
 *         self.header_pos = header_pos             # <<<<<<<<<<<<<<
 *         self.color = RGBA(*rect_color_default)
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_header_pos, __pyx_v_header_pos) < 0) __PYX_ERR(3, 455, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":456
 *         self.elements = []
 *         self.header_pos = header_pos
 *         self.color = RGBA(*rect_color_default)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,label, pos=(0,0),size=(0,0),header_pos = 'top'):
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.color);
  __pyx_v_self->__pyx_base.__pyx_base.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":442
 * 
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(0,0),header_pos = 'top'):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_min_size);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":458
 *         self.color = RGBA(*rect_color_default)
 * 
 *     def __init__(self,label, pos=(0,0),size=(0,0),header_pos = 'top'):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Growing_Menu_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Growing_Menu_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_label = 0;
  CYTHON_UNUSED PyObject *__pyx_v_pos = 0;
  CYTHON_UNUSED PyObject *__pyx_v_size = 0;
  CYTHON_UNUSED PyObject *__pyx_v_header_pos = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_header_pos,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_header_pos,0};
    #endif
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__5);
    values[2] = ((PyObject *)__pyx_tuple__5);
    values[3] = ((PyObject *)__pyx_n_u_top);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 458, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 458, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 458, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_pos);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 458, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(3, 458, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_pos = values[1];
    __pyx_v_size = values[2];
    __pyx_v_header_pos = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, __pyx_nargs); __PYX_ERR(3, 458, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_2__init__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), __pyx_v_label, __pyx_v_pos, __pyx_v_size, __pyx_v_header_pos);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Growing_Menu_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_pos, CYTHON_UNUSED PyObject *__pyx_v_size, CYTHON_UNUSED PyObject *__pyx_v_header_pos) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":461
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */

static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Growing_Menu_draw(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  float __pyx_v_org_y;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  float __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_12Growing_Menu_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 461, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":462
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.element_space.compute(self.outline)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":463
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         #here we compute the requred design height of this menu.
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":466
 * 
 *         #here we compute the requred design height of this menu.
 *         self.outline.design_size.y  = self.height/ui_scale             # <<<<<<<<<<<<<<
 *         #now we correct for any changes induced by the content.
 *         self.outline.compute(parent)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size->y = __pyx_t_8;

  /* "src/pyglui/menus.pxi":468
 *         self.outline.design_size.y  = self.height/ui_scale
 *         #now we correct for any changes induced by the content.
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.element_space.compute(self.outline)
 *         self.draw_menu(nested)
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/menus.pxi":469
 *         #now we correct for any changes induced by the content.
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.draw_menu(nested)
 * 
 */
  __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":470
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 *         self.draw_menu(nested)             # <<<<<<<<<<<<<<
 * 
 *         cdef float org_y = self.element_space.org.y
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Growing_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.draw_menu(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), __pyx_v_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":472
 *         self.draw_menu(nested)
 * 
 *         cdef float org_y = self.element_space.org.y             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to draw them.
 *         if self.element_space.has_area():
 */
  __pyx_t_8 = __pyx_v_self->__pyx_base.__pyx_base.element_space->org->y;
  __pyx_v_org_y = __pyx_t_8;

  /* "src/pyglui/menus.pxi":474
 *         cdef float org_y = self.element_space.org.y
 *         #if elements are not visible, no need to draw them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(3, 474, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "src/pyglui/menus.pxi":475
 *         #if elements are not visible, no need to draw them.
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_key, __pyx_t_2) < 0) __PYX_ERR(3, 475, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":476
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 *                 self.element_space.org.y+= e.height
 */
    if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 476, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(3, 476, __pyx_L1_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":477
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 *                 self.element_space.org.y+= e.height
 *             self.outline.org.y = org_y
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space));
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!__pyx_v_parent_read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 477, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L6_bool_binop_done:;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_parent_read_only, __pyx_t_3) < 0) __PYX_ERR(3, 477, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":478
 *             for e in self.elements:
 *                 e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 *                 self.element_space.org.y+= e.height             # <<<<<<<<<<<<<<
 *             self.outline.org.y = org_y
 * 
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space->org);
      __pyx_t_11 = __pyx_v_self->__pyx_base.__pyx_base.element_space->org;
      __pyx_t_3 = PyFloat_FromDouble(__pyx_t_11->y); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_height); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 478, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11->y = __pyx_t_8;
      __Pyx_DECREF((PyObject *)__pyx_t_11); __pyx_t_11 = 0;

      /* "src/pyglui/menus.pxi":476
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 *                 self.element_space.org.y+= e.height
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":479
 *                 e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 *                 self.element_space.org.y+= e.height
 *             self.outline.org.y = org_y             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
    __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->org->y = __pyx_v_org_y;

    /* "src/pyglui/menus.pxi":474
 *         cdef float org_y = self.element_space.org.y
 *         #if elements are not visible, no need to draw them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  }

  /* "src/pyglui/menus.pxi":461
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF((PyObject *)__pyx_t_11);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Growing_Menu_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 461, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 461, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 461, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(3, 461, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 461, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 461, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 461, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 461, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_4draw(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_4draw(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Growing_Menu->__pyx_base.__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":481
 *             self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Growing_Menu_draw_overlay(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_draw_overlay *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_12Growing_Menu_7draw_overlay)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 481, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":482
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":483
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(3, 483, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":484
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)
 * 
 */
    if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 484, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 484, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":485
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space));
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!__pyx_v_parent_read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 485, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L6_bool_binop_done:;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_parent_read_only, __pyx_t_3) < 0) __PYX_ERR(3, 485, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":484
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":482
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  }

  /* "src/pyglui/menus.pxi":481
 *             self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Growing_Menu_7draw_overlay = {"draw_overlay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_7draw_overlay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_overlay (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 481, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 481, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 481, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_overlay") < 0)) __PYX_ERR(3, 481, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 481, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 481, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_overlay", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 481, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 481, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_6draw_overlay(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Growing_Menu->__pyx_base.__pyx_base.__pyx_base.draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":488
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 */

static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Growing_Menu_handle_input(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_12Growing_Menu_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_12Growing_Menu_9handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 488, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":489
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         if self.resize_corner is not None:             # <<<<<<<<<<<<<<
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:
 */
  __pyx_t_8 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.resize_corner) != Py_None);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":490
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)             # <<<<<<<<<<<<<<
 *         if self.menu_bar is not None:
 *             self.menu_bar.handle_input(new_input,visible)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Draggable *)__pyx_v_self->__pyx_base.__pyx_base.resize_corner->__pyx_vtab)->handle_input(__pyx_v_self->__pyx_base.__pyx_base.resize_corner, __pyx_v_new_input, __pyx_v_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":489
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         if self.resize_corner is not None:             # <<<<<<<<<<<<<<
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:
 */
  }

  /* "src/pyglui/menus.pxi":491
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:             # <<<<<<<<<<<<<<
 *             self.menu_bar.handle_input(new_input,visible)
 *         if self.minimize_corner is not None:
 */
  __pyx_t_8 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.menu_bar) != Py_None);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":492
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:
 *             self.menu_bar.handle_input(new_input,visible)             # <<<<<<<<<<<<<<
 *         if self.minimize_corner is not None:
 *             self.minimize_corner.handle_input(new_input,visible)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Draggable *)__pyx_v_self->__pyx_base.__pyx_base.menu_bar->__pyx_vtab)->handle_input(__pyx_v_self->__pyx_base.__pyx_base.menu_bar, __pyx_v_new_input, __pyx_v_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":491
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:             # <<<<<<<<<<<<<<
 *             self.menu_bar.handle_input(new_input,visible)
 *         if self.minimize_corner is not None:
 */
  }

  /* "src/pyglui/menus.pxi":493
 *         if self.menu_bar is not None:
 *             self.menu_bar.handle_input(new_input,visible)
 *         if self.minimize_corner is not None:             # <<<<<<<<<<<<<<
 *             self.minimize_corner.handle_input(new_input,visible)
 * 
 */
  __pyx_t_8 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.minimize_corner) != Py_None);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":494
 *             self.menu_bar.handle_input(new_input,visible)
 *         if self.minimize_corner is not None:
 *             self.minimize_corner.handle_input(new_input,visible)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Draggable *)__pyx_v_self->__pyx_base.__pyx_base.minimize_corner->__pyx_vtab)->handle_input(__pyx_v_self->__pyx_base.__pyx_base.minimize_corner, __pyx_v_new_input, __pyx_v_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":493
 *         if self.menu_bar is not None:
 *             self.menu_bar.handle_input(new_input,visible)
 *         if self.minimize_corner is not None:             # <<<<<<<<<<<<<<
 *             self.minimize_corner.handle_input(new_input,visible)
 * 
 */
  }

  /* "src/pyglui/menus.pxi":498
 * 
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":499
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 */
    if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 499, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 499, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 499, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":500
 *         if self.element_space.has_area():
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)             # <<<<<<<<<<<<<<
 * 
 *     cpdef precompute(self,FitBox parent):
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_handle_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 500, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L9_bool_binop_done:;
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 500, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":499
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":498
 * 
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 */
  }

  /* "src/pyglui/menus.pxi":488
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Growing_Menu_9handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_9handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 488, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 488, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(3, 488, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 488, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(3, 488, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 488, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 488, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(3, 488, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(3, 488, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_8handle_input(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_8handle_input(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Growing_Menu->__pyx_base.__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":502
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         #here we compute the requred design height of this menu.
 *         self.outline.design_size.y  = self.height/ui_scale
 */

static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_11precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_12Growing_Menu_precompute(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  float __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_12Growing_Menu_11precompute)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_parent)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 502, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":504
 *     cpdef precompute(self,FitBox parent):
 *         #here we compute the requred design height of this menu.
 *         self.outline.design_size.y  = self.height/ui_scale             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size->y = __pyx_t_6;

  /* "src/pyglui/menus.pxi":505
 *         #here we compute the requred design height of this menu.
 *         self.outline.design_size.y  = self.height/ui_scale
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 * 
 *     property height:
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyglui/menus.pxi":502
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         #here we compute the requred design height of this menu.
 *         self.outline.design_size.y  = self.height/ui_scale
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_11precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Growing_Menu_11precompute = {"precompute", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_11precompute, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_11precompute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("precompute (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 502, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "precompute") < 0)) __PYX_ERR(3, 502, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("precompute", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 502, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 502, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_10precompute(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), __pyx_v_parent);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_10precompute(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("precompute", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_12Growing_Menu_precompute(__pyx_v_self, __pyx_v_parent, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":508
 * 
 *     property height:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef float height = 0.0000001 #0 is magic and not meant when hight is computed to be 0.
 *             if self.header_pos_id == 5 and self.collapsed:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_6height_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_6height___get__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_6height___get__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self) {
  float __pyx_v_height;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  float __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":509
 *     property height:
 *         def __get__(self):
 *             cdef float height = 0.0000001 #0 is magic and not meant when hight is computed to be 0.             # <<<<<<<<<<<<<<
 *             if self.header_pos_id == 5 and self.collapsed:
 *                 pass
 */
  __pyx_v_height = 0.0000001;

  /* "src/pyglui/menus.pxi":510
 *         def __get__(self):
 *             cdef float height = 0.0000001 #0 is magic and not meant when hight is computed to be 0.
 *             if self.header_pos_id == 5 and self.collapsed:             # <<<<<<<<<<<<<<
 *                 pass
 *             else:
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.header_pos_id == 5);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {
    goto __pyx_L3;
  }

  /* "src/pyglui/menus.pxi":514
 *             else:
 *                 #space from outline to element space at top
 *                 height += self.element_space.design_org.y*ui_scale             # <<<<<<<<<<<<<<
 *             #space from element_space to outline at bottom
 *             height -= self.element_space.design_size.y*ui_scale #double neg
 */
  /*else*/ {
    __pyx_v_height = (__pyx_v_height + (__pyx_v_self->__pyx_base.__pyx_base.element_space->design_org->y * __pyx_v_6pyglui_2ui_ui_scale));
  }
  __pyx_L3:;

  /* "src/pyglui/menus.pxi":516
 *                 height += self.element_space.design_org.y*ui_scale
 *             #space from element_space to outline at bottom
 *             height -= self.element_space.design_size.y*ui_scale #double neg             # <<<<<<<<<<<<<<
 *             if self._collapsed:
 *                 #elemnt space is 0
 */
  __pyx_v_height = (__pyx_v_height - (__pyx_v_self->__pyx_base.__pyx_base.element_space->design_size->y * __pyx_v_6pyglui_2ui_ui_scale));

  /* "src/pyglui/menus.pxi":517
 *             #space from element_space to outline at bottom
 *             height -= self.element_space.design_size.y*ui_scale #double neg
 *             if self._collapsed:             # <<<<<<<<<<<<<<
 *                 #elemnt space is 0
 *                 pass
 */
  if (__pyx_v_self->_collapsed) {
    goto __pyx_L6;
  }

  /* "src/pyglui/menus.pxi":521
 *                 pass
 *             else:
 *                 for e in self.elements:             # <<<<<<<<<<<<<<
 *                     e.precompute(self.element_space)
 *                 height += sum([<float>e.height for e in self.elements])
 */
  /*else*/ {
    if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 521, __pyx_L1_error)
    }
    __pyx_t_3 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    for (;;) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(3, 521, __pyx_L1_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":522
 *             else:
 *                 for e in self.elements:
 *                     e.precompute(self.element_space)             # <<<<<<<<<<<<<<
 *                 height += sum([<float>e.height for e in self.elements])
 *             return height
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_precompute); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space)};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":521
 *                 pass
 *             else:
 *                 for e in self.elements:             # <<<<<<<<<<<<<<
 *                     e.precompute(self.element_space)
 *                 height += sum([<float>e.height for e in self.elements])
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":523
 *                 for e in self.elements:
 *                     e.precompute(self.element_space)
 *                 height += sum([<float>e.height for e in self.elements])             # <<<<<<<<<<<<<<
 *             return height
 * 
 */
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    { /* enter inner scope */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 523, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(3, 523, __pyx_L11_error)
      }
      __pyx_t_6 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(3, 523, __pyx_L11_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 523, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_e, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_e, __pyx_n_s_height); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 523, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 523, __pyx_L11_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyFloat_FromDouble(((float)__pyx_t_9)); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 523, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_7))) __PYX_ERR(3, 523, __pyx_L11_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_e); __pyx_8genexpr3__pyx_v_e = 0;
      goto __pyx_L14_exit_scope;
      __pyx_L11_error:;
      __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_e); __pyx_8genexpr3__pyx_v_e = 0;
      goto __pyx_L1_error;
      __pyx_L14_exit_scope:;
    } /* exit inner scope */
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 523, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_height = __pyx_t_9;
  }
  __pyx_L6:;

  /* "src/pyglui/menus.pxi":524
 *                     e.precompute(self.element_space)
 *                 height += sum([<float>e.height for e in self.elements])
 *             return height             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":508
 * 
 *     property height:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef float height = 0.0000001 #0 is magic and not meant when hight is computed to be 0.
 *             if self.header_pos_id == 5 and self.collapsed:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":527
 * 
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         self.collapsed = not self.collapsed
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_13toggle_iconified(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Growing_Menu_13toggle_iconified = {"toggle_iconified", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_13toggle_iconified, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_13toggle_iconified(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toggle_iconified (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("toggle_iconified", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "toggle_iconified", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_12toggle_iconified(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_12toggle_iconified(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toggle_iconified", 0);

  /* "src/pyglui/menus.pxi":528
 * 
 *     def toggle_iconified(self):
 *         self.collapsed = not self.collapsed             # <<<<<<<<<<<<<<
 * 
 *     property collapsed:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed, __pyx_t_1) < 0) __PYX_ERR(3, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":527
 * 
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         self.collapsed = not self.collapsed
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.toggle_iconified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":531
 * 
 *     property collapsed:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._collapsed
 *         def __set__(self,collapsed):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_9collapsed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_9collapsed_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_9collapsed___get__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":532
 *     property collapsed:
 *         def __get__(self):
 *             return self._collapsed             # <<<<<<<<<<<<<<
 *         def __set__(self,collapsed):
 *             if collapsed != self._collapsed:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":531
 * 
 *     property collapsed:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._collapsed
 *         def __set__(self,collapsed):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.collapsed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":533
 *         def __get__(self):
 *             return self._collapsed
 *         def __set__(self,collapsed):             # <<<<<<<<<<<<<<
 *             if collapsed != self._collapsed:
 *                 global should_redraw
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Growing_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_collapsed); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Growing_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_collapsed) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_9collapsed_2__set__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_collapsed));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Growing_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, PyObject *__pyx_v_collapsed) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":534
 *             return self._collapsed
 *         def __set__(self,collapsed):
 *             if collapsed != self._collapsed:             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_collapsed, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":536
 *             if collapsed != self._collapsed:
 *                 global should_redraw
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *                 self._collapsed = not self._collapsed
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/menus.pxi":537
 *                 global should_redraw
 *                 should_redraw = True
 *                 self._collapsed = not self._collapsed             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_self->_collapsed = (!__pyx_v_self->_collapsed);

    /* "src/pyglui/menus.pxi":534
 *             return self._collapsed
 *         def __set__(self,collapsed):
 *             if collapsed != self._collapsed:             # <<<<<<<<<<<<<<
 *                 global should_redraw
 *                 should_redraw = True
 */
  }

  /* "src/pyglui/menus.pxi":533
 *         def __get__(self):
 *             return self._collapsed
 *         def __set__(self,collapsed):             # <<<<<<<<<<<<<<
 *             if collapsed != self._collapsed:
 *                 global should_redraw
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.collapsed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":540
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_13configuration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_13configuration_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_13configuration___get__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self) {
  PyObject *__pyx_v_submenus = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":542
 *     @property
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()             # <<<<<<<<<<<<<<
 *         return {'pos':self.outline.design_org[:],'size':[self.outline.design_size[0],0],'collapsed':self.collapsed,'submenus':submenus}
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Growing_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.get_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 542, __pyx_L1_error)
  __pyx_v_submenus = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":543
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 *         return {'pos':self.outline.design_org[:],'size':[self.outline.design_size[0],0],'collapsed':self.collapsed,'submenus':submenus}             # <<<<<<<<<<<<<<
 * 
 *     @configuration.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pos, __pyx_t_2) < 0) __PYX_ERR(3, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
  __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_size, __pyx_t_3) < 0) __PYX_ERR(3, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_collapsed, __pyx_t_3) < 0) __PYX_ERR(3, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_submenus, __pyx_v_submenus) < 0) __PYX_ERR(3, 543, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":540
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.configuration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_submenus);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":545
 *         return {'pos':self.outline.design_org[:],'size':[self.outline.design_size[0],0],'collapsed':self.collapsed,'submenus':submenus}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self,new_conf):
 *         #load from configutation if avaible, else keep old setting
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Growing_Menu_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Growing_Menu_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_13configuration_2__set__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_new_conf));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Growing_Menu_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":548
 *     def configuration(self,new_conf):
 *         #load from configutation if avaible, else keep old setting
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])             # <<<<<<<<<<<<<<
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_pos, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_org), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":549
 *         #load from configutation if avaible, else keep old setting
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])             # <<<<<<<<<<<<<<
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 *         self.header_pos = self.header_pos #update layout
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_size, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":550
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)             # <<<<<<<<<<<<<<
 *         self.header_pos = self.header_pos #update layout
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_collapsed, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed, __pyx_t_1) < 0) __PYX_ERR(3, 550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":551
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 *         self.header_pos = self.header_pos #update layout             # <<<<<<<<<<<<<<
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_header_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_header_pos, __pyx_t_1) < 0) __PYX_ERR(3, 551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":552
 *         self.collapsed = new_conf.get('collapsed',self.collapsed)
 *         self.header_pos = self.header_pos #update layout
 *         self.set_submenu_config(new_conf.get('submenus',{}))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_submenus, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 552, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Growing_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.set_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":545
 *         return {'pos':self.outline.design_org[:],'size':[self.outline.design_size[0],0],'collapsed':self.collapsed,'submenus':submenus}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self,new_conf):
 *         #load from configutation if avaible, else keep old setting
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.configuration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Growing_Menu_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_14__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Growing_Menu_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Growing_Menu_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Growing_Menu_16__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Growing_Menu_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Growing_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Growing_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":575
 *     cdef bint _collapsed
 * 
 *     def __cinit__(self,label,pos=(100,100),size=(200,100),header_pos = 'top'):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_14Scrolling_Menu_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_14Scrolling_Menu_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_header_pos = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_header_pos,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_header_pos,0};
    #endif
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__82);
    values[2] = ((PyObject *)__pyx_tuple__77);
    values[3] = ((PyObject *)__pyx_n_u_top);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 575, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 575, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 575, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_pos);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 575, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(3, 575, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_pos = values[1];
    __pyx_v_size = values[2];
    __pyx_v_header_pos = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 4, __pyx_nargs); __PYX_ERR(3, 575, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu___cinit__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self), __pyx_v_label, __pyx_v_pos, __pyx_v_size, __pyx_v_header_pos);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_14Scrolling_Menu___cinit__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_pos, PyObject *__pyx_v_size, PyObject *__pyx_v_header_pos) {
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_min_size = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/menus.pxi":576
 * 
 *     def __cinit__(self,label,pos=(100,100),size=(200,100),header_pos = 'top'):
 *         self.uid = id(self)             # <<<<<<<<<<<<<<
 *         self._label = label
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.uid);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.uid);
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":577
 *     def __cinit__(self,label,pos=(100,100),size=(200,100),header_pos = 'top'):
 *         self.uid = id(self)
 *         self._label = label             # <<<<<<<<<<<<<<
 * 
 *         if header_pos in ('top', 'bottom', 'headline'):
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_label))||((__pyx_v_label) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_label))) __PYX_ERR(3, 577, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_label;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._label);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._label);
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":579
 *         self._label = label
 * 
 *         if header_pos in ('top', 'bottom', 'headline'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('right'):
 */
  __Pyx_INCREF(__pyx_v_header_pos);
  __pyx_t_1 = __pyx_v_header_pos;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_top, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 579, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_bottom, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 579, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_headline, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 579, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_2;
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":580
 * 
 *         if header_pos in ('top', 'bottom', 'headline'):
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)             # <<<<<<<<<<<<<<
 *         elif header_pos in ('right'):
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":579
 *         self._label = label
 * 
 *         if header_pos in ('top', 'bottom', 'headline'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('right'):
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/menus.pxi":581
 *         if header_pos in ('top', 'bottom', 'headline'):
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('right'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         elif header_pos in ('left'):
 */
  __pyx_t_3 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_header_pos, __pyx_n_u_right, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 581, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":582
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('right'):
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)             # <<<<<<<<<<<<<<
 *         elif header_pos in ('left'):
 *             min_size = Vec2(menu_topbar_min_width,menu_sidebar_min_height)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":581
 *         if header_pos in ('top', 'bottom', 'headline'):
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('right'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         elif header_pos in ('left'):
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/menus.pxi":583
 *         elif header_pos in ('right'):
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         elif header_pos in ('left'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_topbar_min_width,menu_sidebar_min_height)
 *         else:
 */
  __pyx_t_3 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_header_pos, __pyx_n_u_left, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 583, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":584
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         elif header_pos in ('left'):
 *             min_size = Vec2(menu_topbar_min_width,menu_sidebar_min_height)             # <<<<<<<<<<<<<<
 *         else:
 *             min_size = Vec2(0,0)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":583
 *         elif header_pos in ('right'):
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         elif header_pos in ('left'):             # <<<<<<<<<<<<<<
 *             min_size = Vec2(menu_topbar_min_width,menu_sidebar_min_height)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/menus.pxi":586
 *             min_size = Vec2(menu_topbar_min_width,menu_sidebar_min_height)
 *         else:
 *             min_size = Vec2(0,0)             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=min_size)
 *         self.uncollapsed_outline = self.outline.copy()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/menus.pxi":587
 *         else:
 *             min_size = Vec2(0,0)
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=min_size)             # <<<<<<<<<<<<<<
 *         self.uncollapsed_outline = self.outline.copy()
 *         self._collapsed = False
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_t_5) < 0) __PYX_ERR(3, 587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_4) < 0) __PYX_ERR(3, 587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_min_size, ((PyObject *)__pyx_v_min_size)) < 0) __PYX_ERR(3, 587, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":588
 *             min_size = Vec2(0,0)
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=min_size)
 *         self.uncollapsed_outline = self.outline.copy()             # <<<<<<<<<<<<<<
 *         self._collapsed = False
 *         self.elements = []
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->copy(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(3, 588, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->uncollapsed_outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->uncollapsed_outline);
  __pyx_v_self->uncollapsed_outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":589
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=min_size)
 *         self.uncollapsed_outline = self.outline.copy()
 *         self._collapsed = False             # <<<<<<<<<<<<<<
 *         self.elements = []
 * 
 */
  __pyx_v_self->_collapsed = 0;

  /* "src/pyglui/menus.pxi":590
 *         self.uncollapsed_outline = self.outline.copy()
 *         self._collapsed = False
 *         self.elements = []             # <<<<<<<<<<<<<<
 * 
 *         self.scrollstate = Vec2(0,0)
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.elements);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.elements);
  __pyx_v_self->__pyx_base.__pyx_base.elements = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":592
 *         self.elements = []
 * 
 *         self.scrollstate = Vec2(0,0)             # <<<<<<<<<<<<<<
 *         self.scrollbar = Draggable(Vec2(0,0),Vec2(0,0),self.scrollstate,arrest_axis=1,zero_crossing=True)
 *         self.header_pos = header_pos
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->scrollstate);
  __Pyx_DECREF((PyObject *)__pyx_v_self->scrollstate);
  __pyx_v_self->scrollstate = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":593
 * 
 *         self.scrollstate = Vec2(0,0)
 *         self.scrollbar = Draggable(Vec2(0,0),Vec2(0,0),self.scrollstate,arrest_axis=1,zero_crossing=True)             # <<<<<<<<<<<<<<
 *         self.header_pos = header_pos
 *         self.color = RGBA(*rect_color_default)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self->scrollstate);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->scrollstate);
  PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_self->scrollstate));
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_arrest_axis, __pyx_int_1) < 0) __PYX_ERR(3, 593, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_zero_crossing, Py_True) < 0) __PYX_ERR(3, 593, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable), __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->scrollbar);
  __Pyx_DECREF((PyObject *)__pyx_v_self->scrollbar);
  __pyx_v_self->scrollbar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":594
 *         self.scrollstate = Vec2(0,0)
 *         self.scrollbar = Draggable(Vec2(0,0),Vec2(0,0),self.scrollstate,arrest_axis=1,zero_crossing=True)
 *         self.header_pos = header_pos             # <<<<<<<<<<<<<<
 *         self.color = RGBA(*rect_color_default)
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_header_pos, __pyx_v_header_pos) < 0) __PYX_ERR(3, 594, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":595
 *         self.scrollbar = Draggable(Vec2(0,0),Vec2(0,0),self.scrollstate,arrest_axis=1,zero_crossing=True)
 *         self.header_pos = header_pos
 *         self.color = RGBA(*rect_color_default)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,label,pos=(100,100),size=(200,100),header_pos = 'top'):
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.color);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.color);
  __pyx_v_self->__pyx_base.__pyx_base.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":575
 *     cdef bint _collapsed
 * 
 *     def __cinit__(self,label,pos=(100,100),size=(200,100),header_pos = 'top'):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_min_size);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":597
 *         self.color = RGBA(*rect_color_default)
 * 
 *     def __init__(self,label,pos=(100,100),size=(200,100),header_pos = 'top'):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_14Scrolling_Menu_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_14Scrolling_Menu_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_label = 0;
  CYTHON_UNUSED PyObject *__pyx_v_pos = 0;
  CYTHON_UNUSED PyObject *__pyx_v_size = 0;
  CYTHON_UNUSED PyObject *__pyx_v_header_pos = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_header_pos,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_label,&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_header_pos,0};
    #endif
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__82);
    values[2] = ((PyObject *)__pyx_tuple__77);
    values[3] = ((PyObject *)__pyx_n_u_top);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_label)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 597, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 597, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 597, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_pos);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 597, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(3, 597, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_label = values[0];
    __pyx_v_pos = values[1];
    __pyx_v_size = values[2];
    __pyx_v_header_pos = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, __pyx_nargs); __PYX_ERR(3, 597, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_2__init__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self), __pyx_v_label, __pyx_v_pos, __pyx_v_size, __pyx_v_header_pos);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_14Scrolling_Menu_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_label, CYTHON_UNUSED PyObject *__pyx_v_pos, CYTHON_UNUSED PyObject *__pyx_v_size, CYTHON_UNUSED PyObject *__pyx_v_header_pos) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":600
 *         pass
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Scrolling_Menu {}".format(self._label)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_5__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_4__str__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_4__str__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "src/pyglui/menus.pxi":601
 * 
 *     def __str__(self):
 *         return "Scrolling_Menu {}".format(self._label)             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Scrolling_Menu, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._label};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":600
 *         pass
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Scrolling_Menu {}".format(self._label)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":603
 *         return "Scrolling_Menu {}".format(self._label)
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */

static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_7draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 603, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 603, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 603, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":604
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.element_space.compute(self.outline)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":605
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         # collapse/inflate if needed
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":608
 * 
 *         # collapse/inflate if needed
 *         if self.collapsed == self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             if self.collapsed:
 *                 self.uncollapsed_outline = self.outline.copy()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":609
 *         # collapse/inflate if needed
 *         if self.collapsed == self.element_space.has_area():
 *             if self.collapsed:             # <<<<<<<<<<<<<<
 *                 self.uncollapsed_outline = self.outline.copy()
 *                 self.outline.min_size = Vec2(0., 0.)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 609, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_8) {

      /* "src/pyglui/menus.pxi":610
 *         if self.collapsed == self.element_space.has_area():
 *             if self.collapsed:
 *                 self.uncollapsed_outline = self.outline.copy()             # <<<<<<<<<<<<<<
 *                 self.outline.min_size = Vec2(0., 0.)
 *                 self.outline.collapse()
 */
      __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->copy(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(3, 610, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->uncollapsed_outline);
      __Pyx_DECREF((PyObject *)__pyx_v_self->uncollapsed_outline);
      __pyx_v_self->uncollapsed_outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":611
 *             if self.collapsed:
 *                 self.uncollapsed_outline = self.outline.copy()
 *                 self.outline.min_size = Vec2(0., 0.)             # <<<<<<<<<<<<<<
 *                 self.outline.collapse()
 *             else:
 */
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 611, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->min_size);
      __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->min_size);
      __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":612
 *                 self.uncollapsed_outline = self.outline.copy()
 *                 self.outline.min_size = Vec2(0., 0.)
 *                 self.outline.collapse()             # <<<<<<<<<<<<<<
 *             else:
 *                 self.outline.min_size[:] = self.uncollapsed_outline.min_size[:]
 */
      __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->collapse(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":609
 *         # collapse/inflate if needed
 *         if self.collapsed == self.element_space.has_area():
 *             if self.collapsed:             # <<<<<<<<<<<<<<
 *                 self.uncollapsed_outline = self.outline.copy()
 *                 self.outline.min_size = Vec2(0., 0.)
 */
      goto __pyx_L4;
    }

    /* "src/pyglui/menus.pxi":614
 *                 self.outline.collapse()
 *             else:
 *                 self.outline.min_size[:] = self.uncollapsed_outline.min_size[:]             # <<<<<<<<<<<<<<
 *                 self.outline.inflate(self.uncollapsed_outline)
 *             self.outline.compute(parent)
 */
    /*else*/ {
      __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->uncollapsed_outline->min_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->min_size), __pyx_t_5, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 614, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/pyglui/menus.pxi":615
 *             else:
 *                 self.outline.min_size[:] = self.uncollapsed_outline.min_size[:]
 *                 self.outline.inflate(self.uncollapsed_outline)             # <<<<<<<<<<<<<<
 *             self.outline.compute(parent)
 *             self.element_space.compute(self.outline)
 */
      __pyx_t_5 = ((PyObject *)__pyx_v_self->uncollapsed_outline);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->inflate(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L4:;

    /* "src/pyglui/menus.pxi":616
 *                 self.outline.min_size[:] = self.uncollapsed_outline.min_size[:]
 *                 self.outline.inflate(self.uncollapsed_outline)
 *             self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *             self.element_space.compute(self.outline)
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":617
 *                 self.outline.inflate(self.uncollapsed_outline)
 *             self.outline.compute(parent)
 *             self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         if self.header_pos_id == 2:
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":608
 * 
 *         # collapse/inflate if needed
 *         if self.collapsed == self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             if self.collapsed:
 *                 self.uncollapsed_outline = self.outline.copy()
 */
  }

  /* "src/pyglui/menus.pxi":619
 *             self.element_space.compute(self.outline)
 * 
 *         if self.header_pos_id == 2:             # <<<<<<<<<<<<<<
 *             nested = nested or self.collapsed
 *         self.draw_menu(nested)
 */
  __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.header_pos_id == 2);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":620
 * 
 *         if self.header_pos_id == 2:
 *             nested = nested or self.collapsed             # <<<<<<<<<<<<<<
 *         self.draw_menu(nested)
 * 
 */
    if (!__pyx_v_nested) {
    } else {
      __pyx_t_8 = __pyx_v_nested;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(3, 620, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = __pyx_t_9;
    __pyx_L6_bool_binop_done:;
    __pyx_v_nested = __pyx_t_8;

    /* "src/pyglui/menus.pxi":619
 *             self.element_space.compute(self.outline)
 * 
 *         if self.header_pos_id == 2:             # <<<<<<<<<<<<<<
 *             nested = nested or self.collapsed
 *         self.draw_menu(nested)
 */
  }

  /* "src/pyglui/menus.pxi":621
 *         if self.header_pos_id == 2:
 *             nested = nested or self.collapsed
 *         self.draw_menu(nested)             # <<<<<<<<<<<<<<
 * 
 *         #if elements are not visible, no need to draw them.
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.draw_menu(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), __pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/menus.pxi":624
 * 
 *         #if elements are not visible, no need to draw them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             self.draw_scroll_window_elements(parent_read_only)
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.__pyx_base.element_space); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":625
 *         #if elements are not visible, no need to draw them.
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             self.draw_scroll_window_elements(parent_read_only)
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_key, __pyx_t_2) < 0) __PYX_ERR(3, 625, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":626
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             self.draw_scroll_window_elements(parent_read_only)             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->draw_scroll_window_elements(__pyx_v_self, __pyx_v_parent_read_only); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":624
 * 
 *         #if elements are not visible, no need to draw them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             self.draw_scroll_window_elements(parent_read_only)
 */
  }

  /* "src/pyglui/menus.pxi":603
 *         return "Scrolling_Menu {}".format(self._label)
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_14Scrolling_Menu_7draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_7draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_7draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 603, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 603, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 603, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(3, 603, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 603, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 603, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 603, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 603, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_6draw(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_6draw(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Scrolling_Menu->__pyx_base.__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":628
 *             self.draw_scroll_window_elements(parent_read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_9draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw_overlay(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_draw_overlay *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_9draw_overlay)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 628, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 628, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 628, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":629
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":630
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(3, 630, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":631
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)
 * 
 */
    if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 631, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 631, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":632
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 * 
 *     cdef draw_scroll_window_elements(self, bint parent_read_only):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space));
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!__pyx_v_parent_read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 632, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L6_bool_binop_done:;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_parent_read_only, __pyx_t_3) < 0) __PYX_ERR(3, 632, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":631
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":629
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  }

  /* "src/pyglui/menus.pxi":628
 *             self.draw_scroll_window_elements(parent_read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_9draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_14Scrolling_Menu_9draw_overlay = {"draw_overlay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_9draw_overlay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_9draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_overlay (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 628, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 628, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 628, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_overlay") < 0)) __PYX_ERR(3, 628, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 628, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 628, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_overlay", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 628, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 628, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_8draw_overlay(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_8draw_overlay(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Scrolling_Menu->__pyx_base.__pyx_base.__pyx_base.draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":634
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)
 * 
 *     cdef draw_scroll_window_elements(self, bint parent_read_only):             # <<<<<<<<<<<<<<
 * 
 *         #compute scroll stack height.
 */

static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw_scroll_window_elements(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, int __pyx_v_parent_read_only) {
  float __pyx_v_h;
  float __pyx_v_e_h;
  PyObject *__pyx_v_e = NULL;
  float __pyx_v_scroll_factor;
  float __pyx_v_scroll_handle_offset;
  float __pyx_v_scroll_handle_size;
  double __pyx_v_v_pad;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_end = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  float __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  float __pyx_t_9;
  double __pyx_t_10;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  double __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_scroll_window_elements", 0);

  /* "src/pyglui/menus.pxi":637
 * 
 *         #compute scroll stack height.
 *         cdef float h = sum([e.height for e in self.elements])             # <<<<<<<<<<<<<<
 * 
 *         #If the scollbar is not active, make sure the content is not scrolled away:
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 637, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 637, __pyx_L5_error)
    }
    __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(3, 637, __pyx_L5_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 637, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_e, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr4__pyx_v_e, __pyx_n_s_height); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 637, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 637, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_e); __pyx_8genexpr4__pyx_v_e = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_e); __pyx_8genexpr4__pyx_v_e = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_h = __pyx_t_5;

  /* "src/pyglui/menus.pxi":640
 * 
 *         #If the scollbar is not active, make sure the content is not scrolled away:
 *         if not self.scrollbar.selected or 1:             # <<<<<<<<<<<<<<
 *             #self.scrollstate.y = clamp(self.scrollstate.y,min(-h,self.element_space.size.y-h),0)
 *             self.scrollstate.y = clamp(self.scrollstate.y*ui_scale,min(0,-h+self.element_space.size.y),0)/ui_scale
 */
  __pyx_t_7 = (!__pyx_v_self->scrollbar->selected);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_6 = 1;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_6) {

    /* "src/pyglui/menus.pxi":642
 *         if not self.scrollbar.selected or 1:
 *             #self.scrollstate.y = clamp(self.scrollstate.y,min(-h,self.element_space.size.y-h),0)
 *             self.scrollstate.y = clamp(self.scrollstate.y*ui_scale,min(0,-h+self.element_space.size.y),0)/ui_scale             # <<<<<<<<<<<<<<
 * 
 *         self.push_scissor()
 */
    __pyx_t_5 = ((-__pyx_v_h) + __pyx_v_self->__pyx_base.__pyx_base.element_space->size->y);
    __pyx_t_8 = 0;
    if ((__pyx_t_5 < __pyx_t_8)) {
      __pyx_t_9 = __pyx_t_5;
    } else {
      __pyx_t_9 = __pyx_t_8;
    }
    __pyx_t_10 = __pyx_f_6pyglui_2ui_clamp((__pyx_v_self->scrollstate->y * __pyx_v_6pyglui_2ui_ui_scale), __pyx_t_9, 0.0);
    if (unlikely(__pyx_v_6pyglui_2ui_ui_scale == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(3, 642, __pyx_L1_error)
    }
    __pyx_v_self->scrollstate->y = (__pyx_t_10 / __pyx_v_6pyglui_2ui_ui_scale);

    /* "src/pyglui/menus.pxi":640
 * 
 *         #If the scollbar is not active, make sure the content is not scrolled away:
 *         if not self.scrollbar.selected or 1:             # <<<<<<<<<<<<<<
 *             #self.scrollstate.y = clamp(self.scrollstate.y,min(-h,self.element_space.size.y-h),0)
 *             self.scrollstate.y = clamp(self.scrollstate.y*ui_scale,min(0,-h+self.element_space.size.y),0)/ui_scale
 */
  }

  /* "src/pyglui/menus.pxi":644
 *             self.scrollstate.y = clamp(self.scrollstate.y*ui_scale,min(0,-h+self.element_space.size.y),0)/ui_scale
 * 
 *         self.push_scissor()             # <<<<<<<<<<<<<<
 *         self.scrollbar.outline.compute(self.element_space)
 *         self.element_space.org.y += self.scrollstate.y*ui_scale
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->push_scissor(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":645
 * 
 *         self.push_scissor()
 *         self.scrollbar.outline.compute(self.element_space)             # <<<<<<<<<<<<<<
 *         self.element_space.org.y += self.scrollstate.y*ui_scale
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->scrollbar->outline->__pyx_vtab)->compute(__pyx_v_self->scrollbar->outline, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":646
 *         self.push_scissor()
 *         self.scrollbar.outline.compute(self.element_space)
 *         self.element_space.org.y += self.scrollstate.y*ui_scale             # <<<<<<<<<<<<<<
 * 
 *         #now we compute h for real:
 */
  __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space->org);
  __pyx_t_11 = __pyx_v_self->__pyx_base.__pyx_base.element_space->org;
  __pyx_t_11->y = (__pyx_t_11->y + (__pyx_v_self->scrollstate->y * __pyx_v_6pyglui_2ui_ui_scale));
  __Pyx_DECREF((PyObject *)__pyx_t_11); __pyx_t_11 = 0;

  /* "src/pyglui/menus.pxi":649
 * 
 *         #now we compute h for real:
 *         cdef float e_h = 0             # <<<<<<<<<<<<<<
 *         h = 0
 *         #render elements
 */
  __pyx_v_e_h = 0.0;

  /* "src/pyglui/menus.pxi":650
 *         #now we compute h for real:
 *         cdef float e_h = 0
 *         h = 0             # <<<<<<<<<<<<<<
 *         #render elements
 *         for e in self.elements:
 */
  __pyx_v_h = 0.0;

  /* "src/pyglui/menus.pxi":652
 *         h = 0
 *         #render elements
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 *             e_h = e.height
 */
  if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(3, 652, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(3, 652, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":653
 *         #render elements
 *         for e in self.elements:
 *             e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 *             e_h = e.height
 *             h += e_h
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space);
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space));
    __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (!__pyx_v_parent_read_only) {
    } else {
      __pyx_t_14 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_13 = __pyx_t_14;
      __pyx_t_14 = 0;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_14 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_13 = __pyx_t_14;
    __pyx_t_14 = 0;
    __pyx_L14_bool_binop_done:;
    if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_parent_read_only, __pyx_t_13) < 0) __PYX_ERR(3, 653, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "src/pyglui/menus.pxi":654
 *         for e in self.elements:
 *             e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 *             e_h = e.height             # <<<<<<<<<<<<<<
 *             h += e_h
 *             self.element_space.org.y+= e_h
 */
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_height); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_13); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 654, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_v_e_h = __pyx_t_9;

    /* "src/pyglui/menus.pxi":655
 *             e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 *             e_h = e.height
 *             h += e_h             # <<<<<<<<<<<<<<
 *             self.element_space.org.y+= e_h
 *         self.element_space.compute(self.outline)
 */
    __pyx_v_h = (__pyx_v_h + __pyx_v_e_h);

    /* "src/pyglui/menus.pxi":656
 *             e_h = e.height
 *             h += e_h
 *             self.element_space.org.y+= e_h             # <<<<<<<<<<<<<<
 *         self.element_space.compute(self.outline)
 * 
 */
    __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space->org);
    __pyx_t_11 = __pyx_v_self->__pyx_base.__pyx_base.element_space->org;
    __pyx_t_11->y = (__pyx_t_11->y + __pyx_v_e_h);
    __Pyx_DECREF((PyObject *)__pyx_t_11); __pyx_t_11 = 0;

    /* "src/pyglui/menus.pxi":652
 *         h = 0
 *         #render elements
 *         for e in self.elements:             # <<<<<<<<<<<<<<
 *             e.draw(self.element_space,parent_read_only = parent_read_only or self._read_only)
 *             e_h = e.height
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":657
 *             h += e_h
 *             self.element_space.org.y+= e_h
 *         self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         self.pop_scissor()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_13 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "src/pyglui/menus.pxi":659
 *         self.element_space.compute(self.outline)
 * 
 *         self.pop_scissor()             # <<<<<<<<<<<<<<
 * 
 *         cdef float scroll_factor = self.element_space.size.y/(h or 1)
 */
  __pyx_t_13 = ((struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->pop_scissor(__pyx_v_self); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "src/pyglui/menus.pxi":661
 *         self.pop_scissor()
 * 
 *         cdef float scroll_factor = self.element_space.size.y/(h or 1)             # <<<<<<<<<<<<<<
 *         cdef float scroll_handle_offset = max(0,-self.scrollstate.y*ui_scale)*scroll_factor
 *         cdef float scroll_handle_size = self.element_space.size.y * scroll_factor
 */
  if (!__pyx_v_h) {
  } else {
    __pyx_t_9 = __pyx_v_h;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_9 = 1;
  __pyx_L16_bool_binop_done:;
  if (unlikely(__pyx_t_9 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(3, 661, __pyx_L1_error)
  }
  __pyx_v_scroll_factor = (__pyx_v_self->__pyx_base.__pyx_base.element_space->size->y / __pyx_t_9);

  /* "src/pyglui/menus.pxi":662
 * 
 *         cdef float scroll_factor = self.element_space.size.y/(h or 1)
 *         cdef float scroll_handle_offset = max(0,-self.scrollstate.y*ui_scale)*scroll_factor             # <<<<<<<<<<<<<<
 *         cdef float scroll_handle_size = self.element_space.size.y * scroll_factor
 * 
 */
  __pyx_t_10 = ((-__pyx_v_self->scrollstate->y) * __pyx_v_6pyglui_2ui_ui_scale);
  __pyx_t_8 = 0;
  if ((__pyx_t_10 > __pyx_t_8)) {
    __pyx_t_15 = __pyx_t_10;
  } else {
    __pyx_t_15 = __pyx_t_8;
  }
  __pyx_v_scroll_handle_offset = (__pyx_t_15 * __pyx_v_scroll_factor);

  /* "src/pyglui/menus.pxi":663
 *         cdef float scroll_factor = self.element_space.size.y/(h or 1)
 *         cdef float scroll_handle_offset = max(0,-self.scrollstate.y*ui_scale)*scroll_factor
 *         cdef float scroll_handle_size = self.element_space.size.y * scroll_factor             # <<<<<<<<<<<<<<
 * 
 *         #display that we have scrollable content
 */
  __pyx_v_scroll_handle_size = (__pyx_v_self->__pyx_base.__pyx_base.element_space->size->y * __pyx_v_scroll_factor);

  /* "src/pyglui/menus.pxi":666
 * 
 *         #display that we have scrollable content
 *         if scroll_factor < 1:             # <<<<<<<<<<<<<<
 *             #self.element_space.size.x -= 10*ui_scale #shrink element space width to make room for scroll bar
 *             v_pad = 10*ui_scale
 */
  __pyx_t_6 = (__pyx_v_scroll_factor < 1.0);
  if (__pyx_t_6) {

    /* "src/pyglui/menus.pxi":668
 *         if scroll_factor < 1:
 *             #self.element_space.size.x -= 10*ui_scale #shrink element space width to make room for scroll bar
 *             v_pad = 10*ui_scale             # <<<<<<<<<<<<<<
 *             start = self.element_space.org + self.element_space.size + Vec2(5*ui_scale,scroll_handle_offset-self.element_space.size.y+v_pad)
 *             end = self.element_space.org + self.element_space.size + Vec2(5*ui_scale,scroll_handle_offset+scroll_handle_size-self.element_space.size.y-v_pad)
 */
    __pyx_v_v_pad = (10.0 * __pyx_v_6pyglui_2ui_ui_scale);

    /* "src/pyglui/menus.pxi":669
 *             #self.element_space.size.x -= 10*ui_scale #shrink element space width to make room for scroll bar
 *             v_pad = 10*ui_scale
 *             start = self.element_space.org + self.element_space.size + Vec2(5*ui_scale,scroll_handle_offset-self.element_space.size.y+v_pad)             # <<<<<<<<<<<<<<
 *             end = self.element_space.org + self.element_space.size + Vec2(5*ui_scale,scroll_handle_offset+scroll_handle_size-self.element_space.size.y-v_pad)
 *             line(start,end,RGBA(*color_line_default))
 */
    __pyx_t_13 = PyNumber_Add(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space->org), ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space->size)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_1 = PyFloat_FromDouble((5.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = PyFloat_FromDouble(((__pyx_v_scroll_handle_offset - __pyx_v_self->__pyx_base.__pyx_base.element_space->size->y) + __pyx_v_v_pad)); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_12);
    __pyx_t_1 = 0;
    __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_v_start = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "src/pyglui/menus.pxi":670
 *             v_pad = 10*ui_scale
 *             start = self.element_space.org + self.element_space.size + Vec2(5*ui_scale,scroll_handle_offset-self.element_space.size.y+v_pad)
 *             end = self.element_space.org + self.element_space.size + Vec2(5*ui_scale,scroll_handle_offset+scroll_handle_size-self.element_space.size.y-v_pad)             # <<<<<<<<<<<<<<
 *             line(start,end,RGBA(*color_line_default))
 * 
 */
    __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space->org), ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.element_space->size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = PyFloat_FromDouble((5.0 * __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = PyFloat_FromDouble((((__pyx_v_scroll_handle_offset + __pyx_v_scroll_handle_size) - __pyx_v_self->__pyx_base.__pyx_base.element_space->size->y) - __pyx_v_v_pad)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_13);
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_v_end = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":671
 *             start = self.element_space.org + self.element_space.size + Vec2(5*ui_scale,scroll_handle_offset-self.element_space.size.y+v_pad)
 *             end = self.element_space.org + self.element_space.size + Vec2(5*ui_scale,scroll_handle_offset+scroll_handle_size-self.element_space.size.y-v_pad)
 *             line(start,end,RGBA(*color_line_default))             # <<<<<<<<<<<<<<
 * 
 *     cdef push_scissor(self):
 */
    if (!(likely(((__pyx_v_start) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_start, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(3, 671, __pyx_L1_error)
    if (!(likely(((__pyx_v_end) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_end, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(3, 671, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_13 = __pyx_f_6pyglui_2ui_line(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_start), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_end), ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "src/pyglui/menus.pxi":666
 * 
 *         #display that we have scrollable content
 *         if scroll_factor < 1:             # <<<<<<<<<<<<<<
 *             #self.element_space.size.x -= 10*ui_scale #shrink element space width to make room for scroll bar
 *             v_pad = 10*ui_scale
 */
  }

  /* "src/pyglui/menus.pxi":634
 *                 (<UI_element>e).draw_overlay(self.element_space, parent_read_only=parent_read_only or self._read_only)
 * 
 *     cdef draw_scroll_window_elements(self, bint parent_read_only):             # <<<<<<<<<<<<<<
 * 
 *         #compute scroll stack height.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF((PyObject *)__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.draw_scroll_window_elements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":673
 *             line(start,end,RGBA(*color_line_default))
 * 
 *     cdef push_scissor(self):             # <<<<<<<<<<<<<<
 *         # compute and set gl scissor
 *         gl.glPushAttrib(gl.GL_SCISSOR_BIT)
 */

static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_push_scissor(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self) {
  int __pyx_v_sb[4];
  float __pyx_v_org_x;
  float __pyx_v_size_x;
  float __pyx_v_org_y;
  float __pyx_v_size_y;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  float __pyx_t_5;
  float __pyx_t_6;
  long __pyx_t_7;
  GLint __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("push_scissor", 0);

  /* "src/pyglui/menus.pxi":675
 *     cdef push_scissor(self):
 *         # compute and set gl scissor
 *         gl.glPushAttrib(gl.GL_SCISSOR_BIT)             # <<<<<<<<<<<<<<
 *         gl.glEnable(gl.GL_SCISSOR_TEST)
 *         cdef int sb[4]
 */
  glPushAttrib(GL_SCISSOR_BIT);

  /* "src/pyglui/menus.pxi":676
 *         # compute and set gl scissor
 *         gl.glPushAttrib(gl.GL_SCISSOR_BIT)
 *         gl.glEnable(gl.GL_SCISSOR_TEST)             # <<<<<<<<<<<<<<
 *         cdef int sb[4]
 *         global window_size
 */
  glEnable(GL_SCISSOR_TEST);

  /* "src/pyglui/menus.pxi":679
 *         cdef int sb[4]
 *         global window_size
 *         gl.glGetIntegerv(gl.GL_SCISSOR_BOX,sb)             # <<<<<<<<<<<<<<
 *         sb[1] = window_size.y-sb[1]-sb[3] # y-flipped coord system
 *         #deal with nested scissors
 */
  glGetIntegerv(GL_SCISSOR_BOX, __pyx_v_sb);

  /* "src/pyglui/menus.pxi":680
 *         global window_size
 *         gl.glGetIntegerv(gl.GL_SCISSOR_BOX,sb)
 *         sb[1] = window_size.y-sb[1]-sb[3] # y-flipped coord system             # <<<<<<<<<<<<<<
 *         #deal with nested scissors
 *         cdef float org_x = max(sb[0],self.element_space.org.x)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_window_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_sb[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_sb[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_sb[1]) = __pyx_t_4;

  /* "src/pyglui/menus.pxi":682
 *         sb[1] = window_size.y-sb[1]-sb[3] # y-flipped coord system
 *         #deal with nested scissors
 *         cdef float org_x = max(sb[0],self.element_space.org.x)             # <<<<<<<<<<<<<<
 *         cdef float size_x = min(sb[0]+sb[2],self.element_space.org.x+self.element_space.size.x)
 *         size_x = max(0,size_x-org_x)
 */
  __pyx_t_5 = __pyx_v_self->__pyx_base.__pyx_base.element_space->org->x;
  __pyx_t_4 = (__pyx_v_sb[0]);
  if ((__pyx_t_5 > __pyx_t_4)) {
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_4;
  }
  __pyx_v_org_x = __pyx_t_6;

  /* "src/pyglui/menus.pxi":683
 *         #deal with nested scissors
 *         cdef float org_x = max(sb[0],self.element_space.org.x)
 *         cdef float size_x = min(sb[0]+sb[2],self.element_space.org.x+self.element_space.size.x)             # <<<<<<<<<<<<<<
 *         size_x = max(0,size_x-org_x)
 *         cdef float org_y = max(sb[1],self.element_space.org.y)
 */
  __pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.element_space->org->x + __pyx_v_self->__pyx_base.__pyx_base.element_space->size->x);
  __pyx_t_4 = ((__pyx_v_sb[0]) + (__pyx_v_sb[2]));
  if ((__pyx_t_6 < __pyx_t_4)) {
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_size_x = __pyx_t_5;

  /* "src/pyglui/menus.pxi":684
 *         cdef float org_x = max(sb[0],self.element_space.org.x)
 *         cdef float size_x = min(sb[0]+sb[2],self.element_space.org.x+self.element_space.size.x)
 *         size_x = max(0,size_x-org_x)             # <<<<<<<<<<<<<<
 *         cdef float org_y = max(sb[1],self.element_space.org.y)
 *         cdef float size_y = min(sb[1]+sb[3],self.element_space.org.y+self.element_space.size.y)
 */
  __pyx_t_5 = (__pyx_v_size_x - __pyx_v_org_x);
  __pyx_t_7 = 0;
  if ((__pyx_t_5 > __pyx_t_7)) {
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_7;
  }
  __pyx_v_size_x = __pyx_t_6;

  /* "src/pyglui/menus.pxi":685
 *         cdef float size_x = min(sb[0]+sb[2],self.element_space.org.x+self.element_space.size.x)
 *         size_x = max(0,size_x-org_x)
 *         cdef float org_y = max(sb[1],self.element_space.org.y)             # <<<<<<<<<<<<<<
 *         cdef float size_y = min(sb[1]+sb[3],self.element_space.org.y+self.element_space.size.y)
 *         size_y = max(0,size_y-org_y)
 */
  __pyx_t_6 = __pyx_v_self->__pyx_base.__pyx_base.element_space->org->y;
  __pyx_t_4 = (__pyx_v_sb[1]);
  if ((__pyx_t_6 > __pyx_t_4)) {
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_org_y = __pyx_t_5;

  /* "src/pyglui/menus.pxi":686
 *         size_x = max(0,size_x-org_x)
 *         cdef float org_y = max(sb[1],self.element_space.org.y)
 *         cdef float size_y = min(sb[1]+sb[3],self.element_space.org.y+self.element_space.size.y)             # <<<<<<<<<<<<<<
 *         size_y = max(0,size_y-org_y)
 *         gl.glScissor(int(org_x),window_size.y-int(org_y)-int(size_y),int(size_x),int(size_y))
 */
  __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.element_space->org->y + __pyx_v_self->__pyx_base.__pyx_base.element_space->size->y);
  __pyx_t_4 = ((__pyx_v_sb[1]) + (__pyx_v_sb[3]));
  if ((__pyx_t_5 < __pyx_t_4)) {
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_4;
  }
  __pyx_v_size_y = __pyx_t_6;

  /* "src/pyglui/menus.pxi":687
 *         cdef float org_y = max(sb[1],self.element_space.org.y)
 *         cdef float size_y = min(sb[1]+sb[3],self.element_space.org.y+self.element_space.size.y)
 *         size_y = max(0,size_y-org_y)             # <<<<<<<<<<<<<<
 *         gl.glScissor(int(org_x),window_size.y-int(org_y)-int(size_y),int(size_x),int(size_y))
 * 
 */
  __pyx_t_6 = (__pyx_v_size_y - __pyx_v_org_y);
  __pyx_t_7 = 0;
  if ((__pyx_t_6 > __pyx_t_7)) {
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_5 = __pyx_t_7;
  }
  __pyx_v_size_y = __pyx_t_5;

  /* "src/pyglui/menus.pxi":688
 *         cdef float size_y = min(sb[1]+sb[3],self.element_space.org.y+self.element_space.size.y)
 *         size_y = max(0,size_y-org_y)
 *         gl.glScissor(int(org_x),window_size.y-int(org_y)-int(size_y),int(size_x),int(size_y))             # <<<<<<<<<<<<<<
 * 
 *     cdef pop_scissor(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_window_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_FromDouble(__pyx_v_org_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_FromDouble(__pyx_v_size_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyInt_As_GLint(__pyx_t_1); if (unlikely((__pyx_t_8 == ((GLint)-1)) && PyErr_Occurred())) __PYX_ERR(3, 688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  glScissor(((GLint)__pyx_v_org_x), __pyx_t_8, ((GLsizei)__pyx_v_size_x), ((GLsizei)__pyx_v_size_y));

  /* "src/pyglui/menus.pxi":673
 *             line(start,end,RGBA(*color_line_default))
 * 
 *     cdef push_scissor(self):             # <<<<<<<<<<<<<<
 *         # compute and set gl scissor
 *         gl.glPushAttrib(gl.GL_SCISSOR_BIT)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.push_scissor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":690
 *         gl.glScissor(int(org_x),window_size.y-int(org_y)-int(size_y),int(size_x),int(size_y))
 * 
 *     cdef pop_scissor(self):             # <<<<<<<<<<<<<<
 *         #restore scissor state
 *         gl.glPopAttrib()
 */

static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_pop_scissor(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop_scissor", 0);

  /* "src/pyglui/menus.pxi":692
 *     cdef pop_scissor(self):
 *         #restore scissor state
 *         gl.glPopAttrib()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  glPopAttrib();

  /* "src/pyglui/menus.pxi":690
 *         gl.glScissor(int(org_x),window_size.y-int(org_y)-int(size_y),int(size_x),int(size_y))
 * 
 *     cdef pop_scissor(self):             # <<<<<<<<<<<<<<
 *         #restore scissor state
 *         gl.glPopAttrib()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":695
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef bint mouse_over_menu = 0
 */

static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_14Scrolling_Menu_handle_input(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_14Scrolling_Menu_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  int __pyx_v_mouse_over_menu;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 695, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_11handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 695, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 695, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 695, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":697
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         global should_redraw
 *         cdef bint mouse_over_menu = 0             # <<<<<<<<<<<<<<
 * 
 *         if self.resize_corner is not None:
 */
  __pyx_v_mouse_over_menu = 0;

  /* "src/pyglui/menus.pxi":699
 *         cdef bint mouse_over_menu = 0
 * 
 *         if self.resize_corner is not None:             # <<<<<<<<<<<<<<
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.minimize_corner is not None and not (2 == self.header_pos_id and not self.element_space.has_area()):
 */
  __pyx_t_8 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.resize_corner) != Py_None);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":700
 * 
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)             # <<<<<<<<<<<<<<
 *         if self.minimize_corner is not None and not (2 == self.header_pos_id and not self.element_space.has_area()):
 *             self.minimize_corner.handle_input(new_input,visible)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Draggable *)__pyx_v_self->__pyx_base.__pyx_base.resize_corner->__pyx_vtab)->handle_input(__pyx_v_self->__pyx_base.__pyx_base.resize_corner, __pyx_v_new_input, __pyx_v_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":699
 *         cdef bint mouse_over_menu = 0
 * 
 *         if self.resize_corner is not None:             # <<<<<<<<<<<<<<
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.minimize_corner is not None and not (2 == self.header_pos_id and not self.element_space.has_area()):
 */
  }

  /* "src/pyglui/menus.pxi":701
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.minimize_corner is not None and not (2 == self.header_pos_id and not self.element_space.has_area()):             # <<<<<<<<<<<<<<
 *             self.minimize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:
 */
  __pyx_t_9 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.minimize_corner) != Py_None);
  if (__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = (2 == __pyx_v_self->__pyx_base.__pyx_base.header_pos_id);
  if (__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(3, 701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_11 = (!__pyx_t_10);
  __pyx_t_9 = __pyx_t_11;
  __pyx_L7_bool_binop_done:;
  __pyx_t_11 = (!__pyx_t_9);
  __pyx_t_8 = __pyx_t_11;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":702
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.minimize_corner is not None and not (2 == self.header_pos_id and not self.element_space.has_area()):
 *             self.minimize_corner.handle_input(new_input,visible)             # <<<<<<<<<<<<<<
 *         if self.menu_bar is not None:
 *             self.menu_bar.handle_input(new_input,visible)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Draggable *)__pyx_v_self->__pyx_base.__pyx_base.minimize_corner->__pyx_vtab)->handle_input(__pyx_v_self->__pyx_base.__pyx_base.minimize_corner, __pyx_v_new_input, __pyx_v_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":701
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 *         if self.minimize_corner is not None and not (2 == self.header_pos_id and not self.element_space.has_area()):             # <<<<<<<<<<<<<<
 *             self.minimize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:
 */
  }

  /* "src/pyglui/menus.pxi":703
 *         if self.minimize_corner is not None and not (2 == self.header_pos_id and not self.element_space.has_area()):
 *             self.minimize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:             # <<<<<<<<<<<<<<
 *             self.menu_bar.handle_input(new_input,visible)
 * 
 */
  __pyx_t_8 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.menu_bar) != Py_None);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":704
 *             self.minimize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:
 *             self.menu_bar.handle_input(new_input,visible)             # <<<<<<<<<<<<<<
 * 
 *         #if elements are not visible, no need to interact with them.
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Draggable *)__pyx_v_self->__pyx_base.__pyx_base.menu_bar->__pyx_vtab)->handle_input(__pyx_v_self->__pyx_base.__pyx_base.menu_bar, __pyx_v_new_input, __pyx_v_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":703
 *         if self.minimize_corner is not None and not (2 == self.header_pos_id and not self.element_space.has_area()):
 *             self.minimize_corner.handle_input(new_input,visible)
 *         if self.menu_bar is not None:             # <<<<<<<<<<<<<<
 *             self.menu_bar.handle_input(new_input,visible)
 * 
 */
  }

  /* "src/pyglui/menus.pxi":707
 * 
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             # let the elements know that the mouse should be ignored
 *             # if outside of the visible scroll section
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":710
 *             # let the elements know that the mouse should be ignored
 *             # if outside of the visible scroll section
 *             mouse_over_menu =  self.element_space.org.y <= new_input.m.y <= self.element_space.org.y+self.element_space.size.y             # <<<<<<<<<<<<<<
 *             mouse_over_menu = mouse_over_menu and visible
 *             for e in self.elements:
 */
    __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.element_space->org->y <= __pyx_v_new_input->m->y);
    if (__pyx_t_8) {
      __pyx_t_8 = (__pyx_v_new_input->m->y <= (__pyx_v_self->__pyx_base.__pyx_base.element_space->org->y + __pyx_v_self->__pyx_base.__pyx_base.element_space->size->y));
    }
    __pyx_v_mouse_over_menu = __pyx_t_8;

    /* "src/pyglui/menus.pxi":711
 *             # if outside of the visible scroll section
 *             mouse_over_menu =  self.element_space.org.y <= new_input.m.y <= self.element_space.org.y+self.element_space.size.y
 *             mouse_over_menu = mouse_over_menu and visible             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, mouse_over_menu,self._read_only or parent_read_only)
 */
    if (__pyx_v_mouse_over_menu) {
    } else {
      __pyx_t_8 = __pyx_v_mouse_over_menu;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_8 = __pyx_v_visible;
    __pyx_L11_bool_binop_done:;
    __pyx_v_mouse_over_menu = __pyx_t_8;

    /* "src/pyglui/menus.pxi":712
 *             mouse_over_menu =  self.element_space.org.y <= new_input.m.y <= self.element_space.org.y+self.element_space.size.y
 *             mouse_over_menu = mouse_over_menu and visible
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, mouse_over_menu,self._read_only or parent_read_only)
 * 
 */
    if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 712, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
    for (;;) {
      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 712, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":713
 *             mouse_over_menu = mouse_over_menu and visible
 *             for e in self.elements:
 *                 e.handle_input(new_input, mouse_over_menu,self._read_only or parent_read_only)             # <<<<<<<<<<<<<<
 * 
 *             # handle scrollbar interaction after menu items
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_handle_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_mouse_over_menu); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 713, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L15_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L15_bool_binop_done:;
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 713, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":712
 *             mouse_over_menu =  self.element_space.org.y <= new_input.m.y <= self.element_space.org.y+self.element_space.size.y
 *             mouse_over_menu = mouse_over_menu and visible
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, mouse_over_menu,self._read_only or parent_read_only)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":718
 *             # so grabbing a slider does not trigger scrolling
 *             #mouse:
 *             self.scrollbar.handle_input(new_input,visible)             # <<<<<<<<<<<<<<
 *             #scrollwheel:
 *             if new_input.s.y and visible and self.element_space.mouse_over(new_input.m):
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Draggable *)__pyx_v_self->scrollbar->__pyx_vtab)->handle_input(__pyx_v_self->scrollbar, __pyx_v_new_input, __pyx_v_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":720
 *             self.scrollbar.handle_input(new_input,visible)
 *             #scrollwheel:
 *             if new_input.s.y and visible and self.element_space.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                 self.scrollstate.y += new_input.s.y * 3
 *                 new_input.s.y = 0
 */
    __pyx_t_11 = (__pyx_v_new_input->s->y != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_8 = __pyx_t_11;
      goto __pyx_L18_bool_binop_done;
    }
    if (__pyx_v_visible) {
    } else {
      __pyx_t_8 = __pyx_v_visible;
      goto __pyx_L18_bool_binop_done;
    }
    __pyx_t_1 = ((PyObject *)__pyx_v_new_input->m);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_11 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.element_space->__pyx_vtab)->mouse_over(__pyx_v_self->__pyx_base.__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __pyx_t_11;
    __pyx_L18_bool_binop_done:;
    if (__pyx_t_8) {

      /* "src/pyglui/menus.pxi":721
 *             #scrollwheel:
 *             if new_input.s.y and visible and self.element_space.mouse_over(new_input.m):
 *                 self.scrollstate.y += new_input.s.y * 3             # <<<<<<<<<<<<<<
 *                 new_input.s.y = 0
 *                 should_redraw = True
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->scrollstate);
      __pyx_t_13 = __pyx_v_self->scrollstate;
      __pyx_t_13->y = (__pyx_t_13->y + (__pyx_v_new_input->s->y * 3.0));
      __Pyx_DECREF((PyObject *)__pyx_t_13); __pyx_t_13 = 0;

      /* "src/pyglui/menus.pxi":722
 *             if new_input.s.y and visible and self.element_space.mouse_over(new_input.m):
 *                 self.scrollstate.y += new_input.s.y * 3
 *                 new_input.s.y = 0             # <<<<<<<<<<<<<<
 *                 should_redraw = True
 * 
 */
      __pyx_v_new_input->s->y = 0.0;

      /* "src/pyglui/menus.pxi":723
 *                 self.scrollstate.y += new_input.s.y * 3
 *                 new_input.s.y = 0
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_6pyglui_2ui_should_redraw = 1;

      /* "src/pyglui/menus.pxi":720
 *             self.scrollbar.handle_input(new_input,visible)
 *             #scrollwheel:
 *             if new_input.s.y and visible and self.element_space.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                 self.scrollstate.y += new_input.s.y * 3
 *                 new_input.s.y = 0
 */
    }

    /* "src/pyglui/menus.pxi":707
 * 
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             # let the elements know that the mouse should be ignored
 *             # if outside of the visible scroll section
 */
  }

  /* "src/pyglui/menus.pxi":695
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef bint mouse_over_menu = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF((PyObject *)__pyx_t_13);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_14Scrolling_Menu_11handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_11handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_11handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 695, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 695, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(3, 695, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 695, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(3, 695, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 695, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 695, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(3, 695, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(3, 695, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_10handle_input(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_10handle_input(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Scrolling_Menu->__pyx_base.__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":726
 * 
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         self.collapsed = not self.collapsed
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_13toggle_iconified(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_14Scrolling_Menu_13toggle_iconified = {"toggle_iconified", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_13toggle_iconified, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_13toggle_iconified(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toggle_iconified (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("toggle_iconified", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "toggle_iconified", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_12toggle_iconified(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_12toggle_iconified(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toggle_iconified", 0);

  /* "src/pyglui/menus.pxi":727
 * 
 *     def toggle_iconified(self):
 *         self.collapsed = not self.collapsed             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed, __pyx_t_1) < 0) __PYX_ERR(3, 727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":726
 * 
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         self.collapsed = not self.collapsed
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.toggle_iconified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":729
 *         self.collapsed = not self.collapsed
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def collapsed(self):
 *         return self._collapsed
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_9collapsed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_9collapsed_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_9collapsed___get__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":731
 *     @property
 *     def collapsed(self):
 *         return self._collapsed             # <<<<<<<<<<<<<<
 * 
 *     @collapsed.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":729
 *         self.collapsed = not self.collapsed
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def collapsed(self):
 *         return self._collapsed
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.collapsed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":733
 *         return self._collapsed
 * 
 *     @collapsed.setter             # <<<<<<<<<<<<<<
 *     def collapsed(self, should_collapse):
 *         if should_collapse != self.collapsed:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_14Scrolling_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_should_collapse); /*proto*/
static int __pyx_pw_6pyglui_2ui_14Scrolling_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_should_collapse) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_9collapsed_2__set__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_should_collapse));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_14Scrolling_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, PyObject *__pyx_v_should_collapse) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":735
 *     @collapsed.setter
 *     def collapsed(self, should_collapse):
 *         if should_collapse != self.collapsed:             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             should_redraw = True
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_should_collapse, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":737
 *         if should_collapse != self.collapsed:
 *             global should_redraw
 *             should_redraw = True             # <<<<<<<<<<<<<<
 *             self._collapsed = should_collapse
 * 
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "src/pyglui/menus.pxi":738
 *             global should_redraw
 *             should_redraw = True
 *             self._collapsed = should_collapse             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_should_collapse); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 738, __pyx_L1_error)
    __pyx_v_self->_collapsed = __pyx_t_3;

    /* "src/pyglui/menus.pxi":735
 *     @collapsed.setter
 *     def collapsed(self, should_collapse):
 *         if should_collapse != self.collapsed:             # <<<<<<<<<<<<<<
 *             global should_redraw
 *             should_redraw = True
 */
  }

  /* "src/pyglui/menus.pxi":733
 *         return self._collapsed
 * 
 *     @collapsed.setter             # <<<<<<<<<<<<<<
 *     def collapsed(self, should_collapse):
 *         if should_collapse != self.collapsed:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.collapsed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":740
 *             self._collapsed = should_collapse
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_13configuration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_13configuration_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_13configuration___get__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self) {
  PyObject *__pyx_v_submenus = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":742
 *     @property
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()             # <<<<<<<<<<<<<<
 *         if self.collapsed:
 *             return {'label': self.label,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.get_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 742, __pyx_L1_error)
  __pyx_v_submenus = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":743
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 *         if self.collapsed:             # <<<<<<<<<<<<<<
 *             return {'label': self.label,
 *                     'pos':self.outline.design_org[:],
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyglui/menus.pxi":744
 *         cdef dict submenus = self.get_submenu_config()
 *         if self.collapsed:
 *             return {'label': self.label,             # <<<<<<<<<<<<<<
 *                     'pos':self.outline.design_org[:],
 *                     'size':self.outline.design_size[:],
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_label, __pyx_t_3) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":745
 *         if self.collapsed:
 *             return {'label': self.label,
 *                     'pos':self.outline.design_org[:],             # <<<<<<<<<<<<<<
 *                     'size':self.outline.design_size[:],
 *                     'scrollstate':self.scrollstate[:],
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pos, __pyx_t_3) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":746
 *             return {'label': self.label,
 *                     'pos':self.outline.design_org[:],
 *                     'size':self.outline.design_size[:],             # <<<<<<<<<<<<<<
 *                     'scrollstate':self.scrollstate[:],
 *                     'collapsed':True,
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_size, __pyx_t_3) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":747
 *                     'pos':self.outline.design_org[:],
 *                     'size':self.outline.design_size[:],
 *                     'scrollstate':self.scrollstate[:],             # <<<<<<<<<<<<<<
 *                     'collapsed':True,
 *                     'min_size': self.outline.min_size[:],
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->scrollstate), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_scrollstate, __pyx_t_3) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":748
 *                     'size':self.outline.design_size[:],
 *                     'scrollstate':self.scrollstate[:],
 *                     'collapsed':True,             # <<<<<<<<<<<<<<
 *                     'min_size': self.outline.min_size[:],
 *                     'uncollapsed_min_size': self.uncollapsed_outline.min_size[:],
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_collapsed, Py_True) < 0) __PYX_ERR(3, 744, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":749
 *                     'scrollstate':self.scrollstate[:],
 *                     'collapsed':True,
 *                     'min_size': self.outline.min_size[:],             # <<<<<<<<<<<<<<
 *                     'uncollapsed_min_size': self.uncollapsed_outline.min_size[:],
 *                     'uncollapsed_pos':self.uncollapsed_outline.design_org[:],
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->min_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_min_size, __pyx_t_3) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":750
 *                     'collapsed':True,
 *                     'min_size': self.outline.min_size[:],
 *                     'uncollapsed_min_size': self.uncollapsed_outline.min_size[:],             # <<<<<<<<<<<<<<
 *                     'uncollapsed_pos':self.uncollapsed_outline.design_org[:],
 *                     'uncollapsed_size':self.uncollapsed_outline.design_size[:],
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->uncollapsed_outline->min_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_uncollapsed_min_size, __pyx_t_3) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":751
 *                     'min_size': self.outline.min_size[:],
 *                     'uncollapsed_min_size': self.uncollapsed_outline.min_size[:],
 *                     'uncollapsed_pos':self.uncollapsed_outline.design_org[:],             # <<<<<<<<<<<<<<
 *                     'uncollapsed_size':self.uncollapsed_outline.design_size[:],
 *                     'submenus':submenus}
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->uncollapsed_outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_uncollapsed_pos, __pyx_t_3) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":752
 *                     'uncollapsed_min_size': self.uncollapsed_outline.min_size[:],
 *                     'uncollapsed_pos':self.uncollapsed_outline.design_org[:],
 *                     'uncollapsed_size':self.uncollapsed_outline.design_size[:],             # <<<<<<<<<<<<<<
 *                     'submenus':submenus}
 *         else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->uncollapsed_outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_uncollapsed_size, __pyx_t_3) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":753
 *                     'uncollapsed_pos':self.uncollapsed_outline.design_org[:],
 *                     'uncollapsed_size':self.uncollapsed_outline.design_size[:],
 *                     'submenus':submenus}             # <<<<<<<<<<<<<<
 *         else:
 *             return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_submenus, __pyx_v_submenus) < 0) __PYX_ERR(3, 744, __pyx_L1_error)
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "src/pyglui/menus.pxi":743
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 *         if self.collapsed:             # <<<<<<<<<<<<<<
 *             return {'label': self.label,
 *                     'pos':self.outline.design_org[:],
 */
  }

  /* "src/pyglui/menus.pxi":755
 *                     'submenus':submenus}
 *         else:
 *             return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],             # <<<<<<<<<<<<<<
 *                     'collapsed':False,'submenus':submenus,'scrollstate':self.scrollstate[:],
 *                     'min_size': self.outline.min_size[:]}
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pos, __pyx_t_3) < 0) __PYX_ERR(3, 755, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_size, __pyx_t_3) < 0) __PYX_ERR(3, 755, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":756
 *         else:
 *             return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],
 *                     'collapsed':False,'submenus':submenus,'scrollstate':self.scrollstate[:],             # <<<<<<<<<<<<<<
 *                     'min_size': self.outline.min_size[:]}
 * 
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_collapsed, Py_False) < 0) __PYX_ERR(3, 755, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_submenus, __pyx_v_submenus) < 0) __PYX_ERR(3, 755, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->scrollstate), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_scrollstate, __pyx_t_3) < 0) __PYX_ERR(3, 755, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":757
 *             return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],
 *                     'collapsed':False,'submenus':submenus,'scrollstate':self.scrollstate[:],
 *                     'min_size': self.outline.min_size[:]}             # <<<<<<<<<<<<<<
 * 
 *     @configuration.setter
 */
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->min_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_min_size, __pyx_t_3) < 0) __PYX_ERR(3, 755, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "src/pyglui/menus.pxi":740
 *             self._collapsed = should_collapse
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.configuration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_submenus);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":759
 *                     'min_size': self.outline.min_size[:]}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self, new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos', self.outline.design_org[:])
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_14Scrolling_Menu_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf); /*proto*/
static int __pyx_pw_6pyglui_2ui_14Scrolling_Menu_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_13configuration_2__set__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_new_conf));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_14Scrolling_Menu_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":761
 *     @configuration.setter
 *     def configuration(self, new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos', self.outline.design_org[:])             # <<<<<<<<<<<<<<
 *         self.outline.design_size[:] = new_conf.get('size', self.outline.design_size[:])
 *         self.outline.min_size[:] = new_conf.get('min_size', None)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_pos, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_org), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":762
 *     def configuration(self, new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos', self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size', self.outline.design_size[:])             # <<<<<<<<<<<<<<
 *         self.outline.min_size[:] = new_conf.get('min_size', None)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_size, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":763
 *         self.outline.design_org[:] = new_conf.get('pos', self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size', self.outline.design_size[:])
 *         self.outline.min_size[:] = new_conf.get('min_size', None)             # <<<<<<<<<<<<<<
 * 
 *         if new_conf.get('collapsed', False):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->min_size), __pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":765
 *         self.outline.min_size[:] = new_conf.get('min_size', None)
 * 
 *         if new_conf.get('collapsed', False):             # <<<<<<<<<<<<<<
 * 
 *             self.uncollapsed_outline.design_org[:] = new_conf.get('uncollapsed_pos',self.outline.design_org[:])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 765, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "src/pyglui/menus.pxi":767
 *         if new_conf.get('collapsed', False):
 * 
 *             self.uncollapsed_outline.design_org[:] = new_conf.get('uncollapsed_pos',self.outline.design_org[:])             # <<<<<<<<<<<<<<
 *             self.uncollapsed_outline.design_size[:] = new_conf.get('uncollapsed_size',self.outline.design_size[:])
 *             self.uncollapsed_outline.min_size[:] = new_conf.get('uncollapsed_min_size',None)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_uncollapsed_pos, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->uncollapsed_outline->design_org), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 767, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":768
 * 
 *             self.uncollapsed_outline.design_org[:] = new_conf.get('uncollapsed_pos',self.outline.design_org[:])
 *             self.uncollapsed_outline.design_size[:] = new_conf.get('uncollapsed_size',self.outline.design_size[:])             # <<<<<<<<<<<<<<
 *             self.uncollapsed_outline.min_size[:] = new_conf.get('uncollapsed_min_size',None)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_uncollapsed_size, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->uncollapsed_outline->design_size), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":769
 *             self.uncollapsed_outline.design_org[:] = new_conf.get('uncollapsed_pos',self.outline.design_org[:])
 *             self.uncollapsed_outline.design_size[:] = new_conf.get('uncollapsed_size',self.outline.design_size[:])
 *             self.uncollapsed_outline.min_size[:] = new_conf.get('uncollapsed_min_size',None)             # <<<<<<<<<<<<<<
 * 
 *         self.collapsed = new_conf.get('collapsed', False)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->uncollapsed_outline->min_size), __pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 769, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":765
 *         self.outline.min_size[:] = new_conf.get('min_size', None)
 * 
 *         if new_conf.get('collapsed', False):             # <<<<<<<<<<<<<<
 * 
 *             self.uncollapsed_outline.design_org[:] = new_conf.get('uncollapsed_pos',self.outline.design_org[:])
 */
  }

  /* "src/pyglui/menus.pxi":771
 *             self.uncollapsed_outline.min_size[:] = new_conf.get('uncollapsed_min_size',None)
 * 
 *         self.collapsed = new_conf.get('collapsed', False)             # <<<<<<<<<<<<<<
 *         self.header_pos = self.header_pos #update layout
 *         self.scrollstate[:] = new_conf.get('scrollstate',(0,0))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed, __pyx_t_1) < 0) __PYX_ERR(3, 771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":772
 * 
 *         self.collapsed = new_conf.get('collapsed', False)
 *         self.header_pos = self.header_pos #update layout             # <<<<<<<<<<<<<<
 *         self.scrollstate[:] = new_conf.get('scrollstate',(0,0))
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_header_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_header_pos, __pyx_t_1) < 0) __PYX_ERR(3, 772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":773
 *         self.collapsed = new_conf.get('collapsed', False)
 *         self.header_pos = self.header_pos #update layout
 *         self.scrollstate[:] = new_conf.get('scrollstate',(0,0))             # <<<<<<<<<<<<<<
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->scrollstate), __pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":774
 *         self.header_pos = self.header_pos #update layout
 *         self.scrollstate[:] = new_conf.get('scrollstate',(0,0))
 *         self.set_submenu_config(new_conf.get('submenus',{}))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_submenus, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(3, 774, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.set_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":759
 *                     'min_size': self.outline.min_size[:]}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self, new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos', self.outline.design_org[:])
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.configuration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_14Scrolling_Menu_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_14__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_14Scrolling_Menu_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_14Scrolling_Menu_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_14Scrolling_Menu_16__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14Scrolling_Menu_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Scrolling_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":781
 *     cdef public UI_element horizontal_constraint, vertical_constraint
 * 
 *     def __cinit__(self, pos=(0., 0.), size=(0., 0.), padding=(0., 0.)):             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(*pos), Vec2(*size))
 *         self.element_space = FitBox(Vec2(*padding), Vec2(0., 0.) - Vec2(*padding))
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Container_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Container_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_padding = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_padding,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_padding,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)__pyx_tuple__43);
    values[1] = ((PyObject *)__pyx_tuple__43);
    values[2] = ((PyObject *)__pyx_tuple__43);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 781, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 781, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_padding);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 781, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(3, 781, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = values[0];
    __pyx_v_size = values[1];
    __pyx_v_padding = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, __pyx_nargs); __PYX_ERR(3, 781, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Container.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container___cinit__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), __pyx_v_pos, __pyx_v_size, __pyx_v_padding);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Container___cinit__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_size, PyObject *__pyx_v_padding) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "src/pyglui/menus.pxi":782
 * 
 *     def __cinit__(self, pos=(0., 0.), size=(0., 0.), padding=(0., 0.)):
 *         self.outline = FitBox(Vec2(*pos), Vec2(*size))             # <<<<<<<<<<<<<<
 *         self.element_space = FitBox(Vec2(*padding), Vec2(0., 0.) - Vec2(*padding))
 *         self.elements = []
 */
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __pyx_v_self->__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/pyglui/menus.pxi":783
 *     def __cinit__(self, pos=(0., 0.), size=(0., 0.), padding=(0., 0.)):
 *         self.outline = FitBox(Vec2(*pos), Vec2(*size))
 *         self.element_space = FitBox(Vec2(*padding), Vec2(0., 0.) - Vec2(*padding))             # <<<<<<<<<<<<<<
 *         self.elements = []
 *         self.horizontal_constraint = None
 */
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_padding); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_padding); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
  __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
  __pyx_v_self->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":784
 *         self.outline = FitBox(Vec2(*pos), Vec2(*size))
 *         self.element_space = FitBox(Vec2(*padding), Vec2(0., 0.) - Vec2(*padding))
 *         self.elements = []             # <<<<<<<<<<<<<<
 *         self.horizontal_constraint = None
 *         self.vertical_constraint = None
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.elements);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.elements);
  __pyx_v_self->__pyx_base.elements = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":785
 *         self.element_space = FitBox(Vec2(*padding), Vec2(0., 0.) - Vec2(*padding))
 *         self.elements = []
 *         self.horizontal_constraint = None             # <<<<<<<<<<<<<<
 *         self.vertical_constraint = None
 *         self.label = 'Container'
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->horizontal_constraint);
  __Pyx_DECREF((PyObject *)__pyx_v_self->horizontal_constraint);
  __pyx_v_self->horizontal_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)Py_None);

  /* "src/pyglui/menus.pxi":786
 *         self.elements = []
 *         self.horizontal_constraint = None
 *         self.vertical_constraint = None             # <<<<<<<<<<<<<<
 *         self.label = 'Container'
 * 
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->vertical_constraint);
  __Pyx_DECREF((PyObject *)__pyx_v_self->vertical_constraint);
  __pyx_v_self->vertical_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)Py_None);

  /* "src/pyglui/menus.pxi":787
 *         self.horizontal_constraint = None
 *         self.vertical_constraint = None
 *         self.label = 'Container'             # <<<<<<<<<<<<<<
 * 
 *     def init(self, *args, **kwargs):
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_label, __pyx_n_u_Container) < 0) __PYX_ERR(3, 787, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":781
 *     cdef public UI_element horizontal_constraint, vertical_constraint
 * 
 *     def __cinit__(self, pos=(0., 0.), size=(0., 0.), padding=(0., 0.)):             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(Vec2(*pos), Vec2(*size))
 *         self.element_space = FitBox(Vec2(*padding), Vec2(0., 0.) - Vec2(*padding))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Container.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":789
 *         self.label = 'Container'
 * 
 *     def init(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_3init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Container_3init = {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pyglui_2ui_9Container_3init, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Container_3init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "init", 1))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_2init(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_2init(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":792
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         # compute constraints
 *         cdef FitBox copy = parent.computed_copy()
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Container_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Container_draw(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Container_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_copy = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_11 = NULL;
  float __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Container_5draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 792, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":794
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         # compute constraints
 *         cdef FitBox copy = parent.computed_copy()             # <<<<<<<<<<<<<<
 *         self.outline.compute(copy)
 *         if self.horizontal_constraint is not None:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_parent->__pyx_vtab)->computed_copy(__pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(3, 794, __pyx_L1_error)
  __pyx_v_copy = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":795
 *         # compute constraints
 *         cdef FitBox copy = parent.computed_copy()
 *         self.outline.compute(copy)             # <<<<<<<<<<<<<<
 *         if self.horizontal_constraint is not None:
 *             self.horizontal_constraint.precompute(parent)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.outline, __pyx_v_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":796
 *         cdef FitBox copy = parent.computed_copy()
 *         self.outline.compute(copy)
 *         if self.horizontal_constraint is not None:             # <<<<<<<<<<<<<<
 *             self.horizontal_constraint.precompute(parent)
 *             if 0 <= copy.org.x < self.horizontal_constraint.outline.org.x < copy.org.x + copy.size.x:
 */
  __pyx_t_8 = (((PyObject *)__pyx_v_self->horizontal_constraint) != Py_None);
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":797
 *         self.outline.compute(copy)
 *         if self.horizontal_constraint is not None:
 *             self.horizontal_constraint.precompute(parent)             # <<<<<<<<<<<<<<
 *             if 0 <= copy.org.x < self.horizontal_constraint.outline.org.x < copy.org.x + copy.size.x:
 *                 copy.size.x = self.horizontal_constraint.outline.org.x - copy.org.x
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI_element *)__pyx_v_self->horizontal_constraint->__pyx_vtab)->precompute(__pyx_v_self->horizontal_constraint, __pyx_v_parent, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":798
 *         if self.horizontal_constraint is not None:
 *             self.horizontal_constraint.precompute(parent)
 *             if 0 <= copy.org.x < self.horizontal_constraint.outline.org.x < copy.org.x + copy.size.x:             # <<<<<<<<<<<<<<
 *                 copy.size.x = self.horizontal_constraint.outline.org.x - copy.org.x
 *                 if isinstance(self.horizontal_constraint, Base_Menu) and self.horizontal_constraint.header_pos_id == 2 and not self.horizontal_constraint.collapsed:  # left header
 */
    __pyx_t_8 = (0.0 <= __pyx_v_copy->org->x);
    if (__pyx_t_8) {
      __pyx_t_8 = (__pyx_v_copy->org->x < __pyx_v_self->horizontal_constraint->outline->org->x);
      if (__pyx_t_8) {
        __pyx_t_8 = (__pyx_v_self->horizontal_constraint->outline->org->x < (__pyx_v_copy->org->x + __pyx_v_copy->size->x));
      }
    }
    if (__pyx_t_8) {

      /* "src/pyglui/menus.pxi":799
 *             self.horizontal_constraint.precompute(parent)
 *             if 0 <= copy.org.x < self.horizontal_constraint.outline.org.x < copy.org.x + copy.size.x:
 *                 copy.size.x = self.horizontal_constraint.outline.org.x - copy.org.x             # <<<<<<<<<<<<<<
 *                 if isinstance(self.horizontal_constraint, Base_Menu) and self.horizontal_constraint.header_pos_id == 2 and not self.horizontal_constraint.collapsed:  # left header
 *                     copy.size.x += menu_sidebar_pad * ui_scale
 */
      __pyx_v_copy->size->x = (__pyx_v_self->horizontal_constraint->outline->org->x - __pyx_v_copy->org->x);

      /* "src/pyglui/menus.pxi":800
 *             if 0 <= copy.org.x < self.horizontal_constraint.outline.org.x < copy.org.x + copy.size.x:
 *                 copy.size.x = self.horizontal_constraint.outline.org.x - copy.org.x
 *                 if isinstance(self.horizontal_constraint, Base_Menu) and self.horizontal_constraint.header_pos_id == 2 and not self.horizontal_constraint.collapsed:  # left header             # <<<<<<<<<<<<<<
 *                     copy.size.x += menu_sidebar_pad * ui_scale
 *             elif 0 <= self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x <= copy.org.x:
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->horizontal_constraint);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_9 = __Pyx_TypeCheck(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Base_Menu); 
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {
      } else {
        __pyx_t_8 = __pyx_t_9;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->horizontal_constraint), __pyx_n_s_header_pos_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(3, 800, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_9) {
      } else {
        __pyx_t_8 = __pyx_t_9;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->horizontal_constraint), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(3, 800, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = (!__pyx_t_9);
      __pyx_t_8 = __pyx_t_10;
      __pyx_L6_bool_binop_done:;
      if (__pyx_t_8) {

        /* "src/pyglui/menus.pxi":801
 *                 copy.size.x = self.horizontal_constraint.outline.org.x - copy.org.x
 *                 if isinstance(self.horizontal_constraint, Base_Menu) and self.horizontal_constraint.header_pos_id == 2 and not self.horizontal_constraint.collapsed:  # left header
 *                     copy.size.x += menu_sidebar_pad * ui_scale             # <<<<<<<<<<<<<<
 *             elif 0 <= self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x <= copy.org.x:
 *                 copy.size.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x - copy.org.x
 */
        __Pyx_INCREF((PyObject *)__pyx_v_copy->size);
        __pyx_t_11 = __pyx_v_copy->size;
        __pyx_t_11->x = (__pyx_t_11->x + (38.0 * __pyx_v_6pyglui_2ui_ui_scale));
        __Pyx_DECREF((PyObject *)__pyx_t_11); __pyx_t_11 = 0;

        /* "src/pyglui/menus.pxi":800
 *             if 0 <= copy.org.x < self.horizontal_constraint.outline.org.x < copy.org.x + copy.size.x:
 *                 copy.size.x = self.horizontal_constraint.outline.org.x - copy.org.x
 *                 if isinstance(self.horizontal_constraint, Base_Menu) and self.horizontal_constraint.header_pos_id == 2 and not self.horizontal_constraint.collapsed:  # left header             # <<<<<<<<<<<<<<
 *                     copy.size.x += menu_sidebar_pad * ui_scale
 *             elif 0 <= self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x <= copy.org.x:
 */
      }

      /* "src/pyglui/menus.pxi":798
 *         if self.horizontal_constraint is not None:
 *             self.horizontal_constraint.precompute(parent)
 *             if 0 <= copy.org.x < self.horizontal_constraint.outline.org.x < copy.org.x + copy.size.x:             # <<<<<<<<<<<<<<
 *                 copy.size.x = self.horizontal_constraint.outline.org.x - copy.org.x
 *                 if isinstance(self.horizontal_constraint, Base_Menu) and self.horizontal_constraint.header_pos_id == 2 and not self.horizontal_constraint.collapsed:  # left header
 */
      goto __pyx_L4;
    }

    /* "src/pyglui/menus.pxi":802
 *                 if isinstance(self.horizontal_constraint, Base_Menu) and self.horizontal_constraint.header_pos_id == 2 and not self.horizontal_constraint.collapsed:  # left header
 *                     copy.size.x += menu_sidebar_pad * ui_scale
 *             elif 0 <= self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x <= copy.org.x:             # <<<<<<<<<<<<<<
 *                 copy.size.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x - copy.org.x
 *                 copy.org.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x
 */
    __pyx_t_12 = (__pyx_v_self->horizontal_constraint->outline->org->x + __pyx_v_self->horizontal_constraint->outline->size->x);
    __pyx_t_8 = (0.0 <= __pyx_t_12);
    if (__pyx_t_8) {
      __pyx_t_8 = (__pyx_t_12 <= __pyx_v_copy->org->x);
    }
    if (__pyx_t_8) {

      /* "src/pyglui/menus.pxi":803
 *                     copy.size.x += menu_sidebar_pad * ui_scale
 *             elif 0 <= self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x <= copy.org.x:
 *                 copy.size.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x - copy.org.x             # <<<<<<<<<<<<<<
 *                 copy.org.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x
 * 
 */
      __pyx_v_copy->size->x = ((__pyx_v_self->horizontal_constraint->outline->org->x + __pyx_v_self->horizontal_constraint->outline->size->x) - __pyx_v_copy->org->x);

      /* "src/pyglui/menus.pxi":804
 *             elif 0 <= self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x <= copy.org.x:
 *                 copy.size.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x - copy.org.x
 *                 copy.org.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x             # <<<<<<<<<<<<<<
 * 
 *         self.outline.compute(copy)
 */
      __pyx_v_copy->org->x = (__pyx_v_self->horizontal_constraint->outline->org->x + __pyx_v_self->horizontal_constraint->outline->size->x);

      /* "src/pyglui/menus.pxi":802
 *                 if isinstance(self.horizontal_constraint, Base_Menu) and self.horizontal_constraint.header_pos_id == 2 and not self.horizontal_constraint.collapsed:  # left header
 *                     copy.size.x += menu_sidebar_pad * ui_scale
 *             elif 0 <= self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x <= copy.org.x:             # <<<<<<<<<<<<<<
 *                 copy.size.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x - copy.org.x
 *                 copy.org.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x
 */
    }
    __pyx_L4:;

    /* "src/pyglui/menus.pxi":796
 *         cdef FitBox copy = parent.computed_copy()
 *         self.outline.compute(copy)
 *         if self.horizontal_constraint is not None:             # <<<<<<<<<<<<<<
 *             self.horizontal_constraint.precompute(parent)
 *             if 0 <= copy.org.x < self.horizontal_constraint.outline.org.x < copy.org.x + copy.size.x:
 */
  }

  /* "src/pyglui/menus.pxi":806
 *                 copy.org.x = self.horizontal_constraint.outline.org.x + self.horizontal_constraint.outline.size.x
 * 
 *         self.outline.compute(copy)             # <<<<<<<<<<<<<<
 *         self.element_space.compute(self.outline)
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.outline, __pyx_v_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":807
 * 
 *         self.outline.compute(copy)
 *         self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 * 
 *         self.elements.sort(key=sort_key)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":809
 *         self.element_space.compute(self.outline)
 * 
 *         self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             for e in self.elements:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(3, 809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "src/pyglui/menus.pxi":810
 * 
 *         self.elements.sort(key=sort_key)
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":811
 *         self.elements.sort(key=sort_key)
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 * 
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 811, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0;
    for (;;) {
      if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(3, 811, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":812
 *         if self.element_space.has_area():
 *             for e in self.elements:
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_draw); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.element_space);
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.element_space));
      __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nested, Py_False) < 0) __PYX_ERR(3, 812, __pyx_L1_error)
      if (!__pyx_v_parent_read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 812, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L12_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L12_bool_binop_done:;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_parent_read_only, __pyx_t_3) < 0) __PYX_ERR(3, 812, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/pyglui/menus.pxi":811
 *         self.elements.sort(key=sort_key)
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":810
 * 
 *         self.elements.sort(key=sort_key)
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 */
  }

  /* "src/pyglui/menus.pxi":792
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         # compute constraints
 *         cdef FitBox copy = parent.computed_copy()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF((PyObject *)__pyx_t_11);
  __Pyx_AddTraceback("pyglui.ui.Container.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_copy);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Container_5draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Container_5draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Container_5draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 792, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 792, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 792, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(3, 792, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 792, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 792, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 792, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Container.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 792, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_4draw(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_4draw(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Container->__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Container.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":814
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Container_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Container_draw_overlay(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Container_draw_overlay *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw_overlay); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 814, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Container_7draw_overlay)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 814, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 814, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 814, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":815
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":816
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.elements, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_f_6pyglui_2ui_sort_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(3, 816, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":817
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 817, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 817, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 817, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":818
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,             # <<<<<<<<<<<<<<
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 */
      __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.element_space);
      __Pyx_INCREF(__pyx_t_2);

      /* "src/pyglui/menus.pxi":819
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)             # <<<<<<<<<<<<<<
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 */
      if (!__pyx_v_parent_read_only) {
      } else {
        __pyx_t_8 = __pyx_v_parent_read_only;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_8 = __pyx_v_self->__pyx_base.__pyx_base._read_only;
      __pyx_L6_bool_binop_done:;

      /* "src/pyglui/menus.pxi":818
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,             # <<<<<<<<<<<<<<
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 */
      __pyx_t_10.__pyx_n = 2;
      __pyx_t_10.nested = 0;
      __pyx_t_10.parent_read_only = __pyx_t_8;
      __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_UI_element *)((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_e)->__pyx_vtab)->draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_e), ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2), 0, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyglui/menus.pxi":817
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 (<UI_element>e).draw_overlay(self.element_space, nested=False,
 *                                              parent_read_only=parent_read_only or self._read_only)
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "src/pyglui/menus.pxi":815
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             self.elements.sort(key=sort_key)
 *             for e in self.elements:
 */
  }

  /* "src/pyglui/menus.pxi":814
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Container.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Container_7draw_overlay = {"draw_overlay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Container_7draw_overlay, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Container_7draw_overlay(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw_overlay (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 814, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 814, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 814, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw_overlay") < 0)) __PYX_ERR(3, 814, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 814, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 814, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw_overlay", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 814, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Container.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 814, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_6draw_overlay(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_6draw_overlay(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw_overlay", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Container->__pyx_base.__pyx_base.draw_overlay(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Container.draw_overlay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":821
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Container_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Container_handle_input(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_9Container_handle_input *__pyx_optional_args) {
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Container_9handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 821, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":823
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.element_space->__pyx_vtab)->has_area(__pyx_v_self->__pyx_base.element_space); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "src/pyglui/menus.pxi":824
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 */
    if (unlikely(__pyx_v_self->__pyx_base.elements == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(3, 824, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->__pyx_base.elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 824, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":825
 *         if self.element_space.has_area():
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_handle_input); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_visible); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!__pyx_v_self->__pyx_base.__pyx_base._read_only) {
      } else {
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 825, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_L6_bool_binop_done:;
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_new_input), __pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 825, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyglui/menus.pxi":824
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 *             for e in self.elements:             # <<<<<<<<<<<<<<
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyglui/menus.pxi":823
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():             # <<<<<<<<<<<<<<
 *             for e in self.elements:
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 */
  }

  /* "src/pyglui/menus.pxi":821
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Container.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Container_9handle_input = {"handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Container_9handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Container_9handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  int __pyx_v_visible;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,&__pyx_n_s_visible,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 821, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_visible)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 821, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, 1); __PYX_ERR(3, 821, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 821, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_input") < 0)) __PYX_ERR(3, 821, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
    __pyx_v_visible = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_visible == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 821, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 821, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_input", 0, 2, 3, __pyx_nargs); __PYX_ERR(3, 821, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Container.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(3, 821, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_8handle_input(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_8handle_input(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Container->__pyx_base.__pyx_base.handle_input(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_new_input, __pyx_v_visible, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Container.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":827
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_13configuration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Container_13configuration_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_13configuration___get__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_13configuration___get__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self) {
  PyObject *__pyx_v_submenus = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":829
 *     @property
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()             # <<<<<<<<<<<<<<
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'submenus':submenus}
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_Container *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.get_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 829, __pyx_L1_error)
  __pyx_v_submenus = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":830
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'submenus':submenus}             # <<<<<<<<<<<<<<
 * 
 *     @configuration.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pos, __pyx_t_2) < 0) __PYX_ERR(3, 830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_size, __pyx_t_2) < 0) __PYX_ERR(3, 830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_submenus, __pyx_v_submenus) < 0) __PYX_ERR(3, 830, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":827
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def configuration(self):
 *         cdef dict submenus = self.get_submenu_config()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Container.configuration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_submenus);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":832
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'submenus':submenus}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Container_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Container_13configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_13configuration_2__set__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), ((PyObject *)__pyx_v_new_conf));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Container_13configuration_2__set__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, PyObject *__pyx_v_new_conf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":834
 *     @configuration.setter
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])             # <<<<<<<<<<<<<<
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_pos, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_org), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":835
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])             # <<<<<<<<<<<<<<
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_size, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.outline->design_size), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1) < 0) __PYX_ERR(3, 835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":836
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size',self.outline.design_size[:])
 *         self.set_submenu_config(new_conf.get('submenus',{}))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_submenus, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 836, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_Container *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.set_submenu_config(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v_self), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":832
 *         return {'pos':self.outline.design_org[:],'size':self.outline.design_size[:],'submenus':submenus}
 * 
 *     @configuration.setter             # <<<<<<<<<<<<<<
 *     def configuration(self,new_conf):
 *         self.outline.design_org[:] = new_conf.get('pos',self.outline.design_org[:])
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Container.configuration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":779
 * cdef class Container(Base_Menu):
 * 
 *     cdef public UI_element horizontal_constraint, vertical_constraint             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, pos=(0., 0.), size=(0., 0.), padding=(0., 0.)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint___get__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint___get__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->horizontal_constraint);
  __pyx_r = ((PyObject *)__pyx_v_self->horizontal_constraint);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint_2__set__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint_2__set__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_2ui_UI_element))))) __PYX_ERR(3, 779, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->horizontal_constraint);
  __Pyx_DECREF((PyObject *)__pyx_v_self->horizontal_constraint);
  __pyx_v_self->horizontal_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Container.horizontal_constraint.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint_4__del__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Container_21horizontal_constraint_4__del__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->horizontal_constraint);
  __Pyx_DECREF((PyObject *)__pyx_v_self->horizontal_constraint);
  __pyx_v_self->horizontal_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_19vertical_constraint___get__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_19vertical_constraint___get__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->vertical_constraint);
  __pyx_r = ((PyObject *)__pyx_v_self->vertical_constraint);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_19vertical_constraint_2__set__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Container_19vertical_constraint_2__set__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pyglui_2ui_UI_element))))) __PYX_ERR(3, 779, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->vertical_constraint);
  __Pyx_DECREF((PyObject *)__pyx_v_self->vertical_constraint);
  __pyx_v_self->vertical_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Container.vertical_constraint.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_19vertical_constraint_4__del__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Container_19vertical_constraint_4__del__(struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->vertical_constraint);
  __Pyx_DECREF((PyObject *)__pyx_v_self->vertical_constraint);
  __pyx_v_self->vertical_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Container_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Container_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Container_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_10__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Container.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Container_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Container_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Container_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Container_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Container.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Container_12__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Container *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Container_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Container *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Container.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":840
 * 
 * cdef class Timeline_Menu(Scrolling_Menu):
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */

static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_1draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_13Timeline_Menu_draw(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_13Timeline_Menu_draw *__pyx_optional_args) {
  int __pyx_v_nested = ((int)1);
  int __pyx_v_parent_read_only = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_parent_read_only = __pyx_optional_args->parent_read_only;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 840, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_13Timeline_Menu_1draw)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 840, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 840, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_parent), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 840, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/pyglui/menus.pxi":841
 * cdef class Timeline_Menu(Scrolling_Menu):
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         self.outline.compute(parent)             # <<<<<<<<<<<<<<
 *         self.element_space.compute(self.outline)
 *         self.element_space.sketch(RGBA(0., 0., 0., 0.3))
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline, __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":842
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)             # <<<<<<<<<<<<<<
 *         self.element_space.sketch(RGBA(0., 0., 0., 0.3))
 *         super(Timeline_Menu, self).draw(parent, nested, parent_read_only)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.element_space->__pyx_vtab)->compute(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.element_space, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyglui/menus.pxi":843
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 *         self.element_space.sketch(RGBA(0., 0., 0., 0.3))             # <<<<<<<<<<<<<<
 *         super(Timeline_Menu, self).draw(parent, nested, parent_read_only)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.element_space->__pyx_vtab)->sketch(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.element_space, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":844
 *         self.element_space.compute(self.outline)
 *         self.element_space.sketch(RGBA(0., 0., 0., 0.3))
 *         super(Timeline_Menu, self).draw(parent, nested, parent_read_only)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_draw); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_parent_read_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_parent), __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":840
 * 
 * cdef class Timeline_Menu(Scrolling_Menu):
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_1draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13Timeline_Menu_1draw = {"draw", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_1draw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_1draw(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent = 0;
  int __pyx_v_nested;
  int __pyx_v_parent_read_only;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("draw (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_nested,&__pyx_n_s_parent_read_only,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 840, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nested);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 840, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parent_read_only);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 840, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(3, 840, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent = ((struct __pyx_obj_6pyglui_2ui_FitBox *)values[0]);
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 840, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)1);
    }
    if (values[2]) {
      __pyx_v_parent_read_only = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_parent_read_only == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 840, __pyx_L3_error)
    } else {
      __pyx_v_parent_read_only = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 840, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pyglui_2ui_FitBox, 1, "parent", 0))) __PYX_ERR(3, 840, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_draw(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self), __pyx_v_parent, __pyx_v_nested, __pyx_v_parent_read_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_draw(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent, int __pyx_v_nested, int __pyx_v_parent_read_only) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_2.parent_read_only = __pyx_v_parent_read_only;
  __pyx_t_1 = __pyx_vtabptr_6pyglui_2ui_Timeline_Menu->__pyx_base.__pyx_base.__pyx_base.__pyx_base.draw(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v_self), __pyx_v_parent, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":846
 *         super(Timeline_Menu, self).draw(parent, nested, parent_read_only)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def collapsed(self):
 *         return self.outline.design_org.y >= -menu_topbar_pad
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_9collapsed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_9collapsed_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_9collapsed___get__(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_9collapsed___get__(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/pyglui/menus.pxi":848
 *     @property
 *     def collapsed(self):
 *         return self.outline.design_org.y >= -menu_topbar_pad             # <<<<<<<<<<<<<<
 * 
 *     @collapsed.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline->design_org->y >= -38.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyglui/menus.pxi":846
 *         super(Timeline_Menu, self).draw(parent, nested, parent_read_only)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def collapsed(self):
 *         return self.outline.design_org.y >= -menu_topbar_pad
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.collapsed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":850
 *         return self.outline.design_org.y >= -menu_topbar_pad
 * 
 *     @collapsed.setter             # <<<<<<<<<<<<<<
 *     def collapsed(self,collapsed):
 *         if collapsed != self.collapsed:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_13Timeline_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_collapsed); /*proto*/
static int __pyx_pw_6pyglui_2ui_13Timeline_Menu_9collapsed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_collapsed) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_9collapsed_2__set__(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self), ((PyObject *)__pyx_v_collapsed));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_13Timeline_Menu_9collapsed_2__set__(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_collapsed) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/pyglui/menus.pxi":852
 *     @collapsed.setter
 *     def collapsed(self,collapsed):
 *         if collapsed != self.collapsed:             # <<<<<<<<<<<<<<
 *             self.toggle_iconified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_collapsed, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":853
 *     def collapsed(self,collapsed):
 *         if collapsed != self.collapsed:
 *             self.toggle_iconified()             # <<<<<<<<<<<<<<
 * 
 *     def toggle_iconified(self):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toggle_iconified); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_4, };
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyglui/menus.pxi":852
 *     @collapsed.setter
 *     def collapsed(self,collapsed):
 *         if collapsed != self.collapsed:             # <<<<<<<<<<<<<<
 *             self.toggle_iconified()
 * 
 */
  }

  /* "src/pyglui/menus.pxi":850
 *         return self.outline.design_org.y >= -menu_topbar_pad
 * 
 *     @collapsed.setter             # <<<<<<<<<<<<<<
 *     def collapsed(self,collapsed):
 *         if collapsed != self.collapsed:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.collapsed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":855
 *             self.toggle_iconified()
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_3toggle_iconified(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13Timeline_Menu_3toggle_iconified = {"toggle_iconified", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_3toggle_iconified, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_3toggle_iconified(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toggle_iconified (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("toggle_iconified", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "toggle_iconified", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_2toggle_iconified(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_2toggle_iconified(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toggle_iconified", 0);

  /* "src/pyglui/menus.pxi":857
 *     def toggle_iconified(self):
 *         global should_redraw
 *         should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *         if self.collapsed:
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "src/pyglui/menus.pxi":859
 *         should_redraw = True
 * 
 *         if self.collapsed:             # <<<<<<<<<<<<<<
 *             self.outline.inflate(self.uncollapsed_outline)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyglui/menus.pxi":860
 * 
 *         if self.collapsed:
 *             self.outline.inflate(self.uncollapsed_outline)             # <<<<<<<<<<<<<<
 *         else:
 *             self.uncollapsed_outline = self.outline.copy()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.uncollapsed_outline);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->inflate(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline, ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":859
 *         should_redraw = True
 * 
 *         if self.collapsed:             # <<<<<<<<<<<<<<
 *             self.outline.inflate(self.uncollapsed_outline)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyglui/menus.pxi":862
 *             self.outline.inflate(self.uncollapsed_outline)
 *         else:
 *             self.uncollapsed_outline = self.outline.copy()             # <<<<<<<<<<<<<<
 *             self.outline.collapse()
 * 
 */
  /*else*/ {
    __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->copy(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(3, 862, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.uncollapsed_outline);
    __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.uncollapsed_outline);
    __pyx_v_self->__pyx_base.uncollapsed_outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/pyglui/menus.pxi":863
 *         else:
 *             self.uncollapsed_outline = self.outline.copy()
 *             self.outline.collapse()             # <<<<<<<<<<<<<<
 * 
 *     def append(self, obj):
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline->__pyx_vtab)->collapse(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.outline); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "src/pyglui/menus.pxi":855
 *             self.toggle_iconified()
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.toggle_iconified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":865
 *             self.outline.collapse()
 * 
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_5append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13Timeline_Menu_5append = {"append", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_5append, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_5append(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 865, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "append") < 0)) __PYX_ERR(3, 865, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("append", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 865, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_4append(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_4append(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);

  /* "src/pyglui/menus.pxi":866
 * 
 *     def append(self, obj):
 *         if len(self.elements) == 0:             # <<<<<<<<<<<<<<
 *             self.collapsed = False
 *         super(Timeline_Menu, self).append(obj)
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.elements;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 866, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == 0);
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":867
 *     def append(self, obj):
 *         if len(self.elements) == 0:
 *             self.collapsed = False             # <<<<<<<<<<<<<<
 *         super(Timeline_Menu, self).append(obj)
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed, Py_False) < 0) __PYX_ERR(3, 867, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":866
 * 
 *     def append(self, obj):
 *         if len(self.elements) == 0:             # <<<<<<<<<<<<<<
 *             self.collapsed = False
 *         super(Timeline_Menu, self).append(obj)
 */
  }

  /* "src/pyglui/menus.pxi":868
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 *         super(Timeline_Menu, self).append(obj)             # <<<<<<<<<<<<<<
 * 
 *     def insert(self, idx, obj):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_obj); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":865
 *             self.outline.collapse()
 * 
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":870
 *         super(Timeline_Menu, self).append(obj)
 * 
 *     def insert(self, idx, obj):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_7insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13Timeline_Menu_7insert = {"insert", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_7insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_7insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_idx = 0;
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_idx,&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_idx,&__pyx_n_s_obj,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_idx)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 870, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 870, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); __PYX_ERR(3, 870, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "insert") < 0)) __PYX_ERR(3, 870, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_idx = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, __pyx_nargs); __PYX_ERR(3, 870, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_6insert(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self), __pyx_v_idx, __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_6insert(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);

  /* "src/pyglui/menus.pxi":871
 * 
 *     def insert(self, idx, obj):
 *         if len(self.elements) == 0:             # <<<<<<<<<<<<<<
 *             self.collapsed = False
 *         super(Timeline_Menu, self).insert(idx, obj)
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.elements;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 871, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == 0);
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":872
 *     def insert(self, idx, obj):
 *         if len(self.elements) == 0:
 *             self.collapsed = False             # <<<<<<<<<<<<<<
 *         super(Timeline_Menu, self).insert(idx, obj)
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed, Py_False) < 0) __PYX_ERR(3, 872, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":871
 * 
 *     def insert(self, idx, obj):
 *         if len(self.elements) == 0:             # <<<<<<<<<<<<<<
 *             self.collapsed = False
 *         super(Timeline_Menu, self).insert(idx, obj)
 */
  }

  /* "src/pyglui/menus.pxi":873
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 *         super(Timeline_Menu, self).insert(idx, obj)             # <<<<<<<<<<<<<<
 * 
 *     def extend(self, objs):
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_insert); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_idx, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":870
 *         super(Timeline_Menu, self).append(obj)
 * 
 *     def insert(self, idx, obj):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":875
 *         super(Timeline_Menu, self).insert(idx, obj)
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_9extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13Timeline_Menu_9extend = {"extend", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_9extend, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_9extend(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_objs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objs,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objs,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_objs)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 875, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "extend") < 0)) __PYX_ERR(3, 875, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_objs = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extend", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 875, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_8extend(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self), __pyx_v_objs);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_8extend(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_objs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);

  /* "src/pyglui/menus.pxi":876
 * 
 *     def extend(self, objs):
 *         if len(self.elements) == 0:             # <<<<<<<<<<<<<<
 *             self.collapsed = False
 *         super(Timeline_Menu, self).extend(objs)
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.elements;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 876, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == 0);
  if (__pyx_t_3) {

    /* "src/pyglui/menus.pxi":877
 *     def extend(self, objs):
 *         if len(self.elements) == 0:
 *             self.collapsed = False             # <<<<<<<<<<<<<<
 *         super(Timeline_Menu, self).extend(objs)
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed, Py_False) < 0) __PYX_ERR(3, 877, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":876
 * 
 *     def extend(self, objs):
 *         if len(self.elements) == 0:             # <<<<<<<<<<<<<<
 *             self.collapsed = False
 *         super(Timeline_Menu, self).extend(objs)
 */
  }

  /* "src/pyglui/menus.pxi":878
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 *         super(Timeline_Menu, self).extend(objs)             # <<<<<<<<<<<<<<
 * 
 *     def remove(self, obj):
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_extend); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_objs};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":875
 *         super(Timeline_Menu, self).insert(idx, obj)
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyglui/menus.pxi":880
 *         super(Timeline_Menu, self).extend(objs)
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         super(Timeline_Menu, self).remove(obj)
 *         if len(self.elements) == 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_11remove(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13Timeline_Menu_11remove = {"remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_11remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_11remove(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 880, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove") < 0)) __PYX_ERR(3, 880, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("remove", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 880, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_10remove(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self), __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_10remove(struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);

  /* "src/pyglui/menus.pxi":881
 * 
 *     def remove(self, obj):
 *         super(Timeline_Menu, self).remove(obj)             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = True
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu));
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyglui/menus.pxi":882
 *     def remove(self, obj):
 *         super(Timeline_Menu, self).remove(obj)
 *         if len(self.elements) == 0:             # <<<<<<<<<<<<<<
 *             self.collapsed = True
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.elements;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(3, 882, __pyx_L1_error)
  }
  __pyx_t_5 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (__pyx_t_5 == 0);
  if (__pyx_t_6) {

    /* "src/pyglui/menus.pxi":883
 *         super(Timeline_Menu, self).remove(obj)
 *         if len(self.elements) == 0:
 *             self.collapsed = True             # <<<<<<<<<<<<<<
 */
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_collapsed, Py_True) < 0) __PYX_ERR(3, 883, __pyx_L1_error)

    /* "src/pyglui/menus.pxi":882
 *     def remove(self, obj):
 *         super(Timeline_Menu, self).remove(obj)
 *         if len(self.elements) == 0:             # <<<<<<<<<<<<<<
 *             self.collapsed = True
 */
  }

  /* "src/pyglui/menus.pxi":880
 *         super(Timeline_Menu, self).extend(objs)
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         super(Timeline_Menu, self).remove(obj)
 *         if len(self.elements) == 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13Timeline_Menu_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_12__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_13Timeline_Menu_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_13Timeline_Menu_15__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_13Timeline_Menu_14__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_13Timeline_Menu_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Timeline_Menu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Timeline_Menu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":321
 *     cdef object on_change
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):             # <<<<<<<<<<<<<<
 *         assert attribute_context is not None or getter is not None
 *         self.attribute_context = attribute_context
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Synced_Value_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Synced_Value_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute_name = 0;
  PyObject *__pyx_v_attribute_context = 0;
  PyObject *__pyx_v_getter = 0;
  PyObject *__pyx_v_setter = 0;
  PyObject *__pyx_v_on_change = 0;
  PyObject *__pyx_v_trigger_overlay_only = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_getter,&__pyx_n_s_setter,&__pyx_n_s_on_change_2,&__pyx_n_s_trigger_overlay_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_getter,&__pyx_n_s_setter,&__pyx_n_s_on_change_2,&__pyx_n_s_trigger_overlay_only,0};
    #endif
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)Py_False);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_on_change_2);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trigger_overlay_only);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 321, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_getter = values[2];
    __pyx_v_setter = values[3];
    __pyx_v_on_change = values[4];
    __pyx_v_trigger_overlay_only = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 321, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(0, 321, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Synced_Value___cinit__(((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_getter, __pyx_v_setter, __pyx_v_on_change, __pyx_v_trigger_overlay_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Synced_Value___cinit__(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self, PyObject *__pyx_v_attribute_name, PyObject *__pyx_v_attribute_context, PyObject *__pyx_v_getter, PyObject *__pyx_v_setter, PyObject *__pyx_v_on_change, PyObject *__pyx_v_trigger_overlay_only) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyglui/ui.pyx":322
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):
 *         assert attribute_context is not None or getter is not None             # <<<<<<<<<<<<<<
 *         self.attribute_context = attribute_context
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = (__pyx_v_attribute_context != Py_None);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_getter != Py_None);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
      __PYX_ERR(0, 322, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 322, __pyx_L1_error)
  #endif

  /* "pyglui/ui.pyx":323
 *     def __cinit__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):
 *         assert attribute_context is not None or getter is not None
 *         self.attribute_context = attribute_context             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(attribute_context,dict):
 */
  __Pyx_INCREF(__pyx_v_attribute_context);
  __Pyx_GIVEREF(__pyx_v_attribute_context);
  __Pyx_GOTREF(__pyx_v_self->attribute_context);
  __Pyx_DECREF(__pyx_v_self->attribute_context);
  __pyx_v_self->attribute_context = __pyx_v_attribute_context;

  /* "pyglui/ui.pyx":325
 *         self.attribute_context = attribute_context
 * 
 *         if isinstance(attribute_context,dict):             # <<<<<<<<<<<<<<
 *             self.use_dict = True
 *         else:
 */
  __pyx_t_1 = PyDict_Check(__pyx_v_attribute_context); 
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":326
 * 
 *         if isinstance(attribute_context,dict):
 *             self.use_dict = True             # <<<<<<<<<<<<<<
 *         else:
 *             self.use_dict = False
 */
    __pyx_v_self->use_dict = 1;

    /* "pyglui/ui.pyx":325
 *         self.attribute_context = attribute_context
 * 
 *         if isinstance(attribute_context,dict):             # <<<<<<<<<<<<<<
 *             self.use_dict = True
 *         else:
 */
    goto __pyx_L5;
  }

  /* "pyglui/ui.pyx":328
 *             self.use_dict = True
 *         else:
 *             self.use_dict = False             # <<<<<<<<<<<<<<
 * 
 *         self.attribute_name = attribute_name
 */
  /*else*/ {
    __pyx_v_self->use_dict = 0;
  }
  __pyx_L5:;

  /* "pyglui/ui.pyx":330
 *             self.use_dict = False
 * 
 *         self.attribute_name = attribute_name             # <<<<<<<<<<<<<<
 *         self.getter = getter
 *         self.setter = setter
 */
  __Pyx_INCREF(__pyx_v_attribute_name);
  __Pyx_GIVEREF(__pyx_v_attribute_name);
  __Pyx_GOTREF(__pyx_v_self->attribute_name);
  __Pyx_DECREF(__pyx_v_self->attribute_name);
  __pyx_v_self->attribute_name = __pyx_v_attribute_name;

  /* "pyglui/ui.pyx":331
 * 
 *         self.attribute_name = attribute_name
 *         self.getter = getter             # <<<<<<<<<<<<<<
 *         self.setter = setter
 *         self.on_change = on_change
 */
  __Pyx_INCREF(__pyx_v_getter);
  __Pyx_GIVEREF(__pyx_v_getter);
  __Pyx_GOTREF(__pyx_v_self->getter);
  __Pyx_DECREF(__pyx_v_self->getter);
  __pyx_v_self->getter = __pyx_v_getter;

  /* "pyglui/ui.pyx":332
 *         self.attribute_name = attribute_name
 *         self.getter = getter
 *         self.setter = setter             # <<<<<<<<<<<<<<
 *         self.on_change = on_change
 *         self.trigger_overlay_only = trigger_overlay_only
 */
  __Pyx_INCREF(__pyx_v_setter);
  __Pyx_GIVEREF(__pyx_v_setter);
  __Pyx_GOTREF(__pyx_v_self->setter);
  __Pyx_DECREF(__pyx_v_self->setter);
  __pyx_v_self->setter = __pyx_v_setter;

  /* "pyglui/ui.pyx":333
 *         self.getter = getter
 *         self.setter = setter
 *         self.on_change = on_change             # <<<<<<<<<<<<<<
 *         self.trigger_overlay_only = trigger_overlay_only
 * 
 */
  __Pyx_INCREF(__pyx_v_on_change);
  __Pyx_GIVEREF(__pyx_v_on_change);
  __Pyx_GOTREF(__pyx_v_self->on_change);
  __Pyx_DECREF(__pyx_v_self->on_change);
  __pyx_v_self->on_change = __pyx_v_on_change;

  /* "pyglui/ui.pyx":334
 *         self.setter = setter
 *         self.on_change = on_change
 *         self.trigger_overlay_only = trigger_overlay_only             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_trigger_overlay_only); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
  __pyx_v_self->trigger_overlay_only = __pyx_t_1;

  /* "pyglui/ui.pyx":321
 *     cdef object on_change
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):             # <<<<<<<<<<<<<<
 *         assert attribute_context is not None or getter is not None
 *         self.attribute_context = attribute_context
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":336
 *         self.trigger_overlay_only = trigger_overlay_only
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):             # <<<<<<<<<<<<<<
 *         if self.attribute_context is not None:
 *             if self.use_dict:
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Synced_Value_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Synced_Value_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_attribute_name = 0;
  CYTHON_UNUSED PyObject *__pyx_v_attribute_context = 0;
  CYTHON_UNUSED PyObject *__pyx_v_getter = 0;
  CYTHON_UNUSED PyObject *__pyx_v_setter = 0;
  CYTHON_UNUSED PyObject *__pyx_v_on_change = 0;
  CYTHON_UNUSED PyObject *__pyx_v_trigger_overlay_only = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_getter,&__pyx_n_s_setter,&__pyx_n_s_on_change_2,&__pyx_n_s_trigger_overlay_only,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_name,&__pyx_n_s_attribute_context,&__pyx_n_s_getter,&__pyx_n_s_setter,&__pyx_n_s_on_change_2,&__pyx_n_s_trigger_overlay_only,0};
    #endif
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)Py_False);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_name)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attribute_context);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_getter);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_setter);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_on_change_2);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trigger_overlay_only);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 336, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_attribute_name = ((PyObject*)values[0]);
    __pyx_v_attribute_context = values[1];
    __pyx_v_getter = values[2];
    __pyx_v_setter = values[3];
    __pyx_v_on_change = values[4];
    __pyx_v_trigger_overlay_only = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 336, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attribute_name), (&PyUnicode_Type), 1, "attribute_name", 1))) __PYX_ERR(0, 336, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_12Synced_Value_2__init__(((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_v_self), __pyx_v_attribute_name, __pyx_v_attribute_context, __pyx_v_getter, __pyx_v_setter, __pyx_v_on_change, __pyx_v_trigger_overlay_only);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Synced_Value_2__init__(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_attribute_name, CYTHON_UNUSED PyObject *__pyx_v_attribute_context, CYTHON_UNUSED PyObject *__pyx_v_getter, CYTHON_UNUSED PyObject *__pyx_v_setter, CYTHON_UNUSED PyObject *__pyx_v_on_change, CYTHON_UNUSED PyObject *__pyx_v_trigger_overlay_only) {
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyglui/ui.pyx":337
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):
 *         if self.attribute_context is not None:             # <<<<<<<<<<<<<<
 *             if self.use_dict:
 *                 try:
 */
  __pyx_t_1 = (__pyx_v_self->attribute_context != Py_None);
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":338
 *     def __init__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):
 *         if self.attribute_context is not None:
 *             if self.use_dict:             # <<<<<<<<<<<<<<
 *                 try:
 *                     _ = self.attribute_context[self.attribute_name]
 */
    if (__pyx_v_self->use_dict) {

      /* "pyglui/ui.pyx":339
 *         if self.attribute_context is not None:
 *             if self.use_dict:
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = self.attribute_context[self.attribute_name]
 *                 except KeyError:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_4);
        /*try:*/ {

          /* "pyglui/ui.pyx":340
 *             if self.use_dict:
 *                 try:
 *                     _ = self.attribute_context[self.attribute_name]             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     raise Exception("Dict: '%s' has no entry '%s'"%(self.attribute_context,self.attribute_name))
 */
          __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_self->attribute_context, __pyx_v_self->attribute_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_v__ = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "pyglui/ui.pyx":339
 *         if self.attribute_context is not None:
 *             if self.use_dict:
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = self.attribute_context[self.attribute_name]
 *                 except KeyError:
 */
        }
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L10_try_end;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyglui/ui.pyx":341
 *                 try:
 *                     _ = self.attribute_context[self.attribute_name]
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     raise Exception("Dict: '%s' has no entry '%s'"%(self.attribute_context,self.attribute_name))
 *             else:
 */
        __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
        if (__pyx_t_6) {
          __Pyx_AddTraceback("pyglui.ui.Synced_Value.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 341, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_8);

          /* "pyglui/ui.pyx":342
 *                     _ = self.attribute_context[self.attribute_name]
 *                 except KeyError:
 *                     raise Exception("Dict: '%s' has no entry '%s'"%(self.attribute_context,self.attribute_name))             # <<<<<<<<<<<<<<
 *             else:
 *                 try:
 */
          __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 342, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = 0;
          __pyx_t_11 = 127;
          __Pyx_INCREF(__pyx_kp_u_Dict);
          __pyx_t_10 += 7;
          __Pyx_GIVEREF(__pyx_kp_u_Dict);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Dict);
          __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->attribute_context), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 342, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
          __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_12);
          __pyx_t_12 = 0;
          __Pyx_INCREF(__pyx_kp_u_has_no_entry);
          __pyx_t_10 += 16;
          __Pyx_GIVEREF(__pyx_kp_u_has_no_entry);
          PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_has_no_entry);
          __pyx_t_12 = __Pyx_PyUnicode_Unicode(__pyx_v_self->attribute_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 342, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
          __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_12);
          __pyx_t_12 = 0;
          __Pyx_INCREF(__pyx_kp_u__88);
          __pyx_t_10 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__88);
          PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_kp_u__88);
          __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_9, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 342, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 342, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_Raise(__pyx_t_9, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(0, 342, __pyx_L7_except_error)
        }
        goto __pyx_L7_except_error;
        __pyx_L7_except_error:;

        /* "pyglui/ui.pyx":339
 *         if self.attribute_context is not None:
 *             if self.use_dict:
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = self.attribute_context[self.attribute_name]
 *                 except KeyError:
 */
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
        goto __pyx_L1_error;
        __pyx_L10_try_end:;
      }

      /* "pyglui/ui.pyx":338
 *     def __init__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):
 *         if self.attribute_context is not None:
 *             if self.use_dict:             # <<<<<<<<<<<<<<
 *                 try:
 *                     _ = self.attribute_context[self.attribute_name]
 */
      goto __pyx_L4;
    }

    /* "pyglui/ui.pyx":344
 *                     raise Exception("Dict: '%s' has no entry '%s'"%(self.attribute_context,self.attribute_name))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = getattr(self.attribute_context,self.attribute_name)
 *                 except KeyError:
 */
    /*else*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_2);
        /*try:*/ {

          /* "pyglui/ui.pyx":345
 *             else:
 *                 try:
 *                     _ = getattr(self.attribute_context,self.attribute_name)             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     raise Exception("'%s' has no attribute '%s'"%(self.attribute_context,self.attribute_name))
 */
          __pyx_t_8 = __pyx_v_self->attribute_context;
          __Pyx_INCREF(__pyx_t_8);
          __pyx_t_7 = __pyx_v_self->attribute_name;
          __Pyx_INCREF(__pyx_t_7);
          __pyx_t_5 = __Pyx_GetAttr(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 345, __pyx_L13_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v__ = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "pyglui/ui.pyx":344
 *                     raise Exception("Dict: '%s' has no entry '%s'"%(self.attribute_context,self.attribute_name))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = getattr(self.attribute_context,self.attribute_name)
 *                 except KeyError:
 */
        }
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L18_try_end;
        __pyx_L13_error:;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "pyglui/ui.pyx":346
 *                 try:
 *                     _ = getattr(self.attribute_context,self.attribute_name)
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     raise Exception("'%s' has no attribute '%s'"%(self.attribute_context,self.attribute_name))
 *         self.sync()
 */
        __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
        if (__pyx_t_6) {
          __Pyx_AddTraceback("pyglui.ui.Synced_Value.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 346, __pyx_L15_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_8);

          /* "pyglui/ui.pyx":347
 *                     _ = getattr(self.attribute_context,self.attribute_name)
 *                 except KeyError:
 *                     raise Exception("'%s' has no attribute '%s'"%(self.attribute_context,self.attribute_name))             # <<<<<<<<<<<<<<
 *         self.sync()
 * 
 */
          __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 347, __pyx_L15_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = 0;
          __pyx_t_11 = 127;
          __Pyx_INCREF(__pyx_kp_u__88);
          __pyx_t_10 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__88);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u__88);
          __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->attribute_context), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 347, __pyx_L15_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
          __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_12);
          __pyx_t_12 = 0;
          __Pyx_INCREF(__pyx_kp_u_has_no_attribute);
          __pyx_t_10 += 20;
          __Pyx_GIVEREF(__pyx_kp_u_has_no_attribute);
          PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_has_no_attribute);
          __pyx_t_12 = __Pyx_PyUnicode_Unicode(__pyx_v_self->attribute_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 347, __pyx_L15_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
          __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_12);
          __pyx_t_12 = 0;
          __Pyx_INCREF(__pyx_kp_u__88);
          __pyx_t_10 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__88);
          PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_kp_u__88);
          __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_9, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 347, __pyx_L15_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 347, __pyx_L15_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_Raise(__pyx_t_9, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(0, 347, __pyx_L15_except_error)
        }
        goto __pyx_L15_except_error;
        __pyx_L15_except_error:;

        /* "pyglui/ui.pyx":344
 *                     raise Exception("Dict: '%s' has no entry '%s'"%(self.attribute_context,self.attribute_name))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = getattr(self.attribute_context,self.attribute_name)
 *                 except KeyError:
 */
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
        goto __pyx_L1_error;
        __pyx_L18_try_end:;
      }
    }
    __pyx_L4:;

    /* "pyglui/ui.pyx":337
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):
 *         if self.attribute_context is not None:             # <<<<<<<<<<<<<<
 *             if self.use_dict:
 *                 try:
 */
  }

  /* "pyglui/ui.pyx":348
 *                 except KeyError:
 *                     raise Exception("'%s' has no attribute '%s'"%(self.attribute_context,self.attribute_name))
 *         self.sync()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value *)__pyx_v_self->__pyx_vtab)->sync(__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyglui/ui.pyx":336
 *         self.trigger_overlay_only = trigger_overlay_only
 * 
 *     def __init__(self,str attribute_name, object attribute_context = None, getter=None, setter=None, on_change=None, trigger_overlay_only=False):             # <<<<<<<<<<<<<<
 *         if self.attribute_context is not None:
 *             if self.use_dict:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":352
 * 
 * 
 *     cdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         global should_redraw_overlay
 */

static PyObject *__pyx_f_6pyglui_2ui_12Synced_Value_sync(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self) {
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);

  /* "pyglui/ui.pyx":355
 *         global should_redraw
 *         global should_redraw_overlay
 *         if self.getter is not None:             # <<<<<<<<<<<<<<
 *             val = self.getter()
 *             if val != self._value:
 */
  __pyx_t_1 = (__pyx_v_self->getter != Py_None);
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":356
 *         global should_redraw_overlay
 *         if self.getter is not None:
 *             val = self.getter()             # <<<<<<<<<<<<<<
 *             if val != self._value:
 *                 self._value = val
 */
    __Pyx_INCREF(__pyx_v_self->getter);
    __pyx_t_3 = __pyx_v_self->getter; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_4, };
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":357
 *         if self.getter is not None:
 *             val = self.getter()
 *             if val != self._value:             # <<<<<<<<<<<<<<
 *                 self._value = val
 *                 if self.trigger_overlay_only:
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_self->_value, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":358
 *             val = self.getter()
 *             if val != self._value:
 *                 self._value = val             # <<<<<<<<<<<<<<
 *                 if self.trigger_overlay_only:
 *                     should_redraw_overlay = True
 */
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __Pyx_GOTREF(__pyx_v_self->_value);
      __Pyx_DECREF(__pyx_v_self->_value);
      __pyx_v_self->_value = __pyx_v_val;

      /* "pyglui/ui.pyx":359
 *             if val != self._value:
 *                 self._value = val
 *                 if self.trigger_overlay_only:             # <<<<<<<<<<<<<<
 *                     should_redraw_overlay = True
 *                 else:
 */
      if (__pyx_v_self->trigger_overlay_only) {

        /* "pyglui/ui.pyx":360
 *                 self._value = val
 *                 if self.trigger_overlay_only:
 *                     should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *                 else:
 *                     should_redraw = True
 */
        __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

        /* "pyglui/ui.pyx":359
 *             if val != self._value:
 *                 self._value = val
 *                 if self.trigger_overlay_only:             # <<<<<<<<<<<<<<
 *                     should_redraw_overlay = True
 *                 else:
 */
        goto __pyx_L5;
      }

      /* "pyglui/ui.pyx":362
 *                     should_redraw_overlay = True
 *                 else:
 *                     should_redraw = True             # <<<<<<<<<<<<<<
 *                 if self.on_change is not None:
 *                     self.on_change(self.value)
 */
      /*else*/ {
        __pyx_v_6pyglui_2ui_should_redraw = 1;
      }
      __pyx_L5:;

      /* "pyglui/ui.pyx":363
 *                 else:
 *                     should_redraw = True
 *                 if self.on_change is not None:             # <<<<<<<<<<<<<<
 *                     self.on_change(self.value)
 * 
 */
      __pyx_t_1 = (__pyx_v_self->on_change != Py_None);
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":364
 *                     should_redraw = True
 *                 if self.on_change is not None:
 *                     self.on_change(self.value)             # <<<<<<<<<<<<<<
 * 
 *         elif self.use_dict:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_self->on_change);
        __pyx_t_4 = __pyx_v_self->on_change; __pyx_t_6 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyglui/ui.pyx":363
 *                 else:
 *                     should_redraw = True
 *                 if self.on_change is not None:             # <<<<<<<<<<<<<<
 *                     self.on_change(self.value)
 * 
 */
      }

      /* "pyglui/ui.pyx":357
 *         if self.getter is not None:
 *             val = self.getter()
 *             if val != self._value:             # <<<<<<<<<<<<<<
 *                 self._value = val
 *                 if self.trigger_overlay_only:
 */
    }

    /* "pyglui/ui.pyx":355
 *         global should_redraw
 *         global should_redraw_overlay
 *         if self.getter is not None:             # <<<<<<<<<<<<<<
 *             val = self.getter()
 *             if val != self._value:
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":366
 *                     self.on_change(self.value)
 * 
 *         elif self.use_dict:             # <<<<<<<<<<<<<<
 *             if self._value != self.attribute_context[self.attribute_name]:
 *                 self._value = self.attribute_context[self.attribute_name]
 */
  if (__pyx_v_self->use_dict) {

    /* "pyglui/ui.pyx":367
 * 
 *         elif self.use_dict:
 *             if self._value != self.attribute_context[self.attribute_name]:             # <<<<<<<<<<<<<<
 *                 self._value = self.attribute_context[self.attribute_name]
 *                 if self.trigger_overlay_only:
 */
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_self->attribute_context, __pyx_v_self->attribute_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->_value, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":368
 *         elif self.use_dict:
 *             if self._value != self.attribute_context[self.attribute_name]:
 *                 self._value = self.attribute_context[self.attribute_name]             # <<<<<<<<<<<<<<
 *                 if self.trigger_overlay_only:
 *                     should_redraw_overlay = True
 */
      __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_self->attribute_context, __pyx_v_self->attribute_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_v_self->_value);
      __Pyx_DECREF(__pyx_v_self->_value);
      __pyx_v_self->_value = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyglui/ui.pyx":369
 *             if self._value != self.attribute_context[self.attribute_name]:
 *                 self._value = self.attribute_context[self.attribute_name]
 *                 if self.trigger_overlay_only:             # <<<<<<<<<<<<<<
 *                     should_redraw_overlay = True
 *                 else:
 */
      if (__pyx_v_self->trigger_overlay_only) {

        /* "pyglui/ui.pyx":370
 *                 self._value = self.attribute_context[self.attribute_name]
 *                 if self.trigger_overlay_only:
 *                     should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *                 else:
 *                     should_redraw = True
 */
        __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

        /* "pyglui/ui.pyx":369
 *             if self._value != self.attribute_context[self.attribute_name]:
 *                 self._value = self.attribute_context[self.attribute_name]
 *                 if self.trigger_overlay_only:             # <<<<<<<<<<<<<<
 *                     should_redraw_overlay = True
 *                 else:
 */
        goto __pyx_L8;
      }

      /* "pyglui/ui.pyx":372
 *                     should_redraw_overlay = True
 *                 else:
 *                     should_redraw = True             # <<<<<<<<<<<<<<
 *                 if self.on_change is not None:
 *                     self.on_change(self.value)
 */
      /*else*/ {
        __pyx_v_6pyglui_2ui_should_redraw = 1;
      }
      __pyx_L8:;

      /* "pyglui/ui.pyx":373
 *                 else:
 *                     should_redraw = True
 *                 if self.on_change is not None:             # <<<<<<<<<<<<<<
 *                     self.on_change(self.value)
 * 
 */
      __pyx_t_1 = (__pyx_v_self->on_change != Py_None);
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":374
 *                     should_redraw = True
 *                 if self.on_change is not None:
 *                     self.on_change(self.value)             # <<<<<<<<<<<<<<
 * 
 *         elif self._value != getattr(self.attribute_context,self.attribute_name):
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_self->on_change);
        __pyx_t_3 = __pyx_v_self->on_change; __pyx_t_6 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyglui/ui.pyx":373
 *                 else:
 *                     should_redraw = True
 *                 if self.on_change is not None:             # <<<<<<<<<<<<<<
 *                     self.on_change(self.value)
 * 
 */
      }

      /* "pyglui/ui.pyx":367
 * 
 *         elif self.use_dict:
 *             if self._value != self.attribute_context[self.attribute_name]:             # <<<<<<<<<<<<<<
 *                 self._value = self.attribute_context[self.attribute_name]
 *                 if self.trigger_overlay_only:
 */
    }

    /* "pyglui/ui.pyx":366
 *                     self.on_change(self.value)
 * 
 *         elif self.use_dict:             # <<<<<<<<<<<<<<
 *             if self._value != self.attribute_context[self.attribute_name]:
 *                 self._value = self.attribute_context[self.attribute_name]
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":376
 *                     self.on_change(self.value)
 * 
 *         elif self._value != getattr(self.attribute_context,self.attribute_name):             # <<<<<<<<<<<<<<
 *             self._value = getattr(self.attribute_context,self.attribute_name)
 *             if self.trigger_overlay_only:
 */
  __pyx_t_4 = __pyx_v_self->attribute_context;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = __pyx_v_self->attribute_name;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->_value, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":377
 * 
 *         elif self._value != getattr(self.attribute_context,self.attribute_name):
 *             self._value = getattr(self.attribute_context,self.attribute_name)             # <<<<<<<<<<<<<<
 *             if self.trigger_overlay_only:
 *                 should_redraw_overlay = True
 */
    __pyx_t_3 = __pyx_v_self->attribute_context;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = __pyx_v_self->attribute_name;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->_value);
    __Pyx_DECREF(__pyx_v_self->_value);
    __pyx_v_self->_value = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":378
 *         elif self._value != getattr(self.attribute_context,self.attribute_name):
 *             self._value = getattr(self.attribute_context,self.attribute_name)
 *             if self.trigger_overlay_only:             # <<<<<<<<<<<<<<
 *                 should_redraw_overlay = True
 *             else:
 */
    if (__pyx_v_self->trigger_overlay_only) {

      /* "pyglui/ui.pyx":379
 *             self._value = getattr(self.attribute_context,self.attribute_name)
 *             if self.trigger_overlay_only:
 *                 should_redraw_overlay = True             # <<<<<<<<<<<<<<
 *             else:
 *                 should_redraw = True
 */
      __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

      /* "pyglui/ui.pyx":378
 *         elif self._value != getattr(self.attribute_context,self.attribute_name):
 *             self._value = getattr(self.attribute_context,self.attribute_name)
 *             if self.trigger_overlay_only:             # <<<<<<<<<<<<<<
 *                 should_redraw_overlay = True
 *             else:
 */
      goto __pyx_L10;
    }

    /* "pyglui/ui.pyx":381
 *                 should_redraw_overlay = True
 *             else:
 *                 should_redraw = True             # <<<<<<<<<<<<<<
 *             if self.on_change is not None:
 *                 self.on_change(self.value)
 */
    /*else*/ {
      __pyx_v_6pyglui_2ui_should_redraw = 1;
    }
    __pyx_L10:;

    /* "pyglui/ui.pyx":382
 *             else:
 *                 should_redraw = True
 *             if self.on_change is not None:             # <<<<<<<<<<<<<<
 *                 self.on_change(self.value)
 * 
 */
    __pyx_t_1 = (__pyx_v_self->on_change != Py_None);
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":383
 *                 should_redraw = True
 *             if self.on_change is not None:
 *                 self.on_change(self.value)             # <<<<<<<<<<<<<<
 * 
 *     property value:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_self->on_change);
      __pyx_t_3 = __pyx_v_self->on_change; __pyx_t_6 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyglui/ui.pyx":382
 *             else:
 *                 should_redraw = True
 *             if self.on_change is not None:             # <<<<<<<<<<<<<<
 *                 self.on_change(self.value)
 * 
 */
    }

    /* "pyglui/ui.pyx":376
 *                     self.on_change(self.value)
 * 
 *         elif self._value != getattr(self.attribute_context,self.attribute_name):             # <<<<<<<<<<<<<<
 *             self._value = getattr(self.attribute_context,self.attribute_name)
 *             if self.trigger_overlay_only:
 */
  }
  __pyx_L3:;

  /* "pyglui/ui.pyx":352
 * 
 * 
 *     cdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         global should_redraw_overlay
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":386
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._value
 *         def __set__(self,new_val):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Synced_Value_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_12Synced_Value_5value_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Synced_Value_5value___get__(((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Synced_Value_5value___get__(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyglui/ui.pyx":387
 *     property value:
 *         def __get__(self):
 *             return self._value             # <<<<<<<<<<<<<<
 *         def __set__(self,new_val):
 *             if self.setter is not None:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_value);
  __pyx_r = __pyx_v_self->_value;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":386
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._value
 *         def __set__(self,new_val):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":388
 *         def __get__(self):
 *             return self._value
 *         def __set__(self,new_val):             # <<<<<<<<<<<<<<
 *             if self.setter is not None:
 *                 self.setter(new_val)
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_12Synced_Value_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_val); /*proto*/
static int __pyx_pw_6pyglui_2ui_12Synced_Value_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_new_val) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_12Synced_Value_5value_2__set__(((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_v_self), ((PyObject *)__pyx_v_new_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_12Synced_Value_5value_2__set__(struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self, PyObject *__pyx_v_new_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyglui/ui.pyx":389
 *             return self._value
 *         def __set__(self,new_val):
 *             if self.setter is not None:             # <<<<<<<<<<<<<<
 *                 self.setter(new_val)
 *             elif self.use_dict:
 */
  __pyx_t_1 = (__pyx_v_self->setter != Py_None);
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":390
 *         def __set__(self,new_val):
 *             if self.setter is not None:
 *                 self.setter(new_val)             # <<<<<<<<<<<<<<
 *             elif self.use_dict:
 *                 self.attribute_context[self.attribute_name] = new_val
 */
    __Pyx_INCREF(__pyx_v_self->setter);
    __pyx_t_3 = __pyx_v_self->setter; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_new_val};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":389
 *             return self._value
 *         def __set__(self,new_val):
 *             if self.setter is not None:             # <<<<<<<<<<<<<<
 *                 self.setter(new_val)
 *             elif self.use_dict:
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":391
 *             if self.setter is not None:
 *                 self.setter(new_val)
 *             elif self.use_dict:             # <<<<<<<<<<<<<<
 *                 self.attribute_context[self.attribute_name] = new_val
 *             else:
 */
  if (__pyx_v_self->use_dict) {

    /* "pyglui/ui.pyx":392
 *                 self.setter(new_val)
 *             elif self.use_dict:
 *                 self.attribute_context[self.attribute_name] = new_val             # <<<<<<<<<<<<<<
 *             else:
 *                 setattr(self.attribute_context,self.attribute_name,new_val)
 */
    if (unlikely((PyObject_SetItem(__pyx_v_self->attribute_context, __pyx_v_self->attribute_name, __pyx_v_new_val) < 0))) __PYX_ERR(0, 392, __pyx_L1_error)

    /* "pyglui/ui.pyx":391
 *             if self.setter is not None:
 *                 self.setter(new_val)
 *             elif self.use_dict:             # <<<<<<<<<<<<<<
 *                 self.attribute_context[self.attribute_name] = new_val
 *             else:
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":394
 *                 self.attribute_context[self.attribute_name] = new_val
 *             else:
 *                 setattr(self.attribute_context,self.attribute_name,new_val)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_2 = __pyx_v_self->attribute_context;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = __pyx_v_self->attribute_name;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_SetAttr(__pyx_t_2, __pyx_t_3, __pyx_v_new_val); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pyglui/ui.pyx":388
 *         def __get__(self):
 *             return self._value
 *         def __set__(self,new_val):             # <<<<<<<<<<<<<<
 *             if self.setter is not None:
 *                 self.setter(new_val)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Synced_Value_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Synced_Value_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Synced_Value_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Synced_Value_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Synced_Value_4__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Synced_Value_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_12Synced_Value_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_12Synced_Value_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Synced_Value_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_12Synced_Value_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_12Synced_Value_6__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Synced_Value *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_12Synced_Value_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Synced_Value *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Synced_Value.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":406
 *     cdef Vec2 dm,m,s
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.keys = []
 *         self.buttons = []
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input___cinit__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input___cinit__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyglui/ui.pyx":407
 * 
 *     def __cinit__(self):
 *         self.keys = []             # <<<<<<<<<<<<<<
 *         self.buttons = []
 *         self.chars = []
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->keys);
  __Pyx_DECREF(__pyx_v_self->keys);
  __pyx_v_self->keys = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":408
 *     def __cinit__(self):
 *         self.keys = []
 *         self.buttons = []             # <<<<<<<<<<<<<<
 *         self.chars = []
 *         self.active_ui_elements = []
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->buttons);
  __Pyx_DECREF(__pyx_v_self->buttons);
  __pyx_v_self->buttons = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":409
 *         self.keys = []
 *         self.buttons = []
 *         self.chars = []             # <<<<<<<<<<<<<<
 *         self.active_ui_elements = []
 *         self.m = Vec2(0,0)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->chars);
  __Pyx_DECREF(__pyx_v_self->chars);
  __pyx_v_self->chars = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":410
 *         self.buttons = []
 *         self.chars = []
 *         self.active_ui_elements = []             # <<<<<<<<<<<<<<
 *         self.m = Vec2(0,0)
 *         self.dm = Vec2(0,0)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->active_ui_elements);
  __Pyx_DECREF(__pyx_v_self->active_ui_elements);
  __pyx_v_self->active_ui_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":411
 *         self.chars = []
 *         self.active_ui_elements = []
 *         self.m = Vec2(0,0)             # <<<<<<<<<<<<<<
 *         self.dm = Vec2(0,0)
 *         self.s = Vec2(0,0)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->m);
  __Pyx_DECREF((PyObject *)__pyx_v_self->m);
  __pyx_v_self->m = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":412
 *         self.active_ui_elements = []
 *         self.m = Vec2(0,0)
 *         self.dm = Vec2(0,0)             # <<<<<<<<<<<<<<
 *         self.s = Vec2(0,0)
 *         self.cb = ''
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->dm);
  __Pyx_DECREF((PyObject *)__pyx_v_self->dm);
  __pyx_v_self->dm = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":413
 *         self.m = Vec2(0,0)
 *         self.dm = Vec2(0,0)
 *         self.s = Vec2(0,0)             # <<<<<<<<<<<<<<
 *         self.cb = ''
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->s);
  __Pyx_DECREF((PyObject *)__pyx_v_self->s);
  __pyx_v_self->s = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":414
 *         self.dm = Vec2(0,0)
 *         self.s = Vec2(0,0)
 *         self.cb = ''             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_INCREF(__pyx_kp_u__34);
  __Pyx_GIVEREF(__pyx_kp_u__34);
  __Pyx_GOTREF(__pyx_v_self->cb);
  __Pyx_DECREF(__pyx_v_self->cb);
  __pyx_v_self->cb = ((PyObject*)__pyx_kp_u__34);

  /* "pyglui/ui.pyx":406
 *     cdef Vec2 dm,m,s
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.keys = []
 *         self.buttons = []
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Input.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":416
 *         self.cb = ''
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_2__init__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":419
 *         pass
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return bool(self.keys or self.chars or self.buttons or self.dm or self.s)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_5__nonzero__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_4__nonzero__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_4__nonzero__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__nonzero__", 0);

  /* "pyglui/ui.pyx":420
 * 
 *     def __nonzero__(self):
 *         return bool(self.keys or self.chars or self.buttons or self.dm or self.s)             # <<<<<<<<<<<<<<
 * 
 *     def purge(self):
 */
  __pyx_t_2 = (__pyx_v_self->keys != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->keys) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->chars != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->chars) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->buttons != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->buttons) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->dm)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 420, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->s)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 420, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = (!(!__pyx_t_1));
  goto __pyx_L0;

  /* "pyglui/ui.pyx":419
 *         pass
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return bool(self.keys or self.chars or self.buttons or self.dm or self.s)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Input.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":422
 *         return bool(self.keys or self.chars or self.buttons or self.dm or self.s)
 * 
 *     def purge(self):             # <<<<<<<<<<<<<<
 *         self.keys = []
 *         self.buttons = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_7purge(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_5Input_7purge = {"purge", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Input_7purge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_5Input_7purge(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("purge (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("purge", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "purge", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_6purge(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_6purge(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("purge", 0);

  /* "pyglui/ui.pyx":423
 * 
 *     def purge(self):
 *         self.keys = []             # <<<<<<<<<<<<<<
 *         self.buttons = []
 *         self.chars = []
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->keys);
  __Pyx_DECREF(__pyx_v_self->keys);
  __pyx_v_self->keys = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":424
 *     def purge(self):
 *         self.keys = []
 *         self.buttons = []             # <<<<<<<<<<<<<<
 *         self.chars = []
 *         self.dm.x = 0
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->buttons);
  __Pyx_DECREF(__pyx_v_self->buttons);
  __pyx_v_self->buttons = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":425
 *         self.keys = []
 *         self.buttons = []
 *         self.chars = []             # <<<<<<<<<<<<<<
 *         self.dm.x = 0
 *         self.dm.y = 0
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->chars);
  __Pyx_DECREF(__pyx_v_self->chars);
  __pyx_v_self->chars = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":426
 *         self.buttons = []
 *         self.chars = []
 *         self.dm.x = 0             # <<<<<<<<<<<<<<
 *         self.dm.y = 0
 *         self.s.x = 0
 */
  __pyx_v_self->dm->x = 0.0;

  /* "pyglui/ui.pyx":427
 *         self.chars = []
 *         self.dm.x = 0
 *         self.dm.y = 0             # <<<<<<<<<<<<<<
 *         self.s.x = 0
 *         self.s.y = 0
 */
  __pyx_v_self->dm->y = 0.0;

  /* "pyglui/ui.pyx":428
 *         self.dm.x = 0
 *         self.dm.y = 0
 *         self.s.x = 0             # <<<<<<<<<<<<<<
 *         self.s.y = 0
 *         self.cb = ''
 */
  __pyx_v_self->s->x = 0.0;

  /* "pyglui/ui.pyx":429
 *         self.dm.y = 0
 *         self.s.x = 0
 *         self.s.y = 0             # <<<<<<<<<<<<<<
 *         self.cb = ''
 * 
 */
  __pyx_v_self->s->y = 0.0;

  /* "pyglui/ui.pyx":430
 *         self.s.x = 0
 *         self.s.y = 0
 *         self.cb = ''             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_INCREF(__pyx_kp_u__34);
  __Pyx_GIVEREF(__pyx_kp_u__34);
  __Pyx_GOTREF(__pyx_v_self->cb);
  __Pyx_DECREF(__pyx_v_self->cb);
  __pyx_v_self->cb = ((PyObject*)__pyx_kp_u__34);

  /* "pyglui/ui.pyx":422
 *         return bool(self.keys or self.chars or self.buttons or self.dm or self.s)
 * 
 *     def purge(self):             # <<<<<<<<<<<<<<
 *         self.keys = []
 *         self.buttons = []
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Input.purge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":432
 *         self.cb = ''
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'Current Input: \n   Mouse pos  : %s\n   Mouse delta: %s\n   Scroll: %s\n   Buttons: %s\n   Keys: %s\n   Chars: %s' %(self.m,self.dm,self.s,self.buttons,self.keys,self.chars)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_9__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Input_9__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_8__str__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_8__str__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyglui/ui.pyx":433
 * 
 *     def __str__(self):
 *         return 'Current Input: \n   Mouse pos  : %s\n   Mouse delta: %s\n   Scroll: %s\n   Buttons: %s\n   Keys: %s\n   Chars: %s' %(self.m,self.dm,self.s,self.buttons,self.keys,self.chars)             # <<<<<<<<<<<<<<
 * 
 * Unused_Input = namedtuple('Unused_Input', ['buttons', 'keys', 'chars', 'clipboard'])
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_Current_Input_Mouse_pos);
  __pyx_t_2 += 32;
  __Pyx_GIVEREF(__pyx_kp_u_Current_Input_Mouse_pos);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Current_Input_Mouse_pos);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self->m)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_Mouse_delta);
  __pyx_t_2 += 17;
  __Pyx_GIVEREF(__pyx_kp_u_Mouse_delta);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_Mouse_delta);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self->dm)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_Scroll);
  __pyx_t_2 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_Scroll);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_Scroll);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self->s)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_Buttons);
  __pyx_t_2 += 13;
  __Pyx_GIVEREF(__pyx_kp_u_Buttons);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_Buttons);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->buttons), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_Keys);
  __pyx_t_2 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Keys);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u_Keys);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->keys), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_Chars);
  __pyx_t_2 += 11;
  __Pyx_GIVEREF(__pyx_kp_u_Chars);
  PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_kp_u_Chars);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->chars), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 12, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":432
 *         self.cb = ''
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'Current Input: \n   Mouse pos  : %s\n   Mouse delta: %s\n   Scroll: %s\n   Buttons: %s\n   Keys: %s\n   Chars: %s' %(self.m,self.dm,self.s,self.buttons,self.keys,self.chars)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Input.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":402
 *     '''
 * 
 *     cdef public list keys,chars,buttons,active_ui_elements             # <<<<<<<<<<<<<<
 *     cdef public basestring cb
 *     cdef Vec2 dm,m,s
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_4keys_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Input_4keys_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_4keys___get__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_4keys___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->keys);
  __pyx_r = __pyx_v_self->keys;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_4keys_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_4keys_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_4keys_2__set__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_4keys_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->keys);
  __Pyx_DECREF(__pyx_v_self->keys);
  __pyx_v_self->keys = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Input.keys.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_4keys_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_4keys_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_4keys_4__del__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_4keys_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->keys);
  __Pyx_DECREF(__pyx_v_self->keys);
  __pyx_v_self->keys = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_5chars_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Input_5chars_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_5chars___get__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_5chars___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->chars);
  __pyx_r = __pyx_v_self->chars;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_5chars_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_5chars_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_5chars_2__set__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_5chars_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->chars);
  __Pyx_DECREF(__pyx_v_self->chars);
  __pyx_v_self->chars = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Input.chars.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_5chars_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_5chars_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_5chars_4__del__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_5chars_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->chars);
  __Pyx_DECREF(__pyx_v_self->chars);
  __pyx_v_self->chars = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_7buttons_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Input_7buttons_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_7buttons___get__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_7buttons___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->buttons);
  __pyx_r = __pyx_v_self->buttons;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_7buttons_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_7buttons_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_7buttons_2__set__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_7buttons_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->buttons);
  __Pyx_DECREF(__pyx_v_self->buttons);
  __pyx_v_self->buttons = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Input.buttons.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_7buttons_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_7buttons_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_7buttons_4__del__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_7buttons_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->buttons);
  __Pyx_DECREF(__pyx_v_self->buttons);
  __pyx_v_self->buttons = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_18active_ui_elements___get__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_18active_ui_elements___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->active_ui_elements);
  __pyx_r = __pyx_v_self->active_ui_elements;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_18active_ui_elements_2__set__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_18active_ui_elements_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->active_ui_elements);
  __Pyx_DECREF(__pyx_v_self->active_ui_elements);
  __pyx_v_self->active_ui_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Input.active_ui_elements.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_18active_ui_elements_4__del__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_18active_ui_elements_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->active_ui_elements);
  __Pyx_DECREF(__pyx_v_self->active_ui_elements);
  __pyx_v_self->active_ui_elements = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":403
 * 
 *     cdef public list keys,chars,buttons,active_ui_elements
 *     cdef public basestring cb             # <<<<<<<<<<<<<<
 *     cdef Vec2 dm,m,s
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_2cb_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_5Input_2cb_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_2cb___get__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_2cb___get__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->cb);
  __pyx_r = __pyx_v_self->cb;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_2cb_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_2cb_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_2cb_2__set__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_2cb_2__set__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_v_value))) __PYX_ERR(0, 403, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->cb);
  __Pyx_DECREF(__pyx_v_self->cb);
  __pyx_v_self->cb = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Input.cb.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_5Input_2cb_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_5Input_2cb_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_2cb_4__del__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_5Input_2cb_4__del__(struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->cb);
  __Pyx_DECREF(__pyx_v_self->cb);
  __pyx_v_self->cb = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_5Input_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Input_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_5Input_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_10__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Input.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_5Input_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_5Input_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Input_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_5Input_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Input.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_5Input_12__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Input *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_5Input_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Input.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":452
 *     cdef object click_cb
 * 
 *     def __cinit__(self,Vec2 pos, Vec2 size, Vec2 value, arrest_axis = 0,zero_crossing=True,click_cb = None,catch_input=True):             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(pos,size)
 *         self.value = value
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Draggable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Draggable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_pos = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_value = 0;
  PyObject *__pyx_v_arrest_axis = 0;
  PyObject *__pyx_v_zero_crossing = 0;
  PyObject *__pyx_v_click_cb = 0;
  PyObject *__pyx_v_catch_input = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_value,&__pyx_n_s_arrest_axis,&__pyx_n_s_zero_crossing,&__pyx_n_s_click_cb,&__pyx_n_s_catch_input,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_value,&__pyx_n_s_arrest_axis,&__pyx_n_s_zero_crossing,&__pyx_n_s_click_cb,&__pyx_n_s_catch_input,0};
    #endif
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[3] = ((PyObject *)__pyx_int_0);
    values[4] = ((PyObject *)Py_True);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((PyObject *)Py_True);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 7, 1); __PYX_ERR(0, 452, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 7, 2); __PYX_ERR(0, 452, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arrest_axis);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_zero_crossing);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_click_cb);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_catch_input);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 452, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[0]);
    __pyx_v_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[1]);
    __pyx_v_value = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[2]);
    __pyx_v_arrest_axis = values[3];
    __pyx_v_zero_crossing = values[4];
    __pyx_v_click_cb = values[5];
    __pyx_v_catch_input = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 7, __pyx_nargs); __PYX_ERR(0, 452, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Draggable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_6pyglui_2ui_Vec2, 1, "pos", 0))) __PYX_ERR(0, 452, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_size), __pyx_ptype_6pyglui_2ui_Vec2, 1, "size", 0))) __PYX_ERR(0, 452, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_6pyglui_2ui_Vec2, 1, "value", 0))) __PYX_ERR(0, 452, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Draggable___cinit__(((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_v_self), __pyx_v_pos, __pyx_v_size, __pyx_v_value, __pyx_v_arrest_axis, __pyx_v_zero_crossing, __pyx_v_click_cb, __pyx_v_catch_input);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Draggable___cinit__(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_pos, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_value, PyObject *__pyx_v_arrest_axis, PyObject *__pyx_v_zero_crossing, PyObject *__pyx_v_click_cb, PyObject *__pyx_v_catch_input) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyglui/ui.pyx":453
 * 
 *     def __cinit__(self,Vec2 pos, Vec2 size, Vec2 value, arrest_axis = 0,zero_crossing=True,click_cb = None,catch_input=True):
 *         self.outline = FitBox(pos,size)             # <<<<<<<<<<<<<<
 *         self.value = value
 *         self.selected = False
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_pos);
  __Pyx_GIVEREF((PyObject *)__pyx_v_pos);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_pos));
  __Pyx_INCREF((PyObject *)__pyx_v_size);
  __Pyx_GIVEREF((PyObject *)__pyx_v_size);
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_size));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->outline);
  __Pyx_DECREF((PyObject *)__pyx_v_self->outline);
  __pyx_v_self->outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":454
 *     def __cinit__(self,Vec2 pos, Vec2 size, Vec2 value, arrest_axis = 0,zero_crossing=True,click_cb = None,catch_input=True):
 *         self.outline = FitBox(pos,size)
 *         self.value = value             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         self.touch_point = Vec2(0,0)
 */
  __Pyx_INCREF((PyObject *)__pyx_v_value);
  __Pyx_GIVEREF((PyObject *)__pyx_v_value);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->value);
  __Pyx_DECREF((PyObject *)__pyx_v_self->value);
  __pyx_v_self->value = __pyx_v_value;

  /* "pyglui/ui.pyx":455
 *         self.outline = FitBox(pos,size)
 *         self.value = value
 *         self.selected = False             # <<<<<<<<<<<<<<
 *         self.touch_point = Vec2(0,0)
 *         self.drag_accumulator = Vec2(0,0)
 */
  __pyx_v_self->selected = 0;

  /* "pyglui/ui.pyx":456
 *         self.value = value
 *         self.selected = False
 *         self.touch_point = Vec2(0,0)             # <<<<<<<<<<<<<<
 *         self.drag_accumulator = Vec2(0,0)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->touch_point);
  __Pyx_DECREF((PyObject *)__pyx_v_self->touch_point);
  __pyx_v_self->touch_point = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":457
 *         self.selected = False
 *         self.touch_point = Vec2(0,0)
 *         self.drag_accumulator = Vec2(0,0)             # <<<<<<<<<<<<<<
 * 
 *         self.arrest_axis = arrest_axis
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->drag_accumulator);
  __Pyx_DECREF((PyObject *)__pyx_v_self->drag_accumulator);
  __pyx_v_self->drag_accumulator = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":459
 *         self.drag_accumulator = Vec2(0,0)
 * 
 *         self.arrest_axis = arrest_axis             # <<<<<<<<<<<<<<
 *         self.zero_crossing = zero_crossing
 *         self.click_cb = click_cb
 */
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_arrest_axis); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L1_error)
  __pyx_v_self->arrest_axis = __pyx_t_3;

  /* "pyglui/ui.pyx":460
 * 
 *         self.arrest_axis = arrest_axis
 *         self.zero_crossing = zero_crossing             # <<<<<<<<<<<<<<
 *         self.click_cb = click_cb
 *         self.dragged = False
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_zero_crossing); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 460, __pyx_L1_error)
  __pyx_v_self->zero_crossing = __pyx_t_4;

  /* "pyglui/ui.pyx":461
 *         self.arrest_axis = arrest_axis
 *         self.zero_crossing = zero_crossing
 *         self.click_cb = click_cb             # <<<<<<<<<<<<<<
 *         self.dragged = False
 *         self.catch_input = catch_input
 */
  __Pyx_INCREF(__pyx_v_click_cb);
  __Pyx_GIVEREF(__pyx_v_click_cb);
  __Pyx_GOTREF(__pyx_v_self->click_cb);
  __Pyx_DECREF(__pyx_v_self->click_cb);
  __pyx_v_self->click_cb = __pyx_v_click_cb;

  /* "pyglui/ui.pyx":462
 *         self.zero_crossing = zero_crossing
 *         self.click_cb = click_cb
 *         self.dragged = False             # <<<<<<<<<<<<<<
 *         self.catch_input = catch_input
 * 
 */
  __pyx_v_self->dragged = 0;

  /* "pyglui/ui.pyx":463
 *         self.click_cb = click_cb
 *         self.dragged = False
 *         self.catch_input = catch_input             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,Vec2 pos, Vec2 size, Vec2 value, arrest_axis = 0,zero_crossing=True,click_cb = None,catch_input=True):
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_catch_input); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 463, __pyx_L1_error)
  __pyx_v_self->catch_input = __pyx_t_4;

  /* "pyglui/ui.pyx":452
 *     cdef object click_cb
 * 
 *     def __cinit__(self,Vec2 pos, Vec2 size, Vec2 value, arrest_axis = 0,zero_crossing=True,click_cb = None,catch_input=True):             # <<<<<<<<<<<<<<
 *         self.outline = FitBox(pos,size)
 *         self.value = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.Draggable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":465
 *         self.catch_input = catch_input
 * 
 *     def __init__(self,Vec2 pos, Vec2 size, Vec2 value, arrest_axis = 0,zero_crossing=True,click_cb = None,catch_input=True):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_9Draggable_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_9Draggable_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_pos = 0;
  CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size = 0;
  CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_arrest_axis = 0;
  CYTHON_UNUSED PyObject *__pyx_v_zero_crossing = 0;
  CYTHON_UNUSED PyObject *__pyx_v_click_cb = 0;
  CYTHON_UNUSED PyObject *__pyx_v_catch_input = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_value,&__pyx_n_s_arrest_axis,&__pyx_n_s_zero_crossing,&__pyx_n_s_click_cb,&__pyx_n_s_catch_input,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,&__pyx_n_s_size,&__pyx_n_s_value,&__pyx_n_s_arrest_axis,&__pyx_n_s_zero_crossing,&__pyx_n_s_click_cb,&__pyx_n_s_catch_input,0};
    #endif
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[3] = ((PyObject *)__pyx_int_0);
    values[4] = ((PyObject *)Py_True);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((PyObject *)Py_True);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, 1); __PYX_ERR(0, 465, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, 2); __PYX_ERR(0, 465, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arrest_axis);
          if (value) { values[3] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_zero_crossing);
          if (value) { values[4] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_click_cb);
          if (value) { values[5] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_catch_input);
          if (value) { values[6] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 465, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[0]);
    __pyx_v_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[1]);
    __pyx_v_value = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[2]);
    __pyx_v_arrest_axis = values[3];
    __pyx_v_zero_crossing = values[4];
    __pyx_v_click_cb = values[5];
    __pyx_v_catch_input = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, __pyx_nargs); __PYX_ERR(0, 465, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Draggable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_6pyglui_2ui_Vec2, 1, "pos", 0))) __PYX_ERR(0, 465, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_size), __pyx_ptype_6pyglui_2ui_Vec2, 1, "size", 0))) __PYX_ERR(0, 465, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_6pyglui_2ui_Vec2, 1, "value", 0))) __PYX_ERR(0, 465, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Draggable_2__init__(((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_v_self), __pyx_v_pos, __pyx_v_size, __pyx_v_value, __pyx_v_arrest_axis, __pyx_v_zero_crossing, __pyx_v_click_cb, __pyx_v_catch_input);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_9Draggable_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_pos, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_arrest_axis, CYTHON_UNUSED PyObject *__pyx_v_zero_crossing, CYTHON_UNUSED PyObject *__pyx_v_click_cb, CYTHON_UNUSED PyObject *__pyx_v_catch_input) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":468
 *         pass
 * 
 *     cdef draw(self, FitBox parent_size,bint nested=True):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent_size)
 *         self.outline.sketch()
 */

static PyObject *__pyx_f_6pyglui_2ui_9Draggable_draw(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_parent_size, struct __pyx_opt_args_6pyglui_2ui_9Draggable_draw *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("draw", 0);
  if (__pyx_optional_args) {
  }

  /* "pyglui/ui.pyx":469
 * 
 *     cdef draw(self, FitBox parent_size,bint nested=True):
 *         self.outline.compute(parent_size)             # <<<<<<<<<<<<<<
 *         self.outline.sketch()
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->outline->__pyx_vtab)->compute(__pyx_v_self->outline, __pyx_v_parent_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":470
 *     cdef draw(self, FitBox parent_size,bint nested=True):
 *         self.outline.compute(parent_size)
 *         self.outline.sketch()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->outline->__pyx_vtab)->sketch(__pyx_v_self->outline, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":468
 *         pass
 * 
 *     cdef draw(self, FitBox parent_size,bint nested=True):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent_size)
 *         self.outline.sketch()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Draggable.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":473
 * 
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         # we need to check for new clicks as touch pads can isse
 *         # a button down that is not follow by a button up.
 */

static PyObject *__pyx_pw_6pyglui_2ui_9Draggable_5pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6pyglui_2ui_9Draggable_pre_handle_input(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pre_handle_input", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pre_handle_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_9Draggable_5pre_handle_input)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_new_input)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyglui/ui.pyx":476
 *         # we need to check for new clicks as touch pads can isse
 *         # a button down that is not follow by a button up.
 *         for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *             if b[1] == 1:
 *                 if not self.outline.mouse_over(new_input.m):
 */
  if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 476, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_new_input->buttons; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 476, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyglui/ui.pyx":477
 *         # a button down that is not follow by a button up.
 *         for b in new_input.buttons:
 *             if b[1] == 1:             # <<<<<<<<<<<<<<
 *                 if not self.outline.mouse_over(new_input.m):
 *                     self.selected = False
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {

      /* "pyglui/ui.pyx":478
 *         for b in new_input.buttons:
 *             if b[1] == 1:
 *                 if not self.outline.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     self.selected = False
 * 
 */
      __pyx_t_3 = ((PyObject *)__pyx_v_new_input->m);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = (!((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->outline->__pyx_vtab)->mouse_over(__pyx_v_self->outline, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3), 0));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {

        /* "pyglui/ui.pyx":479
 *             if b[1] == 1:
 *                 if not self.outline.mouse_over(new_input.m):
 *                     self.selected = False             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_v_self->selected = 0;

        /* "pyglui/ui.pyx":478
 *         for b in new_input.buttons:
 *             if b[1] == 1:
 *                 if not self.outline.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     self.selected = False
 * 
 */
      }

      /* "pyglui/ui.pyx":477
 *         # a button down that is not follow by a button up.
 *         for b in new_input.buttons:
 *             if b[1] == 1:             # <<<<<<<<<<<<<<
 *                 if not self.outline.mouse_over(new_input.m):
 *                     self.selected = False
 */
    }

    /* "pyglui/ui.pyx":476
 *         # we need to check for new clicks as touch pads can isse
 *         # a button down that is not follow by a button up.
 *         for b in new_input.buttons:             # <<<<<<<<<<<<<<
 *             if b[1] == 1:
 *                 if not self.outline.mouse_over(new_input.m):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":473
 * 
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         # we need to check for new clicks as touch pads can isse
 *         # a button down that is not follow by a button up.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Draggable.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Draggable_5pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Draggable_5pre_handle_input = {"pre_handle_input", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Draggable_5pre_handle_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Draggable_5pre_handle_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pre_handle_input (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_input,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_input)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pre_handle_input") < 0)) __PYX_ERR(0, 473, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pre_handle_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 473, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Draggable.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_input), __pyx_ptype_6pyglui_2ui_Input, 1, "new_input", 0))) __PYX_ERR(0, 473, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_9Draggable_4pre_handle_input(((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_v_self), __pyx_v_new_input);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Draggable_4pre_handle_input(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pre_handle_input", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pyglui_2ui_9Draggable_pre_handle_input(__pyx_v_self, __pyx_v_new_input, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Draggable.pre_handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":482
 * 
 * 
 *     cdef handle_input(self,Input new_input, bint visible):             # <<<<<<<<<<<<<<
 *         global should_redraw
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_9Draggable_handle_input(struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Input *__pyx_v_new_input, int __pyx_v_visible) {
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  float __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_input", 0);

  /* "pyglui/ui.pyx":485
 *         global should_redraw
 * 
 *         if self.selected and new_input.dm:             # <<<<<<<<<<<<<<
 *             self.value -= self.drag_accumulator
 *             self.drag_accumulator = (new_input.m-self.touch_point)
 */
  if (__pyx_v_self->selected) {
  } else {
    __pyx_t_1 = __pyx_v_self->selected;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_new_input->dm)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 485, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":486
 * 
 *         if self.selected and new_input.dm:
 *             self.value -= self.drag_accumulator             # <<<<<<<<<<<<<<
 *             self.drag_accumulator = (new_input.m-self.touch_point)
 *             self.drag_accumulator *= 1/ui_scale
 */
    __pyx_t_3 = PyNumber_InPlaceSubtract(((PyObject *)__pyx_v_self->value), ((PyObject *)__pyx_v_self->drag_accumulator)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->value);
    __Pyx_DECREF((PyObject *)__pyx_v_self->value);
    __pyx_v_self->value = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyglui/ui.pyx":487
 *         if self.selected and new_input.dm:
 *             self.value -= self.drag_accumulator
 *             self.drag_accumulator = (new_input.m-self.touch_point)             # <<<<<<<<<<<<<<
 *             self.drag_accumulator *= 1/ui_scale
 * 
 */
    __pyx_t_3 = PyNumber_Subtract(((PyObject *)__pyx_v_new_input->m), ((PyObject *)__pyx_v_self->touch_point)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->drag_accumulator);
    __Pyx_DECREF((PyObject *)__pyx_v_self->drag_accumulator);
    __pyx_v_self->drag_accumulator = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyglui/ui.pyx":488
 *             self.value -= self.drag_accumulator
 *             self.drag_accumulator = (new_input.m-self.touch_point)
 *             self.drag_accumulator *= 1/ui_scale             # <<<<<<<<<<<<<<
 * 
 *             if (abs(self.drag_accumulator.x) + abs(self.drag_accumulator.y))  > drag_threshold:
 */
    if (unlikely(__pyx_v_6pyglui_2ui_ui_scale == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 488, __pyx_L1_error)
    }
    __pyx_t_3 = PyFloat_FromDouble((1.0 / __pyx_v_6pyglui_2ui_ui_scale)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_InPlaceMultiply(((PyObject *)__pyx_v_self->drag_accumulator), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->drag_accumulator);
    __Pyx_DECREF((PyObject *)__pyx_v_self->drag_accumulator);
    __pyx_v_self->drag_accumulator = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":490
 *             self.drag_accumulator *= 1/ui_scale
 * 
 *             if (abs(self.drag_accumulator.x) + abs(self.drag_accumulator.y))  > drag_threshold:             # <<<<<<<<<<<<<<
 *                 self.dragged  = True
 * 
 */
    __pyx_t_1 = ((fabsf(__pyx_v_self->drag_accumulator->x) + fabsf(__pyx_v_self->drag_accumulator->y)) > 10.0);
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":491
 * 
 *             if (abs(self.drag_accumulator.x) + abs(self.drag_accumulator.y))  > drag_threshold:
 *                 self.dragged  = True             # <<<<<<<<<<<<<<
 * 
 *             if self.arrest_axis == 1:
 */
      __pyx_v_self->dragged = 1;

      /* "pyglui/ui.pyx":490
 *             self.drag_accumulator *= 1/ui_scale
 * 
 *             if (abs(self.drag_accumulator.x) + abs(self.drag_accumulator.y))  > drag_threshold:             # <<<<<<<<<<<<<<
 *                 self.dragged  = True
 * 
 */
    }

    /* "pyglui/ui.pyx":493
 *                 self.dragged  = True
 * 
 *             if self.arrest_axis == 1:             # <<<<<<<<<<<<<<
 *                 self.drag_accumulator.x = 0
 *             elif self.arrest_axis == 2:
 */
    switch (__pyx_v_self->arrest_axis) {
      case 1:

      /* "pyglui/ui.pyx":494
 * 
 *             if self.arrest_axis == 1:
 *                 self.drag_accumulator.x = 0             # <<<<<<<<<<<<<<
 *             elif self.arrest_axis == 2:
 *                 self.drag_accumulator.y = 0
 */
      __pyx_v_self->drag_accumulator->x = 0.0;

      /* "pyglui/ui.pyx":493
 *                 self.dragged  = True
 * 
 *             if self.arrest_axis == 1:             # <<<<<<<<<<<<<<
 *                 self.drag_accumulator.x = 0
 *             elif self.arrest_axis == 2:
 */
      break;
      case 2:

      /* "pyglui/ui.pyx":496
 *                 self.drag_accumulator.x = 0
 *             elif self.arrest_axis == 2:
 *                 self.drag_accumulator.y = 0             # <<<<<<<<<<<<<<
 * 
 *             if not self.zero_crossing:
 */
      __pyx_v_self->drag_accumulator->y = 0.0;

      /* "pyglui/ui.pyx":495
 *             if self.arrest_axis == 1:
 *                 self.drag_accumulator.x = 0
 *             elif self.arrest_axis == 2:             # <<<<<<<<<<<<<<
 *                 self.drag_accumulator.y = 0
 * 
 */
      break;
      default: break;
    }

    /* "pyglui/ui.pyx":498
 *                 self.drag_accumulator.y = 0
 * 
 *             if not self.zero_crossing:             # <<<<<<<<<<<<<<
 *                 if self.value.x > 0 and self.value.x + self.drag_accumulator.x <= 0:
 *                     self.drag_accumulator.x = .001 - self.value.x
 */
    __pyx_t_1 = (!__pyx_v_self->zero_crossing);
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":499
 * 
 *             if not self.zero_crossing:
 *                 if self.value.x > 0 and self.value.x + self.drag_accumulator.x <= 0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.x = .001 - self.value.x
 *                 elif self.value.x < 0 and self.value.x + self.drag_accumulator.x >= 0:
 */
      __pyx_t_2 = (__pyx_v_self->value->x > 0.0);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_2 = ((__pyx_v_self->value->x + __pyx_v_self->drag_accumulator->x) <= 0.0);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L9_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":500
 *             if not self.zero_crossing:
 *                 if self.value.x > 0 and self.value.x + self.drag_accumulator.x <= 0:
 *                     self.drag_accumulator.x = .001 - self.value.x             # <<<<<<<<<<<<<<
 *                 elif self.value.x < 0 and self.value.x + self.drag_accumulator.x >= 0:
 *                     self.drag_accumulator.x = -.001 - self.value.x
 */
        __pyx_v_self->drag_accumulator->x = (.001 - __pyx_v_self->value->x);

        /* "pyglui/ui.pyx":499
 * 
 *             if not self.zero_crossing:
 *                 if self.value.x > 0 and self.value.x + self.drag_accumulator.x <= 0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.x = .001 - self.value.x
 *                 elif self.value.x < 0 and self.value.x + self.drag_accumulator.x >= 0:
 */
        goto __pyx_L8;
      }

      /* "pyglui/ui.pyx":501
 *                 if self.value.x > 0 and self.value.x + self.drag_accumulator.x <= 0:
 *                     self.drag_accumulator.x = .001 - self.value.x
 *                 elif self.value.x < 0 and self.value.x + self.drag_accumulator.x >= 0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.x = -.001 - self.value.x
 *                 elif self.value.x ==0:
 */
      __pyx_t_2 = (__pyx_v_self->value->x < 0.0);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_2 = ((__pyx_v_self->value->x + __pyx_v_self->drag_accumulator->x) >= 0.0);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L11_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":502
 *                     self.drag_accumulator.x = .001 - self.value.x
 *                 elif self.value.x < 0 and self.value.x + self.drag_accumulator.x >= 0:
 *                     self.drag_accumulator.x = -.001 - self.value.x             # <<<<<<<<<<<<<<
 *                 elif self.value.x ==0:
 *                     self.drag_accumulator.x = 0
 */
        __pyx_v_self->drag_accumulator->x = (-.001 - __pyx_v_self->value->x);

        /* "pyglui/ui.pyx":501
 *                 if self.value.x > 0 and self.value.x + self.drag_accumulator.x <= 0:
 *                     self.drag_accumulator.x = .001 - self.value.x
 *                 elif self.value.x < 0 and self.value.x + self.drag_accumulator.x >= 0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.x = -.001 - self.value.x
 *                 elif self.value.x ==0:
 */
        goto __pyx_L8;
      }

      /* "pyglui/ui.pyx":503
 *                 elif self.value.x < 0 and self.value.x + self.drag_accumulator.x >= 0:
 *                     self.drag_accumulator.x = -.001 - self.value.x
 *                 elif self.value.x ==0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.x = 0
 *                 if self.value.y > 0 and self.value.y + self.drag_accumulator.y <= 0:
 */
      __pyx_t_1 = (__pyx_v_self->value->x == 0.0);
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":504
 *                     self.drag_accumulator.x = -.001 - self.value.x
 *                 elif self.value.x ==0:
 *                     self.drag_accumulator.x = 0             # <<<<<<<<<<<<<<
 *                 if self.value.y > 0 and self.value.y + self.drag_accumulator.y <= 0:
 *                     self.drag_accumulator.y = .001 - self.value.y
 */
        __pyx_v_self->drag_accumulator->x = 0.0;

        /* "pyglui/ui.pyx":503
 *                 elif self.value.x < 0 and self.value.x + self.drag_accumulator.x >= 0:
 *                     self.drag_accumulator.x = -.001 - self.value.x
 *                 elif self.value.x ==0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.x = 0
 *                 if self.value.y > 0 and self.value.y + self.drag_accumulator.y <= 0:
 */
      }
      __pyx_L8:;

      /* "pyglui/ui.pyx":505
 *                 elif self.value.x ==0:
 *                     self.drag_accumulator.x = 0
 *                 if self.value.y > 0 and self.value.y + self.drag_accumulator.y <= 0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.y = .001 - self.value.y
 *                 elif self.value.y < 0 and self.value.y + self.drag_accumulator.y >= 0:
 */
      __pyx_t_2 = (__pyx_v_self->value->y > 0.0);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L14_bool_binop_done;
      }
      __pyx_t_2 = ((__pyx_v_self->value->y + __pyx_v_self->drag_accumulator->y) <= 0.0);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L14_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":506
 *                     self.drag_accumulator.x = 0
 *                 if self.value.y > 0 and self.value.y + self.drag_accumulator.y <= 0:
 *                     self.drag_accumulator.y = .001 - self.value.y             # <<<<<<<<<<<<<<
 *                 elif self.value.y < 0 and self.value.y + self.drag_accumulator.y >= 0:
 *                     self.drag_accumulator.y = -.001 - self.value.y
 */
        __pyx_v_self->drag_accumulator->y = (.001 - __pyx_v_self->value->y);

        /* "pyglui/ui.pyx":505
 *                 elif self.value.x ==0:
 *                     self.drag_accumulator.x = 0
 *                 if self.value.y > 0 and self.value.y + self.drag_accumulator.y <= 0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.y = .001 - self.value.y
 *                 elif self.value.y < 0 and self.value.y + self.drag_accumulator.y >= 0:
 */
        goto __pyx_L13;
      }

      /* "pyglui/ui.pyx":507
 *                 if self.value.y > 0 and self.value.y + self.drag_accumulator.y <= 0:
 *                     self.drag_accumulator.y = .001 - self.value.y
 *                 elif self.value.y < 0 and self.value.y + self.drag_accumulator.y >= 0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.y = -.001 - self.value.y
 *                 elif self.value.y ==0:
 */
      __pyx_t_2 = (__pyx_v_self->value->y < 0.0);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L16_bool_binop_done;
      }
      __pyx_t_2 = ((__pyx_v_self->value->y + __pyx_v_self->drag_accumulator->y) >= 0.0);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L16_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":508
 *                     self.drag_accumulator.y = .001 - self.value.y
 *                 elif self.value.y < 0 and self.value.y + self.drag_accumulator.y >= 0:
 *                     self.drag_accumulator.y = -.001 - self.value.y             # <<<<<<<<<<<<<<
 *                 elif self.value.y ==0:
 *                     self.drag_accumulator.y = 0
 */
        __pyx_v_self->drag_accumulator->y = (-.001 - __pyx_v_self->value->y);

        /* "pyglui/ui.pyx":507
 *                 if self.value.y > 0 and self.value.y + self.drag_accumulator.y <= 0:
 *                     self.drag_accumulator.y = .001 - self.value.y
 *                 elif self.value.y < 0 and self.value.y + self.drag_accumulator.y >= 0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.y = -.001 - self.value.y
 *                 elif self.value.y ==0:
 */
        goto __pyx_L13;
      }

      /* "pyglui/ui.pyx":509
 *                 elif self.value.y < 0 and self.value.y + self.drag_accumulator.y >= 0:
 *                     self.drag_accumulator.y = -.001 - self.value.y
 *                 elif self.value.y ==0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.y = 0
 * 
 */
      __pyx_t_1 = (__pyx_v_self->value->y == 0.0);
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":510
 *                     self.drag_accumulator.y = -.001 - self.value.y
 *                 elif self.value.y ==0:
 *                     self.drag_accumulator.y = 0             # <<<<<<<<<<<<<<
 * 
 *             self.value += self.drag_accumulator
 */
        __pyx_v_self->drag_accumulator->y = 0.0;

        /* "pyglui/ui.pyx":509
 *                 elif self.value.y < 0 and self.value.y + self.drag_accumulator.y >= 0:
 *                     self.drag_accumulator.y = -.001 - self.value.y
 *                 elif self.value.y ==0:             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator.y = 0
 * 
 */
      }
      __pyx_L13:;

      /* "pyglui/ui.pyx":498
 *                 self.drag_accumulator.y = 0
 * 
 *             if not self.zero_crossing:             # <<<<<<<<<<<<<<
 *                 if self.value.x > 0 and self.value.x + self.drag_accumulator.x <= 0:
 *                     self.drag_accumulator.x = .001 - self.value.x
 */
    }

    /* "pyglui/ui.pyx":512
 *                     self.drag_accumulator.y = 0
 * 
 *             self.value += self.drag_accumulator             # <<<<<<<<<<<<<<
 * 
 *             should_redraw = True
 */
    __pyx_t_4 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_self->value), ((PyObject *)__pyx_v_self->drag_accumulator)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->value);
    __Pyx_DECREF((PyObject *)__pyx_v_self->value);
    __pyx_v_self->value = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":514
 *             self.value += self.drag_accumulator
 * 
 *             should_redraw = True             # <<<<<<<<<<<<<<
 * 
 *         for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired
 */
    __pyx_v_6pyglui_2ui_should_redraw = 1;

    /* "pyglui/ui.pyx":485
 *         global should_redraw
 * 
 *         if self.selected and new_input.dm:             # <<<<<<<<<<<<<<
 *             self.value -= self.drag_accumulator
 *             self.drag_accumulator = (new_input.m-self.touch_point)
 */
  }

  /* "pyglui/ui.pyx":516
 *             should_redraw = True
 * 
 *         for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired             # <<<<<<<<<<<<<<
 *             if b[1] == 1 and visible:
 *                 if self.outline.mouse_over(new_input.m):
 */
  if (unlikely(__pyx_v_new_input->buttons == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 516, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyList_GetSlice(__pyx_v_new_input->buttons, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 516, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":517
 * 
 *         for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired
 *             if b[1] == 1 and visible:             # <<<<<<<<<<<<<<
 *                 if self.outline.mouse_over(new_input.m):
 *                     self.selected = True
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L21_bool_binop_done;
    }
    __pyx_t_1 = __pyx_v_visible;
    __pyx_L21_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":518
 *         for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired
 *             if b[1] == 1 and visible:
 *                 if self.outline.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     self.selected = True
 *                     self.dragged  = False
 */
      __pyx_t_6 = ((PyObject *)__pyx_v_new_input->m);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->outline->__pyx_vtab)->mouse_over(__pyx_v_self->outline, ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_6), 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":519
 *             if b[1] == 1 and visible:
 *                 if self.outline.mouse_over(new_input.m):
 *                     self.selected = True             # <<<<<<<<<<<<<<
 *                     self.dragged  = False
 *                     self.touch_point.x = new_input.m.x
 */
        __pyx_v_self->selected = 1;

        /* "pyglui/ui.pyx":520
 *                 if self.outline.mouse_over(new_input.m):
 *                     self.selected = True
 *                     self.dragged  = False             # <<<<<<<<<<<<<<
 *                     self.touch_point.x = new_input.m.x
 *                     self.touch_point.y = new_input.m.y
 */
        __pyx_v_self->dragged = 0;

        /* "pyglui/ui.pyx":521
 *                     self.selected = True
 *                     self.dragged  = False
 *                     self.touch_point.x = new_input.m.x             # <<<<<<<<<<<<<<
 *                     self.touch_point.y = new_input.m.y
 *                     self.drag_accumulator = Vec2(0,0)
 */
        __pyx_t_7 = __pyx_v_new_input->m->x;
        __pyx_v_self->touch_point->x = __pyx_t_7;

        /* "pyglui/ui.pyx":522
 *                     self.dragged  = False
 *                     self.touch_point.x = new_input.m.x
 *                     self.touch_point.y = new_input.m.y             # <<<<<<<<<<<<<<
 *                     self.drag_accumulator = Vec2(0,0)
 *                     if self.catch_input:
 */
        __pyx_t_7 = __pyx_v_new_input->m->y;
        __pyx_v_self->touch_point->y = __pyx_t_7;

        /* "pyglui/ui.pyx":523
 *                     self.touch_point.x = new_input.m.x
 *                     self.touch_point.y = new_input.m.y
 *                     self.drag_accumulator = Vec2(0,0)             # <<<<<<<<<<<<<<
 *                     if self.catch_input:
 *                         new_input.buttons.remove(b)
 */
        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_GOTREF((PyObject *)__pyx_v_self->drag_accumulator);
        __Pyx_DECREF((PyObject *)__pyx_v_self->drag_accumulator);
        __pyx_v_self->drag_accumulator = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_6);
        __pyx_t_6 = 0;

        /* "pyglui/ui.pyx":524
 *                     self.touch_point.y = new_input.m.y
 *                     self.drag_accumulator = Vec2(0,0)
 *                     if self.catch_input:             # <<<<<<<<<<<<<<
 *                         new_input.buttons.remove(b)
 *             if self.selected and b[1] == 0:
 */
        if (__pyx_v_self->catch_input) {

          /* "pyglui/ui.pyx":525
 *                     self.drag_accumulator = Vec2(0,0)
 *                     if self.catch_input:
 *                         new_input.buttons.remove(b)             # <<<<<<<<<<<<<<
 *             if self.selected and b[1] == 0:
 *                 self.selected = False
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_input->buttons, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = NULL;
          __pyx_t_9 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_9 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_b};
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 525, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "pyglui/ui.pyx":524
 *                     self.touch_point.y = new_input.m.y
 *                     self.drag_accumulator = Vec2(0,0)
 *                     if self.catch_input:             # <<<<<<<<<<<<<<
 *                         new_input.buttons.remove(b)
 *             if self.selected and b[1] == 0:
 */
        }

        /* "pyglui/ui.pyx":518
 *         for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired
 *             if b[1] == 1 and visible:
 *                 if self.outline.mouse_over(new_input.m):             # <<<<<<<<<<<<<<
 *                     self.selected = True
 *                     self.dragged  = False
 */
      }

      /* "pyglui/ui.pyx":517
 * 
 *         for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired
 *             if b[1] == 1 and visible:             # <<<<<<<<<<<<<<
 *                 if self.outline.mouse_over(new_input.m):
 *                     self.selected = True
 */
    }

    /* "pyglui/ui.pyx":526
 *                     if self.catch_input:
 *                         new_input.buttons.remove(b)
 *             if self.selected and b[1] == 0:             # <<<<<<<<<<<<<<
 *                 self.selected = False
 *                 if self.click_cb and not self.dragged:
 */
    if (__pyx_v_self->selected) {
    } else {
      __pyx_t_1 = __pyx_v_self->selected;
      goto __pyx_L26_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_L26_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":527
 *                         new_input.buttons.remove(b)
 *             if self.selected and b[1] == 0:
 *                 self.selected = False             # <<<<<<<<<<<<<<
 *                 if self.click_cb and not self.dragged:
 *                     self.click_cb()
 */
      __pyx_v_self->selected = 0;

      /* "pyglui/ui.pyx":528
 *             if self.selected and b[1] == 0:
 *                 self.selected = False
 *                 if self.click_cb and not self.dragged:             # <<<<<<<<<<<<<<
 *                     self.click_cb()
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->click_cb); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 528, __pyx_L1_error)
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L29_bool_binop_done;
      }
      __pyx_t_2 = (!__pyx_v_self->dragged);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L29_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyglui/ui.pyx":529
 *                 self.selected = False
 *                 if self.click_cb and not self.dragged:
 *                     self.click_cb()             # <<<<<<<<<<<<<<
 * 
 *         if self.selected:
 */
        __Pyx_INCREF(__pyx_v_self->click_cb);
        __pyx_t_6 = __pyx_v_self->click_cb; __pyx_t_8 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_9 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_8, };
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyglui/ui.pyx":528
 *             if self.selected and b[1] == 0:
 *                 self.selected = False
 *                 if self.click_cb and not self.dragged:             # <<<<<<<<<<<<<<
 *                     self.click_cb()
 * 
 */
      }

      /* "pyglui/ui.pyx":526
 *                     if self.catch_input:
 *                         new_input.buttons.remove(b)
 *             if self.selected and b[1] == 0:             # <<<<<<<<<<<<<<
 *                 self.selected = False
 *                 if self.click_cb and not self.dragged:
 */
    }

    /* "pyglui/ui.pyx":516
 *             should_redraw = True
 * 
 *         for b in new_input.buttons[:]:#we need to make a copy for remove to work as desired             # <<<<<<<<<<<<<<
 *             if b[1] == 1 and visible:
 *                 if self.outline.mouse_over(new_input.m):
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyglui/ui.pyx":531
 *                     self.click_cb()
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             new_input.active_ui_elements.append(self)
 * 
 */
  if (__pyx_v_self->selected) {

    /* "pyglui/ui.pyx":532
 * 
 *         if self.selected:
 *             new_input.active_ui_elements.append(self)             # <<<<<<<<<<<<<<
 * 
 *     cdef sync(self):
 */
    if (unlikely(__pyx_v_new_input->active_ui_elements == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
      __PYX_ERR(0, 532, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_input->active_ui_elements, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 532, __pyx_L1_error)

    /* "pyglui/ui.pyx":531
 *                     self.click_cb()
 * 
 *         if self.selected:             # <<<<<<<<<<<<<<
 *             new_input.active_ui_elements.append(self)
 * 
 */
  }

  /* "pyglui/ui.pyx":482
 * 
 * 
 *     cdef handle_input(self,Input new_input, bint visible):             # <<<<<<<<<<<<<<
 *         global should_redraw
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyglui.ui.Draggable.handle_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":534
 *             new_input.active_ui_elements.append(self)
 * 
 *     cdef sync(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_9Draggable_sync(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Draggable_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Draggable_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Draggable_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Draggable_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Draggable_6__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Draggable_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Draggable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_9Draggable_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_9Draggable_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Draggable_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_9Draggable_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Draggable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_9Draggable_8__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_9Draggable_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Draggable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Draggable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":565
 *     cdef Vec2 design_org,org,design_size,size,min_size
 * 
 *     def __cinit__(self,Vec2 position,Vec2 size, Vec2 min_size = Vec2(0,0)):             # <<<<<<<<<<<<<<
 *         self.design_org = Vec2(position.x,position.y)
 *         self.design_size = Vec2(size.x,size.y)
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6FitBox_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_6FitBox_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_position = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_min_size = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position,&__pyx_n_s_size,&__pyx_n_s_min_size,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position,&__pyx_n_s_size,&__pyx_n_s_min_size,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[2] = (PyObject *)__pyx_k__89;
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_position)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 565, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 565, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 565, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 565, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 565, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_position = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[0]);
    __pyx_v_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[1]);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 565, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.FitBox.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_position), __pyx_ptype_6pyglui_2ui_Vec2, 1, "position", 0))) __PYX_ERR(0, 565, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_size), __pyx_ptype_6pyglui_2ui_Vec2, 1, "size", 0))) __PYX_ERR(0, 565, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_min_size), __pyx_ptype_6pyglui_2ui_Vec2, 1, "min_size", 0))) __PYX_ERR(0, 565, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox___cinit__(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self), __pyx_v_position, __pyx_v_size, __pyx_v_min_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6FitBox___cinit__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_position, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_min_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyglui/ui.pyx":566
 * 
 *     def __cinit__(self,Vec2 position,Vec2 size, Vec2 min_size = Vec2(0,0)):
 *         self.design_org = Vec2(position.x,position.y)             # <<<<<<<<<<<<<<
 *         self.design_size = Vec2(size.x,size.y)
 *         self.min_size = Vec2(min_size.x,min_size.y)
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_position->x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_position->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->design_org);
  __Pyx_DECREF((PyObject *)__pyx_v_self->design_org);
  __pyx_v_self->design_org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":567
 *     def __cinit__(self,Vec2 position,Vec2 size, Vec2 min_size = Vec2(0,0)):
 *         self.design_org = Vec2(position.x,position.y)
 *         self.design_size = Vec2(size.x,size.y)             # <<<<<<<<<<<<<<
 *         self.min_size = Vec2(min_size.x,min_size.y)
 *         # The values below are just temporay
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_size->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_size->y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->design_size);
  __Pyx_DECREF((PyObject *)__pyx_v_self->design_size);
  __pyx_v_self->design_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyglui/ui.pyx":568
 *         self.design_org = Vec2(position.x,position.y)
 *         self.design_size = Vec2(size.x,size.y)
 *         self.min_size = Vec2(min_size.x,min_size.y)             # <<<<<<<<<<<<<<
 *         # The values below are just temporay
 *         # and will be overwritten by compute.
 */
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_min_size->x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_min_size->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->min_size);
  __Pyx_DECREF((PyObject *)__pyx_v_self->min_size);
  __pyx_v_self->min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":571
 *         # The values below are just temporay
 *         # and will be overwritten by compute.
 *         self.org = Vec2(position.x,position.y)             # <<<<<<<<<<<<<<
 *         self.org *= ui_scale
 *         self.size = Vec2(size.x,size.y)
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_position->x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_position->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->org);
  __Pyx_DECREF((PyObject *)__pyx_v_self->org);
  __pyx_v_self->org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":572
 *         # and will be overwritten by compute.
 *         self.org = Vec2(position.x,position.y)
 *         self.org *= ui_scale             # <<<<<<<<<<<<<<
 *         self.size = Vec2(size.x,size.y)
 *         self.size *=ui_scale
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_InPlaceMultiply(((PyObject *)__pyx_v_self->org), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->org);
  __Pyx_DECREF((PyObject *)__pyx_v_self->org);
  __pyx_v_self->org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyglui/ui.pyx":573
 *         self.org = Vec2(position.x,position.y)
 *         self.org *= ui_scale
 *         self.size = Vec2(size.x,size.y)             # <<<<<<<<<<<<<<
 *         self.size *=ui_scale
 * 
 */
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_size->x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_size->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->size);
  __Pyx_DECREF((PyObject *)__pyx_v_self->size);
  __pyx_v_self->size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":574
 *         self.org *= ui_scale
 *         self.size = Vec2(size.x,size.y)
 *         self.size *=ui_scale             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_6pyglui_2ui_ui_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_InPlaceMultiply(((PyObject *)__pyx_v_self->size), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Vec2))))) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->size);
  __Pyx_DECREF((PyObject *)__pyx_v_self->size);
  __pyx_v_self->size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":565
 *     cdef Vec2 design_org,org,design_size,size,min_size
 * 
 *     def __cinit__(self,Vec2 position,Vec2 size, Vec2 min_size = Vec2(0,0)):             # <<<<<<<<<<<<<<
 *         self.design_org = Vec2(position.x,position.y)
 *         self.design_size = Vec2(size.x,size.y)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.FitBox.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":577
 * 
 * 
 *     def __init__(self,Vec2 position,Vec2 size, Vec2 min_size = Vec2(0,0)):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_6FitBox_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_6FitBox_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_position = 0;
  CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size = 0;
  CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_min_size = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position,&__pyx_n_s_size,&__pyx_n_s_min_size,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position,&__pyx_n_s_size,&__pyx_n_s_min_size,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[2] = (PyObject *)__pyx_k__90;
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_position)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 577, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min_size);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 577, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_position = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[0]);
    __pyx_v_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[1]);
    __pyx_v_min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 577, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.FitBox.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_position), __pyx_ptype_6pyglui_2ui_Vec2, 1, "position", 0))) __PYX_ERR(0, 577, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_size), __pyx_ptype_6pyglui_2ui_Vec2, 1, "size", 0))) __PYX_ERR(0, 577, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_min_size), __pyx_ptype_6pyglui_2ui_Vec2, 1, "min_size", 0))) __PYX_ERR(0, 577, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_2__init__(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self), __pyx_v_position, __pyx_v_size, __pyx_v_min_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_6FitBox_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_position, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_size, CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_min_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":580
 *         pass
 * 
 *     cdef collapse(self):             # <<<<<<<<<<<<<<
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_collapse(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  float __pyx_t_3;
  __Pyx_RefNannySetupContext("collapse", 0);

  /* "pyglui/ui.pyx":583
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.x >= 0 and  self.design_size.x  > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.x = self.min_size.x
 *         #object is positioned from right (resp. bottom) and sized from context size
 */
  __pyx_t_2 = (__pyx_v_self->design_org->x >= 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->x > 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":584
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.x >= 0 and  self.design_size.x  > 0:
 *             self.design_size.x = self.min_size.x             # <<<<<<<<<<<<<<
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:
 */
    __pyx_t_3 = __pyx_v_self->min_size->x;
    __pyx_v_self->design_size->x = __pyx_t_3;

    /* "pyglui/ui.pyx":583
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.x >= 0 and  self.design_size.x  > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.x = self.min_size.x
 *         #object is positioned from right (resp. bottom) and sized from context size
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":586
 *             self.design_size.x = self.min_size.x
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:             # <<<<<<<<<<<<<<
 *             self.design_org.x = self.design_size.x - self.min_size.x
 *             # self.design_size.x = self.min_size.x
 */
  __pyx_t_2 = (__pyx_v_self->design_org->x < 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->x <= 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":587
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:
 *             self.design_org.x = self.design_size.x - self.min_size.x             # <<<<<<<<<<<<<<
 *             # self.design_size.x = self.min_size.x
 *         #object is positioned from left (top) and sized from context size:
 */
    __pyx_v_self->design_org->x = (__pyx_v_self->design_size->x - __pyx_v_self->min_size->x);

    /* "pyglui/ui.pyx":586
 *             self.design_size.x = self.min_size.x
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:             # <<<<<<<<<<<<<<
 *             self.design_org.x = self.design_size.x - self.min_size.x
 *             # self.design_size.x = self.min_size.x
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":590
 *             # self.design_size.x = self.min_size.x
 *         #object is positioned from left (top) and sized from context size:
 *         elif self.design_org.x >= 0 and self.design_size.x <= 0:             # <<<<<<<<<<<<<<
 *             pass
 *         #object is positioned from right and sized from object org
 */
  __pyx_t_2 = (__pyx_v_self->design_org->x >= 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->x <= 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":593
 *             pass
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.x < 0 and self.design_size.x > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.x = self.min_size.x
 *         else:
 */
  __pyx_t_2 = (__pyx_v_self->design_org->x < 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->x > 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":594
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.x < 0 and self.design_size.x > 0:
 *             self.design_size.x = self.min_size.x             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
    __pyx_t_3 = __pyx_v_self->min_size->x;
    __pyx_v_self->design_size->x = __pyx_t_3;

    /* "pyglui/ui.pyx":593
 *             pass
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.x < 0 and self.design_size.x > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.x = self.min_size.x
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":596
 *             self.design_size.x = self.min_size.x
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyglui/ui.pyx":599
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.y >= 0 and self.design_size.y  > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.y = self.min_size.y
 *         #object is positions from right (resp. bottom) and sized from context size
 */
  __pyx_t_2 = (__pyx_v_self->design_org->y >= 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->y > 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L13_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":600
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.y >= 0 and self.design_size.y  > 0:
 *             self.design_size.y = self.min_size.y             # <<<<<<<<<<<<<<
 *         #object is positions from right (resp. bottom) and sized from context size
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:
 */
    __pyx_t_3 = __pyx_v_self->min_size->y;
    __pyx_v_self->design_size->y = __pyx_t_3;

    /* "pyglui/ui.pyx":599
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.y >= 0 and self.design_size.y  > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.y = self.min_size.y
 *         #object is positions from right (resp. bottom) and sized from context size
 */
    goto __pyx_L12;
  }

  /* "pyglui/ui.pyx":602
 *             self.design_size.y = self.min_size.y
 *         #object is positions from right (resp. bottom) and sized from context size
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:             # <<<<<<<<<<<<<<
 *             self.design_org.y = self.design_size.y -self.min_size.y
 *             # self.design_size.y = self.min_size.y
 */
  __pyx_t_2 = (__pyx_v_self->design_org->y < 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->y <= 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":603
 *         #object is positions from right (resp. bottom) and sized from context size
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:
 *             self.design_org.y = self.design_size.y -self.min_size.y             # <<<<<<<<<<<<<<
 *             # self.design_size.y = self.min_size.y
 *         #object is positioned from left (top) and sized from context size:
 */
    __pyx_v_self->design_org->y = (__pyx_v_self->design_size->y - __pyx_v_self->min_size->y);

    /* "pyglui/ui.pyx":602
 *             self.design_size.y = self.min_size.y
 *         #object is positions from right (resp. bottom) and sized from context size
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:             # <<<<<<<<<<<<<<
 *             self.design_org.y = self.design_size.y -self.min_size.y
 *             # self.design_size.y = self.min_size.y
 */
    goto __pyx_L12;
  }

  /* "pyglui/ui.pyx":606
 *             # self.design_size.y = self.min_size.y
 *         #object is positioned from left (top) and sized from context size:
 *         elif self.design_org.y >= 0 and self.design_size.y <= 0:             # <<<<<<<<<<<<<<
 *             pass
 *         #object is positioned from right and sized from object org
 */
  __pyx_t_2 = (__pyx_v_self->design_org->y >= 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->y <= 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_1) {
    goto __pyx_L12;
  }

  /* "pyglui/ui.pyx":609
 *             pass
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.y < 0 and self.design_size.y > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.y = self.min_size.y
 *         else:
 */
  __pyx_t_2 = (__pyx_v_self->design_org->y < 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->y > 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L19_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":610
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.y < 0 and self.design_size.y > 0:
 *             self.design_size.y = self.min_size.y             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
    __pyx_t_3 = __pyx_v_self->min_size->y;
    __pyx_v_self->design_size->y = __pyx_t_3;

    /* "pyglui/ui.pyx":609
 *             pass
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.y < 0 and self.design_size.y > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.y = self.min_size.y
 *         else:
 */
    goto __pyx_L12;
  }

  /* "pyglui/ui.pyx":612
 *             self.design_size.y = self.min_size.y
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
  }
  __pyx_L12:;

  /* "pyglui/ui.pyx":580
 *         pass
 * 
 *     cdef collapse(self):             # <<<<<<<<<<<<<<
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":615
 * 
 * 
 *     cdef inflate(self,FitBox target):             # <<<<<<<<<<<<<<
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_inflate(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_target) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  float __pyx_t_3;
  __Pyx_RefNannySetupContext("inflate", 0);

  /* "pyglui/ui.pyx":618
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.x >= 0 and  self.design_size.x  > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.x = target.design_size.x
 *         #object is positioned from right (resp. bottom) and sized from context size
 */
  __pyx_t_2 = (__pyx_v_self->design_org->x >= 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->x > 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":619
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.x >= 0 and  self.design_size.x  > 0:
 *             self.design_size.x = target.design_size.x             # <<<<<<<<<<<<<<
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:
 */
    __pyx_t_3 = __pyx_v_target->design_size->x;
    __pyx_v_self->design_size->x = __pyx_t_3;

    /* "pyglui/ui.pyx":618
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.x >= 0 and  self.design_size.x  > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.x = target.design_size.x
 *         #object is positioned from right (resp. bottom) and sized from context size
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":621
 *             self.design_size.x = target.design_size.x
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:             # <<<<<<<<<<<<<<
 *             self.design_org.x = target.design_org.x
 *             self.design_size.x = target.design_size.x
 */
  __pyx_t_2 = (__pyx_v_self->design_org->x < 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->x <= 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":622
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:
 *             self.design_org.x = target.design_org.x             # <<<<<<<<<<<<<<
 *             self.design_size.x = target.design_size.x
 *         #object is positioned from left (top) and sized from context size:
 */
    __pyx_t_3 = __pyx_v_target->design_org->x;
    __pyx_v_self->design_org->x = __pyx_t_3;

    /* "pyglui/ui.pyx":623
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:
 *             self.design_org.x = target.design_org.x
 *             self.design_size.x = target.design_size.x             # <<<<<<<<<<<<<<
 *         #object is positioned from left (top) and sized from context size:
 *         elif self.design_org.x >= 0 and self.design_size.x <= 0:
 */
    __pyx_t_3 = __pyx_v_target->design_size->x;
    __pyx_v_self->design_size->x = __pyx_t_3;

    /* "pyglui/ui.pyx":621
 *             self.design_size.x = target.design_size.x
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.x < 0 and self.design_size.x <= 0:             # <<<<<<<<<<<<<<
 *             self.design_org.x = target.design_org.x
 *             self.design_size.x = target.design_size.x
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":625
 *             self.design_size.x = target.design_size.x
 *         #object is positioned from left (top) and sized from context size:
 *         elif self.design_org.x >= 0 and self.design_size.x <= 0:             # <<<<<<<<<<<<<<
 *             pass
 *         #object is positioned from right and sized from object org
 */
  __pyx_t_2 = (__pyx_v_self->design_org->x >= 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->x <= 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":628
 *             pass
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.x < 0 and self.design_size.x > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.x = target.design_size.x
 *         else:
 */
  __pyx_t_2 = (__pyx_v_self->design_org->x < 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->x > 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":629
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.x < 0 and self.design_size.x > 0:
 *             self.design_size.x = target.design_size.x             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
    __pyx_t_3 = __pyx_v_target->design_size->x;
    __pyx_v_self->design_size->x = __pyx_t_3;

    /* "pyglui/ui.pyx":628
 *             pass
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.x < 0 and self.design_size.x > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.x = target.design_size.x
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":631
 *             self.design_size.x = target.design_size.x
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyglui/ui.pyx":634
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.y >= 0 and  self.design_size.y  > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.y = target.design_size.y
 *         #object is positioned from right (resp. bottom) and sized from context size
 */
  __pyx_t_2 = (__pyx_v_self->design_org->y >= 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->y > 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L13_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":635
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.y >= 0 and  self.design_size.y  > 0:
 *             self.design_size.y = target.design_size.y             # <<<<<<<<<<<<<<
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:
 */
    __pyx_t_3 = __pyx_v_target->design_size->y;
    __pyx_v_self->design_size->y = __pyx_t_3;

    /* "pyglui/ui.pyx":634
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 *         if self.design_org.y >= 0 and  self.design_size.y  > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.y = target.design_size.y
 *         #object is positioned from right (resp. bottom) and sized from context size
 */
    goto __pyx_L12;
  }

  /* "pyglui/ui.pyx":637
 *             self.design_size.y = target.design_size.y
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:             # <<<<<<<<<<<<<<
 *             self.design_org.y = target.design_org.y
 *             self.design_size.y = target.design_size.y
 */
  __pyx_t_2 = (__pyx_v_self->design_org->y < 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->y <= 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":638
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:
 *             self.design_org.y = target.design_org.y             # <<<<<<<<<<<<<<
 *             self.design_size.y = target.design_size.y
 *         #object is positioned from left (top) and sized from context size:
 */
    __pyx_t_3 = __pyx_v_target->design_org->y;
    __pyx_v_self->design_org->y = __pyx_t_3;

    /* "pyglui/ui.pyx":639
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:
 *             self.design_org.y = target.design_org.y
 *             self.design_size.y = target.design_size.y             # <<<<<<<<<<<<<<
 *         #object is positioned from left (top) and sized from context size:
 *         elif self.design_org.y >= 0 and self.design_size.y <= 0:
 */
    __pyx_t_3 = __pyx_v_target->design_size->y;
    __pyx_v_self->design_size->y = __pyx_t_3;

    /* "pyglui/ui.pyx":637
 *             self.design_size.y = target.design_size.y
 *         #object is positioned from right (resp. bottom) and sized from context size
 *         elif self.design_org.y < 0 and self.design_size.y <= 0:             # <<<<<<<<<<<<<<
 *             self.design_org.y = target.design_org.y
 *             self.design_size.y = target.design_size.y
 */
    goto __pyx_L12;
  }

  /* "pyglui/ui.pyx":641
 *             self.design_size.y = target.design_size.y
 *         #object is positioned from left (top) and sized from context size:
 *         elif self.design_org.y >= 0 and self.design_size.y <= 0:             # <<<<<<<<<<<<<<
 *             pass
 *         #object is positioned from right and sized from object org
 */
  __pyx_t_2 = (__pyx_v_self->design_org->y >= 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->y <= 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_1) {
    goto __pyx_L12;
  }

  /* "pyglui/ui.pyx":644
 *             pass
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.y < 0 and self.design_size.y > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.y = target.design_size.y
 *         else:
 */
  __pyx_t_2 = (__pyx_v_self->design_org->y < 0.0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->design_size->y > 0.0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L19_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":645
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.y < 0 and self.design_size.y > 0:
 *             self.design_size.y = target.design_size.y             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
    __pyx_t_3 = __pyx_v_target->design_size->y;
    __pyx_v_self->design_size->y = __pyx_t_3;

    /* "pyglui/ui.pyx":644
 *             pass
 *         #object is positioned from right and sized from object org
 *         elif self.design_org.y < 0 and self.design_size.y > 0:             # <<<<<<<<<<<<<<
 *             self.design_size.y = target.design_size.y
 *         else:
 */
    goto __pyx_L12;
  }

  /* "pyglui/ui.pyx":647
 *             self.design_size.y = target.design_size.y
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
  }
  __pyx_L12:;

  /* "pyglui/ui.pyx":615
 * 
 * 
 *     cdef inflate(self,FitBox target):             # <<<<<<<<<<<<<<
 * 
 *         #object is positioned from left(resp. top) and sized from object org
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":650
 * 
 * 
 *     cdef compute(self,FitBox context):             # <<<<<<<<<<<<<<
 *         cdef float overflow
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_compute(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_context) {
  float __pyx_v_overflow;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  float __pyx_t_2;
  double __pyx_t_3;
  double __pyx_t_4;
  int __pyx_t_5;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("compute", 0);

  /* "pyglui/ui.pyx":654
 * 
 *         # all x
 *         if self.design_org.x >=0:             # <<<<<<<<<<<<<<
 *             self.org.x = self.design_org.x * ui_scale
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->design_org->x >= 0.0);
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":655
 *         # all x
 *         if self.design_org.x >=0:
 *             self.org.x = self.design_org.x * ui_scale             # <<<<<<<<<<<<<<
 *         else:
 *             self.org.x = context.size.x+self.design_org.x * ui_scale #design org is negative - double subtraction
 */
    __pyx_v_self->org->x = (__pyx_v_self->design_org->x * __pyx_v_6pyglui_2ui_ui_scale);

    /* "pyglui/ui.pyx":654
 * 
 *         # all x
 *         if self.design_org.x >=0:             # <<<<<<<<<<<<<<
 *             self.org.x = self.design_org.x * ui_scale
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":657
 *             self.org.x = self.design_org.x * ui_scale
 *         else:
 *             self.org.x = context.size.x+self.design_org.x * ui_scale #design org is negative - double subtraction             # <<<<<<<<<<<<<<
 *         if self.design_size.x > 0:
 *             # size is direcly specified
 */
  /*else*/ {
    __pyx_v_self->org->x = (__pyx_v_context->size->x + (__pyx_v_self->design_org->x * __pyx_v_6pyglui_2ui_ui_scale));
  }
  __pyx_L3:;

  /* "pyglui/ui.pyx":658
 *         else:
 *             self.org.x = context.size.x+self.design_org.x * ui_scale #design org is negative - double subtraction
 *         if self.design_size.x > 0:             # <<<<<<<<<<<<<<
 *             # size is direcly specified
 *             self.size.x = self.design_size.x * ui_scale
 */
  __pyx_t_1 = (__pyx_v_self->design_size->x > 0.0);
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":660
 *         if self.design_size.x > 0:
 *             # size is direcly specified
 *             self.size.x = self.design_size.x * ui_scale             # <<<<<<<<<<<<<<
 *         else:
 *             self.size.x = context.size.x - self.org.x + self.design_size.x * ui_scale #design size is negative - double subtraction
 */
    __pyx_v_self->size->x = (__pyx_v_self->design_size->x * __pyx_v_6pyglui_2ui_ui_scale);

    /* "pyglui/ui.pyx":658
 *         else:
 *             self.org.x = context.size.x+self.design_org.x * ui_scale #design org is negative - double subtraction
 *         if self.design_size.x > 0:             # <<<<<<<<<<<<<<
 *             # size is direcly specified
 *             self.size.x = self.design_size.x * ui_scale
 */
    goto __pyx_L4;
  }

  /* "pyglui/ui.pyx":662
 *             self.size.x = self.design_size.x * ui_scale
 *         else:
 *             self.size.x = context.size.x - self.org.x + self.design_size.x * ui_scale #design size is negative - double subtraction             # <<<<<<<<<<<<<<
 * 
 *         self.size.x = max(self.min_size.x * ui_scale, self.size.x)
 */
  /*else*/ {
    __pyx_v_self->size->x = ((__pyx_v_context->size->x - __pyx_v_self->org->x) + (__pyx_v_self->design_size->x * __pyx_v_6pyglui_2ui_ui_scale));
  }
  __pyx_L4:;

  /* "pyglui/ui.pyx":664
 *             self.size.x = context.size.x - self.org.x + self.design_size.x * ui_scale #design size is negative - double subtraction
 * 
 *         self.size.x = max(self.min_size.x * ui_scale, self.size.x)             # <<<<<<<<<<<<<<
 *         if self.design_org.x < 0 and self.design_size.x <= 0:
 *             overflow = self.org.x + self.size.x - context.size.x - self.design_size.x * ui_scale
 */
  __pyx_t_2 = __pyx_v_self->size->x;
  __pyx_t_3 = (__pyx_v_self->min_size->x * __pyx_v_6pyglui_2ui_ui_scale);
  if ((__pyx_t_2 > __pyx_t_3)) {
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  __pyx_v_self->size->x = __pyx_t_4;

  /* "pyglui/ui.pyx":665
 * 
 *         self.size.x = max(self.min_size.x * ui_scale, self.size.x)
 *         if self.design_org.x < 0 and self.design_size.x <= 0:             # <<<<<<<<<<<<<<
 *             overflow = self.org.x + self.size.x - context.size.x - self.design_size.x * ui_scale
 *             if overflow > 0:
 */
  __pyx_t_5 = (__pyx_v_self->design_org->x < 0.0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_self->design_size->x <= 0.0);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":666
 *         self.size.x = max(self.min_size.x * ui_scale, self.size.x)
 *         if self.design_org.x < 0 and self.design_size.x <= 0:
 *             overflow = self.org.x + self.size.x - context.size.x - self.design_size.x * ui_scale             # <<<<<<<<<<<<<<
 *             if overflow > 0:
 *                 self.org.x -= overflow
 */
    __pyx_v_overflow = (((__pyx_v_self->org->x + __pyx_v_self->size->x) - __pyx_v_context->size->x) - (__pyx_v_self->design_size->x * __pyx_v_6pyglui_2ui_ui_scale));

    /* "pyglui/ui.pyx":667
 *         if self.design_org.x < 0 and self.design_size.x <= 0:
 *             overflow = self.org.x + self.size.x - context.size.x - self.design_size.x * ui_scale
 *             if overflow > 0:             # <<<<<<<<<<<<<<
 *                 self.org.x -= overflow
 * 
 */
    __pyx_t_1 = (__pyx_v_overflow > 0.0);
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":668
 *             overflow = self.org.x + self.size.x - context.size.x - self.design_size.x * ui_scale
 *             if overflow > 0:
 *                 self.org.x -= overflow             # <<<<<<<<<<<<<<
 * 
 *         # finally translate into scene by parent org
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->org);
      __pyx_t_6 = __pyx_v_self->org;
      __pyx_t_6->x = (__pyx_t_6->x - __pyx_v_overflow);
      __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0;

      /* "pyglui/ui.pyx":667
 *         if self.design_org.x < 0 and self.design_size.x <= 0:
 *             overflow = self.org.x + self.size.x - context.size.x - self.design_size.x * ui_scale
 *             if overflow > 0:             # <<<<<<<<<<<<<<
 *                 self.org.x -= overflow
 * 
 */
    }

    /* "pyglui/ui.pyx":665
 * 
 *         self.size.x = max(self.min_size.x * ui_scale, self.size.x)
 *         if self.design_org.x < 0 and self.design_size.x <= 0:             # <<<<<<<<<<<<<<
 *             overflow = self.org.x + self.size.x - context.size.x - self.design_size.x * ui_scale
 *             if overflow > 0:
 */
  }

  /* "pyglui/ui.pyx":671
 * 
 *         # finally translate into scene by parent org
 *         self.org.x +=context.org.x             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF((PyObject *)__pyx_v_self->org);
  __pyx_t_6 = __pyx_v_self->org;
  __pyx_t_6->x = (__pyx_t_6->x + __pyx_v_context->org->x);
  __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0;

  /* "pyglui/ui.pyx":674
 * 
 * 
 *         if self.design_org.y >=0:             # <<<<<<<<<<<<<<
 *             self.org.y = self.design_org.y * ui_scale
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->design_org->y >= 0.0);
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":675
 * 
 *         if self.design_org.y >=0:
 *             self.org.y = self.design_org.y * ui_scale             # <<<<<<<<<<<<<<
 *         else:
 *             self.org.y = context.size.y+self.design_org.y * ui_scale #design size is negative - double subtraction
 */
    __pyx_v_self->org->y = (__pyx_v_self->design_org->y * __pyx_v_6pyglui_2ui_ui_scale);

    /* "pyglui/ui.pyx":674
 * 
 * 
 *         if self.design_org.y >=0:             # <<<<<<<<<<<<<<
 *             self.org.y = self.design_org.y * ui_scale
 *         else:
 */
    goto __pyx_L9;
  }

  /* "pyglui/ui.pyx":677
 *             self.org.y = self.design_org.y * ui_scale
 *         else:
 *             self.org.y = context.size.y+self.design_org.y * ui_scale #design size is negative - double subtraction             # <<<<<<<<<<<<<<
 *         if self.design_size.y > 0:
 *             # size is direcly specified
 */
  /*else*/ {
    __pyx_v_self->org->y = (__pyx_v_context->size->y + (__pyx_v_self->design_org->y * __pyx_v_6pyglui_2ui_ui_scale));
  }
  __pyx_L9:;

  /* "pyglui/ui.pyx":678
 *         else:
 *             self.org.y = context.size.y+self.design_org.y * ui_scale #design size is negative - double subtraction
 *         if self.design_size.y > 0:             # <<<<<<<<<<<<<<
 *             # size is direcly specified
 *             self.size.y = self.design_size.y * ui_scale
 */
  __pyx_t_1 = (__pyx_v_self->design_size->y > 0.0);
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":680
 *         if self.design_size.y > 0:
 *             # size is direcly specified
 *             self.size.y = self.design_size.y * ui_scale             # <<<<<<<<<<<<<<
 *         else:
 *             self.size.y = context.size.y - self.org.y + self.design_size.y * ui_scale #design size is negative - double subtraction
 */
    __pyx_v_self->size->y = (__pyx_v_self->design_size->y * __pyx_v_6pyglui_2ui_ui_scale);

    /* "pyglui/ui.pyx":678
 *         else:
 *             self.org.y = context.size.y+self.design_org.y * ui_scale #design size is negative - double subtraction
 *         if self.design_size.y > 0:             # <<<<<<<<<<<<<<
 *             # size is direcly specified
 *             self.size.y = self.design_size.y * ui_scale
 */
    goto __pyx_L10;
  }

  /* "pyglui/ui.pyx":682
 *             self.size.y = self.design_size.y * ui_scale
 *         else:
 *             self.size.y = context.size.y - self.org.y + self.design_size.y * ui_scale #design size is negative - double subtraction             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_v_self->size->y = ((__pyx_v_context->size->y - __pyx_v_self->org->y) + (__pyx_v_self->design_size->y * __pyx_v_6pyglui_2ui_ui_scale));
  }
  __pyx_L10:;

  /* "pyglui/ui.pyx":685
 * 
 * 
 *         self.size.y = max(self.min_size.y * ui_scale,self.size.y)             # <<<<<<<<<<<<<<
 *         if self.design_org.y < 0 and self.design_size.y <= 0:
 *             overflow = self.org.y + self.size.y - context.size.y - self.design_size.y * ui_scale
 */
  __pyx_t_2 = __pyx_v_self->size->y;
  __pyx_t_4 = (__pyx_v_self->min_size->y * __pyx_v_6pyglui_2ui_ui_scale);
  if ((__pyx_t_2 > __pyx_t_4)) {
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  __pyx_v_self->size->y = __pyx_t_3;

  /* "pyglui/ui.pyx":686
 * 
 *         self.size.y = max(self.min_size.y * ui_scale,self.size.y)
 *         if self.design_org.y < 0 and self.design_size.y <= 0:             # <<<<<<<<<<<<<<
 *             overflow = self.org.y + self.size.y - context.size.y - self.design_size.y * ui_scale
 *             if overflow > 0:
 */
  __pyx_t_5 = (__pyx_v_self->design_org->y < 0.0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_self->design_size->y <= 0.0);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":687
 *         self.size.y = max(self.min_size.y * ui_scale,self.size.y)
 *         if self.design_org.y < 0 and self.design_size.y <= 0:
 *             overflow = self.org.y + self.size.y - context.size.y - self.design_size.y * ui_scale             # <<<<<<<<<<<<<<
 *             if overflow > 0:
 *                 self.org.y -= overflow
 */
    __pyx_v_overflow = (((__pyx_v_self->org->y + __pyx_v_self->size->y) - __pyx_v_context->size->y) - (__pyx_v_self->design_size->y * __pyx_v_6pyglui_2ui_ui_scale));

    /* "pyglui/ui.pyx":688
 *         if self.design_org.y < 0 and self.design_size.y <= 0:
 *             overflow = self.org.y + self.size.y - context.size.y - self.design_size.y * ui_scale
 *             if overflow > 0:             # <<<<<<<<<<<<<<
 *                 self.org.y -= overflow
 * 
 */
    __pyx_t_1 = (__pyx_v_overflow > 0.0);
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":689
 *             overflow = self.org.y + self.size.y - context.size.y - self.design_size.y * ui_scale
 *             if overflow > 0:
 *                 self.org.y -= overflow             # <<<<<<<<<<<<<<
 * 
 *         # finally translate into scene by parent org
 */
      __Pyx_INCREF((PyObject *)__pyx_v_self->org);
      __pyx_t_6 = __pyx_v_self->org;
      __pyx_t_6->y = (__pyx_t_6->y - __pyx_v_overflow);
      __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0;

      /* "pyglui/ui.pyx":688
 *         if self.design_org.y < 0 and self.design_size.y <= 0:
 *             overflow = self.org.y + self.size.y - context.size.y - self.design_size.y * ui_scale
 *             if overflow > 0:             # <<<<<<<<<<<<<<
 *                 self.org.y -= overflow
 * 
 */
    }

    /* "pyglui/ui.pyx":686
 * 
 *         self.size.y = max(self.min_size.y * ui_scale,self.size.y)
 *         if self.design_org.y < 0 and self.design_size.y <= 0:             # <<<<<<<<<<<<<<
 *             overflow = self.org.y + self.size.y - context.size.y - self.design_size.y * ui_scale
 *             if overflow > 0:
 */
  }

  /* "pyglui/ui.pyx":692
 * 
 *         # finally translate into scene by parent org
 *         self.org.y +=context.org.y             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF((PyObject *)__pyx_v_self->org);
  __pyx_t_6 = __pyx_v_self->org;
  __pyx_t_6->y = (__pyx_t_6->y + __pyx_v_context->org->y);
  __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0;

  /* "pyglui/ui.pyx":650
 * 
 * 
 *     cdef compute(self,FitBox context):             # <<<<<<<<<<<<<<
 *         cdef float overflow
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":696
 * 
 *     property rect:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.org.x,self.org.y,self.size.x,self.size.y
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_4rect_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_4rect_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_4rect___get__(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_4rect___get__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyglui/ui.pyx":697
 *     property rect:
 *         def __get__(self):
 *             return self.org.x,self.org.y,self.size.x,self.size.y             # <<<<<<<<<<<<<<
 * 
 *     property ellipse:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->org->x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->org->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->size->x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->size->y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":696
 * 
 *     property rect:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.org.x,self.org.y,self.size.x,self.size.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.FitBox.rect.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":700
 * 
 *     property ellipse:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2, self.size.x,self.size.y
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_7ellipse_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_7ellipse_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_7ellipse___get__(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_7ellipse___get__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyglui/ui.pyx":701
 *     property ellipse:
 *         def __get__(self):
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2, self.size.x,self.size.y             # <<<<<<<<<<<<<<
 * 
 *     property center:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->org->x + (__pyx_v_self->size->x / 2.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->org->y + (__pyx_v_self->size->y / 2.0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->size->x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->size->y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":700
 * 
 *     property ellipse:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2, self.size.x,self.size.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.FitBox.ellipse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":704
 * 
 *     property center:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_6center_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_6center_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_6center___get__(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_6center___get__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyglui/ui.pyx":705
 *     property center:
 *         def __get__(self):
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint mouse_over(self,Vec2 m):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->org->x + (__pyx_v_self->size->x / 2.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->org->y + (__pyx_v_self->size->y / 2.0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":704
 * 
 *     property center:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.FitBox.center.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":707
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2
 * 
 *     cpdef bint mouse_over(self,Vec2 m):             # <<<<<<<<<<<<<<
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_5mouse_over(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_6pyglui_2ui_6FitBox_mouse_over(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mouse_over", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mouse_over); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6FitBox_5mouse_over)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_m)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyglui/ui.pyx":708
 * 
 *     cpdef bint mouse_over(self,Vec2 m):
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint mouse_over_margin(self, Vec2 m, Vec2 margin):
 */
  __pyx_t_7 = (__pyx_v_self->org->x <= __pyx_v_m->x);
  if (__pyx_t_7) {
    __pyx_t_7 = (__pyx_v_m->x <= (__pyx_v_self->org->x + __pyx_v_self->size->x));
  }
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_self->org->y <= __pyx_v_m->y);
  if (__pyx_t_7) {
    __pyx_t_7 = (__pyx_v_m->y <= (__pyx_v_self->org->y + __pyx_v_self->size->y));
  }
  __pyx_t_6 = __pyx_t_7;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":707
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2
 * 
 *     cpdef bint mouse_over(self,Vec2 m):             # <<<<<<<<<<<<<<
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyglui.ui.FitBox.mouse_over", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_5mouse_over(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6FitBox_5mouse_over = {"mouse_over", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6FitBox_5mouse_over, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_5mouse_over(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mouse_over (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_m)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mouse_over") < 0)) __PYX_ERR(0, 707, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_m = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mouse_over", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 707, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.FitBox.mouse_over", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_6pyglui_2ui_Vec2, 1, "m", 0))) __PYX_ERR(0, 707, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_4mouse_over(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self), __pyx_v_m);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_4mouse_over(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mouse_over", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6pyglui_2ui_6FitBox_mouse_over(__pyx_v_self, __pyx_v_m, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.FitBox.mouse_over", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":710
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y
 * 
 *     cpdef bint mouse_over_margin(self, Vec2 m, Vec2 margin):             # <<<<<<<<<<<<<<
 *         return self.org.x - margin.x <= m.x <= self.org.x + self.size.x + margin.x and self.org.y - margin.y <= m.y <= self.org.y + self.size.y + margin.y
 * 
 */

static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_7mouse_over_margin(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_6pyglui_2ui_6FitBox_mouse_over_margin(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_margin, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mouse_over_margin", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mouse_over_margin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #ifdef __Pyx_CyFunction_USED
      if (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)
      #else
      if (!PyCFunction_Check(__pyx_t_1)
      #endif
              || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pyglui_2ui_6FitBox_7mouse_over_margin)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_margin)};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyglui/ui.pyx":711
 * 
 *     cpdef bint mouse_over_margin(self, Vec2 m, Vec2 margin):
 *         return self.org.x - margin.x <= m.x <= self.org.x + self.size.x + margin.x and self.org.y - margin.y <= m.y <= self.org.y + self.size.y + margin.y             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_t_7 = ((__pyx_v_self->org->x - __pyx_v_margin->x) <= __pyx_v_m->x);
  if (__pyx_t_7) {
    __pyx_t_7 = (__pyx_v_m->x <= ((__pyx_v_self->org->x + __pyx_v_self->size->x) + __pyx_v_margin->x));
  }
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_7 = ((__pyx_v_self->org->y - __pyx_v_margin->y) <= __pyx_v_m->y);
  if (__pyx_t_7) {
    __pyx_t_7 = (__pyx_v_m->y <= ((__pyx_v_self->org->y + __pyx_v_self->size->y) + __pyx_v_margin->y));
  }
  __pyx_t_6 = __pyx_t_7;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":710
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y
 * 
 *     cpdef bint mouse_over_margin(self, Vec2 m, Vec2 margin):             # <<<<<<<<<<<<<<
 *         return self.org.x - margin.x <= m.x <= self.org.x + self.size.x + margin.x and self.org.y - margin.y <= m.y <= self.org.y + self.size.y + margin.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyglui.ui.FitBox.mouse_over_margin", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_7mouse_over_margin(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6FitBox_7mouse_over_margin = {"mouse_over_margin", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6FitBox_7mouse_over_margin, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_7mouse_over_margin(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m = 0;
  struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_margin = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mouse_over_margin (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,&__pyx_n_s_margin,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,&__pyx_n_s_margin,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_m)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_margin)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("mouse_over_margin", 1, 2, 2, 1); __PYX_ERR(0, 710, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mouse_over_margin") < 0)) __PYX_ERR(0, 710, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_m = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[0]);
    __pyx_v_margin = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mouse_over_margin", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 710, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.FitBox.mouse_over_margin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_6pyglui_2ui_Vec2, 1, "m", 0))) __PYX_ERR(0, 710, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_margin), __pyx_ptype_6pyglui_2ui_Vec2, 1, "margin", 0))) __PYX_ERR(0, 710, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_6mouse_over_margin(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self), __pyx_v_m, __pyx_v_margin);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_6mouse_over_margin(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_m, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_margin) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mouse_over_margin", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6pyglui_2ui_6FitBox_mouse_over_margin(__pyx_v_self, __pyx_v_m, __pyx_v_margin, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.FitBox.mouse_over_margin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":713
 *         return self.org.x - margin.x <= m.x <= self.org.x + self.size.x + margin.x and self.org.y - margin.y <= m.y <= self.org.y + self.size.y + margin.y
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "FitBox:\n   design org: %s size: %s\n   comptd org: %s size: %s"%(self.design_org,self.design_size,self.org,self.size)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_9__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_9__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_8__str__(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_8__str__(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyglui/ui.pyx":714
 * 
 *     def __str__(self):
 *         return "FitBox:\n   design org: %s size: %s\n   comptd org: %s size: %s"%(self.design_org,self.design_size,self.org,self.size)             # <<<<<<<<<<<<<<
 * 
 *     cdef same_design(self,FitBox other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_FitBox_design_org);
  __pyx_t_2 += 23;
  __Pyx_GIVEREF(__pyx_kp_u_FitBox_design_org);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_FitBox_design_org);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self->design_org)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_size_2);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_size_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_size_2);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self->design_size)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_comptd_org);
  __pyx_t_2 += 16;
  __Pyx_GIVEREF(__pyx_kp_u_comptd_org);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_comptd_org);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self->org)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_size_2);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_size_2);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_size_2);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)__pyx_v_self->size)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 8, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":713
 *         return self.org.x - margin.x <= m.x <= self.org.x + self.size.x + margin.x and self.org.y - margin.y <= m.y <= self.org.y + self.size.y + margin.y
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "FitBox:\n   design org: %s size: %s\n   comptd org: %s size: %s"%(self.design_org,self.design_size,self.org,self.size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.FitBox.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":716
 *         return "FitBox:\n   design org: %s size: %s\n   comptd org: %s size: %s"%(self.design_org,self.design_size,self.org,self.size)
 * 
 *     cdef same_design(self,FitBox other):             # <<<<<<<<<<<<<<
 *         return bool(self.design_org == other.design_org and self.design_size == other.design_size)
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_same_design(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("same_design", 0);

  /* "pyglui/ui.pyx":717
 * 
 *     cdef same_design(self,FitBox other):
 *         return bool(self.design_org == other.design_org and self.design_size == other.design_size)             # <<<<<<<<<<<<<<
 * 
 *     cdef design_distance(self,FitBox other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_self->design_org), ((PyObject *)__pyx_v_other->design_org), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_self->design_size), ((PyObject *)__pyx_v_other->design_size), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":716
 *         return "FitBox:\n   design org: %s size: %s\n   comptd org: %s size: %s"%(self.design_org,self.design_size,self.org,self.size)
 * 
 *     cdef same_design(self,FitBox other):             # <<<<<<<<<<<<<<
 *         return bool(self.design_org == other.design_org and self.design_size == other.design_size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.FitBox.same_design", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":719
 *         return bool(self.design_org == other.design_org and self.design_size == other.design_size)
 * 
 *     cdef design_distance(self,FitBox other):             # <<<<<<<<<<<<<<
 *         cdef float d = 0
 *         d += abs(self.design_size.x-other.design_size.x)
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_design_distance(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_other) {
  float __pyx_v_d;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("design_distance", 0);

  /* "pyglui/ui.pyx":720
 * 
 *     cdef design_distance(self,FitBox other):
 *         cdef float d = 0             # <<<<<<<<<<<<<<
 *         d += abs(self.design_size.x-other.design_size.x)
 *         d += abs(self.design_size.y-other.design_size.y)
 */
  __pyx_v_d = 0.0;

  /* "pyglui/ui.pyx":721
 *     cdef design_distance(self,FitBox other):
 *         cdef float d = 0
 *         d += abs(self.design_size.x-other.design_size.x)             # <<<<<<<<<<<<<<
 *         d += abs(self.design_size.y-other.design_size.y)
 *         d += abs(self.design_org.x-other.design_org.x)
 */
  __pyx_v_d = (__pyx_v_d + fabsf((__pyx_v_self->design_size->x - __pyx_v_other->design_size->x)));

  /* "pyglui/ui.pyx":722
 *         cdef float d = 0
 *         d += abs(self.design_size.x-other.design_size.x)
 *         d += abs(self.design_size.y-other.design_size.y)             # <<<<<<<<<<<<<<
 *         d += abs(self.design_org.x-other.design_org.x)
 *         d += abs(self.design_org.y-other.design_org.y)
 */
  __pyx_v_d = (__pyx_v_d + fabsf((__pyx_v_self->design_size->y - __pyx_v_other->design_size->y)));

  /* "pyglui/ui.pyx":723
 *         d += abs(self.design_size.x-other.design_size.x)
 *         d += abs(self.design_size.y-other.design_size.y)
 *         d += abs(self.design_org.x-other.design_org.x)             # <<<<<<<<<<<<<<
 *         d += abs(self.design_org.y-other.design_org.y)
 *         return d
 */
  __pyx_v_d = (__pyx_v_d + fabsf((__pyx_v_self->design_org->x - __pyx_v_other->design_org->x)));

  /* "pyglui/ui.pyx":724
 *         d += abs(self.design_size.y-other.design_size.y)
 *         d += abs(self.design_org.x-other.design_org.x)
 *         d += abs(self.design_org.y-other.design_org.y)             # <<<<<<<<<<<<<<
 *         return d
 * 
 */
  __pyx_v_d = (__pyx_v_d + fabsf((__pyx_v_self->design_org->y - __pyx_v_other->design_org->y)));

  /* "pyglui/ui.pyx":725
 *         d += abs(self.design_org.x-other.design_org.x)
 *         d += abs(self.design_org.y-other.design_org.y)
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     cdef sketch(self, RGBA color=RGBA(*rect_color_default)):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":719
 *         return bool(self.design_org == other.design_org and self.design_size == other.design_size)
 * 
 *     cdef design_distance(self,FitBox other):             # <<<<<<<<<<<<<<
 *         cdef float d = 0
 *         d += abs(self.design_size.x-other.design_size.x)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.FitBox.design_distance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":727
 *         return d
 * 
 *     cdef sketch(self, RGBA color=RGBA(*rect_color_default)):             # <<<<<<<<<<<<<<
 *         rect(self.org, self.size, color)
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_sketch(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch *__pyx_optional_args) {
  struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *__pyx_v_color = __pyx_k__91;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sketch", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_color = __pyx_optional_args->color;
    }
  }

  /* "pyglui/ui.pyx":728
 * 
 *     cdef sketch(self, RGBA color=RGBA(*rect_color_default)):
 *         rect(self.org, self.size, color)             # <<<<<<<<<<<<<<
 * 
 *     cdef copy(self):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->org);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_v_self->size);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_6pyglui_2ui_rect(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2), __pyx_v_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyglui/ui.pyx":727
 *         return d
 * 
 *     cdef sketch(self, RGBA color=RGBA(*rect_color_default)):             # <<<<<<<<<<<<<<
 *         rect(self.org, self.size, color)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.FitBox.sketch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":730
 *         rect(self.org, self.size, color)
 * 
 *     cdef copy(self):             # <<<<<<<<<<<<<<
 *         return FitBox( Vec2(*self.design_org), Vec2(*self.design_size), Vec2(*self.min_size) )
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_copy(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "pyglui/ui.pyx":731
 * 
 *     cdef copy(self):
 *         return FitBox( Vec2(*self.design_org), Vec2(*self.design_size), Vec2(*self.min_size) )             # <<<<<<<<<<<<<<
 * 
 *     cdef computed_copy(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_Tuple(((PyObject *)__pyx_v_self->design_org)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySequence_Tuple(((PyObject *)__pyx_v_self->design_size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySequence_Tuple(((PyObject *)__pyx_v_self->min_size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":730
 *         rect(self.org, self.size, color)
 * 
 *     cdef copy(self):             # <<<<<<<<<<<<<<
 *         return FitBox( Vec2(*self.design_org), Vec2(*self.design_size), Vec2(*self.min_size) )
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.FitBox.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":733
 *         return FitBox( Vec2(*self.design_org), Vec2(*self.design_size), Vec2(*self.min_size) )
 * 
 *     cdef computed_copy(self):             # <<<<<<<<<<<<<<
 *         cdef FitBox box = self.copy()
 *         box.org = Vec2(*self.org[:])
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_computed_copy(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_box = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("computed_copy", 0);

  /* "pyglui/ui.pyx":734
 * 
 *     cdef computed_copy(self):
 *         cdef FitBox box = self.copy()             # <<<<<<<<<<<<<<
 *         box.org = Vec2(*self.org[:])
 *         box.size = Vec2(*self.size[:])
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyglui_2ui_FitBox *)__pyx_v_self->__pyx_vtab)->copy(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(0, 734, __pyx_L1_error)
  __pyx_v_box = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":735
 *     cdef computed_copy(self):
 *         cdef FitBox box = self.copy()
 *         box.org = Vec2(*self.org[:])             # <<<<<<<<<<<<<<
 *         box.size = Vec2(*self.size[:])
 *         return box
 */
  __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->org), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_box->org);
  __Pyx_DECREF((PyObject *)__pyx_v_box->org);
  __pyx_v_box->org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":736
 *         cdef FitBox box = self.copy()
 *         box.org = Vec2(*self.org[:])
 *         box.size = Vec2(*self.size[:])             # <<<<<<<<<<<<<<
 *         return box
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->size), 0, 0, NULL, NULL, &__pyx_slice__26, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_box->size);
  __Pyx_DECREF((PyObject *)__pyx_v_box->size);
  __pyx_v_box->size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyglui/ui.pyx":737
 *         box.org = Vec2(*self.org[:])
 *         box.size = Vec2(*self.size[:])
 *         return box             # <<<<<<<<<<<<<<
 * 
 *     cdef has_area(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_box);
  __pyx_r = ((PyObject *)__pyx_v_box);
  goto __pyx_L0;

  /* "pyglui/ui.pyx":733
 *         return FitBox( Vec2(*self.design_org), Vec2(*self.design_size), Vec2(*self.min_size) )
 * 
 *     cdef computed_copy(self):             # <<<<<<<<<<<<<<
 *         cdef FitBox box = self.copy()
 *         box.org = Vec2(*self.org[:])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyglui.ui.FitBox.computed_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_box);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":739
 *         return box
 * 
 *     cdef has_area(self):             # <<<<<<<<<<<<<<
 *         return 1 < self.size.x*self.size.y
 * 
 */

static PyObject *__pyx_f_6pyglui_2ui_6FitBox_has_area(struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("has_area", 0);

  /* "pyglui/ui.pyx":740
 * 
 *     cdef has_area(self):
 *         return 1 < self.size.x*self.size.y             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((1.0 < (__pyx_v_self->size->x * __pyx_v_self->size->y))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":739
 *         return box
 * 
 *     cdef has_area(self):             # <<<<<<<<<<<<<<
 *         return 1 < self.size.x*self.size.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.FitBox.has_area", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6FitBox_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6FitBox_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_10__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.FitBox.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_6FitBox_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6FitBox_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_6FitBox_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.FitBox.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_6FitBox_12__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_6FitBox_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_FitBox *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.FitBox.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":746
 *     cdef public float x,y
 * 
 *     def __cinit__(self,float x, float y):             # <<<<<<<<<<<<<<
 *         self.x = x
 *         self.y = y
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Vec2_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Vec2_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_x;
  float __pyx_v_y;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_y)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 746, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 746, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    }
    __pyx_v_x = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_y == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 746, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2___cinit__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), __pyx_v_x, __pyx_v_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Vec2___cinit__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, float __pyx_v_x, float __pyx_v_y) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyglui/ui.pyx":747
 * 
 *     def __cinit__(self,float x, float y):
 *         self.x = x             # <<<<<<<<<<<<<<
 *         self.y = y
 * 
 */
  __pyx_v_self->x = __pyx_v_x;

  /* "pyglui/ui.pyx":748
 *     def __cinit__(self,float x, float y):
 *         self.x = x
 *         self.y = y             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,x,y):
 */
  __pyx_v_self->y = __pyx_v_y;

  /* "pyglui/ui.pyx":746
 *     cdef public float x,y
 * 
 *     def __cinit__(self,float x, float y):             # <<<<<<<<<<<<<<
 *         self.x = x
 *         self.y = y
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":750
 *         self.y = y
 * 
 *     def __init__(self,x,y):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Vec2_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Vec2_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_x = 0;
  CYTHON_UNUSED PyObject *__pyx_v_y = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_y)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 750, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 750, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 750, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_2__init__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), __pyx_v_x, __pyx_v_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Vec2_2__init__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_y) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":753
 *         pass
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return bool(self.x or self.y)
 * 
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Vec2_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Vec2_5__nonzero__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_4__nonzero__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Vec2_4__nonzero__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__nonzero__", 0);

  /* "pyglui/ui.pyx":754
 * 
 *     def __nonzero__(self):
 *         return bool(self.x or self.y)             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self,Vec2 other):
 */
  __pyx_t_2 = (__pyx_v_self->x != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->y != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = (!(!__pyx_t_1));
  goto __pyx_L0;

  /* "pyglui/ui.pyx":753
 *         pass
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return bool(self.x or self.y)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":756
 *         return bool(self.x or self.y)
 * 
 *     def __add__(self,Vec2 other):             # <<<<<<<<<<<<<<
 *         return Vec2(self.x+other.x,self.y+other.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pyglui_2ui_Vec2, 1, "other", 0))) __PYX_ERR(0, 756, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_6__add__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_6__add__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "pyglui/ui.pyx":757
 * 
 *     def __add__(self,Vec2 other):
 *         return Vec2(self.x+other.x,self.y+other.y)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->x + __pyx_v_other->x)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->y + __pyx_v_other->y)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":756
 *         return bool(self.x or self.y)
 * 
 *     def __add__(self,Vec2 other):             # <<<<<<<<<<<<<<
 *         return Vec2(self.x+other.x,self.y+other.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":760
 * 
 * 
 *     def __iadd__(self,Vec2 other):             # <<<<<<<<<<<<<<
 *         self.x += other.x
 *         self.y += other.y
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_9__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_9__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pyglui_2ui_Vec2, 1, "other", 0))) __PYX_ERR(0, 760, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_8__iadd__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_8__iadd__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iadd__", 0);

  /* "pyglui/ui.pyx":761
 * 
 *     def __iadd__(self,Vec2 other):
 *         self.x += other.x             # <<<<<<<<<<<<<<
 *         self.y += other.y
 *         return self
 */
  __pyx_v_self->x = (__pyx_v_self->x + __pyx_v_other->x);

  /* "pyglui/ui.pyx":762
 *     def __iadd__(self,Vec2 other):
 *         self.x += other.x
 *         self.y += other.y             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->y = (__pyx_v_self->y + __pyx_v_other->y);

  /* "pyglui/ui.pyx":763
 *         self.x += other.x
 *         self.y += other.y
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self,float factor):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyglui/ui.pyx":760
 * 
 * 
 *     def __iadd__(self,Vec2 other):             # <<<<<<<<<<<<<<
 *         self.x += other.x
 *         self.y += other.y
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":765
 *         return self
 * 
 *     def __mul__(self,float factor):             # <<<<<<<<<<<<<<
 *         return Vec2(self.x * factor, self.y * factor)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_11__mul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_factor); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_11__mul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_factor) {
  float __pyx_v_factor;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  assert(__pyx_arg_factor); {
    __pyx_v_factor = __pyx_PyFloat_AsFloat(__pyx_arg_factor); if (unlikely((__pyx_v_factor == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 765, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_10__mul__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((float)__pyx_v_factor));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_10__mul__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, float __pyx_v_factor) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "pyglui/ui.pyx":766
 * 
 *     def __mul__(self,float factor):
 *         return Vec2(self.x * factor, self.y * factor)             # <<<<<<<<<<<<<<
 * 
 *     def __imul__(self,float factor):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->x * __pyx_v_factor)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->y * __pyx_v_factor)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":765
 *         return self
 * 
 *     def __mul__(self,float factor):             # <<<<<<<<<<<<<<
 *         return Vec2(self.x * factor, self.y * factor)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":768
 *         return Vec2(self.x * factor, self.y * factor)
 * 
 *     def __imul__(self,float factor):             # <<<<<<<<<<<<<<
 *         self.x *= factor
 *         self.y *= factor
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_13__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_factor); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_13__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_factor) {
  float __pyx_v_factor;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
  assert(__pyx_arg_factor); {
    __pyx_v_factor = __pyx_PyFloat_AsFloat(__pyx_arg_factor); if (unlikely((__pyx_v_factor == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 768, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_12__imul__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((float)__pyx_v_factor));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_12__imul__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, float __pyx_v_factor) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__imul__", 0);

  /* "pyglui/ui.pyx":769
 * 
 *     def __imul__(self,float factor):
 *         self.x *= factor             # <<<<<<<<<<<<<<
 *         self.y *= factor
 *         return self
 */
  __pyx_v_self->x = (__pyx_v_self->x * __pyx_v_factor);

  /* "pyglui/ui.pyx":770
 *     def __imul__(self,float factor):
 *         self.x *= factor
 *         self.y *= factor             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->y = (__pyx_v_self->y * __pyx_v_factor);

  /* "pyglui/ui.pyx":771
 *         self.x *= factor
 *         self.y *= factor
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __matmul__(self, Vec2 other):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyglui/ui.pyx":768
 *         return Vec2(self.x * factor, self.y * factor)
 * 
 *     def __imul__(self,float factor):             # <<<<<<<<<<<<<<
 *         self.x *= factor
 *         self.y *= factor
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":773
 *         return self
 * 
 *     def __matmul__(self, Vec2 other):             # <<<<<<<<<<<<<<
 *         return self.x * other.x + self.y * other.y
 * 
 */

/* Python wrapper */
#if PY_VERSION_HEX >= 0x03050000
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_15__matmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_15__matmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__matmul__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pyglui_2ui_Vec2, 1, "other", 0))) __PYX_ERR(0, 773, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_14__matmul__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_VERSION_HEX >= 0x03050000)*/

#if PY_VERSION_HEX >= 0x03050000
static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_14__matmul__(PyObject *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__matmul__", 0);

  /* "pyglui/ui.pyx":774
 * 
 *     def __matmul__(self, Vec2 other):
 *         return self.x * other.x + self.y * other.y             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self,Vec2 other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_other->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_other->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":773
 *         return self
 * 
 *     def __matmul__(self, Vec2 other):             # <<<<<<<<<<<<<<
 *         return self.x * other.x + self.y * other.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__matmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if PY_VERSION_HEX >= 0x03050000)*/

/* "pyglui/ui.pyx":776
 *         return self.x * other.x + self.y * other.y
 * 
 *     def __sub__(self,Vec2 other):             # <<<<<<<<<<<<<<
 *         return Vec2(self.x-other.x,self.y-other.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_17__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_17__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pyglui_2ui_Vec2, 1, "other", 0))) __PYX_ERR(0, 776, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_16__sub__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_16__sub__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "pyglui/ui.pyx":777
 * 
 *     def __sub__(self,Vec2 other):
 *         return Vec2(self.x-other.x,self.y-other.y)             # <<<<<<<<<<<<<<
 * 
 *     def __isub__(self,Vec2 other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->x - __pyx_v_other->x)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->y - __pyx_v_other->y)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":776
 *         return self.x * other.x + self.y * other.y
 * 
 *     def __sub__(self,Vec2 other):             # <<<<<<<<<<<<<<
 *         return Vec2(self.x-other.x,self.y-other.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":779
 *         return Vec2(self.x-other.x,self.y-other.y)
 * 
 *     def __isub__(self,Vec2 other):             # <<<<<<<<<<<<<<
 *         self.x -= other.x
 *         self.y -= other.y
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_19__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_19__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pyglui_2ui_Vec2, 1, "other", 0))) __PYX_ERR(0, 779, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_18__isub__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_18__isub__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__isub__", 0);

  /* "pyglui/ui.pyx":780
 * 
 *     def __isub__(self,Vec2 other):
 *         self.x -= other.x             # <<<<<<<<<<<<<<
 *         self.y -= other.y
 *         return self
 */
  __pyx_v_self->x = (__pyx_v_self->x - __pyx_v_other->x);

  /* "pyglui/ui.pyx":781
 *     def __isub__(self,Vec2 other):
 *         self.x -= other.x
 *         self.y -= other.y             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->y = (__pyx_v_self->y - __pyx_v_other->y);

  /* "pyglui/ui.pyx":782
 *         self.x -= other.x
 *         self.y -= other.y
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __truediv__(self, float divident):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyglui/ui.pyx":779
 *         return Vec2(self.x-other.x,self.y-other.y)
 * 
 *     def __isub__(self,Vec2 other):             # <<<<<<<<<<<<<<
 *         self.x -= other.x
 *         self.y -= other.y
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":784
 *         return self
 * 
 *     def __truediv__(self, float divident):             # <<<<<<<<<<<<<<
 *         return Vec2(self.x / divident, self.y / divident)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_21__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_divident); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_21__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_divident) {
  float __pyx_v_divident;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
  assert(__pyx_arg_divident); {
    __pyx_v_divident = __pyx_PyFloat_AsFloat(__pyx_arg_divident); if (unlikely((__pyx_v_divident == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 784, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_20__truediv__(((PyObject *)__pyx_v_self), ((float)__pyx_v_divident));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_20__truediv__(PyObject *__pyx_v_self, float __pyx_v_divident) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__truediv__", 0);

  /* "pyglui/ui.pyx":785
 * 
 *     def __truediv__(self, float divident):
 *         return Vec2(self.x / divident, self.y / divident)             # <<<<<<<<<<<<<<
 * 
 *     def __itruediv__(self,float divident):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_divident); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_divident); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":784
 *         return self
 * 
 *     def __truediv__(self, float divident):             # <<<<<<<<<<<<<<
 *         return Vec2(self.x / divident, self.y / divident)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":787
 *         return Vec2(self.x / divident, self.y / divident)
 * 
 *     def __itruediv__(self,float divident):             # <<<<<<<<<<<<<<
 *         self.x /= divident
 *         self.y /= divident
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_23__itruediv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_divident); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_23__itruediv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_divident) {
  float __pyx_v_divident;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__itruediv__ (wrapper)", 0);
  assert(__pyx_arg_divident); {
    __pyx_v_divident = __pyx_PyFloat_AsFloat(__pyx_arg_divident); if (unlikely((__pyx_v_divident == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 787, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__itruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_22__itruediv__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((float)__pyx_v_divident));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_22__itruediv__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, float __pyx_v_divident) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__itruediv__", 0);

  /* "pyglui/ui.pyx":788
 * 
 *     def __itruediv__(self,float divident):
 *         self.x /= divident             # <<<<<<<<<<<<<<
 *         self.y /= divident
 *         return self
 */
  if (unlikely(__pyx_v_divident == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 788, __pyx_L1_error)
  }
  __pyx_v_self->x = (__pyx_v_self->x / __pyx_v_divident);

  /* "pyglui/ui.pyx":789
 *     def __itruediv__(self,float divident):
 *         self.x /= divident
 *         self.y /= divident             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  if (unlikely(__pyx_v_divident == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 789, __pyx_L1_error)
  }
  __pyx_v_self->y = (__pyx_v_self->y / __pyx_v_divident);

  /* "pyglui/ui.pyx":790
 *         self.x /= divident
 *         self.y /= divident
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pyglui/ui.pyx":787
 *         return Vec2(self.x / divident, self.y / divident)
 * 
 *     def __itruediv__(self,float divident):             # <<<<<<<<<<<<<<
 *         self.x /= divident
 *         self.y /= divident
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__itruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":792
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 2
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_6pyglui_2ui_4Vec2_25__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_6pyglui_2ui_4Vec2_25__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_24__len__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_6pyglui_2ui_4Vec2_24__len__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyglui/ui.pyx":793
 * 
 *     def __len__(self):
 *         return 2             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 2;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":792
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 2
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":795
 *         return 2
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'x: %s y: %s'%(self.x,self.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_27__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_27__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_26__str__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_26__str__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyglui/ui.pyx":796
 * 
 *     def __str__(self):
 *         return 'x: %s y: %s'%(self.x,self.y)             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(self,Vec2 other,int op):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_x_3);
  __pyx_t_2 += 3;
  __Pyx_GIVEREF(__pyx_kp_u_x_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_x_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_y_2);
  __pyx_t_2 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_y_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_y_2);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyglui/ui.pyx":795
 *         return 2
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'x: %s y: %s'%(self.x,self.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":798
 *         return 'x: %s y: %s'%(self.x,self.y)
 * 
 *     def __richcmp__(self,Vec2 other,int op):             # <<<<<<<<<<<<<<
 *         '''
 *         <   0
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_29__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_29__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pyglui_2ui_Vec2, 1, "other", 0))) __PYX_ERR(0, 798, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_28__richcmp__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_other), ((int)__pyx_v_op));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_28__richcmp__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_other, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "pyglui/ui.pyx":807
 *         >=  5
 *         '''
 *         if op == 2:             # <<<<<<<<<<<<<<
 *             return bool(self.x == other.x and self.y == other.y)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_op == 2);
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":808
 *         '''
 *         if op == 2:
 *             return bool(self.x == other.x and self.y == other.y)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = (__pyx_v_self->x == __pyx_v_other->x);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->y == __pyx_v_other->y);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyglui/ui.pyx":807
 *         >=  5
 *         '''
 *         if op == 2:             # <<<<<<<<<<<<<<
 *             return bool(self.x == other.x and self.y == other.y)
 *         else:
 */
  }

  /* "pyglui/ui.pyx":810
 *             return bool(self.x == other.x and self.y == other.y)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self,idx):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "pyglui/ui.pyx":798
 *         return 'x: %s y: %s'%(self.x,self.y)
 * 
 *     def __richcmp__(self,Vec2 other,int op):             # <<<<<<<<<<<<<<
 *         '''
 *         <   0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":812
 *             return NotImplemented
 * 
 *     def __getitem__(self,idx):             # <<<<<<<<<<<<<<
 *         if isinstance(idx,slice):
 *             return (self.x,self.y)[idx]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_31__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_31__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_30__getitem__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((PyObject *)__pyx_v_idx));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_30__getitem__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, PyObject *__pyx_v_idx) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyglui/ui.pyx":813
 * 
 *     def __getitem__(self,idx):
 *         if isinstance(idx,slice):             # <<<<<<<<<<<<<<
 *             return (self.x,self.y)[idx]
 *         else:
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_idx); 
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":814
 *     def __getitem__(self,idx):
 *         if isinstance(idx,slice):
 *             return (self.x,self.y)[idx]             # <<<<<<<<<<<<<<
 *         else:
 *             if idx==0:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyglui/ui.pyx":813
 * 
 *     def __getitem__(self,idx):
 *         if isinstance(idx,slice):             # <<<<<<<<<<<<<<
 *             return (self.x,self.y)[idx]
 *         else:
 */
  }

  /* "pyglui/ui.pyx":816
 *             return (self.x,self.y)[idx]
 *         else:
 *             if idx==0:             # <<<<<<<<<<<<<<
 *                 return self.x
 *             elif idx==1:
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_idx, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":817
 *         else:
 *             if idx==0:
 *                 return self.x             # <<<<<<<<<<<<<<
 *             elif idx==1:
 *                 return self.y
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyglui/ui.pyx":816
 *             return (self.x,self.y)[idx]
 *         else:
 *             if idx==0:             # <<<<<<<<<<<<<<
 *                 return self.x
 *             elif idx==1:
 */
    }

    /* "pyglui/ui.pyx":818
 *             if idx==0:
 *                 return self.x
 *             elif idx==1:             # <<<<<<<<<<<<<<
 *                 return self.y
 *             raise IndexError()
 */
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_idx, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 818, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":819
 *                 return self.x
 *             elif idx==1:
 *                 return self.y             # <<<<<<<<<<<<<<
 *             raise IndexError()
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "pyglui/ui.pyx":818
 *             if idx==0:
 *                 return self.x
 *             elif idx==1:             # <<<<<<<<<<<<<<
 *                 return self.y
 *             raise IndexError()
 */
    }

    /* "pyglui/ui.pyx":820
 *             elif idx==1:
 *                 return self.y
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self,idx,obj):
 */
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 820, __pyx_L1_error)
  }

  /* "pyglui/ui.pyx":812
 *             return NotImplemented
 * 
 *     def __getitem__(self,idx):             # <<<<<<<<<<<<<<
 *         if isinstance(idx,slice):
 *             return (self.x,self.y)[idx]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":822
 *             raise IndexError()
 * 
 *     def __setitem__(self,idx,obj):             # <<<<<<<<<<<<<<
 *         if isinstance(idx,slice):
 *             self.x,self.y = obj[0], obj[1] #we should be more specific about the kind of slice
 */

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Vec2_33__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_obj); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Vec2_33__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_obj) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_32__setitem__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((PyObject *)__pyx_v_idx), ((PyObject *)__pyx_v_obj));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Vec2_32__setitem__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  float __pyx_t_3;
  float __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyglui/ui.pyx":823
 * 
 *     def __setitem__(self,idx,obj):
 *         if isinstance(idx,slice):             # <<<<<<<<<<<<<<
 *             self.x,self.y = obj[0], obj[1] #we should be more specific about the kind of slice
 *         else:
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_idx); 
  if (__pyx_t_1) {

    /* "pyglui/ui.pyx":824
 *     def __setitem__(self,idx,obj):
 *         if isinstance(idx,slice):
 *             self.x,self.y = obj[0], obj[1] #we should be more specific about the kind of slice             # <<<<<<<<<<<<<<
 *         else:
 *             if idx ==0:
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_obj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_obj, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->x = __pyx_t_3;
    __pyx_v_self->y = __pyx_t_4;

    /* "pyglui/ui.pyx":823
 * 
 *     def __setitem__(self,idx,obj):
 *         if isinstance(idx,slice):             # <<<<<<<<<<<<<<
 *             self.x,self.y = obj[0], obj[1] #we should be more specific about the kind of slice
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyglui/ui.pyx":826
 *             self.x,self.y = obj[0], obj[1] #we should be more specific about the kind of slice
 *         else:
 *             if idx ==0:             # <<<<<<<<<<<<<<
 *                 self.x = obj
 *             elif idx == 1:
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_idx, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 826, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pyglui/ui.pyx":827
 *         else:
 *             if idx ==0:
 *                 self.x = obj             # <<<<<<<<<<<<<<
 *             elif idx == 1:
 *                 self.y == obj
 */
      __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_v_obj); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 827, __pyx_L1_error)
      __pyx_v_self->x = __pyx_t_4;

      /* "pyglui/ui.pyx":826
 *             self.x,self.y = obj[0], obj[1] #we should be more specific about the kind of slice
 *         else:
 *             if idx ==0:             # <<<<<<<<<<<<<<
 *                 self.x = obj
 *             elif idx == 1:
 */
      goto __pyx_L4;
    }

    /* "pyglui/ui.pyx":828
 *             if idx ==0:
 *                 self.x = obj
 *             elif idx == 1:             # <<<<<<<<<<<<<<
 *                 self.y == obj
 *             else:
 */
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_idx, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 828, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(__pyx_t_1)) {

      /* "pyglui/ui.pyx":829
 *                 self.x = obj
 *             elif idx == 1:
 *                 self.y == obj             # <<<<<<<<<<<<<<
 *             else:
 *                 raise IndexError()
 */
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_v_obj, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyglui/ui.pyx":828
 *             if idx ==0:
 *                 self.x = obj
 *             elif idx == 1:             # <<<<<<<<<<<<<<
 *                 self.y == obj
 *             else:
 */
      goto __pyx_L4;
    }

    /* "pyglui/ui.pyx":831
 *                 self.y == obj
 *             else:
 *                 raise IndexError()             # <<<<<<<<<<<<<<
 */
    /*else*/ {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 831, __pyx_L1_error)
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "pyglui/ui.pyx":822
 *             raise IndexError()
 * 
 *     def __setitem__(self,idx,obj):             # <<<<<<<<<<<<<<
 *         if isinstance(idx,slice):
 *             self.x,self.y = obj[0], obj[1] #we should be more specific about the kind of slice
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyglui.ui.Vec2.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyglui/ui.pyx":744
 * 
 * cdef class Vec2:
 *     cdef public float x,y             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,float x, float y):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_1x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_1x_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_1x___get__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_1x___get__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Vec2.x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Vec2_1x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Vec2_1x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_1x_2__set__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Vec2_1x_2__set__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L1_error)
  __pyx_v_self->x = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_1y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_1y_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_1y___get__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_1y___get__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyglui.ui.Vec2.y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pyglui_2ui_4Vec2_1y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pyglui_2ui_4Vec2_1y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_1y_2__set__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pyglui_2ui_4Vec2_1y_2__set__(struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L1_error)
  __pyx_v_self->y = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_35__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_4Vec2_35__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Vec2_35__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_35__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_34__reduce_cython__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_37__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_4Vec2_37__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Vec2_37__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_4Vec2_37__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_4Vec2_36__setstate_cython__(((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_4Vec2_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pyglui_2ui_Vec2 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyglui.ui.Vec2.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_UI_element(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_15__pyx_unpickle_UI_element(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_15__pyx_unpickle_UI_element = {"__pyx_unpickle_UI_element", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_15__pyx_unpickle_UI_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_15__pyx_unpickle_UI_element(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_UI_element (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UI_element", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UI_element", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_UI_element") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UI_element", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_UI_element", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_14__pyx_unpickle_UI_element(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_14__pyx_unpickle_UI_element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_UI_element", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7842cdf, 0x44bb70b, 0xac02bc6):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__92, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7842cdf, 0x44bb70b, 0xac02bc6):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))" % __pyx_checksum
 *     __pyx_result = UI_element.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x7842cdf, 0x44bb70b, 0xac02bc6):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = UI_element.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7842cdf, 0x44bb70b, 0xac02bc6):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))" % __pyx_checksum
 *     __pyx_result = UI_element.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UI_element__set_state(<UI_element> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))" % __pyx_checksum
 *     __pyx_result = UI_element.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_UI_element__set_state(<UI_element> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = UI_element.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UI_element__set_state(<UI_element> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_UI_element__set_state(UI_element __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6pyglui_2ui___pyx_unpickle_UI_element__set_state(((struct __pyx_obj_6pyglui_2ui_UI_element *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))" % __pyx_checksum
 *     __pyx_result = UI_element.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_UI_element__set_state(<UI_element> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UI_element__set_state(<UI_element> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_UI_element__set_state(UI_element __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.outline = __pyx_state[3]; __pyx_result.uid = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_UI_element(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_UI_element", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_UI_element__set_state(<UI_element> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UI_element__set_state(UI_element __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.outline = __pyx_state[3]; __pyx_result.uid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pyglui_2ui___pyx_unpickle_UI_element__set_state(struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_UI_element__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_UI_element__set_state(UI_element __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.outline = __pyx_state[3]; __pyx_result.uid = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_label);
  __Pyx_DECREF(__pyx_v___pyx_result->_label);
  __pyx_v___pyx_result->_label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_order = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_read_only = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->outline);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->outline);
  __pyx_v___pyx_result->outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->uid);
  __Pyx_DECREF(__pyx_v___pyx_result->uid);
  __pyx_v___pyx_result->uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_UI_element__set_state(UI_element __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.outline = __pyx_state[3]; __pyx_result.uid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 > 5);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.outline = __pyx_state[3]; __pyx_result.uid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_UI_element__set_state(UI_element __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.outline = __pyx_state[3]; __pyx_result.uid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_UI_element__set_state(<UI_element> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UI_element__set_state(UI_element __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.outline = __pyx_state[3]; __pyx_result.uid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_UI_element__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Base_Menu(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_17__pyx_unpickle_Base_Menu(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_17__pyx_unpickle_Base_Menu = {"__pyx_unpickle_Base_Menu", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_17__pyx_unpickle_Base_Menu, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_17__pyx_unpickle_Base_Menu(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Base_Menu (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Base_Menu", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Base_Menu", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Base_Menu") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Base_Menu", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_Base_Menu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_16__pyx_unpickle_Base_Menu(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_16__pyx_unpickle_Base_Menu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Base_Menu", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8f229b7, 0xef8a081, 0x3d0e76a):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__94, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8f229b7, 0xef8a081, 0x3d0e76a):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 *     __pyx_result = Base_Menu.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x8f229b7, 0xef8a081, 0x3d0e76a):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Base_Menu.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8f229b7, 0xef8a081, 0x3d0e76a):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 *     __pyx_result = Base_Menu.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Base_Menu__set_state(<Base_Menu> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 *     __pyx_result = Base_Menu.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Base_Menu__set_state(<Base_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = Base_Menu.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Base_Menu__set_state(<Base_Menu> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Base_Menu__set_state(Base_Menu __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6pyglui_2ui___pyx_unpickle_Base_Menu__set_state(((struct __pyx_obj_6pyglui_2ui_Base_Menu *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 *     __pyx_result = Base_Menu.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Base_Menu__set_state(<Base_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Base_Menu__set_state(<Base_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Base_Menu__set_state(Base_Menu __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Base_Menu(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_Base_Menu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Base_Menu__set_state(<Base_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Base_Menu__set_state(Base_Menu __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pyglui_2ui___pyx_unpickle_Base_Menu__set_state(struct __pyx_obj_6pyglui_2ui_Base_Menu *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Base_Menu__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Base_Menu__set_state(Base_Menu __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._label);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._label);
  __pyx_v___pyx_result->__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._order = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._read_only = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->color);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->color);
  __pyx_v___pyx_result->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->element_space);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->element_space);
  __pyx_v___pyx_result->element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->elements);
  __Pyx_DECREF(__pyx_v___pyx_result->elements);
  __pyx_v___pyx_result->elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->header_pos_id = __pyx_t_4;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Draggable))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->menu_bar);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->menu_bar);
  __pyx_v___pyx_result->menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Draggable))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->minimize_corner);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->minimize_corner);
  __pyx_v___pyx_result->minimize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.outline);
  __pyx_v___pyx_result->__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Draggable))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->resize_corner);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->resize_corner);
  __pyx_v___pyx_result->resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.uid);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.uid);
  __pyx_v___pyx_result->__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Base_Menu__set_state(Base_Menu __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 > 12);
  if (__pyx_t_6) {
  } else {
    __pyx_t_3 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[12])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Base_Menu__set_state(Base_Menu __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Base_Menu__set_state(<Base_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Base_Menu__set_state(Base_Menu __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_Base_Menu__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Movable_Menu(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pyglui_2ui_19__pyx_unpickle_Movable_Menu(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pyglui_2ui_19__pyx_unpickle_Movable_Menu = {"__pyx_unpickle_Movable_Menu", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_19__pyx_unpickle_Movable_Menu, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pyglui_2ui_19__pyx_unpickle_Movable_Menu(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Movable_Menu (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Movable_Menu", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Movable_Menu", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Movable_Menu") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Movable_Menu", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_Movable_Menu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pyglui_2ui_18__pyx_unpickle_Movable_Menu(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pyglui_2ui_18__pyx_unpickle_Movable_Menu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Movable_Menu", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8f229b7, 0xef8a081, 0x3d0e76a):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__94, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8f229b7, 0xef8a081, 0x3d0e76a):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 *     __pyx_result = Movable_Menu.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x8f229b7, 0xef8a081, 0x3d0e76a):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Movable_Menu.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8f229b7, 0xef8a081, 0x3d0e76a):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 *     __pyx_result = Movable_Menu.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Movable_Menu__set_state(<Movable_Menu> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pyglui_2ui_Movable_Menu), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 *     __pyx_result = Movable_Menu.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Movable_Menu__set_state(<Movable_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = Movable_Menu.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Movable_Menu__set_state(<Movable_Menu> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Movable_Menu__set_state(Movable_Menu __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6pyglui_2ui___pyx_unpickle_Movable_Menu__set_state(((struct __pyx_obj_6pyglui_2ui_Movable_Menu *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8f229b7, 0xef8a081, 0x3d0e76a) = (_label, _order, _read_only, color, element_space, elements, header_pos_id, menu_bar, minimize_corner, outline, resize_corner, uid))" % __pyx_checksum
 *     __pyx_result = Movable_Menu.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Movable_Menu__set_state(<Movable_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Movable_Menu__set_state(<Movable_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Movable_Menu__set_state(Movable_Menu __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Movable_Menu(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_Movable_Menu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Movable_Menu__set_state(<Movable_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Movable_Menu__set_state(Movable_Menu __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pyglui_2ui___pyx_unpickle_Movable_Menu__set_state(struct __pyx_obj_6pyglui_2ui_Movable_Menu *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Movable_Menu__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Movable_Menu__set_state(Movable_Menu __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError((PY_MAJOR_VERSION < 3 ? "basestring" : "str"), __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._label);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._label);
  __pyx_v___pyx_result->__pyx_base.__pyx_base._label = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base._order = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base._read_only = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_4cygl_5utils_RGBA))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.color);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.color);
  __pyx_v___pyx_result->__pyx_base.color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.element_space);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.element_space);
  __pyx_v___pyx_result->__pyx_base.element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.elements);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.elements);
  __pyx_v___pyx_result->__pyx_base.elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.header_pos_id = __pyx_t_4;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Draggable))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.menu_bar);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.menu_bar);
  __pyx_v___pyx_result->__pyx_base.menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Draggable))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.minimize_corner);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.minimize_corner);
  __pyx_v___pyx_result->__pyx_base.minimize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_FitBox))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.outline);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.outline);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pyglui_2ui_Draggable))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.resize_corner);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.resize_corner);
  __pyx_v___pyx_result->__pyx_base.resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.uid);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.uid);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.uid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Movable_Menu__set_state(Movable_Menu __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 > 12);
  if (__pyx_t_6) {
  } else {
    __pyx_t_3 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[12])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_4 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Movable_Menu__set_state(Movable_Menu __pyx_result, tuple __pyx_state):
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Movable_Menu__set_state(<Movable_Menu> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Movable_Menu__set_state(Movable_Menu __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.color = __pyx_state[3]; __pyx_result.element_space = __pyx_state[4]; __pyx_result.elements = __pyx_state[5]; __pyx_result.header_pos_id = __pyx_state[6]; __pyx_result.menu_bar = __pyx_state[7]; __pyx_result.minimize_corner = __pyx_state[8]; __pyx_result.outline = __pyx_state[9]; __pyx_result.resize_corner = __pyx_state[10]; __pyx_result.uid = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyglui.ui.__pyx_unpickle_Movable_Menu__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cysignals/signals.pxd":57
 * # (PyErr_Occurred() is non-NULL). To Cython, it will look like
 * # cython_check_exception() actually raised the exception.
 * cdef inline void cython_check_exception() nogil except *:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

static CYTHON_INLINE void __pyx_f_9cysignals_7signals_cython_check_exception(void) {

  /* function exit code */
}

/* "cysignals/signals.pxd":63
 * cdef void verify_exc_value()
 * 
 * cdef inline PyObject* sig_occurred():             # <<<<<<<<<<<<<<
 *     """
 *     Borrowed reference to the exception which is currently being
 */

static CYTHON_INLINE PyObject *__pyx_f_9cysignals_7signals_sig_occurred(void) {
  PyObject *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("sig_occurred", 0);

  /* "cysignals/signals.pxd":77
 *     exception is stored somewhere.
 *     """
 *     if unlikely(cysigs.exc_value is not NULL):             # <<<<<<<<<<<<<<
 *         verify_exc_value()
 *     return cysigs.exc_value
 */
  __pyx_t_1 = (unlikely((cysigs.exc_value != NULL)) != 0);
  if (__pyx_t_1) {

    /* "cysignals/signals.pxd":78
 *     """
 *     if unlikely(cysigs.exc_value is not NULL):
 *         verify_exc_value()             # <<<<<<<<<<<<<<
 *     return cysigs.exc_value
 * 
 */
    __pyx_f_9cysignals_7signals_verify_exc_value();

    /* "cysignals/signals.pxd":77
 *     exception is stored somewhere.
 *     """
 *     if unlikely(cysigs.exc_value is not NULL):             # <<<<<<<<<<<<<<
 *         verify_exc_value()
 *     return cysigs.exc_value
 */
  }

  /* "cysignals/signals.pxd":79
 *     if unlikely(cysigs.exc_value is not NULL):
 *         verify_exc_value()
 *     return cysigs.exc_value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = cysigs.exc_value;
  goto __pyx_L0;

  /* "cysignals/signals.pxd":63
 * cdef void verify_exc_value()
 * 
 * cdef inline PyObject* sig_occurred():             # <<<<<<<<<<<<<<
 *     """
 *     Borrowed reference to the exception which is currently being
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cysignals/signals.pxd":93
 * 
 * 
 * cdef inline void __generate_declarations():             # <<<<<<<<<<<<<<
 *     cysigs
 *     _sig_on_interrupt_received
 */

static CYTHON_INLINE void __pyx_f_9cysignals_7signals___generate_declarations(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__generate_declarations", 0);

  /* "cysignals/signals.pxd":94
 * 
 * cdef inline void __generate_declarations():
 *     cysigs             # <<<<<<<<<<<<<<
 *     _sig_on_interrupt_received
 *     _sig_on_recover
 */
  (void)(cysigs);

  /* "cysignals/signals.pxd":95
 * cdef inline void __generate_declarations():
 *     cysigs
 *     _sig_on_interrupt_received             # <<<<<<<<<<<<<<
 *     _sig_on_recover
 *     _sig_off_warning
 */
  (void)(_sig_on_interrupt_received);

  /* "cysignals/signals.pxd":96
 *     cysigs
 *     _sig_on_interrupt_received
 *     _sig_on_recover             # <<<<<<<<<<<<<<
 *     _sig_off_warning
 *     print_backtrace
 */
  (void)(_sig_on_recover);

  /* "cysignals/signals.pxd":97
 *     _sig_on_interrupt_received
 *     _sig_on_recover
 *     _sig_off_warning             # <<<<<<<<<<<<<<
 *     print_backtrace
 */
  (void)(_sig_off_warning);

  /* "cysignals/signals.pxd":98
 *     _sig_on_recover
 *     _sig_off_warning
 *     print_backtrace             # <<<<<<<<<<<<<<
 */
  (void)(print_backtrace);

  /* "cysignals/signals.pxd":93
 * 
 * 
 * cdef inline void __generate_declarations():             # <<<<<<<<<<<<<<
 *     cysigs
 *     _sig_on_interrupt_received
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "cfunc.to_py":67
 * @cname("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm")
 * cdef object __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*f)(UI_element) except *):
 *     def wrap(UI_element elm):             # <<<<<<<<<<<<<<
 *         """wrap(elm: 'UI_element') -> 'float'"""
 *         return f(elm)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_1wrap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_wrap, "wrap(elm: 'UI_element') -> 'float'");
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_1wrap = {"wrap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_1wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_wrap};
static PyObject *__pyx_pw_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_1wrap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_elm = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elm,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elm,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_elm)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "wrap") < 0)) __PYX_ERR(1, 67, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_elm = ((struct __pyx_obj_6pyglui_2ui_UI_element *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrap", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 67, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elm), __pyx_ptype_6pyglui_2ui_UI_element, 1, "elm", 0))) __PYX_ERR(1, 67, __pyx_L1_error)
  __pyx_r = __pyx_pf_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_wrap(__pyx_self, __pyx_v_elm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_wrap(PyObject *__pyx_self, struct __pyx_obj_6pyglui_2ui_UI_element *__pyx_v_elm) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm *__pyx_cur_scope;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrap", 0);
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":69
 *     def wrap(UI_element elm):
 *         """wrap(elm: 'UI_element') -> 'float'"""
 *         return f(elm)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_elm); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 69, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cfunc.to_py":67
 * @cname("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm")
 * cdef object __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*f)(UI_element) except *):
 *     def wrap(UI_element elm):             # <<<<<<<<<<<<<<
 *         """wrap(elm: 'UI_element') -> 'float'"""
 *         return f(elm)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cfunc.to_py":66
 * 
 * @cname("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm")
 * cdef object __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*f)(UI_element) except *):             # <<<<<<<<<<<<<<
 *     def wrap(UI_element elm):
 *         """wrap(elm: 'UI_element') -> 'float'"""
 */

static PyObject *__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*__pyx_v_f)(struct __pyx_obj_6pyglui_2ui_UI_element *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm *__pyx_cur_scope;
  PyObject *__pyx_v_wrap = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm", 0);
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 66, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":67
 * @cname("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm")
 * cdef object __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*f)(UI_element) except *):
 *     def wrap(UI_element elm):             # <<<<<<<<<<<<<<
 *         """wrap(elm: 'UI_element') -> 'float'"""
 *         return f(elm)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_54__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_1wrap, 0, __pyx_n_s_Pyx_CFunc_float__lParenUI_elem, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrap = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cfunc.to_py":70
 *         """wrap(elm: 'UI_element') -> 'float'"""
 *         return f(elm)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrap);
  __pyx_r = __pyx_v_wrap;
  goto __pyx_L0;

  /* "cfunc.to_py":66
 * 
 * @cname("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm")
 * cdef object __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*f)(UI_element) except *):             # <<<<<<<<<<<<<<
 *     def wrap(UI_element elm):
 *         """wrap(elm: 'UI_element') -> 'float'"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrap);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_6pyglui_2ui_UI __pyx_vtable_6pyglui_2ui_UI;

static PyObject *__pyx_tp_new_6pyglui_2ui_UI(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_UI *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pyglui_2ui_UI *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pyglui_2ui_UI;
  new((void*)&(p->ui_layer)) __pyx_t_6pyglui_2ui_fbo_tex_id();
  new((void*)&(p->overlay_layer)) __pyx_t_6pyglui_2ui_fbo_tex_id();
  p->new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)Py_None); Py_INCREF(Py_None);
  p->elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->window = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_2UI_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_UI(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_UI *p = (struct __pyx_obj_6pyglui_2ui_UI *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_UI) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->ui_layer);
  __Pyx_call_destructor(p->overlay_layer);
  Py_CLEAR(p->new_input);
  Py_CLEAR(p->elements);
  Py_CLEAR(p->window);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_UI(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_UI *p = (struct __pyx_obj_6pyglui_2ui_UI *)o;
  if (p->new_input) {
    e = (*v)(((PyObject *)p->new_input), a); if (e) return e;
  }
  if (p->elements) {
    e = (*v)(p->elements, a); if (e) return e;
  }
  if (p->window) {
    e = (*v)(((PyObject *)p->window), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_UI(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_UI *p = (struct __pyx_obj_6pyglui_2ui_UI *)o;
  tmp = ((PyObject*)p->new_input);
  p->new_input = ((struct __pyx_obj_6pyglui_2ui_Input *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->elements);
  p->elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->window);
  p->window = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_6pyglui_2ui_UI(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_6pyglui_2ui_UI(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_2UI_37__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_2UI_39__delitem__(o, i);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_2UI_configuration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_2UI_13configuration_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_2UI_configuration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_2UI_13configuration_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_2UI_scale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_2UI_5scale_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_2UI_scale(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_2UI_5scale_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_2UI_elements(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_2UI_8elements_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_2UI_elements(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_2UI_8elements_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_2UI_8elements_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_UI[] = {
  {"add_font", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_5add_font, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"terminate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_7terminate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"update_mouse", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_9update_mouse, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"update_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_11update_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"update_scroll", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_13update_scroll, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"update_key", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_15update_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"update_char", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_17update_char, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"update_button", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_19update_button, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"update_clipboard", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_21update_clipboard, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_23update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"collect_menus", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_25collect_menus, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"append", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_27append, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"extend", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_29extend, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_31remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_43__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_2UI_45__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_UI[] = {
  {(char *)"configuration", __pyx_getprop_6pyglui_2ui_2UI_configuration, __pyx_setprop_6pyglui_2ui_2UI_configuration, (char *)0, 0},
  {(char *)"scale", __pyx_getprop_6pyglui_2ui_2UI_scale, __pyx_setprop_6pyglui_2ui_2UI_scale, (char *)0, 0},
  {(char *)"elements", __pyx_getprop_6pyglui_2ui_2UI_elements, __pyx_setprop_6pyglui_2ui_2UI_elements, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_UI_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_UI},
  {Py_sq_length, (void *)__pyx_pw_6pyglui_2ui_2UI_33__len__},
  {Py_sq_item, (void *)__pyx_sq_item_6pyglui_2ui_UI},
  {Py_sq_contains, (void *)__pyx_pw_6pyglui_2ui_2UI_41__contains__},
  {Py_mp_length, (void *)__pyx_pw_6pyglui_2ui_2UI_33__len__},
  {Py_mp_subscript, (void *)__pyx_pw_6pyglui_2ui_2UI_35__getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_6pyglui_2ui_UI},
  {Py_tp_doc, (void *)PyDoc_STR("\n    The UI context for a glfw window.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_UI},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_UI},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_UI},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_UI},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_2UI_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_UI},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_UI_spec = {
  "pyglui.ui.UI",
  sizeof(struct __pyx_obj_6pyglui_2ui_UI),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_UI_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_UI = {
  __pyx_pw_6pyglui_2ui_2UI_33__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6pyglui_2ui_UI, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_6pyglui_2ui_2UI_41__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_UI = {
  __pyx_pw_6pyglui_2ui_2UI_33__len__, /*mp_length*/
  __pyx_pw_6pyglui_2ui_2UI_35__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6pyglui_2ui_UI, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6pyglui_2ui_UI = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""UI", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_UI), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_UI, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_UI, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_UI, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    The UI context for a glfw window.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_UI, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_UI, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_UI, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_UI, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_2UI_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_UI, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_UI_element __pyx_vtable_6pyglui_2ui_UI_element;

static PyObject *__pyx_tp_new_6pyglui_2ui_UI_element(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_UI_element *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pyglui_2ui_UI_element *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pyglui_2ui_UI_element;
  p->uid = Py_None; Py_INCREF(Py_None);
  p->outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->_label = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pyglui_2ui_UI_element(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_UI_element *p = (struct __pyx_obj_6pyglui_2ui_UI_element *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_UI_element) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->uid);
  Py_CLEAR(p->outline);
  Py_CLEAR(p->_label);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_UI_element(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_UI_element *p = (struct __pyx_obj_6pyglui_2ui_UI_element *)o;
  if (p->uid) {
    e = (*v)(p->uid, a); if (e) return e;
  }
  if (p->outline) {
    e = (*v)(((PyObject *)p->outline), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_UI_element(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_UI_element *p = (struct __pyx_obj_6pyglui_2ui_UI_element *)o;
  tmp = ((PyObject*)p->uid);
  p->uid = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->outline);
  p->outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_10UI_element_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_10UI_element_5width_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_10UI_element_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_10UI_element_6height_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_10UI_element_read_only(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_10UI_element_9read_only_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_10UI_element_read_only(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_10UI_element_9read_only_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_10UI_element_label(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_10UI_element_5label_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_10UI_element_label(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_10UI_element_5label_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_10UI_element_order(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_10UI_element_5order_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_10UI_element_order(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_10UI_element_5order_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_10UI_element_uid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_10UI_element_3uid_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_10UI_element_outline(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_10UI_element_7outline_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_10UI_element_outline(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_10UI_element_7outline_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_10UI_element_7outline_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_UI_element[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10UI_element_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_UI_element[] = {
  {(char *)"width", __pyx_getprop_6pyglui_2ui_10UI_element_width, 0, (char *)0, 0},
  {(char *)"height", __pyx_getprop_6pyglui_2ui_10UI_element_height, 0, (char *)0, 0},
  {(char *)"read_only", __pyx_getprop_6pyglui_2ui_10UI_element_read_only, __pyx_setprop_6pyglui_2ui_10UI_element_read_only, (char *)0, 0},
  {(char *)"label", __pyx_getprop_6pyglui_2ui_10UI_element_label, __pyx_setprop_6pyglui_2ui_10UI_element_label, (char *)0, 0},
  {(char *)"order", __pyx_getprop_6pyglui_2ui_10UI_element_order, __pyx_setprop_6pyglui_2ui_10UI_element_order, (char *)0, 0},
  {(char *)"uid", __pyx_getprop_6pyglui_2ui_10UI_element_uid, 0, (char *)0, 0},
  {(char *)"outline", __pyx_getprop_6pyglui_2ui_10UI_element_outline, __pyx_setprop_6pyglui_2ui_10UI_element_outline, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_UI_element_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_UI_element},
  {Py_tp_doc, (void *)PyDoc_STR("\n    The base class for all UI elements.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_UI_element},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_UI_element},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_UI_element},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_UI_element},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_UI_element},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_UI_element_spec = {
  "pyglui.ui.UI_element",
  sizeof(struct __pyx_obj_6pyglui_2ui_UI_element),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_UI_element_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_UI_element = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""UI_element", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_UI_element), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_UI_element, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    The base class for all UI elements.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_UI_element, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_UI_element, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_UI_element, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_UI_element, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_UI_element, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Slider __pyx_vtable_6pyglui_2ui_Slider;

static PyObject *__pyx_tp_new_6pyglui_2ui_Slider(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Slider *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Slider *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Slider;
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->slider_pos = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->line_default_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->line_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->button_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->button_selected_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->step_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->label_field = ((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_6Slider_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Slider(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Slider *p = (struct __pyx_obj_6pyglui_2ui_Slider *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Slider) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->field);
  Py_CLEAR(p->slider_pos);
  Py_CLEAR(p->sync_val);
  Py_CLEAR(p->line_default_color);
  Py_CLEAR(p->line_highlight_color);
  Py_CLEAR(p->text_color);
  Py_CLEAR(p->button_color);
  Py_CLEAR(p->button_selected_color);
  Py_CLEAR(p->button_shadow_color);
  Py_CLEAR(p->step_color);
  Py_CLEAR(p->label_field);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Slider(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Slider *p = (struct __pyx_obj_6pyglui_2ui_Slider *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->field) {
    e = (*v)(((PyObject *)p->field), a); if (e) return e;
  }
  if (p->slider_pos) {
    e = (*v)(((PyObject *)p->slider_pos), a); if (e) return e;
  }
  if (p->sync_val) {
    e = (*v)(((PyObject *)p->sync_val), a); if (e) return e;
  }
  if (p->line_default_color) {
    e = (*v)(((PyObject *)p->line_default_color), a); if (e) return e;
  }
  if (p->line_highlight_color) {
    e = (*v)(((PyObject *)p->line_highlight_color), a); if (e) return e;
  }
  if (p->text_color) {
    e = (*v)(((PyObject *)p->text_color), a); if (e) return e;
  }
  if (p->button_color) {
    e = (*v)(((PyObject *)p->button_color), a); if (e) return e;
  }
  if (p->button_selected_color) {
    e = (*v)(((PyObject *)p->button_selected_color), a); if (e) return e;
  }
  if (p->button_shadow_color) {
    e = (*v)(((PyObject *)p->button_shadow_color), a); if (e) return e;
  }
  if (p->step_color) {
    e = (*v)(((PyObject *)p->step_color), a); if (e) return e;
  }
  if (p->label_field) {
    e = (*v)(((PyObject *)p->label_field), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Slider(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Slider *p = (struct __pyx_obj_6pyglui_2ui_Slider *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->field);
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->slider_pos);
  p->slider_pos = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sync_val);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->line_default_color);
  p->line_default_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->line_highlight_color);
  p->line_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->text_color);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button_color);
  p->button_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button_selected_color);
  p->button_selected_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button_shadow_color);
  p->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->step_color);
  p->step_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->label_field);
  p->label_field = ((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Slider_display_format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Slider_14display_format_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Slider_display_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Slider_14display_format_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Slider_minimum(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Slider_7minimum_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Slider_minimum(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Slider_7minimum_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Slider_maximum(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Slider_7maximum_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Slider_maximum(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Slider_7maximum_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Slider_step(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Slider_4step_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Slider_step(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Slider_4step_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Slider_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Slider_5field_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Slider_field(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Slider_5field_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_6Slider_5field_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Slider[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Slider_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Slider_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Slider[] = {
  {(char *)"display_format", __pyx_getprop_6pyglui_2ui_6Slider_display_format, __pyx_setprop_6pyglui_2ui_6Slider_display_format, (char *)0, 0},
  {(char *)"minimum", __pyx_getprop_6pyglui_2ui_6Slider_minimum, __pyx_setprop_6pyglui_2ui_6Slider_minimum, (char *)0, 0},
  {(char *)"maximum", __pyx_getprop_6pyglui_2ui_6Slider_maximum, __pyx_setprop_6pyglui_2ui_6Slider_maximum, (char *)0, 0},
  {(char *)"step", __pyx_getprop_6pyglui_2ui_6Slider_step, __pyx_setprop_6pyglui_2ui_6Slider_step, (char *)0, 0},
  {(char *)"field", __pyx_getprop_6pyglui_2ui_6Slider_field, __pyx_setprop_6pyglui_2ui_6Slider_field, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Slider_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Slider},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Slider},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Slider},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Slider},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Slider},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_6Slider_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Slider},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Slider_spec = {
  "pyglui.ui.Slider",
  sizeof(struct __pyx_obj_6pyglui_2ui_Slider),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Slider_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Slider = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Slider", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Slider), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Slider, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Slider, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Slider, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Slider, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Slider, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_6Slider_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Slider, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Switch __pyx_vtable_6pyglui_2ui_Switch;

static PyObject *__pyx_tp_new_6pyglui_2ui_Switch(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Switch *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Switch *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Switch;
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->button_color_on = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->button_color_off = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->button_selected_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_6Switch_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Switch(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Switch *p = (struct __pyx_obj_6pyglui_2ui_Switch *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Switch) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->field);
  Py_CLEAR(p->button);
  Py_CLEAR(p->sync_val);
  Py_CLEAR(p->text_color);
  Py_CLEAR(p->button_color_on);
  Py_CLEAR(p->button_color_off);
  Py_CLEAR(p->button_shadow_color);
  Py_CLEAR(p->button_selected_color);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Switch(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Switch *p = (struct __pyx_obj_6pyglui_2ui_Switch *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->field) {
    e = (*v)(((PyObject *)p->field), a); if (e) return e;
  }
  if (p->button) {
    e = (*v)(((PyObject *)p->button), a); if (e) return e;
  }
  if (p->sync_val) {
    e = (*v)(((PyObject *)p->sync_val), a); if (e) return e;
  }
  if (p->text_color) {
    e = (*v)(((PyObject *)p->text_color), a); if (e) return e;
  }
  if (p->button_color_on) {
    e = (*v)(((PyObject *)p->button_color_on), a); if (e) return e;
  }
  if (p->button_color_off) {
    e = (*v)(((PyObject *)p->button_color_off), a); if (e) return e;
  }
  if (p->button_shadow_color) {
    e = (*v)(((PyObject *)p->button_shadow_color), a); if (e) return e;
  }
  if (p->button_selected_color) {
    e = (*v)(((PyObject *)p->button_selected_color), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Switch(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Switch *p = (struct __pyx_obj_6pyglui_2ui_Switch *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->field);
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button);
  p->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sync_val);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->text_color);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button_color_on);
  p->button_color_on = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button_color_off);
  p->button_color_off = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button_shadow_color);
  p->button_shadow_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button_selected_color);
  p->button_selected_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Switch_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Switch_5field_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Switch_field(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Switch_5field_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_6Switch_5field_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Switch_button(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Switch_6button_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Switch_button(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Switch_6button_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_6Switch_6button_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Switch[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Switch_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Switch_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Switch[] = {
  {(char *)"field", __pyx_getprop_6pyglui_2ui_6Switch_field, __pyx_setprop_6pyglui_2ui_6Switch_field, (char *)0, 0},
  {(char *)"button", __pyx_getprop_6pyglui_2ui_6Switch_button, __pyx_setprop_6pyglui_2ui_6Switch_button, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Switch_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Switch},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Switch},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Switch},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Switch},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Switch},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_6Switch_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Switch},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Switch_spec = {
  "pyglui.ui.Switch",
  sizeof(struct __pyx_obj_6pyglui_2ui_Switch),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Switch_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Switch = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Switch", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Switch), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Switch, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Switch, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Switch, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Switch, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Switch, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_6Switch_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Switch, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Selector __pyx_vtable_6pyglui_2ui_Selector;

static PyObject *__pyx_tp_new_6pyglui_2ui_Selector(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Selector *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Selector *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Selector;
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->select_field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->selection = Py_None; Py_INCREF(Py_None);
  p->selection_labels = Py_None; Py_INCREF(Py_None);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->triangle_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->selection_getter = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_8Selector_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Selector(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Selector *p = (struct __pyx_obj_6pyglui_2ui_Selector *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Selector) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->field);
  Py_CLEAR(p->select_field);
  Py_CLEAR(p->selection);
  Py_CLEAR(p->selection_labels);
  Py_CLEAR(p->sync_val);
  Py_CLEAR(p->text_color);
  Py_CLEAR(p->triangle_color);
  Py_CLEAR(p->selection_getter);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Selector(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Selector *p = (struct __pyx_obj_6pyglui_2ui_Selector *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->field) {
    e = (*v)(((PyObject *)p->field), a); if (e) return e;
  }
  if (p->select_field) {
    e = (*v)(((PyObject *)p->select_field), a); if (e) return e;
  }
  if (p->selection) {
    e = (*v)(p->selection, a); if (e) return e;
  }
  if (p->selection_labels) {
    e = (*v)(p->selection_labels, a); if (e) return e;
  }
  if (p->sync_val) {
    e = (*v)(((PyObject *)p->sync_val), a); if (e) return e;
  }
  if (p->text_color) {
    e = (*v)(((PyObject *)p->text_color), a); if (e) return e;
  }
  if (p->triangle_color) {
    e = (*v)(((PyObject *)p->triangle_color), a); if (e) return e;
  }
  if (p->selection_getter) {
    e = (*v)(p->selection_getter, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Selector(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Selector *p = (struct __pyx_obj_6pyglui_2ui_Selector *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->field);
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->select_field);
  p->select_field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->selection);
  p->selection = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->selection_labels);
  p->selection_labels = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sync_val);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->text_color);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->triangle_color);
  p->triangle_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->selection_getter);
  p->selection_getter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Selector_field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Selector_5field_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Selector_field(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Selector_5field_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_8Selector_5field_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Selector[] = {
  {"_on_change", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_7_on_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Selector_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Selector[] = {
  {(char *)"field", __pyx_getprop_6pyglui_2ui_8Selector_field, __pyx_setprop_6pyglui_2ui_8Selector_field, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Selector_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Selector},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Selector},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Selector},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Selector},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Selector},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_8Selector_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Selector},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Selector_spec = {
  "pyglui.ui.Selector",
  sizeof(struct __pyx_obj_6pyglui_2ui_Selector),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Selector_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Selector = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Selector", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Selector), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Selector, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Selector, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Selector, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Selector, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Selector, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_8Selector_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Selector, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Text_Input __pyx_vtable_6pyglui_2ui_Text_Input;

static PyObject *__pyx_tp_new_6pyglui_2ui_Text_Input(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Text_Input *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Text_Input *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Text_Input;
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->textfield = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->preview = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->text_input_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->text_input_line_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->data_type = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_10Text_Input_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Text_Input(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Text_Input *p = (struct __pyx_obj_6pyglui_2ui_Text_Input *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Text_Input) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->field);
  Py_CLEAR(p->textfield);
  Py_CLEAR(p->sync_val);
  Py_CLEAR(p->preview);
  Py_CLEAR(p->text_color);
  Py_CLEAR(p->text_input_highlight_color);
  Py_CLEAR(p->text_input_line_highlight_color);
  Py_CLEAR(p->data_type);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Text_Input(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Text_Input *p = (struct __pyx_obj_6pyglui_2ui_Text_Input *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->field) {
    e = (*v)(((PyObject *)p->field), a); if (e) return e;
  }
  if (p->textfield) {
    e = (*v)(((PyObject *)p->textfield), a); if (e) return e;
  }
  if (p->sync_val) {
    e = (*v)(((PyObject *)p->sync_val), a); if (e) return e;
  }
  if (p->text_color) {
    e = (*v)(((PyObject *)p->text_color), a); if (e) return e;
  }
  if (p->text_input_highlight_color) {
    e = (*v)(((PyObject *)p->text_input_highlight_color), a); if (e) return e;
  }
  if (p->text_input_line_highlight_color) {
    e = (*v)(((PyObject *)p->text_input_line_highlight_color), a); if (e) return e;
  }
  if (p->data_type) {
    e = (*v)(p->data_type, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Text_Input(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Text_Input *p = (struct __pyx_obj_6pyglui_2ui_Text_Input *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->field);
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->textfield);
  p->textfield = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sync_val);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->text_color);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->text_input_highlight_color);
  p->text_input_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->text_input_line_highlight_color);
  p->text_input_line_highlight_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->data_type);
  p->data_type = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_10Text_Input_sync_val(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_10Text_Input_8sync_val_1__get__(o);
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Text_Input[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10Text_Input_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_10Text_Input_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Text_Input[] = {
  {(char *)"sync_val", __pyx_getprop_6pyglui_2ui_10Text_Input_sync_val, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Text_Input_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Text_Input},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Text input field.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Text_Input},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Text_Input},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Text_Input},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Text_Input},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_10Text_Input_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Text_Input},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Text_Input_spec = {
  "pyglui.ui.Text_Input",
  sizeof(struct __pyx_obj_6pyglui_2ui_Text_Input),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Text_Input_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Text_Input = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Text_Input", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Text_Input), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Text_Input, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Text input field.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Text_Input, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Text_Input, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Text_Input, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Text_Input, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_10Text_Input_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Text_Input, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Slider_Text_Input __pyx_vtable_6pyglui_2ui_Slider_Text_Input;

static PyObject *__pyx_tp_new_6pyglui_2ui_Slider_Text_Input(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Text_Input(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Slider_Text_Input;
  p->validator = Py_None; Py_INCREF(Py_None);
  p->display_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_17Slider_Text_Input_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Slider_Text_Input(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *p = (struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Slider_Text_Input) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->validator);
  Py_CLEAR(p->display_format);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_Text_Input(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Slider_Text_Input(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *p = (struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_Text_Input(o, v, a); if (e) return e;
  if (p->validator) {
    e = (*v)(p->validator, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Slider_Text_Input(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *p = (struct __pyx_obj_6pyglui_2ui_Slider_Text_Input *)o;
  __pyx_tp_clear_6pyglui_2ui_Text_Input(o);
  tmp = ((PyObject*)p->validator);
  p->validator = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_17Slider_Text_Input_validator(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_17Slider_Text_Input_validator(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_17Slider_Text_Input_9validator_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_17Slider_Text_Input_display_format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_17Slider_Text_Input_display_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_17Slider_Text_Input_14display_format_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Slider_Text_Input[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_17Slider_Text_Input_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_17Slider_Text_Input_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Slider_Text_Input[] = {
  {(char *)"validator", __pyx_getprop_6pyglui_2ui_17Slider_Text_Input_validator, __pyx_setprop_6pyglui_2ui_17Slider_Text_Input_validator, (char *)0, 0},
  {(char *)"display_format", __pyx_getprop_6pyglui_2ui_17Slider_Text_Input_display_format, __pyx_setprop_6pyglui_2ui_17Slider_Text_Input_display_format, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Slider_Text_Input_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Slider_Text_Input},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Slider_Text_Input},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Slider_Text_Input},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Slider_Text_Input},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Slider_Text_Input},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Slider_Text_Input},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Slider_Text_Input_spec = {
  "pyglui.ui.Slider_Text_Input",
  sizeof(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Slider_Text_Input_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Slider_Text_Input = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Slider_Text_Input", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Slider_Text_Input), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Slider_Text_Input, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Slider_Text_Input, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Slider_Text_Input, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Slider_Text_Input, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Slider_Text_Input, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6pyglui_2ui_10Text_Input_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Slider_Text_Input, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Button __pyx_vtable_6pyglui_2ui_Button;

static PyObject *__pyx_tp_new_6pyglui_2ui_Button(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Button *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Button *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Button;
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->function = Py_None; Py_INCREF(Py_None);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->_outer_label = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_6Button_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Button(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Button *p = (struct __pyx_obj_6pyglui_2ui_Button *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Button) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->field);
  Py_CLEAR(p->button);
  Py_CLEAR(p->function);
  Py_CLEAR(p->text_color);
  Py_CLEAR(p->_outer_label);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Button(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Button *p = (struct __pyx_obj_6pyglui_2ui_Button *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->field) {
    e = (*v)(((PyObject *)p->field), a); if (e) return e;
  }
  if (p->button) {
    e = (*v)(((PyObject *)p->button), a); if (e) return e;
  }
  if (p->function) {
    e = (*v)(p->function, a); if (e) return e;
  }
  if (p->text_color) {
    e = (*v)(((PyObject *)p->text_color), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Button(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Button *p = (struct __pyx_obj_6pyglui_2ui_Button *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->field);
  p->field = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->button);
  p->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->function);
  p->function = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->text_color);
  p->text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Button_outer_label(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Button_11outer_label_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Button_outer_label(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Button_11outer_label_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_6Button_function(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6Button_8function_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_6Button_function(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_6Button_8function_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_6Button_8function_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Button[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Button_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6Button_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Button[] = {
  {(char *)"outer_label", __pyx_getprop_6pyglui_2ui_6Button_outer_label, __pyx_setprop_6pyglui_2ui_6Button_outer_label, (char *)0, 0},
  {(char *)"function", __pyx_getprop_6pyglui_2ui_6Button_function, __pyx_setprop_6pyglui_2ui_6Button_function, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Button_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Button},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Button},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Button},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Button},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Button},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_6Button_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Button},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Button_spec = {
  "pyglui.ui.Button",
  sizeof(struct __pyx_obj_6pyglui_2ui_Button),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Button_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Button = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Button", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Button), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Button, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Button, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Button, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Button, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Button, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_6Button_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Button, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Separator __pyx_vtable_6pyglui_2ui_Separator;

static PyObject *__pyx_tp_new_6pyglui_2ui_Separator(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Separator *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Separator *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Separator;
  if (unlikely(__pyx_pw_6pyglui_2ui_9Separator_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Separator[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Separator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Separator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Separator_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_UI_element},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_UI_element},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Separator},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_9Separator_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Separator},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Separator_spec = {
  "pyglui.ui.Separator",
  sizeof(struct __pyx_obj_6pyglui_2ui_Separator),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Separator_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Separator = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Separator", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Separator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_UI_element, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_UI_element, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_UI_element, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Separator, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_9Separator_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Separator, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Info_Text __pyx_vtable_6pyglui_2ui_Info_Text;

static PyObject *__pyx_tp_new_6pyglui_2ui_Info_Text(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Info_Text *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Info_Text *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Info_Text;
  p->_text = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->text_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->_text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_9Info_Text_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Info_Text(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Info_Text *p = (struct __pyx_obj_6pyglui_2ui_Info_Text *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Info_Text) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_text);
  Py_CLEAR(p->text_area);
  Py_CLEAR(p->_text_color);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Info_Text(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Info_Text *p = (struct __pyx_obj_6pyglui_2ui_Info_Text *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->text_area) {
    e = (*v)(((PyObject *)p->text_area), a); if (e) return e;
  }
  if (p->_text_color) {
    e = (*v)(((PyObject *)p->_text_color), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Info_Text(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Info_Text *p = (struct __pyx_obj_6pyglui_2ui_Info_Text *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->text_area);
  p->text_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_text_color);
  p->_text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Info_Text_text(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Info_Text_4text_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Info_Text_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Info_Text_4text_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Info_Text_text_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Info_Text_9text_size_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Info_Text_text_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Info_Text_9text_size_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Info_Text_text_color(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Info_Text_10text_color_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Info_Text_text_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Info_Text_10text_color_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Info_Text_centered(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Info_Text_8centered_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Info_Text_centered(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Info_Text_8centered_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Info_Text[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Info_Text_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Info_Text_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Info_Text[] = {
  {(char *)"text", __pyx_getprop_6pyglui_2ui_9Info_Text_text, __pyx_setprop_6pyglui_2ui_9Info_Text_text, (char *)0, 0},
  {(char *)"text_size", __pyx_getprop_6pyglui_2ui_9Info_Text_text_size, __pyx_setprop_6pyglui_2ui_9Info_Text_text_size, (char *)0, 0},
  {(char *)"text_color", __pyx_getprop_6pyglui_2ui_9Info_Text_text_color, __pyx_setprop_6pyglui_2ui_9Info_Text_text_color, (char *)0, 0},
  {(char *)"centered", __pyx_getprop_6pyglui_2ui_9Info_Text_centered, __pyx_setprop_6pyglui_2ui_9Info_Text_centered, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Info_Text_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Info_Text},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Info_Text},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Info_Text},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Info_Text},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Info_Text},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_9Info_Text_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Info_Text},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Info_Text_spec = {
  "pyglui.ui.Info_Text",
  sizeof(struct __pyx_obj_6pyglui_2ui_Info_Text),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Info_Text_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Info_Text = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Info_Text", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Info_Text), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Info_Text, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Info_Text, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Info_Text, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Info_Text, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Info_Text, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_9Info_Text_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Info_Text, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Color_Legend __pyx_vtable_6pyglui_2ui_Color_Legend;

static PyObject *__pyx_tp_new_6pyglui_2ui_Color_Legend(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Color_Legend *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Color_Legend *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Color_Legend;
  p->_text = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->text_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->_text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->_line_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_12Color_Legend_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Color_Legend(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Color_Legend *p = (struct __pyx_obj_6pyglui_2ui_Color_Legend *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Color_Legend) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_text);
  Py_CLEAR(p->text_area);
  Py_CLEAR(p->_text_color);
  Py_CLEAR(p->_line_color);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Color_Legend(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Color_Legend *p = (struct __pyx_obj_6pyglui_2ui_Color_Legend *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->text_area) {
    e = (*v)(((PyObject *)p->text_area), a); if (e) return e;
  }
  if (p->_text_color) {
    e = (*v)(((PyObject *)p->_text_color), a); if (e) return e;
  }
  if (p->_line_color) {
    e = (*v)(((PyObject *)p->_line_color), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Color_Legend(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Color_Legend *p = (struct __pyx_obj_6pyglui_2ui_Color_Legend *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->text_area);
  p->text_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_text_color);
  p->_text_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_line_color);
  p->_line_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Color_Legend[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Color_Legend_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Color_Legend_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Color_Legend_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Color_Legend},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Color_Legend},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Color_Legend},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Color_Legend},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_12Color_Legend_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Color_Legend},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Color_Legend_spec = {
  "pyglui.ui.Color_Legend",
  sizeof(struct __pyx_obj_6pyglui_2ui_Color_Legend),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Color_Legend_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Color_Legend = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Color_Legend", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Color_Legend), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Color_Legend, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Color_Legend, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Color_Legend, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Color_Legend, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_12Color_Legend_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Color_Legend, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Thumb __pyx_vtable_6pyglui_2ui_Thumb;

static PyObject *__pyx_tp_new_6pyglui_2ui_Thumb(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Thumb *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Thumb *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Thumb;
  p->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->label_font = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->_on_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->_off_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->_status_text = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->hotkey = Py_None; Py_INCREF(Py_None);
  p->label_getter = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_5Thumb_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Thumb(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Thumb *p = (struct __pyx_obj_6pyglui_2ui_Thumb *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Thumb) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->button);
  Py_CLEAR(p->label_font);
  Py_CLEAR(p->sync_val);
  Py_CLEAR(p->_on_color);
  Py_CLEAR(p->_off_color);
  Py_CLEAR(p->_status_text);
  Py_CLEAR(p->hotkey);
  Py_CLEAR(p->label_getter);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Thumb(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Thumb *p = (struct __pyx_obj_6pyglui_2ui_Thumb *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->button) {
    e = (*v)(((PyObject *)p->button), a); if (e) return e;
  }
  if (p->sync_val) {
    e = (*v)(((PyObject *)p->sync_val), a); if (e) return e;
  }
  if (p->_on_color) {
    e = (*v)(((PyObject *)p->_on_color), a); if (e) return e;
  }
  if (p->_off_color) {
    e = (*v)(((PyObject *)p->_off_color), a); if (e) return e;
  }
  if (p->hotkey) {
    e = (*v)(p->hotkey, a); if (e) return e;
  }
  if (p->label_getter) {
    e = (*v)(p->label_getter, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Thumb(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Thumb *p = (struct __pyx_obj_6pyglui_2ui_Thumb *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->button);
  p->button = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sync_val);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_on_color);
  p->_on_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_off_color);
  p->_off_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->hotkey);
  p->hotkey = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->label_getter);
  p->label_getter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Thumb_status_text(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Thumb_11status_text_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Thumb_status_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Thumb_11status_text_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Thumb_on_color(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Thumb_8on_color_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Thumb_on_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Thumb_8on_color_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Thumb_off_color(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Thumb_9off_color_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Thumb_off_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Thumb_9off_color_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Thumb_button(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Thumb_6button_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Thumb_button(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Thumb_6button_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_5Thumb_6button_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Thumb_label_font(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Thumb_10label_font_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Thumb_label_font(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Thumb_10label_font_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_5Thumb_10label_font_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Thumb[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Thumb_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Thumb_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Thumb[] = {
  {(char *)"status_text", __pyx_getprop_6pyglui_2ui_5Thumb_status_text, __pyx_setprop_6pyglui_2ui_5Thumb_status_text, (char *)0, 0},
  {(char *)"on_color", __pyx_getprop_6pyglui_2ui_5Thumb_on_color, __pyx_setprop_6pyglui_2ui_5Thumb_on_color, (char *)0, 0},
  {(char *)"off_color", __pyx_getprop_6pyglui_2ui_5Thumb_off_color, __pyx_setprop_6pyglui_2ui_5Thumb_off_color, (char *)0, 0},
  {(char *)"button", __pyx_getprop_6pyglui_2ui_5Thumb_button, __pyx_setprop_6pyglui_2ui_5Thumb_button, (char *)0, 0},
  {(char *)"label_font", __pyx_getprop_6pyglui_2ui_5Thumb_label_font, __pyx_setprop_6pyglui_2ui_5Thumb_label_font, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Thumb_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Thumb},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Not a classical UI element. Use button instead.\n    Thumb is a circular type of switch/button\n    It can also display status info via a overlay\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Thumb},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Thumb},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Thumb},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Thumb},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_5Thumb_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Thumb},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Thumb_spec = {
  "pyglui.ui.Thumb",
  sizeof(struct __pyx_obj_6pyglui_2ui_Thumb),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Thumb_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Thumb = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Thumb", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Thumb), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Thumb, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Not a classical UI element. Use button instead.\n    Thumb is a circular type of switch/button\n    It can also display status info via a overlay\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Thumb, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Thumb, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Thumb, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Thumb, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_5Thumb_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Thumb, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Icon __pyx_vtable_6pyglui_2ui_Icon;

static PyObject *__pyx_tp_new_6pyglui_2ui_Icon(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Icon *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Thumb(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Icon *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Icon;
  p->_tooltip = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_4Icon_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Icon(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Icon *p = (struct __pyx_obj_6pyglui_2ui_Icon *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Icon) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_tooltip);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_Thumb(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_4Icon_tooltip(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_4Icon_7tooltip_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_4Icon_tooltip(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_4Icon_7tooltip_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_4Icon_indicator_start(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_4Icon_15indicator_start_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_4Icon_indicator_start(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_4Icon_15indicator_start_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_4Icon_indicator_stop(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_4Icon_14indicator_stop_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_4Icon_indicator_stop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_4Icon_14indicator_stop_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Icon[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Icon_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Icon_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Icon[] = {
  {(char *)"tooltip", __pyx_getprop_6pyglui_2ui_4Icon_tooltip, __pyx_setprop_6pyglui_2ui_4Icon_tooltip, (char *)0, 0},
  {(char *)"indicator_start", __pyx_getprop_6pyglui_2ui_4Icon_indicator_start, __pyx_setprop_6pyglui_2ui_4Icon_indicator_start, (char *)0, 0},
  {(char *)"indicator_stop", __pyx_getprop_6pyglui_2ui_4Icon_indicator_stop, __pyx_setprop_6pyglui_2ui_4Icon_indicator_stop, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Icon_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Icon},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Thumb},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Thumb},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Icon},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Icon},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Icon},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Icon_spec = {
  "pyglui.ui.Icon",
  sizeof(struct __pyx_obj_6pyglui_2ui_Icon),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Icon_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Icon = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Icon", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Icon), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Icon, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Thumb, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Thumb, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Icon, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Icon, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6pyglui_2ui_5Thumb_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Icon, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Hot_Key __pyx_vtable_6pyglui_2ui_Hot_Key;

static PyObject *__pyx_tp_new_6pyglui_2ui_Hot_Key(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Hot_Key *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Hot_Key *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Hot_Key;
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->on_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->off_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->hotkey = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_7Hot_Key_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Hot_Key(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Hot_Key *p = (struct __pyx_obj_6pyglui_2ui_Hot_Key *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Hot_Key) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->sync_val);
  Py_CLEAR(p->on_color);
  Py_CLEAR(p->off_color);
  Py_CLEAR(p->hotkey);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Hot_Key(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Hot_Key *p = (struct __pyx_obj_6pyglui_2ui_Hot_Key *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->sync_val) {
    e = (*v)(((PyObject *)p->sync_val), a); if (e) return e;
  }
  if (p->on_color) {
    e = (*v)(((PyObject *)p->on_color), a); if (e) return e;
  }
  if (p->off_color) {
    e = (*v)(((PyObject *)p->off_color), a); if (e) return e;
  }
  if (p->hotkey) {
    e = (*v)(p->hotkey, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Hot_Key(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Hot_Key *p = (struct __pyx_obj_6pyglui_2ui_Hot_Key *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->sync_val);
  p->sync_val = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->on_color);
  p->on_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->off_color);
  p->off_color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->hotkey);
  p->hotkey = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_7Hot_Key_on_color(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_7Hot_Key_on_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_7Hot_Key_8on_color_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_7Hot_Key_off_color(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_7Hot_Key_off_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_7Hot_Key_9off_color_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Hot_Key[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_7Hot_Key_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_7Hot_Key_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Hot_Key[] = {
  {(char *)"on_color", __pyx_getprop_6pyglui_2ui_7Hot_Key_on_color, __pyx_setprop_6pyglui_2ui_7Hot_Key_on_color, (char *)0, 0},
  {(char *)"off_color", __pyx_getprop_6pyglui_2ui_7Hot_Key_off_color, __pyx_setprop_6pyglui_2ui_7Hot_Key_off_color, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Hot_Key_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Hot_Key},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Just a hotkey. Not displayed.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Hot_Key},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Hot_Key},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Hot_Key},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Hot_Key},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_7Hot_Key_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Hot_Key},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Hot_Key_spec = {
  "pyglui.ui.Hot_Key",
  sizeof(struct __pyx_obj_6pyglui_2ui_Hot_Key),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Hot_Key_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Hot_Key = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Hot_Key", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Hot_Key), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Hot_Key, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Just a hotkey. Not displayed.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Hot_Key, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Hot_Key, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Hot_Key, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Hot_Key, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_7Hot_Key_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Hot_Key, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Seek_Bar __pyx_vtable_6pyglui_2ui_Seek_Bar;

static PyObject *__pyx_tp_new_6pyglui_2ui_Seek_Bar(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Seek_Bar *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Seek_Bar *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Seek_Bar;
  p->point_click_seek_loc = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->bar = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->seek_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->trim_left_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->trim_right_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->trim_left = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->trim_right = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->playback_speed = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  p->recent_idx_ts_getter = Py_None; Py_INCREF(Py_None);
  p->playback_time_setter = Py_None; Py_INCREF(Py_None);
  p->seeking_cb = Py_None; Py_INCREF(Py_None);
  p->handle_start_reference = ((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)Py_None); Py_INCREF(Py_None);
  p->backwards = ((struct __pyx_obj_6pyglui_2ui_Icon *)Py_None); Py_INCREF(Py_None);
  p->play = ((struct __pyx_obj_6pyglui_2ui_Icon *)Py_None); Py_INCREF(Py_None);
  p->forwards = ((struct __pyx_obj_6pyglui_2ui_Icon *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_8Seek_Bar_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Seek_Bar(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Seek_Bar *p = (struct __pyx_obj_6pyglui_2ui_Seek_Bar *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Seek_Bar) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->point_click_seek_loc);
  Py_CLEAR(p->bar);
  Py_CLEAR(p->seek_handle);
  Py_CLEAR(p->trim_left_handle);
  Py_CLEAR(p->trim_right_handle);
  Py_CLEAR(p->trim_left);
  Py_CLEAR(p->trim_right);
  Py_CLEAR(p->playback_speed);
  Py_CLEAR(p->recent_idx_ts_getter);
  Py_CLEAR(p->playback_time_setter);
  Py_CLEAR(p->seeking_cb);
  Py_CLEAR(p->handle_start_reference);
  Py_CLEAR(p->backwards);
  Py_CLEAR(p->play);
  Py_CLEAR(p->forwards);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Seek_Bar(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Seek_Bar *p = (struct __pyx_obj_6pyglui_2ui_Seek_Bar *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->point_click_seek_loc) {
    e = (*v)(((PyObject *)p->point_click_seek_loc), a); if (e) return e;
  }
  if (p->bar) {
    e = (*v)(((PyObject *)p->bar), a); if (e) return e;
  }
  if (p->seek_handle) {
    e = (*v)(((PyObject *)p->seek_handle), a); if (e) return e;
  }
  if (p->trim_left_handle) {
    e = (*v)(((PyObject *)p->trim_left_handle), a); if (e) return e;
  }
  if (p->trim_right_handle) {
    e = (*v)(((PyObject *)p->trim_right_handle), a); if (e) return e;
  }
  if (p->trim_left) {
    e = (*v)(((PyObject *)p->trim_left), a); if (e) return e;
  }
  if (p->trim_right) {
    e = (*v)(((PyObject *)p->trim_right), a); if (e) return e;
  }
  if (p->playback_speed) {
    e = (*v)(((PyObject *)p->playback_speed), a); if (e) return e;
  }
  if (p->recent_idx_ts_getter) {
    e = (*v)(p->recent_idx_ts_getter, a); if (e) return e;
  }
  if (p->playback_time_setter) {
    e = (*v)(p->playback_time_setter, a); if (e) return e;
  }
  if (p->seeking_cb) {
    e = (*v)(p->seeking_cb, a); if (e) return e;
  }
  if (p->handle_start_reference) {
    e = (*v)(((PyObject *)p->handle_start_reference), a); if (e) return e;
  }
  if (p->backwards) {
    e = (*v)(((PyObject *)p->backwards), a); if (e) return e;
  }
  if (p->play) {
    e = (*v)(((PyObject *)p->play), a); if (e) return e;
  }
  if (p->forwards) {
    e = (*v)(((PyObject *)p->forwards), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Seek_Bar(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Seek_Bar *p = (struct __pyx_obj_6pyglui_2ui_Seek_Bar *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->point_click_seek_loc);
  p->point_click_seek_loc = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->bar);
  p->bar = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->seek_handle);
  p->seek_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->trim_left_handle);
  p->trim_left_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->trim_right_handle);
  p->trim_right_handle = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->trim_left);
  p->trim_left = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->trim_right);
  p->trim_right = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->playback_speed);
  p->playback_speed = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->recent_idx_ts_getter);
  p->recent_idx_ts_getter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->playback_time_setter);
  p->playback_time_setter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->seeking_cb);
  p->seeking_cb = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->handle_start_reference);
  p->handle_start_reference = ((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->backwards);
  p->backwards = ((struct __pyx_obj_6pyglui_2ui_Icon *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->play);
  p->play = ((struct __pyx_obj_6pyglui_2ui_Icon *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->forwards);
  p->forwards = ((struct __pyx_obj_6pyglui_2ui_Icon *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Seek_Bar_hovering(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Seek_Bar_8hovering_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Seek_Bar_seeking(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Seek_Bar_7seeking_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Seek_Bar_trimming_left(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Seek_Bar_13trimming_left_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Seek_Bar_trimming_right(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Seek_Bar_14trimming_right_1__get__(o);
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Seek_Bar[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Seek_Bar_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Seek_Bar[] = {
  {(char *)"hovering", __pyx_getprop_6pyglui_2ui_8Seek_Bar_hovering, 0, (char *)0, 0},
  {(char *)"seeking", __pyx_getprop_6pyglui_2ui_8Seek_Bar_seeking, 0, (char *)0, 0},
  {(char *)"trimming_left", __pyx_getprop_6pyglui_2ui_8Seek_Bar_trimming_left, 0, (char *)0, 0},
  {(char *)"trimming_right", __pyx_getprop_6pyglui_2ui_8Seek_Bar_trimming_right, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Seek_Bar_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Seek_Bar},
  {Py_tp_doc, (void *)PyDoc_STR("Seek bar that visualizes seek handles, trim marks and playback buttons\n\n    Hover modes (descending priority):\n        1   Seek handle is being hovered\n        2   Right trim mark handle is being hovered\n        3   Left trim mark handle is being hovered\n        4   Seek bar is being hovered\n        0   Seek bar is not being hovered\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Seek_Bar},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Seek_Bar},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Seek_Bar},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Seek_Bar},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_8Seek_Bar_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Seek_Bar},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Seek_Bar_spec = {
  "pyglui.ui.Seek_Bar",
  sizeof(struct __pyx_obj_6pyglui_2ui_Seek_Bar),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Seek_Bar_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Seek_Bar = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Seek_Bar", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Seek_Bar), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Seek_Bar, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("Seek bar that visualizes seek handles, trim marks and playback buttons\n\n    Hover modes (descending priority):\n        1   Seek handle is being hovered\n        2   Right trim mark handle is being hovered\n        3   Left trim mark handle is being hovered\n        4   Seek bar is being hovered\n        0   Seek bar is not being hovered\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Seek_Bar, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Seek_Bar, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Seek_Bar, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Seek_Bar, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_8Seek_Bar_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Seek_Bar, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Timeline __pyx_vtable_6pyglui_2ui_Timeline;

static PyObject *__pyx_tp_new_6pyglui_2ui_Timeline(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Timeline *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Timeline *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Timeline;
  p->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  p->draw_data = Py_None; Py_INCREF(Py_None);
  p->draw_label = Py_None; Py_INCREF(Py_None);
  p->data_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_8Timeline_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Timeline(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Timeline *p = (struct __pyx_obj_6pyglui_2ui_Timeline *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Timeline) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->color);
  Py_CLEAR(p->draw_data);
  Py_CLEAR(p->draw_label);
  Py_CLEAR(p->data_area);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Timeline(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Timeline *p = (struct __pyx_obj_6pyglui_2ui_Timeline *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->color) {
    e = (*v)(((PyObject *)p->color), a); if (e) return e;
  }
  if (p->draw_data) {
    e = (*v)(p->draw_data, a); if (e) return e;
  }
  if (p->draw_label) {
    e = (*v)(p->draw_label, a); if (e) return e;
  }
  if (p->data_area) {
    e = (*v)(((PyObject *)p->data_area), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Timeline(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Timeline *p = (struct __pyx_obj_6pyglui_2ui_Timeline *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->color);
  p->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->draw_data);
  p->draw_data = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->draw_label);
  p->draw_label = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->data_area);
  p->data_area = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Timeline_content_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Timeline_14content_height_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Timeline_content_height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Timeline_14content_height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Timeline_color(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Timeline_5color_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Timeline_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Timeline_5color_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_8Timeline_5color_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Timeline_point_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Timeline_10point_size_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Timeline_point_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Timeline_10point_size_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Timeline_xstart(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Timeline_6xstart_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Timeline_xstart(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Timeline_6xstart_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Timeline_xstop(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Timeline_5xstop_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Timeline_xstop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Timeline_5xstop_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Timeline_ystart(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Timeline_6ystart_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Timeline_ystart(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Timeline_6ystart_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Timeline_ystop(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Timeline_5ystop_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Timeline_ystop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Timeline_5ystop_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_8Timeline_ypad(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_8Timeline_4ypad_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_8Timeline_ypad(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_8Timeline_4ypad_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Timeline[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Timeline_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_8Timeline_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Timeline[] = {
  {(char *)"content_height", __pyx_getprop_6pyglui_2ui_8Timeline_content_height, __pyx_setprop_6pyglui_2ui_8Timeline_content_height, (char *)PyDoc_STR("gets scale-independent timeline height excluding vertical padding"), 0},
  {(char *)"color", __pyx_getprop_6pyglui_2ui_8Timeline_color, __pyx_setprop_6pyglui_2ui_8Timeline_color, (char *)0, 0},
  {(char *)"point_size", __pyx_getprop_6pyglui_2ui_8Timeline_point_size, __pyx_setprop_6pyglui_2ui_8Timeline_point_size, (char *)0, 0},
  {(char *)"xstart", __pyx_getprop_6pyglui_2ui_8Timeline_xstart, __pyx_setprop_6pyglui_2ui_8Timeline_xstart, (char *)0, 0},
  {(char *)"xstop", __pyx_getprop_6pyglui_2ui_8Timeline_xstop, __pyx_setprop_6pyglui_2ui_8Timeline_xstop, (char *)0, 0},
  {(char *)"ystart", __pyx_getprop_6pyglui_2ui_8Timeline_ystart, __pyx_setprop_6pyglui_2ui_8Timeline_ystart, (char *)0, 0},
  {(char *)"ystop", __pyx_getprop_6pyglui_2ui_8Timeline_ystop, __pyx_setprop_6pyglui_2ui_8Timeline_ystop, (char *)0, 0},
  {(char *)"ypad", __pyx_getprop_6pyglui_2ui_8Timeline_ypad, __pyx_setprop_6pyglui_2ui_8Timeline_ypad, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Timeline_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Timeline},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Timeline},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Timeline},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Timeline},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Timeline},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_8Timeline_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Timeline},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Timeline_spec = {
  "pyglui.ui.Timeline",
  sizeof(struct __pyx_obj_6pyglui_2ui_Timeline),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Timeline_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Timeline = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Timeline", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Timeline), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Timeline, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Timeline, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Timeline, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Timeline, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Timeline, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_8Timeline_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Timeline, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Base_Menu __pyx_vtable_6pyglui_2ui_Base_Menu;

static PyObject *__pyx_tp_new_6pyglui_2ui_Base_Menu(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Base_Menu *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_UI_element(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Base_Menu *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Base_Menu;
  p->elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None); Py_INCREF(Py_None);
  p->minimize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None); Py_INCREF(Py_None);
  p->resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None); Py_INCREF(Py_None);
  p->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Base_Menu(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Base_Menu *p = (struct __pyx_obj_6pyglui_2ui_Base_Menu *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Base_Menu) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->elements);
  Py_CLEAR(p->element_space);
  Py_CLEAR(p->menu_bar);
  Py_CLEAR(p->minimize_corner);
  Py_CLEAR(p->resize_corner);
  Py_CLEAR(p->color);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_UI_element(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Base_Menu(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Base_Menu *p = (struct __pyx_obj_6pyglui_2ui_Base_Menu *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_UI_element(o, v, a); if (e) return e;
  if (p->elements) {
    e = (*v)(p->elements, a); if (e) return e;
  }
  if (p->element_space) {
    e = (*v)(((PyObject *)p->element_space), a); if (e) return e;
  }
  if (p->menu_bar) {
    e = (*v)(((PyObject *)p->menu_bar), a); if (e) return e;
  }
  if (p->minimize_corner) {
    e = (*v)(((PyObject *)p->minimize_corner), a); if (e) return e;
  }
  if (p->resize_corner) {
    e = (*v)(((PyObject *)p->resize_corner), a); if (e) return e;
  }
  if (p->color) {
    e = (*v)(((PyObject *)p->color), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Base_Menu(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Base_Menu *p = (struct __pyx_obj_6pyglui_2ui_Base_Menu *)o;
  __pyx_tp_clear_6pyglui_2ui_UI_element(o);
  tmp = ((PyObject*)p->elements);
  p->elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->element_space);
  p->element_space = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->menu_bar);
  p->menu_bar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->minimize_corner);
  p->minimize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->resize_corner);
  p->resize_corner = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->color);
  p->color = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_6pyglui_2ui_Base_Menu(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_6pyglui_2ui_Base_Menu(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Base_Menu_15__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_9Base_Menu_17__delitem__(o, i);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Base_Menu_elements(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Base_Menu_8elements_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Base_Menu_elements(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Base_Menu_8elements_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_9Base_Menu_8elements_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Base_Menu_header_pos_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Base_Menu_13header_pos_id_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Base_Menu_color(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Base_Menu_5color_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Base_Menu_color(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Base_Menu_5color_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_9Base_Menu_5color_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Base_Menu[] = {
  {"append", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_3append, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"insert", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_5insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"extend", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_7extend, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_9remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"collect_in_window", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_23collect_in_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Base_Menu_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Base_Menu[] = {
  {(char *)"elements", __pyx_getprop_6pyglui_2ui_9Base_Menu_elements, __pyx_setprop_6pyglui_2ui_9Base_Menu_elements, (char *)0, 0},
  {(char *)"header_pos_id", __pyx_getprop_6pyglui_2ui_9Base_Menu_header_pos_id, 0, (char *)0, 0},
  {(char *)"color", __pyx_getprop_6pyglui_2ui_9Base_Menu_color, __pyx_setprop_6pyglui_2ui_9Base_Menu_color, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Base_Menu_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Base_Menu},
  {Py_nb_bool, (void *)__pyx_pw_6pyglui_2ui_9Base_Menu_21__bool__},
  {Py_sq_length, (void *)__pyx_pw_6pyglui_2ui_9Base_Menu_11__len__},
  {Py_sq_item, (void *)__pyx_sq_item_6pyglui_2ui_Base_Menu},
  {Py_sq_contains, (void *)__pyx_pw_6pyglui_2ui_9Base_Menu_19__contains__},
  {Py_mp_length, (void *)__pyx_pw_6pyglui_2ui_9Base_Menu_11__len__},
  {Py_mp_subscript, (void *)__pyx_pw_6pyglui_2ui_9Base_Menu_13__getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_6pyglui_2ui_Base_Menu},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Base class that other menu inherit from. Dont use this.\n    This contains all methods/attributed shared by all derived menus.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Base_Menu},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Base_Menu},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Base_Menu},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Base_Menu},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Base_Menu},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Base_Menu_spec = {
  "pyglui.ui.Base_Menu",
  sizeof(struct __pyx_obj_6pyglui_2ui_Base_Menu),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Base_Menu_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_Base_Menu = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_6pyglui_2ui_9Base_Menu_21__bool__, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Base_Menu = {
  __pyx_pw_6pyglui_2ui_9Base_Menu_11__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6pyglui_2ui_Base_Menu, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_6pyglui_2ui_9Base_Menu_19__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Base_Menu = {
  __pyx_pw_6pyglui_2ui_9Base_Menu_11__len__, /*mp_length*/
  __pyx_pw_6pyglui_2ui_9Base_Menu_13__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6pyglui_2ui_Base_Menu, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6pyglui_2ui_Base_Menu = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Base_Menu", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Base_Menu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Base_Menu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Base_Menu, /*tp_as_number*/
  &__pyx_tp_as_sequence_Base_Menu, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Base_Menu, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Base class that other menu inherit from. Dont use this.\n    This contains all methods/attributed shared by all derived menus.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Base_Menu, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Base_Menu, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Base_Menu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Base_Menu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Base_Menu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Movable_Menu __pyx_vtable_6pyglui_2ui_Movable_Menu;

static PyObject *__pyx_tp_new_6pyglui_2ui_Movable_Menu(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Movable_Menu *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Base_Menu(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Movable_Menu *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Movable_Menu;
  return o;
}

static PyObject *__pyx_getprop_6pyglui_2ui_12Movable_Menu_header_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_12Movable_Menu_10header_pos_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_12Movable_Menu_header_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_12Movable_Menu_10header_pos_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Movable_Menu[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Movable_Menu_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Movable_Menu_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Movable_Menu[] = {
  {(char *)"header_pos", __pyx_getprop_6pyglui_2ui_12Movable_Menu_header_pos, __pyx_setprop_6pyglui_2ui_12Movable_Menu_header_pos, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Movable_Menu_slots[] = {
  {Py_tp_doc, (void *)PyDoc_STR("\n    Abstract class that implemented movable ui elements.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Base_Menu},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Base_Menu},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Movable_Menu},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Movable_Menu},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Movable_Menu},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Movable_Menu_spec = {
  "pyglui.ui.Movable_Menu",
  sizeof(struct __pyx_obj_6pyglui_2ui_Movable_Menu),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Movable_Menu_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Movable_Menu = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Movable_Menu", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Movable_Menu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Base_Menu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Abstract class that implemented movable ui elements.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Base_Menu, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Base_Menu, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Movable_Menu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Movable_Menu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Movable_Menu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Stretching_Menu __pyx_vtable_6pyglui_2ui_Stretching_Menu;

static PyObject *__pyx_tp_new_6pyglui_2ui_Stretching_Menu(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Stretching_Menu *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Base_Menu(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Stretching_Menu *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Stretching_Menu;
  if (unlikely(__pyx_pw_6pyglui_2ui_15Stretching_Menu_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_6pyglui_2ui_15Stretching_Menu_configuration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_15Stretching_Menu_13configuration_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_15Stretching_Menu_configuration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_15Stretching_Menu_13configuration_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_15Stretching_Menu_collapsed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_15Stretching_Menu_9collapsed_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_15Stretching_Menu_collapsed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_15Stretching_Menu_9collapsed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Stretching_Menu[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_15Stretching_Menu_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_15Stretching_Menu_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Stretching_Menu[] = {
  {(char *)"configuration", __pyx_getprop_6pyglui_2ui_15Stretching_Menu_configuration, __pyx_setprop_6pyglui_2ui_15Stretching_Menu_configuration, (char *)0, 0},
  {(char *)"collapsed", __pyx_getprop_6pyglui_2ui_15Stretching_Menu_collapsed, __pyx_setprop_6pyglui_2ui_15Stretching_Menu_collapsed, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Stretching_Menu_slots[] = {
  {Py_tp_doc, (void *)PyDoc_STR("\n    A simple menu\n    Not movable and fixed in height.\n    It will space its content evenenly in y.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Base_Menu},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Base_Menu},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Stretching_Menu},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Stretching_Menu},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_15Stretching_Menu_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Stretching_Menu},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Stretching_Menu_spec = {
  "pyglui.ui.Stretching_Menu",
  sizeof(struct __pyx_obj_6pyglui_2ui_Stretching_Menu),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Stretching_Menu_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Stretching_Menu = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Stretching_Menu", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Stretching_Menu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Base_Menu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    A simple menu\n    Not movable and fixed in height.\n    It will space its content evenenly in y.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Base_Menu, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Base_Menu, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Stretching_Menu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Stretching_Menu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_15Stretching_Menu_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Stretching_Menu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Horizontally_Stretching_Menu __pyx_vtable_6pyglui_2ui_Horizontally_Stretching_Menu;

static PyObject *__pyx_tp_new_6pyglui_2ui_Horizontally_Stretching_Menu(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Base_Menu(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Horizontally_Stretching_Menu;
  if (unlikely(__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_6pyglui_2ui_28Horizontally_Stretching_Menu_configuration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_28Horizontally_Stretching_Menu_configuration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13configuration_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_28Horizontally_Stretching_Menu_collapsed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_28Horizontally_Stretching_Menu_collapsed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_9collapsed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Horizontally_Stretching_Menu[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Horizontally_Stretching_Menu[] = {
  {(char *)"configuration", __pyx_getprop_6pyglui_2ui_28Horizontally_Stretching_Menu_configuration, __pyx_setprop_6pyglui_2ui_28Horizontally_Stretching_Menu_configuration, (char *)0, 0},
  {(char *)"collapsed", __pyx_getprop_6pyglui_2ui_28Horizontally_Stretching_Menu_collapsed, __pyx_setprop_6pyglui_2ui_28Horizontally_Stretching_Menu_collapsed, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu_slots[] = {
  {Py_tp_doc, (void *)PyDoc_STR("\n    A simple menu\n    Not movable and fixed in height.\n    It will space its content evenenly in x.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Base_Menu},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Base_Menu},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Horizontally_Stretching_Menu},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Horizontally_Stretching_Menu},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Horizontally_Stretching_Menu},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu_spec = {
  "pyglui.ui.Horizontally_Stretching_Menu",
  sizeof(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Horizontally_Stretching_Menu", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Horizontally_Stretching_Menu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Base_Menu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    A simple menu\n    Not movable and fixed in height.\n    It will space its content evenenly in x.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Base_Menu, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Base_Menu, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Horizontally_Stretching_Menu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Horizontally_Stretching_Menu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_28Horizontally_Stretching_Menu_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Horizontally_Stretching_Menu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Growing_Menu __pyx_vtable_6pyglui_2ui_Growing_Menu;

static PyObject *__pyx_tp_new_6pyglui_2ui_Growing_Menu(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Growing_Menu *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Movable_Menu(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Growing_Menu *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Growing_Menu;
  if (unlikely(__pyx_pw_6pyglui_2ui_12Growing_Menu_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_6pyglui_2ui_12Growing_Menu_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_12Growing_Menu_6height_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_12Growing_Menu_collapsed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_12Growing_Menu_9collapsed_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_12Growing_Menu_collapsed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_12Growing_Menu_9collapsed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_12Growing_Menu_configuration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_12Growing_Menu_13configuration_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_12Growing_Menu_configuration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_12Growing_Menu_13configuration_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Growing_Menu[] = {
  {"toggle_iconified", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_13toggle_iconified, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Growing_Menu_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Growing_Menu[] = {
  {(char *)"height", __pyx_getprop_6pyglui_2ui_12Growing_Menu_height, 0, (char *)0, 0},
  {(char *)"collapsed", __pyx_getprop_6pyglui_2ui_12Growing_Menu_collapsed, __pyx_setprop_6pyglui_2ui_12Growing_Menu_collapsed, (char *)0, 0},
  {(char *)"configuration", __pyx_getprop_6pyglui_2ui_12Growing_Menu_configuration, __pyx_setprop_6pyglui_2ui_12Growing_Menu_configuration, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Growing_Menu_slots[] = {
  {Py_tp_doc, (void *)PyDoc_STR("\n    Growing_Menu is a movable object on the canvas grows with its content\n\n    size height will be ignored as it depend on the content.\n    size positive -> size from self.org\n    size 0 -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n    size negative -> make the box to up to size pixels to the parent container.\n    position negative -> align to the opposite side of context\n    position 0  -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n\n\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Base_Menu},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Base_Menu},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Growing_Menu},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Growing_Menu},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_12Growing_Menu_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Growing_Menu},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Growing_Menu_spec = {
  "pyglui.ui.Growing_Menu",
  sizeof(struct __pyx_obj_6pyglui_2ui_Growing_Menu),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Growing_Menu_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Growing_Menu = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Growing_Menu", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Growing_Menu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Base_Menu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Growing_Menu is a movable object on the canvas grows with its content\n\n    size height will be ignored as it depend on the content.\n    size positive -> size from self.org\n    size 0 -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n    size negative -> make the box to up to size pixels to the parent container.\n    position negative -> align to the opposite side of context\n    position 0  -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n\n\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Base_Menu, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Base_Menu, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Growing_Menu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Growing_Menu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_12Growing_Menu_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Growing_Menu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Scrolling_Menu __pyx_vtable_6pyglui_2ui_Scrolling_Menu;

static PyObject *__pyx_tp_new_6pyglui_2ui_Scrolling_Menu(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Movable_Menu(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Scrolling_Menu;
  p->uncollapsed_outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->scrollbar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None); Py_INCREF(Py_None);
  p->scrollstate = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_14Scrolling_Menu_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Scrolling_Menu(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *p = (struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Scrolling_Menu) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->uncollapsed_outline);
  Py_CLEAR(p->scrollbar);
  Py_CLEAR(p->scrollstate);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_Base_Menu(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Scrolling_Menu(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *p = (struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_Base_Menu(o, v, a); if (e) return e;
  if (p->uncollapsed_outline) {
    e = (*v)(((PyObject *)p->uncollapsed_outline), a); if (e) return e;
  }
  if (p->scrollbar) {
    e = (*v)(((PyObject *)p->scrollbar), a); if (e) return e;
  }
  if (p->scrollstate) {
    e = (*v)(((PyObject *)p->scrollstate), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Scrolling_Menu(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *p = (struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *)o;
  __pyx_tp_clear_6pyglui_2ui_Base_Menu(o);
  tmp = ((PyObject*)p->uncollapsed_outline);
  p->uncollapsed_outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->scrollbar);
  p->scrollbar = ((struct __pyx_obj_6pyglui_2ui_Draggable *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->scrollstate);
  p->scrollstate = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_14Scrolling_Menu_collapsed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_14Scrolling_Menu_9collapsed_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_14Scrolling_Menu_collapsed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_14Scrolling_Menu_9collapsed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_14Scrolling_Menu_configuration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_14Scrolling_Menu_13configuration_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_14Scrolling_Menu_configuration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_14Scrolling_Menu_13configuration_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Scrolling_Menu[] = {
  {"toggle_iconified", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_13toggle_iconified, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Scrolling_Menu[] = {
  {(char *)"collapsed", __pyx_getprop_6pyglui_2ui_14Scrolling_Menu_collapsed, __pyx_setprop_6pyglui_2ui_14Scrolling_Menu_collapsed, (char *)0, 0},
  {(char *)"configuration", __pyx_getprop_6pyglui_2ui_14Scrolling_Menu_configuration, __pyx_setprop_6pyglui_2ui_14Scrolling_Menu_configuration, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Scrolling_Menu_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Scrolling_Menu},
  {Py_tp_str, (void *)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_5__str__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Scrolling_Menu is a movable object on the canvas that contains other elements\n    and scrolls when they overflow the space.\n\n    size positive -> size from self.org\n    size 0 -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n    size negative -> make the box to up to size pixels to the parent container.\n    position negative -> align to the opposite side of context\n    position 0  -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Scrolling_Menu},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Scrolling_Menu},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Scrolling_Menu},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Scrolling_Menu},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_14Scrolling_Menu_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Scrolling_Menu},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Scrolling_Menu_spec = {
  "pyglui.ui.Scrolling_Menu",
  sizeof(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Scrolling_Menu_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Scrolling_Menu = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Scrolling_Menu", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Scrolling_Menu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6pyglui_2ui_14Scrolling_Menu_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Scrolling_Menu is a movable object on the canvas that contains other elements\n    and scrolls when they overflow the space.\n\n    size positive -> size from self.org\n    size 0 -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n    size negative -> make the box to up to size pixels to the parent container.\n    position negative -> align to the opposite side of context\n    position 0  -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Scrolling_Menu, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Scrolling_Menu, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Scrolling_Menu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Scrolling_Menu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_14Scrolling_Menu_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Scrolling_Menu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Container __pyx_vtable_6pyglui_2ui_Container;

static PyObject *__pyx_tp_new_6pyglui_2ui_Container(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Container *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Base_Menu(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Container *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Container;
  p->horizontal_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)Py_None); Py_INCREF(Py_None);
  p->vertical_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_9Container_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Container(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Container *p = (struct __pyx_obj_6pyglui_2ui_Container *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Container) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->horizontal_constraint);
  Py_CLEAR(p->vertical_constraint);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6pyglui_2ui_Base_Menu(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Container(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Container *p = (struct __pyx_obj_6pyglui_2ui_Container *)o;
  e = __pyx_tp_traverse_6pyglui_2ui_Base_Menu(o, v, a); if (e) return e;
  if (p->horizontal_constraint) {
    e = (*v)(((PyObject *)p->horizontal_constraint), a); if (e) return e;
  }
  if (p->vertical_constraint) {
    e = (*v)(((PyObject *)p->vertical_constraint), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Container(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Container *p = (struct __pyx_obj_6pyglui_2ui_Container *)o;
  __pyx_tp_clear_6pyglui_2ui_Base_Menu(o);
  tmp = ((PyObject*)p->horizontal_constraint);
  p->horizontal_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->vertical_constraint);
  p->vertical_constraint = ((struct __pyx_obj_6pyglui_2ui_UI_element *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Container_configuration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Container_13configuration_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Container_configuration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Container_13configuration_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Container_horizontal_constraint(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Container_horizontal_constraint(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_9Container_21horizontal_constraint_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_9Container_vertical_constraint(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_9Container_vertical_constraint(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_9Container_19vertical_constraint_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Container[] = {
  {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pyglui_2ui_9Container_3init, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Container_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Container_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Container[] = {
  {(char *)"configuration", __pyx_getprop_6pyglui_2ui_9Container_configuration, __pyx_setprop_6pyglui_2ui_9Container_configuration, (char *)0, 0},
  {(char *)"horizontal_constraint", __pyx_getprop_6pyglui_2ui_9Container_horizontal_constraint, __pyx_setprop_6pyglui_2ui_9Container_horizontal_constraint, (char *)0, 0},
  {(char *)"vertical_constraint", __pyx_getprop_6pyglui_2ui_9Container_vertical_constraint, __pyx_setprop_6pyglui_2ui_9Container_vertical_constraint, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Container_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Container},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Container},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Container},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Container},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Container},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Container},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Container_spec = {
  "pyglui.ui.Container",
  sizeof(struct __pyx_obj_6pyglui_2ui_Container),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Container_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Container = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Container", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Container), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Container, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Container, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Container, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Container, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Container, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Container, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Timeline_Menu __pyx_vtable_6pyglui_2ui_Timeline_Menu;

static PyObject *__pyx_tp_new_6pyglui_2ui_Timeline_Menu(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Timeline_Menu *p;
  PyObject *o = __pyx_tp_new_6pyglui_2ui_Scrolling_Menu(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6pyglui_2ui_Timeline_Menu *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pyglui_2ui_UI_element*)__pyx_vtabptr_6pyglui_2ui_Timeline_Menu;
  return o;
}

static PyObject *__pyx_getprop_6pyglui_2ui_13Timeline_Menu_collapsed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_13Timeline_Menu_9collapsed_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_13Timeline_Menu_collapsed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_13Timeline_Menu_9collapsed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Timeline_Menu[] = {
  {"toggle_iconified", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_3toggle_iconified, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"append", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_5append, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"insert", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_7insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"extend", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_9extend, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_11remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_13Timeline_Menu_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Timeline_Menu[] = {
  {(char *)"collapsed", __pyx_getprop_6pyglui_2ui_13Timeline_Menu_collapsed, __pyx_setprop_6pyglui_2ui_13Timeline_Menu_collapsed, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Timeline_Menu_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Scrolling_Menu},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Scrolling_Menu},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Timeline_Menu},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Timeline_Menu},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Timeline_Menu},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Timeline_Menu_spec = {
  "pyglui.ui.Timeline_Menu",
  sizeof(struct __pyx_obj_6pyglui_2ui_Timeline_Menu),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Timeline_Menu_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Timeline_Menu = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Timeline_Menu", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Timeline_Menu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Scrolling_Menu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6pyglui_2ui_14Scrolling_Menu_5__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Scrolling_Menu, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Scrolling_Menu, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Timeline_Menu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Timeline_Menu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6pyglui_2ui_14Scrolling_Menu_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Timeline_Menu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Synced_Value __pyx_vtable_6pyglui_2ui_Synced_Value;

static PyObject *__pyx_tp_new_6pyglui_2ui_Synced_Value(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Synced_Value *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pyglui_2ui_Synced_Value *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pyglui_2ui_Synced_Value;
  p->attribute_context = Py_None; Py_INCREF(Py_None);
  p->attribute_name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_value = Py_None; Py_INCREF(Py_None);
  p->getter = Py_None; Py_INCREF(Py_None);
  p->setter = Py_None; Py_INCREF(Py_None);
  p->on_change = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_12Synced_Value_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Synced_Value(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Synced_Value *p = (struct __pyx_obj_6pyglui_2ui_Synced_Value *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Synced_Value) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->attribute_context);
  Py_CLEAR(p->attribute_name);
  Py_CLEAR(p->_value);
  Py_CLEAR(p->getter);
  Py_CLEAR(p->setter);
  Py_CLEAR(p->on_change);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Synced_Value(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *p = (struct __pyx_obj_6pyglui_2ui_Synced_Value *)o;
  if (p->attribute_context) {
    e = (*v)(p->attribute_context, a); if (e) return e;
  }
  if (p->_value) {
    e = (*v)(p->_value, a); if (e) return e;
  }
  if (p->getter) {
    e = (*v)(p->getter, a); if (e) return e;
  }
  if (p->setter) {
    e = (*v)(p->setter, a); if (e) return e;
  }
  if (p->on_change) {
    e = (*v)(p->on_change, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Synced_Value(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Synced_Value *p = (struct __pyx_obj_6pyglui_2ui_Synced_Value *)o;
  tmp = ((PyObject*)p->attribute_context);
  p->attribute_context = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_value);
  p->_value = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->getter);
  p->getter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->setter);
  p->setter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->on_change);
  p->on_change = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_12Synced_Value_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_12Synced_Value_5value_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_12Synced_Value_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_12Synced_Value_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Synced_Value[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Synced_Value_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_12Synced_Value_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Synced_Value[] = {
  {(char *)"value", __pyx_getprop_6pyglui_2ui_12Synced_Value_value, __pyx_setprop_6pyglui_2ui_12Synced_Value_value, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Synced_Value_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Synced_Value},
  {Py_tp_doc, (void *)PyDoc_STR("\n    an element that has a synced value\n    attributes will be accecd through the attribute context unless you supply a getter.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Synced_Value},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Synced_Value},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Synced_Value},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Synced_Value},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_12Synced_Value_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Synced_Value},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Synced_Value_spec = {
  "pyglui.ui.Synced_Value",
  sizeof(struct __pyx_obj_6pyglui_2ui_Synced_Value),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Synced_Value_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Synced_Value = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Synced_Value", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Synced_Value), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Synced_Value, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    an element that has a synced value\n    attributes will be accecd through the attribute context unless you supply a getter.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Synced_Value, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Synced_Value, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Synced_Value, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Synced_Value, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_12Synced_Value_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Synced_Value, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6pyglui_2ui_Input(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Input *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pyglui_2ui_Input *)o);
  p->keys = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->chars = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->buttons = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->active_ui_elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->cb = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->dm = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->m = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->s = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_5Input_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Input(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Input *p = (struct __pyx_obj_6pyglui_2ui_Input *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Input) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->keys);
  Py_CLEAR(p->chars);
  Py_CLEAR(p->buttons);
  Py_CLEAR(p->active_ui_elements);
  Py_CLEAR(p->cb);
  Py_CLEAR(p->dm);
  Py_CLEAR(p->m);
  Py_CLEAR(p->s);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Input(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Input *p = (struct __pyx_obj_6pyglui_2ui_Input *)o;
  if (p->keys) {
    e = (*v)(p->keys, a); if (e) return e;
  }
  if (p->chars) {
    e = (*v)(p->chars, a); if (e) return e;
  }
  if (p->buttons) {
    e = (*v)(p->buttons, a); if (e) return e;
  }
  if (p->active_ui_elements) {
    e = (*v)(p->active_ui_elements, a); if (e) return e;
  }
  if (p->dm) {
    e = (*v)(((PyObject *)p->dm), a); if (e) return e;
  }
  if (p->m) {
    e = (*v)(((PyObject *)p->m), a); if (e) return e;
  }
  if (p->s) {
    e = (*v)(((PyObject *)p->s), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Input(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Input *p = (struct __pyx_obj_6pyglui_2ui_Input *)o;
  tmp = ((PyObject*)p->keys);
  p->keys = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->chars);
  p->chars = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->buttons);
  p->buttons = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->active_ui_elements);
  p->active_ui_elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dm);
  p->dm = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->m);
  p->m = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->s);
  p->s = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Input_keys(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Input_4keys_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Input_keys(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Input_4keys_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_5Input_4keys_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Input_chars(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Input_5chars_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Input_chars(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Input_5chars_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_5Input_5chars_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Input_buttons(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Input_7buttons_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Input_buttons(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Input_7buttons_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_5Input_7buttons_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Input_active_ui_elements(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Input_active_ui_elements(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_5Input_18active_ui_elements_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_5Input_cb(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_5Input_2cb_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_5Input_cb(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_5Input_2cb_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pyglui_2ui_5Input_2cb_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Input[] = {
  {"purge", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Input_7purge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Input_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_5Input_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Input[] = {
  {(char *)"keys", __pyx_getprop_6pyglui_2ui_5Input_keys, __pyx_setprop_6pyglui_2ui_5Input_keys, (char *)0, 0},
  {(char *)"chars", __pyx_getprop_6pyglui_2ui_5Input_chars, __pyx_setprop_6pyglui_2ui_5Input_chars, (char *)0, 0},
  {(char *)"buttons", __pyx_getprop_6pyglui_2ui_5Input_buttons, __pyx_setprop_6pyglui_2ui_5Input_buttons, (char *)0, 0},
  {(char *)"active_ui_elements", __pyx_getprop_6pyglui_2ui_5Input_active_ui_elements, __pyx_setprop_6pyglui_2ui_5Input_active_ui_elements, (char *)0, 0},
  {(char *)"cb", __pyx_getprop_6pyglui_2ui_5Input_cb, __pyx_setprop_6pyglui_2ui_5Input_cb, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Input_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Input},
  {Py_nb_bool, (void *)__pyx_pw_6pyglui_2ui_5Input_5__nonzero__},
  {Py_tp_str, (void *)__pyx_pw_6pyglui_2ui_5Input_9__str__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Holds accumulated user input collect during a frame.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Input},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Input},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Input},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Input},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_5Input_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Input},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Input_spec = {
  "pyglui.ui.Input",
  sizeof(struct __pyx_obj_6pyglui_2ui_Input),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Input_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_Input = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_6pyglui_2ui_5Input_5__nonzero__, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_6pyglui_2ui_Input = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Input", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Input), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Input, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Input, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6pyglui_2ui_5Input_9__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Holds accumulated user input collect during a frame.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Input, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Input, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Input, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Input, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_5Input_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Input, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_Draggable __pyx_vtable_6pyglui_2ui_Draggable;

static PyObject *__pyx_tp_new_6pyglui_2ui_Draggable(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_Draggable *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pyglui_2ui_Draggable *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pyglui_2ui_Draggable;
  p->outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  p->touch_point = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->drag_accumulator = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->value = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->click_cb = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_9Draggable_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Draggable(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_Draggable *p = (struct __pyx_obj_6pyglui_2ui_Draggable *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Draggable) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->outline);
  Py_CLEAR(p->touch_point);
  Py_CLEAR(p->drag_accumulator);
  Py_CLEAR(p->value);
  Py_CLEAR(p->click_cb);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_Draggable(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_Draggable *p = (struct __pyx_obj_6pyglui_2ui_Draggable *)o;
  if (p->outline) {
    e = (*v)(((PyObject *)p->outline), a); if (e) return e;
  }
  if (p->touch_point) {
    e = (*v)(((PyObject *)p->touch_point), a); if (e) return e;
  }
  if (p->drag_accumulator) {
    e = (*v)(((PyObject *)p->drag_accumulator), a); if (e) return e;
  }
  if (p->value) {
    e = (*v)(((PyObject *)p->value), a); if (e) return e;
  }
  if (p->click_cb) {
    e = (*v)(p->click_cb, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_Draggable(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_Draggable *p = (struct __pyx_obj_6pyglui_2ui_Draggable *)o;
  tmp = ((PyObject*)p->outline);
  p->outline = ((struct __pyx_obj_6pyglui_2ui_FitBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->touch_point);
  p->touch_point = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->drag_accumulator);
  p->drag_accumulator = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->value);
  p->value = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->click_cb);
  p->click_cb = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Draggable[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Draggable_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_9Draggable_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Draggable_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Draggable},
  {Py_tp_doc, (void *)PyDoc_STR("\n    A rectangle that can be dragged.\n    Does not move itself but the drag vector is added to 'value'\n    Mouse postions units are scaled by 1/ui_scale\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_Draggable},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_Draggable},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Draggable},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_9Draggable_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Draggable},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Draggable_spec = {
  "pyglui.ui.Draggable",
  sizeof(struct __pyx_obj_6pyglui_2ui_Draggable),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_Draggable_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_Draggable = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Draggable", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Draggable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Draggable, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    A rectangle that can be dragged.\n    Does not move itself but the drag vector is added to 'value'\n    Mouse postions units are scaled by 1/ui_scale\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_Draggable, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_Draggable, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Draggable, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_9Draggable_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Draggable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pyglui_2ui_FitBox __pyx_vtable_6pyglui_2ui_FitBox;

static PyObject *__pyx_tp_new_6pyglui_2ui_FitBox(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pyglui_2ui_FitBox *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pyglui_2ui_FitBox *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pyglui_2ui_FitBox;
  p->design_org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->design_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  p->min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pyglui_2ui_6FitBox_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_FitBox(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui_FitBox *p = (struct __pyx_obj_6pyglui_2ui_FitBox *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_FitBox) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->design_org);
  Py_CLEAR(p->org);
  Py_CLEAR(p->design_size);
  Py_CLEAR(p->size);
  Py_CLEAR(p->min_size);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pyglui_2ui_FitBox(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui_FitBox *p = (struct __pyx_obj_6pyglui_2ui_FitBox *)o;
  if (p->design_org) {
    e = (*v)(((PyObject *)p->design_org), a); if (e) return e;
  }
  if (p->org) {
    e = (*v)(((PyObject *)p->org), a); if (e) return e;
  }
  if (p->design_size) {
    e = (*v)(((PyObject *)p->design_size), a); if (e) return e;
  }
  if (p->size) {
    e = (*v)(((PyObject *)p->size), a); if (e) return e;
  }
  if (p->min_size) {
    e = (*v)(((PyObject *)p->min_size), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui_FitBox(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui_FitBox *p = (struct __pyx_obj_6pyglui_2ui_FitBox *)o;
  tmp = ((PyObject*)p->design_org);
  p->design_org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->org);
  p->org = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->design_size);
  p->design_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->size);
  p->size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->min_size);
  p->min_size = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pyglui_2ui_6FitBox_rect(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6FitBox_4rect_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_6FitBox_ellipse(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6FitBox_7ellipse_1__get__(o);
}

static PyObject *__pyx_getprop_6pyglui_2ui_6FitBox_center(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_6FitBox_6center_1__get__(o);
}

static PyMethodDef __pyx_methods_6pyglui_2ui_FitBox[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6FitBox_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_6FitBox_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_FitBox[] = {
  {(char *)"rect", __pyx_getprop_6pyglui_2ui_6FitBox_rect, 0, (char *)0, 0},
  {(char *)"ellipse", __pyx_getprop_6pyglui_2ui_6FitBox_ellipse, 0, (char *)0, 0},
  {(char *)"center", __pyx_getprop_6pyglui_2ui_6FitBox_center, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_FitBox_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_FitBox},
  {Py_tp_str, (void *)__pyx_pw_6pyglui_2ui_6FitBox_9__str__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    A box that will fit itself into a context.\n    Specified by rules for x and y respectively:\n        size positive -> size from self.org\n        size 0 -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n        size negative -> make the box to up to size pixels to the parent container.\n        position negative -> align to the opposite side of context\n        position 0  -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n\n    This is quite expressive but does have a limitation:\n        You cannot design a box that is outside of the parent context.\n\n    Its made of 4 Vec2\n        \"design_org\" \"design_size\" define the rules for placement and size\n\n        \"org\" and \"size\" are the computed results of the box\n            fitted and translated by its parent context\n\n    Vec2 min_size is optional.\n\n\n    Vec2 size and org will be computed when calling .compute(context,[nested])\n        the globl UI scale factor will be applied to these vectors.\n\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui_FitBox},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui_FitBox},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_FitBox},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_FitBox},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_6FitBox_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_FitBox},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_FitBox_spec = {
  "pyglui.ui.FitBox",
  sizeof(struct __pyx_obj_6pyglui_2ui_FitBox),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui_FitBox_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui_FitBox = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""FitBox", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_FitBox), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_FitBox, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6pyglui_2ui_6FitBox_9__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    A box that will fit itself into a context.\n    Specified by rules for x and y respectively:\n        size positive -> size from self.org\n        size 0 -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n        size negative -> make the box to up to size pixels to the parent container.\n        position negative -> align to the opposite side of context\n        position 0  -> span into parent context and lock it like this. If you want it draggable use -.001 or .001\n\n    This is quite expressive but does have a limitation:\n        You cannot design a box that is outside of the parent context.\n\n    Its made of 4 Vec2\n        \"design_org\" \"design_size\" define the rules for placement and size\n\n        \"org\" and \"size\" are the computed results of the box\n            fitted and translated by its parent context\n\n    Vec2 min_size is optional.\n\n\n    Vec2 size and org will be computed when calling .compute(context,[nested])\n        the globl UI scale factor will be applied to these vectors.\n\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui_FitBox, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui_FitBox, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_FitBox, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_FitBox, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_6FitBox_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_FitBox, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6pyglui_2ui_Vec2(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  if (unlikely(__pyx_pw_6pyglui_2ui_4Vec2_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pyglui_2ui_Vec2(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pyglui_2ui_Vec2) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_6pyglui_2ui_Vec2(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_6pyglui_2ui_Vec2(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_4Vec2_33__setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static CYTHON_INLINE PyObject *__pyx_nb_add_6pyglui_2ui_Vec2_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
    slot = type->tp_as_number ? type->tp_as_number->nb_add : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_add);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_add_6pyglui_2ui_Vec2(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_add == &__pyx_nb_add_6pyglui_2ui_Vec2)
#endif
            || __Pyx_TypeCheck(left, __pyx_ptype_6pyglui_2ui_Vec2);
    if (!(1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_add == &__pyx_nb_add_6pyglui_2ui_Vec2)
#endif
                || __Pyx_TypeCheck(right, __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_left) {
        PyObject *res;
        if (maybe_self_is_right && 0 && !(1)) {
            res = __pyx_nb_add_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
            if (res != Py_NotImplemented) return res;
            Py_DECREF(res);
            maybe_self_is_right = 0;
        }
        res = __pyx_pw_6pyglui_2ui_4Vec2_7__add__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    if ((1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_add == &__pyx_nb_add_6pyglui_2ui_Vec2)
#endif
                || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_right) {
        return __pyx_nb_add_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_subtract_6pyglui_2ui_Vec2_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
    slot = type->tp_as_number ? type->tp_as_number->nb_subtract : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_subtract);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_subtract_6pyglui_2ui_Vec2(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_subtract == &__pyx_nb_subtract_6pyglui_2ui_Vec2)
#endif
            || __Pyx_TypeCheck(left, __pyx_ptype_6pyglui_2ui_Vec2);
    if (!(1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_subtract == &__pyx_nb_subtract_6pyglui_2ui_Vec2)
#endif
                || __Pyx_TypeCheck(right, __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_left) {
        PyObject *res;
        if (maybe_self_is_right && 0 && !(1)) {
            res = __pyx_nb_subtract_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
            if (res != Py_NotImplemented) return res;
            Py_DECREF(res);
            maybe_self_is_right = 0;
        }
        res = __pyx_pw_6pyglui_2ui_4Vec2_17__sub__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    if ((1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_subtract == &__pyx_nb_subtract_6pyglui_2ui_Vec2)
#endif
                || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_right) {
        return __pyx_nb_subtract_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_multiply_6pyglui_2ui_Vec2_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
    slot = type->tp_as_number ? type->tp_as_number->nb_multiply : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_multiply);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_multiply_6pyglui_2ui_Vec2(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_multiply == &__pyx_nb_multiply_6pyglui_2ui_Vec2)
#endif
            || __Pyx_TypeCheck(left, __pyx_ptype_6pyglui_2ui_Vec2);
    if (!(1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_multiply == &__pyx_nb_multiply_6pyglui_2ui_Vec2)
#endif
                || __Pyx_TypeCheck(right, __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_left) {
        PyObject *res;
        if (maybe_self_is_right && 0 && !(1)) {
            res = __pyx_nb_multiply_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
            if (res != Py_NotImplemented) return res;
            Py_DECREF(res);
            maybe_self_is_right = 0;
        }
        res = __pyx_pw_6pyglui_2ui_4Vec2_11__mul__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    if ((1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_multiply == &__pyx_nb_multiply_6pyglui_2ui_Vec2)
#endif
                || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_right) {
        return __pyx_nb_multiply_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_true_divide_6pyglui_2ui_Vec2_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
    slot = type->tp_as_number ? type->tp_as_number->nb_true_divide : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_true_divide);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_true_divide_6pyglui_2ui_Vec2(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_6pyglui_2ui_Vec2)
#endif
            || __Pyx_TypeCheck(left, __pyx_ptype_6pyglui_2ui_Vec2);
    if (!(1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_6pyglui_2ui_Vec2)
#endif
                || __Pyx_TypeCheck(right, __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_left) {
        PyObject *res;
        if (maybe_self_is_right && 0 && !(1)) {
            res = __pyx_nb_true_divide_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
            if (res != Py_NotImplemented) return res;
            Py_DECREF(res);
            maybe_self_is_right = 0;
        }
        res = __pyx_pw_6pyglui_2ui_4Vec2_21__truediv__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    if ((1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_6pyglui_2ui_Vec2)
#endif
                || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_right) {
        return __pyx_nb_true_divide_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



#if PY_VERSION_HEX >= 0x03050000
static CYTHON_INLINE PyObject *__pyx_nb_matrix_multiply_6pyglui_2ui_Vec2_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
    slot = type->tp_as_number ? type->tp_as_number->nb_matrix_multiply : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_matrix_multiply);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_matrix_multiply_6pyglui_2ui_Vec2(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_matrix_multiply == &__pyx_nb_matrix_multiply_6pyglui_2ui_Vec2)
#endif
            || __Pyx_TypeCheck(left, __pyx_ptype_6pyglui_2ui_Vec2);
    if (!(1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_matrix_multiply == &__pyx_nb_matrix_multiply_6pyglui_2ui_Vec2)
#endif
                || __Pyx_TypeCheck(right, __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_left) {
        PyObject *res;
        if (maybe_self_is_right && 0 && !(1)) {
            res = __pyx_nb_matrix_multiply_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
            if (res != Py_NotImplemented) return res;
            Py_DECREF(res);
            maybe_self_is_right = 0;
        }
        res = __pyx_pw_6pyglui_2ui_4Vec2_15__matmul__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    if ((1)) {
        maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
                || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_matrix_multiply == &__pyx_nb_matrix_multiply_6pyglui_2ui_Vec2)
#endif
                || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_6pyglui_2ui_Vec2);
    }
    if (maybe_self_is_right) {
        return __pyx_nb_matrix_multiply_6pyglui_2ui_Vec2_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_6pyglui_2ui_Vec2, tp_base, PyTypeObject*), left, right );
    }
    return __Pyx_NewRef(Py_NotImplemented);
}


#endif

static PyObject *__pyx_getprop_6pyglui_2ui_4Vec2_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_4Vec2_1x_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_4Vec2_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_4Vec2_1x_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pyglui_2ui_4Vec2_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pyglui_2ui_4Vec2_1y_1__get__(o);
}

static int __pyx_setprop_6pyglui_2ui_4Vec2_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pyglui_2ui_4Vec2_1y_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pyglui_2ui_Vec2[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Vec2_35__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pyglui_2ui_4Vec2_37__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pyglui_2ui_Vec2[] = {
  {(char *)"x", __pyx_getprop_6pyglui_2ui_4Vec2_x, __pyx_setprop_6pyglui_2ui_4Vec2_x, (char *)0, 0},
  {(char *)"y", __pyx_getprop_6pyglui_2ui_4Vec2_y, __pyx_setprop_6pyglui_2ui_4Vec2_y, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui_Vec2_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui_Vec2},
  {Py_nb_add, (void *)__pyx_nb_add_6pyglui_2ui_Vec2},
  {Py_nb_subtract, (void *)__pyx_nb_subtract_6pyglui_2ui_Vec2},
  {Py_nb_multiply, (void *)__pyx_nb_multiply_6pyglui_2ui_Vec2},
  {Py_nb_bool, (void *)__pyx_pw_6pyglui_2ui_4Vec2_5__nonzero__},
  {Py_nb_inplace_add, (void *)__pyx_pw_6pyglui_2ui_4Vec2_9__iadd__},
  {Py_nb_inplace_subtract, (void *)__pyx_pw_6pyglui_2ui_4Vec2_19__isub__},
  {Py_nb_inplace_multiply, (void *)__pyx_pw_6pyglui_2ui_4Vec2_13__imul__},
  {Py_nb_true_divide, (void *)__pyx_nb_true_divide_6pyglui_2ui_Vec2},
  {Py_nb_inplace_true_divide, (void *)__pyx_pw_6pyglui_2ui_4Vec2_23__itruediv__},
  #if PY_VERSION_HEX >= 0x03050000
  {Py_nb_matrix_multiply, (void *)__pyx_nb_matrix_multiply_6pyglui_2ui_Vec2},
  #endif
  {Py_sq_length, (void *)__pyx_pw_6pyglui_2ui_4Vec2_25__len__},
  {Py_sq_item, (void *)__pyx_sq_item_6pyglui_2ui_Vec2},
  {Py_mp_length, (void *)__pyx_pw_6pyglui_2ui_4Vec2_25__len__},
  {Py_mp_subscript, (void *)__pyx_pw_6pyglui_2ui_4Vec2_31__getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_6pyglui_2ui_Vec2},
  {Py_tp_str, (void *)__pyx_pw_6pyglui_2ui_4Vec2_27__str__},
  {Py_tp_richcompare, (void *)__pyx_pw_6pyglui_2ui_4Vec2_29__richcmp__},
  {Py_tp_methods, (void *)__pyx_methods_6pyglui_2ui_Vec2},
  {Py_tp_getset, (void *)__pyx_getsets_6pyglui_2ui_Vec2},
  {Py_tp_init, (void *)__pyx_pw_6pyglui_2ui_4Vec2_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui_Vec2},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui_Vec2_spec = {
  "pyglui.ui.Vec2",
  sizeof(struct __pyx_obj_6pyglui_2ui_Vec2),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_6pyglui_2ui_Vec2_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_Vec2 = {
  __pyx_nb_add_6pyglui_2ui_Vec2, /*nb_add*/
  __pyx_nb_subtract_6pyglui_2ui_Vec2, /*nb_subtract*/
  __pyx_nb_multiply_6pyglui_2ui_Vec2, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_6pyglui_2ui_4Vec2_5__nonzero__, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  __pyx_pw_6pyglui_2ui_4Vec2_9__iadd__, /*nb_inplace_add*/
  __pyx_pw_6pyglui_2ui_4Vec2_19__isub__, /*nb_inplace_subtract*/
  __pyx_pw_6pyglui_2ui_4Vec2_13__imul__, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  __pyx_nb_true_divide_6pyglui_2ui_Vec2, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  __pyx_pw_6pyglui_2ui_4Vec2_23__itruediv__, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  __pyx_nb_matrix_multiply_6pyglui_2ui_Vec2, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Vec2 = {
  __pyx_pw_6pyglui_2ui_4Vec2_25__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6pyglui_2ui_Vec2, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Vec2 = {
  __pyx_pw_6pyglui_2ui_4Vec2_25__len__, /*mp_length*/
  __pyx_pw_6pyglui_2ui_4Vec2_31__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6pyglui_2ui_Vec2, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6pyglui_2ui_Vec2 = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""Vec2", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui_Vec2), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui_Vec2, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Vec2, /*tp_as_number*/
  &__pyx_tp_as_sequence_Vec2, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Vec2, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6pyglui_2ui_4Vec2_27__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_pw_6pyglui_2ui_4Vec2_29__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pyglui_2ui_Vec2, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pyglui_2ui_Vec2, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pyglui_2ui_4Vec2_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui_Vec2, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off *__pyx_freelist_6pyglui_2ui___pyx_scope_struct__sig_on_off[8];
static int __pyx_freecount_6pyglui_2ui___pyx_scope_struct__sig_on_off = 0;

static PyObject *__pyx_tp_new_6pyglui_2ui___pyx_scope_struct__sig_on_off(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pyglui_2ui___pyx_scope_struct__sig_on_off > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off)))) {
    o = (PyObject*)__pyx_freelist_6pyglui_2ui___pyx_scope_struct__sig_on_off[--__pyx_freecount_6pyglui_2ui___pyx_scope_struct__sig_on_off];
    memset(o, 0, sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct__sig_on_off(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pyglui_2ui___pyx_scope_struct__sig_on_off < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off)))) {
    __pyx_freelist_6pyglui_2ui___pyx_scope_struct__sig_on_off[__pyx_freecount_6pyglui_2ui___pyx_scope_struct__sig_on_off++] = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct__sig_on_off},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui___pyx_scope_struct__sig_on_off},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off_spec = {
  "pyglui.ui.__pyx_scope_struct__sig_on_off",
  sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER,
  __pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""__pyx_scope_struct__sig_on_off", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct__sig_on_off), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct__sig_on_off, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui___pyx_scope_struct__sig_on_off, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *__pyx_freelist_6pyglui_2ui___pyx_scope_struct_1_frange[8];
static int __pyx_freecount_6pyglui_2ui___pyx_scope_struct_1_frange = 0;

static PyObject *__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_1_frange(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pyglui_2ui___pyx_scope_struct_1_frange > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange)))) {
    o = (PyObject*)__pyx_freelist_6pyglui_2ui___pyx_scope_struct_1_frange[--__pyx_freecount_6pyglui_2ui___pyx_scope_struct_1_frange];
    memset(o, 0, sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_1_frange(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *p = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_start);
  Py_CLEAR(p->__pyx_v_step);
  Py_CLEAR(p->__pyx_v_stop);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pyglui_2ui___pyx_scope_struct_1_frange < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange)))) {
    __pyx_freelist_6pyglui_2ui___pyx_scope_struct_1_frange[__pyx_freecount_6pyglui_2ui___pyx_scope_struct_1_frange++] = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_1_frange(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *p = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange *)o;
  if (p->__pyx_v_start) {
    e = (*v)(p->__pyx_v_start, a); if (e) return e;
  }
  if (p->__pyx_v_step) {
    e = (*v)(p->__pyx_v_step, a); if (e) return e;
  }
  if (p->__pyx_v_stop) {
    e = (*v)(p->__pyx_v_stop, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_1_frange},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_1_frange},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_1_frange},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange_spec = {
  "pyglui.ui.__pyx_scope_struct_1_frange",
  sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange_slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""__pyx_scope_struct_1_frange", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_1_frange), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_1_frange, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_1_frange, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui___pyx_scope_struct_1_frange, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *__pyx_freelist_6pyglui_2ui___pyx_scope_struct_2___cinit__[8];
static int __pyx_freecount_6pyglui_2ui___pyx_scope_struct_2___cinit__ = 0;

static PyObject *__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_2___cinit__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pyglui_2ui___pyx_scope_struct_2___cinit__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__)))) {
    o = (PyObject*)__pyx_freelist_6pyglui_2ui___pyx_scope_struct_2___cinit__[--__pyx_freecount_6pyglui_2ui___pyx_scope_struct_2___cinit__];
    memset(o, 0, sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_2___cinit__(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *p = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_labels);
  Py_CLEAR(p->__pyx_v_selection);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pyglui_2ui___pyx_scope_struct_2___cinit__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__)))) {
    __pyx_freelist_6pyglui_2ui___pyx_scope_struct_2___cinit__[__pyx_freecount_6pyglui_2ui___pyx_scope_struct_2___cinit__++] = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_2___cinit__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *p = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *)o;
  if (p->__pyx_v_labels) {
    e = (*v)(p->__pyx_v_labels, a); if (e) return e;
  }
  if (p->__pyx_v_selection) {
    e = (*v)(p->__pyx_v_selection, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui___pyx_scope_struct_2___cinit__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *p = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__ *)o;
  tmp = ((PyObject*)p->__pyx_v_labels);
  p->__pyx_v_labels = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_selection);
  p->__pyx_v_selection = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit___slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_2___cinit__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_2___cinit__},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui___pyx_scope_struct_2___cinit__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_2___cinit__},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit___spec = {
  "pyglui.ui.__pyx_scope_struct_2___cinit__",
  sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit___slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""__pyx_scope_struct_2___cinit__", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_2___cinit__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_2___cinit__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_2___cinit__, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui___pyx_scope_struct_2___cinit__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui___pyx_scope_struct_2___cinit__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *__pyx_freelist_6pyglui_2ui___pyx_scope_struct_3___cinit__[8];
static int __pyx_freecount_6pyglui_2ui___pyx_scope_struct_3___cinit__ = 0;

static PyObject *__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_3___cinit__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6pyglui_2ui___pyx_scope_struct_3___cinit__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__)))) {
    o = (PyObject*)__pyx_freelist_6pyglui_2ui___pyx_scope_struct_3___cinit__[--__pyx_freecount_6pyglui_2ui___pyx_scope_struct_3___cinit__];
    memset(o, 0, sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_3___cinit__(PyObject *o) {
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *p = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_decr_pbs_icon);
  Py_CLEAR(p->__pyx_v_incr_pbs_icon);
  Py_CLEAR(p->__pyx_v_pause_icon);
  Py_CLEAR(p->__pyx_v_play_icon);
  Py_CLEAR(p->__pyx_v_step_bwd_icon);
  Py_CLEAR(p->__pyx_v_step_fwd_icon);
  Py_CLEAR(p->__pyx_v_sync_ctx);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6pyglui_2ui___pyx_scope_struct_3___cinit__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__)))) {
    __pyx_freelist_6pyglui_2ui___pyx_scope_struct_3___cinit__[__pyx_freecount_6pyglui_2ui___pyx_scope_struct_3___cinit__++] = ((struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_3___cinit__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *p = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *)o;
  if (p->__pyx_v_decr_pbs_icon) {
    e = (*v)(p->__pyx_v_decr_pbs_icon, a); if (e) return e;
  }
  if (p->__pyx_v_incr_pbs_icon) {
    e = (*v)(p->__pyx_v_incr_pbs_icon, a); if (e) return e;
  }
  if (p->__pyx_v_pause_icon) {
    e = (*v)(p->__pyx_v_pause_icon, a); if (e) return e;
  }
  if (p->__pyx_v_play_icon) {
    e = (*v)(p->__pyx_v_play_icon, a); if (e) return e;
  }
  if (p->__pyx_v_step_bwd_icon) {
    e = (*v)(p->__pyx_v_step_bwd_icon, a); if (e) return e;
  }
  if (p->__pyx_v_step_fwd_icon) {
    e = (*v)(p->__pyx_v_step_fwd_icon, a); if (e) return e;
  }
  if (p->__pyx_v_sync_ctx) {
    e = (*v)(p->__pyx_v_sync_ctx, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pyglui_2ui___pyx_scope_struct_3___cinit__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *p = (struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__ *)o;
  tmp = ((PyObject*)p->__pyx_v_decr_pbs_icon);
  p->__pyx_v_decr_pbs_icon = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_incr_pbs_icon);
  p->__pyx_v_incr_pbs_icon = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_pause_icon);
  p->__pyx_v_pause_icon = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_play_icon);
  p->__pyx_v_play_icon = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_step_bwd_icon);
  p->__pyx_v_step_bwd_icon = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_step_fwd_icon);
  p->__pyx_v_step_fwd_icon = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_sync_ctx);
  p->__pyx_v_sync_ctx = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit___slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_3___cinit__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_3___cinit__},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pyglui_2ui___pyx_scope_struct_3___cinit__},
  {Py_tp_new, (void *)__pyx_tp_new_6pyglui_2ui___pyx_scope_struct_3___cinit__},
  {0, 0},
};
static PyType_Spec __pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit___spec = {
  "pyglui.ui.__pyx_scope_struct_3___cinit__",
  sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit___slots,
};
#else

static PyTypeObject __pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""__pyx_scope_struct_3___cinit__", /*tp_name*/
  sizeof(struct __pyx_obj_6pyglui_2ui___pyx_scope_struct_3___cinit__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pyglui_2ui___pyx_scope_struct_3___cinit__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pyglui_2ui___pyx_scope_struct_3___cinit__, /*tp_traverse*/
  __pyx_tp_clear_6pyglui_2ui___pyx_scope_struct_3___cinit__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pyglui_2ui___pyx_scope_struct_3___cinit__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm[8];
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm = 0;

static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm)))) {
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm];
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(PyObject *o) {
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm)))) {
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm},
  {Py_tp_new, (void *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm},
  {0, 0},
};
static PyType_Spec __pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_spec = {
  "pyglui.ui.__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm",
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER,
  __pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_slots,
};
#else

static PyTypeObject __pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyglui.ui.""__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm", /*tp_name*/
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  #if CYTHON_USE_MODULE_STATE
  {0, __pyx_k_02_0f_06_3f, sizeof(__pyx_k_02_0f_06_3f), 0, 1, 0, 0},
  {0, __pyx_k_0_2f, sizeof(__pyx_k_0_2f), 0, 1, 0, 0},
  {0, __pyx_k_1_31_0, sizeof(__pyx_k_1_31_0), 0, 1, 0, 0},
  {0, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
  {0, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu, sizeof(__pyx_k_Base_Menu), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu___reduce_cython, sizeof(__pyx_k_Base_Menu___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu___setstate_cython, sizeof(__pyx_k_Base_Menu___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu_append, sizeof(__pyx_k_Base_Menu_append), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu_collect_in_window, sizeof(__pyx_k_Base_Menu_collect_in_window), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu_extend, sizeof(__pyx_k_Base_Menu_extend), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu_insert, sizeof(__pyx_k_Base_Menu_insert), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu_remove, sizeof(__pyx_k_Base_Menu_remove), 0, 0, 1, 1},
  {0, __pyx_k_Base_Menu_sync, sizeof(__pyx_k_Base_Menu_sync), 0, 0, 1, 1},
  {0, __pyx_k_Button, sizeof(__pyx_k_Button), 0, 0, 1, 1},
  {0, __pyx_k_Button___reduce_cython, sizeof(__pyx_k_Button___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Button___setstate_cython, sizeof(__pyx_k_Button___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Button_draw, sizeof(__pyx_k_Button_draw), 0, 0, 1, 1},
  {0, __pyx_k_Button_handle_input, sizeof(__pyx_k_Button_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Buttons, sizeof(__pyx_k_Buttons), 0, 1, 0, 0},
  {0, __pyx_k_Can_only_append_UI_elements_not, sizeof(__pyx_k_Can_only_append_UI_elements_not), 0, 1, 0, 0},
  {0, __pyx_k_Chars, sizeof(__pyx_k_Chars), 0, 1, 0, 0},
  {0, __pyx_k_Color_Legend, sizeof(__pyx_k_Color_Legend), 0, 0, 1, 1},
  {0, __pyx_k_Color_Legend___reduce_cython, sizeof(__pyx_k_Color_Legend___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Color_Legend___setstate_cython, sizeof(__pyx_k_Color_Legend___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Color_Legend_draw, sizeof(__pyx_k_Color_Legend_draw), 0, 0, 1, 1},
  {0, __pyx_k_Color_Legend_precompute, sizeof(__pyx_k_Color_Legend_precompute), 0, 0, 1, 1},
  {0, __pyx_k_Container, sizeof(__pyx_k_Container), 0, 0, 1, 1},
  {0, __pyx_k_Container, sizeof(__pyx_k_Container), 0, 1, 0, 1},
  {0, __pyx_k_Container___reduce_cython, sizeof(__pyx_k_Container___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Container___setstate_cython, sizeof(__pyx_k_Container___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Container_draw, sizeof(__pyx_k_Container_draw), 0, 0, 1, 1},
  {0, __pyx_k_Container_draw_overlay, sizeof(__pyx_k_Container_draw_overlay), 0, 0, 1, 1},
  {0, __pyx_k_Container_handle_input, sizeof(__pyx_k_Container_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Container_init, sizeof(__pyx_k_Container_init), 0, 0, 1, 1},
  {0, __pyx_k_Current_Input_Mouse_pos, sizeof(__pyx_k_Current_Input_Mouse_pos), 0, 1, 0, 0},
  {0, __pyx_k_Darwin, sizeof(__pyx_k_Darwin), 0, 1, 0, 1},
  {0, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 1, 0, 0},
  {0, __pyx_k_Draggable, sizeof(__pyx_k_Draggable), 0, 0, 1, 1},
  {0, __pyx_k_Draggable___reduce_cython, sizeof(__pyx_k_Draggable___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Draggable___setstate_cython, sizeof(__pyx_k_Draggable___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Draggable_pre_handle_input, sizeof(__pyx_k_Draggable_pre_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_FitBox, sizeof(__pyx_k_FitBox), 0, 0, 1, 1},
  {0, __pyx_k_FitBox___reduce_cython, sizeof(__pyx_k_FitBox___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_FitBox___setstate_cython, sizeof(__pyx_k_FitBox___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_FitBox_design_org, sizeof(__pyx_k_FitBox_design_org), 0, 1, 0, 0},
  {0, __pyx_k_FitBox_mouse_over, sizeof(__pyx_k_FitBox_mouse_over), 0, 0, 1, 1},
  {0, __pyx_k_FitBox_mouse_over_margin, sizeof(__pyx_k_FitBox_mouse_over_margin), 0, 0, 1, 1},
  {0, __pyx_k_Growing_Menu, sizeof(__pyx_k_Growing_Menu), 0, 0, 1, 1},
  {0, __pyx_k_Growing_Menu___reduce_cython, sizeof(__pyx_k_Growing_Menu___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Growing_Menu___setstate_cython, sizeof(__pyx_k_Growing_Menu___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Growing_Menu_draw, sizeof(__pyx_k_Growing_Menu_draw), 0, 0, 1, 1},
  {0, __pyx_k_Growing_Menu_draw_overlay, sizeof(__pyx_k_Growing_Menu_draw_overlay), 0, 0, 1, 1},
  {0, __pyx_k_Growing_Menu_handle_input, sizeof(__pyx_k_Growing_Menu_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Growing_Menu_precompute, sizeof(__pyx_k_Growing_Menu_precompute), 0, 0, 1, 1},
  {0, __pyx_k_Growing_Menu_toggle_iconified, sizeof(__pyx_k_Growing_Menu_toggle_iconified), 0, 0, 1, 1},
  {0, __pyx_k_Header_Positon_argument_needs_to, sizeof(__pyx_k_Header_Positon_argument_needs_to), 0, 1, 0, 0},
  {0, __pyx_k_Horizontally_Stretching_Menu, sizeof(__pyx_k_Horizontally_Stretching_Menu), 0, 0, 1, 1},
  {0, __pyx_k_Horizontally_Stretching_Menu___r, sizeof(__pyx_k_Horizontally_Stretching_Menu___r), 0, 0, 1, 1},
  {0, __pyx_k_Horizontally_Stretching_Menu___s, sizeof(__pyx_k_Horizontally_Stretching_Menu___s), 0, 0, 1, 1},
  {0, __pyx_k_Horizontally_Stretching_Menu_dra, sizeof(__pyx_k_Horizontally_Stretching_Menu_dra), 0, 0, 1, 1},
  {0, __pyx_k_Horizontally_Stretching_Menu_dra_2, sizeof(__pyx_k_Horizontally_Stretching_Menu_dra_2), 0, 0, 1, 1},
  {0, __pyx_k_Horizontally_Stretching_Menu_han, sizeof(__pyx_k_Horizontally_Stretching_Menu_han), 0, 0, 1, 1},
  {0, __pyx_k_Hot_Key, sizeof(__pyx_k_Hot_Key), 0, 0, 1, 1},
  {0, __pyx_k_Hot_Key___reduce_cython, sizeof(__pyx_k_Hot_Key___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Hot_Key___setstate_cython, sizeof(__pyx_k_Hot_Key___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Hot_Key_handle_input, sizeof(__pyx_k_Hot_Key_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Hot_Key_sync, sizeof(__pyx_k_Hot_Key_sync), 0, 0, 1, 1},
  {0, __pyx_k_Icon, sizeof(__pyx_k_Icon), 0, 0, 1, 1},
  {0, __pyx_k_Icon___reduce_cython, sizeof(__pyx_k_Icon___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Icon___setstate_cython, sizeof(__pyx_k_Icon___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Icon_draw, sizeof(__pyx_k_Icon_draw), 0, 0, 1, 1},
  {0, __pyx_k_Icon_draw_overlay, sizeof(__pyx_k_Icon_draw_overlay), 0, 0, 1, 1},
  {0, __pyx_k_Icon_handle_input, sizeof(__pyx_k_Icon_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {0, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0},
  {0, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {0, __pyx_k_Indicator_values_are_required_to, sizeof(__pyx_k_Indicator_values_are_required_to), 0, 1, 0, 0},
  {0, __pyx_k_Info_Text, sizeof(__pyx_k_Info_Text), 0, 0, 1, 1},
  {0, __pyx_k_Info_Text___reduce_cython, sizeof(__pyx_k_Info_Text___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Info_Text___setstate_cython, sizeof(__pyx_k_Info_Text___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Info_Text_draw, sizeof(__pyx_k_Info_Text_draw), 0, 0, 1, 1},
  {0, __pyx_k_Info_Text_precompute, sizeof(__pyx_k_Info_Text_precompute), 0, 0, 1, 1},
  {0, __pyx_k_Input, sizeof(__pyx_k_Input), 0, 0, 1, 1},
  {0, __pyx_k_Input___reduce_cython, sizeof(__pyx_k_Input___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Input___setstate_cython, sizeof(__pyx_k_Input___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Input_purge, sizeof(__pyx_k_Input_purge), 0, 0, 1, 1},
  {0, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {0, __pyx_k_Keys, sizeof(__pyx_k_Keys), 0, 1, 0, 0},
  {0, __pyx_k_Mouse_delta, sizeof(__pyx_k_Mouse_delta), 0, 1, 0, 0},
  {0, __pyx_k_Movable_Menu, sizeof(__pyx_k_Movable_Menu), 0, 0, 1, 1},
  {0, __pyx_k_Movable_Menu___reduce_cython, sizeof(__pyx_k_Movable_Menu___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Movable_Menu___setstate_cython, sizeof(__pyx_k_Movable_Menu___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0},
  {0, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
  {0, __pyx_k_OpenSans_Regular_ttf, sizeof(__pyx_k_OpenSans_Regular_ttf), 0, 1, 0, 0},
  {0, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {0, __pyx_k_Pyx_CFunc_float__lParenUI_elem, sizeof(__pyx_k_Pyx_CFunc_float__lParenUI_elem), 0, 0, 1, 1},
  {0, __pyx_k_Roboto_Regular_ttf, sizeof(__pyx_k_Roboto_Regular_ttf), 0, 1, 0, 0},
  {0, __pyx_k_Scroll, sizeof(__pyx_k_Scroll), 0, 1, 0, 0},
  {0, __pyx_k_Scrolling_Menu, sizeof(__pyx_k_Scrolling_Menu), 0, 1, 0, 0},
  {0, __pyx_k_Scrolling_Menu_2, sizeof(__pyx_k_Scrolling_Menu_2), 0, 0, 1, 1},
  {0, __pyx_k_Scrolling_Menu___reduce_cython, sizeof(__pyx_k_Scrolling_Menu___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Scrolling_Menu___setstate_cython, sizeof(__pyx_k_Scrolling_Menu___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Scrolling_Menu_draw, sizeof(__pyx_k_Scrolling_Menu_draw), 0, 0, 1, 1},
  {0, __pyx_k_Scrolling_Menu_draw_overlay, sizeof(__pyx_k_Scrolling_Menu_draw_overlay), 0, 0, 1, 1},
  {0, __pyx_k_Scrolling_Menu_handle_input, sizeof(__pyx_k_Scrolling_Menu_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Scrolling_Menu_toggle_iconified, sizeof(__pyx_k_Scrolling_Menu_toggle_iconified), 0, 0, 1, 1},
  {0, __pyx_k_Seek_Bar, sizeof(__pyx_k_Seek_Bar), 0, 0, 1, 1},
  {0, __pyx_k_Seek_Bar___reduce_cython, sizeof(__pyx_k_Seek_Bar___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Seek_Bar___setstate_cython, sizeof(__pyx_k_Seek_Bar___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Seek_Bar_draw, sizeof(__pyx_k_Seek_Bar_draw), 0, 0, 1, 1},
  {0, __pyx_k_Seek_Bar_draw_overlay, sizeof(__pyx_k_Seek_Bar_draw_overlay), 0, 0, 1, 1},
  {0, __pyx_k_Seek_Bar_handle_input, sizeof(__pyx_k_Seek_Bar_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Seek_Bar_sync, sizeof(__pyx_k_Seek_Bar_sync), 0, 0, 1, 1},
  {0, __pyx_k_Selector, sizeof(__pyx_k_Selector), 0, 0, 1, 1},
  {0, __pyx_k_Selector___reduce_cython, sizeof(__pyx_k_Selector___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Selector___setstate_cython, sizeof(__pyx_k_Selector___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Selector__on_change, sizeof(__pyx_k_Selector__on_change), 0, 0, 1, 1},
  {0, __pyx_k_Selector_draw, sizeof(__pyx_k_Selector_draw), 0, 0, 1, 1},
  {0, __pyx_k_Selector_handle_input, sizeof(__pyx_k_Selector_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Selector_sync, sizeof(__pyx_k_Selector_sync), 0, 0, 1, 1},
  {0, __pyx_k_Separator, sizeof(__pyx_k_Separator), 0, 0, 1, 1},
  {0, __pyx_k_Separator___reduce_cython, sizeof(__pyx_k_Separator___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Separator___setstate_cython, sizeof(__pyx_k_Separator___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Separator_draw, sizeof(__pyx_k_Separator_draw), 0, 0, 1, 1},
  {0, __pyx_k_Separator_precompute, sizeof(__pyx_k_Separator_precompute), 0, 0, 1, 1},
  {0, __pyx_k_Slider, sizeof(__pyx_k_Slider), 0, 0, 1, 1},
  {0, __pyx_k_Slider_Text_Input, sizeof(__pyx_k_Slider_Text_Input), 0, 0, 1, 1},
  {0, __pyx_k_Slider_Text_Input___reduce_cytho, sizeof(__pyx_k_Slider_Text_Input___reduce_cytho), 0, 0, 1, 1},
  {0, __pyx_k_Slider_Text_Input___setstate_cyt, sizeof(__pyx_k_Slider_Text_Input___setstate_cyt), 0, 0, 1, 1},
  {0, __pyx_k_Slider___reduce_cython, sizeof(__pyx_k_Slider___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Slider___setstate_cython, sizeof(__pyx_k_Slider___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Slider_draw, sizeof(__pyx_k_Slider_draw), 0, 0, 1, 1},
  {0, __pyx_k_Slider_handle_input, sizeof(__pyx_k_Slider_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Slider_sync, sizeof(__pyx_k_Slider_sync), 0, 0, 1, 1},
  {0, __pyx_k_Slider_validate, sizeof(__pyx_k_Slider_validate), 0, 0, 1, 1},
  {0, __pyx_k_Slider_values_should_be_float_or, sizeof(__pyx_k_Slider_values_should_be_float_or), 0, 1, 0, 0},
  {0, __pyx_k_Stretching_Menu, sizeof(__pyx_k_Stretching_Menu), 0, 0, 1, 1},
  {0, __pyx_k_Stretching_Menu___reduce_cython, sizeof(__pyx_k_Stretching_Menu___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Stretching_Menu___setstate_cytho, sizeof(__pyx_k_Stretching_Menu___setstate_cytho), 0, 0, 1, 1},
  {0, __pyx_k_Stretching_Menu_draw, sizeof(__pyx_k_Stretching_Menu_draw), 0, 0, 1, 1},
  {0, __pyx_k_Stretching_Menu_draw_overlay, sizeof(__pyx_k_Stretching_Menu_draw_overlay), 0, 0, 1, 1},
  {0, __pyx_k_Stretching_Menu_handle_input, sizeof(__pyx_k_Stretching_Menu_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Switch, sizeof(__pyx_k_Switch), 0, 0, 1, 1},
  {0, __pyx_k_Switch___reduce_cython, sizeof(__pyx_k_Switch___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Switch___setstate_cython, sizeof(__pyx_k_Switch___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Switch_draw, sizeof(__pyx_k_Switch_draw), 0, 0, 1, 1},
  {0, __pyx_k_Switch_handle_input, sizeof(__pyx_k_Switch_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Switch_sync, sizeof(__pyx_k_Switch_sync), 0, 0, 1, 1},
  {0, __pyx_k_Synced_Value, sizeof(__pyx_k_Synced_Value), 0, 0, 1, 1},
  {0, __pyx_k_Synced_Value___reduce_cython, sizeof(__pyx_k_Synced_Value___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Synced_Value___setstate_cython, sizeof(__pyx_k_Synced_Value___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Synced_value_s_is_not_part_of_se, sizeof(__pyx_k_Synced_value_s_is_not_part_of_se), 0, 1, 0, 0},
  {0, __pyx_k_Text_Input, sizeof(__pyx_k_Text_Input), 0, 0, 1, 1},
  {0, __pyx_k_Text_Input___reduce_cython, sizeof(__pyx_k_Text_Input___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Text_Input___setstate_cython, sizeof(__pyx_k_Text_Input___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Text_Input_draw, sizeof(__pyx_k_Text_Input_draw), 0, 0, 1, 1},
  {0, __pyx_k_Text_Input_handle_input, sizeof(__pyx_k_Text_Input_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Text_Input_pre_handle_input, sizeof(__pyx_k_Text_Input_pre_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Text_Input_sync, sizeof(__pyx_k_Text_Input_sync), 0, 0, 1, 1},
  {0, __pyx_k_Thumb, sizeof(__pyx_k_Thumb), 0, 0, 1, 1},
  {0, __pyx_k_Thumb___reduce_cython, sizeof(__pyx_k_Thumb___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Thumb___setstate_cython, sizeof(__pyx_k_Thumb___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Thumb_draw, sizeof(__pyx_k_Thumb_draw), 0, 0, 1, 1},
  {0, __pyx_k_Thumb_handle_input, sizeof(__pyx_k_Thumb_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_Thumb_sync, sizeof(__pyx_k_Thumb_sync), 0, 0, 1, 1},
  {0, __pyx_k_Timeline, sizeof(__pyx_k_Timeline), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu, sizeof(__pyx_k_Timeline_Menu), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu___reduce_cython, sizeof(__pyx_k_Timeline_Menu___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu___setstate_cython, sizeof(__pyx_k_Timeline_Menu___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu_append, sizeof(__pyx_k_Timeline_Menu_append), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu_draw, sizeof(__pyx_k_Timeline_Menu_draw), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu_extend, sizeof(__pyx_k_Timeline_Menu_extend), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu_insert, sizeof(__pyx_k_Timeline_Menu_insert), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu_remove, sizeof(__pyx_k_Timeline_Menu_remove), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_Menu_toggle_iconified, sizeof(__pyx_k_Timeline_Menu_toggle_iconified), 0, 0, 1, 1},
  {0, __pyx_k_Timeline___reduce_cython, sizeof(__pyx_k_Timeline___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Timeline___setstate_cython, sizeof(__pyx_k_Timeline___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_draw, sizeof(__pyx_k_Timeline_draw), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_draw_label_default, sizeof(__pyx_k_Timeline_draw_label_default), 0, 0, 1, 1},
  {0, __pyx_k_Timeline_refresh, sizeof(__pyx_k_Timeline_refresh), 0, 0, 1, 1},
  {0, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {0, __pyx_k_UI, sizeof(__pyx_k_UI), 0, 0, 1, 1},
  {0, __pyx_k_UI_Framebuffer_could_not_be_crea, sizeof(__pyx_k_UI_Framebuffer_could_not_be_crea), 0, 1, 0, 0},
  {0, __pyx_k_UI___reduce_cython, sizeof(__pyx_k_UI___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_UI___setstate_cython, sizeof(__pyx_k_UI___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_UI_add_font, sizeof(__pyx_k_UI_add_font), 0, 0, 1, 1},
  {0, __pyx_k_UI_append, sizeof(__pyx_k_UI_append), 0, 0, 1, 1},
  {0, __pyx_k_UI_collect_menus, sizeof(__pyx_k_UI_collect_menus), 0, 0, 1, 1},
  {0, __pyx_k_UI_element, sizeof(__pyx_k_UI_element), 0, 0, 1, 1},
  {0, __pyx_k_UI_element___reduce_cython, sizeof(__pyx_k_UI_element___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_UI_element___setstate_cython, sizeof(__pyx_k_UI_element___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_UI_element_draw, sizeof(__pyx_k_UI_element_draw), 0, 0, 1, 1},
  {0, __pyx_k_UI_element_draw_overlay, sizeof(__pyx_k_UI_element_draw_overlay), 0, 0, 1, 1},
  {0, __pyx_k_UI_element_handle_input, sizeof(__pyx_k_UI_element_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_UI_element_pre_handle_input, sizeof(__pyx_k_UI_element_pre_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_UI_element_precompute, sizeof(__pyx_k_UI_element_precompute), 0, 0, 1, 1},
  {0, __pyx_k_UI_element_sync, sizeof(__pyx_k_UI_element_sync), 0, 0, 1, 1},
  {0, __pyx_k_UI_extend, sizeof(__pyx_k_UI_extend), 0, 0, 1, 1},
  {0, __pyx_k_UI_remove, sizeof(__pyx_k_UI_remove), 0, 0, 1, 1},
  {0, __pyx_k_UI_terminate, sizeof(__pyx_k_UI_terminate), 0, 0, 1, 1},
  {0, __pyx_k_UI_update, sizeof(__pyx_k_UI_update), 0, 0, 1, 1},
  {0, __pyx_k_UI_update_button, sizeof(__pyx_k_UI_update_button), 0, 0, 1, 1},
  {0, __pyx_k_UI_update_char, sizeof(__pyx_k_UI_update_char), 0, 0, 1, 1},
  {0, __pyx_k_UI_update_clipboard, sizeof(__pyx_k_UI_update_clipboard), 0, 0, 1, 1},
  {0, __pyx_k_UI_update_key, sizeof(__pyx_k_UI_update_key), 0, 0, 1, 1},
  {0, __pyx_k_UI_update_mouse, sizeof(__pyx_k_UI_update_mouse), 0, 0, 1, 1},
  {0, __pyx_k_UI_update_scroll, sizeof(__pyx_k_UI_update_scroll), 0, 0, 1, 1},
  {0, __pyx_k_UI_update_window, sizeof(__pyx_k_UI_update_window), 0, 0, 1, 1},
  {0, __pyx_k_Unused_Input, sizeof(__pyx_k_Unused_Input), 0, 0, 1, 1},
  {0, __pyx_k_Unused_Input, sizeof(__pyx_k_Unused_Input), 0, 1, 0, 1},
  {0, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {0, __pyx_k_Vec2, sizeof(__pyx_k_Vec2), 0, 0, 1, 1},
  {0, __pyx_k_Vec2___reduce_cython, sizeof(__pyx_k_Vec2___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Vec2___setstate_cython, sizeof(__pyx_k_Vec2___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k__330, sizeof(__pyx_k__330), 0, 0, 1, 1},
  {0, __pyx_k__34, sizeof(__pyx_k__34), 0, 1, 0, 0},
  {0, __pyx_k__50, sizeof(__pyx_k__50), 0, 0, 1, 1},
  {0, __pyx_k__88, sizeof(__pyx_k__88), 0, 1, 0, 0},
  {0, __pyx_k__93, sizeof(__pyx_k__93), 0, 1, 0, 0},
  {0, __pyx_k__97, sizeof(__pyx_k__97), 0, 0, 1, 1},
  {0, __pyx_k_action, sizeof(__pyx_k_action), 0, 0, 1, 1},
  {0, __pyx_k_add_font, sizeof(__pyx_k_add_font), 0, 0, 1, 1},
  {0, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {0, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {0, __pyx_k_arrest_axis, sizeof(__pyx_k_arrest_axis), 0, 0, 1, 1},
  {0, __pyx_k_as_tuple, sizeof(__pyx_k_as_tuple), 0, 0, 1, 1},
  {0, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
  {0, __pyx_k_attribute_context, sizeof(__pyx_k_attribute_context), 0, 0, 1, 1},
  {0, __pyx_k_attribute_name, sizeof(__pyx_k_attribute_name), 0, 0, 1, 1},
  {0, __pyx_k_backwards, sizeof(__pyx_k_backwards), 0, 1, 0, 1},
  {0, __pyx_k_bottom, sizeof(__pyx_k_bottom), 0, 1, 0, 1},
  {0, __pyx_k_button, sizeof(__pyx_k_button), 0, 0, 1, 1},
  {0, __pyx_k_buttons, sizeof(__pyx_k_buttons), 0, 1, 0, 1},
  {0, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {0, __pyx_k_catch_input, sizeof(__pyx_k_catch_input), 0, 0, 1, 1},
  {0, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1},
  {0, __pyx_k_centered, sizeof(__pyx_k_centered), 0, 0, 1, 1},
  {0, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1},
  {0, __pyx_k_char, sizeof(__pyx_k_char), 0, 0, 1, 1},
  {0, __pyx_k_chars, sizeof(__pyx_k_chars), 0, 1, 0, 1},
  {0, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
  {0, __pyx_k_cinit___locals_default_selecti, sizeof(__pyx_k_cinit___locals_default_selecti), 0, 0, 1, 1},
  {0, __pyx_k_cinit___locals_default_selecti_2, sizeof(__pyx_k_cinit___locals_default_selecti_2), 0, 0, 1, 1},
  {0, __pyx_k_cinit___locals_lambda, sizeof(__pyx_k_cinit___locals_lambda), 0, 0, 1, 1},
  {0, __pyx_k_cinit___locals_set_play, sizeof(__pyx_k_cinit___locals_set_play), 0, 0, 1, 1},
  {0, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {0, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
  {0, __pyx_k_clear_state, sizeof(__pyx_k_clear_state), 0, 0, 1, 1},
  {0, __pyx_k_click_cb, sizeof(__pyx_k_click_cb), 0, 0, 1, 1},
  {0, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {0, __pyx_k_clipboard, sizeof(__pyx_k_clipboard), 0, 0, 1, 1},
  {0, __pyx_k_clipboard, sizeof(__pyx_k_clipboard), 0, 1, 0, 1},
  {0, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {0, __pyx_k_collapsed, sizeof(__pyx_k_collapsed), 0, 0, 1, 1},
  {0, __pyx_k_collapsed, sizeof(__pyx_k_collapsed), 0, 1, 0, 1},
  {0, __pyx_k_collect_in_window, sizeof(__pyx_k_collect_in_window), 0, 0, 1, 1},
  {0, __pyx_k_collect_menus, sizeof(__pyx_k_collect_menus), 0, 0, 1, 1},
  {0, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {0, __pyx_k_comptd_org, sizeof(__pyx_k_comptd_org), 0, 1, 0, 0},
  {0, __pyx_k_configuration, sizeof(__pyx_k_configuration), 0, 0, 1, 1},
  {0, __pyx_k_content_height, sizeof(__pyx_k_content_height), 0, 0, 1, 1},
  {0, __pyx_k_contextlib, sizeof(__pyx_k_contextlib), 0, 0, 1, 1},
  {0, __pyx_k_contextmanager, sizeof(__pyx_k_contextmanager), 0, 0, 1, 1},
  {0, __pyx_k_cysignals, sizeof(__pyx_k_cysignals), 0, 0, 1, 1},
  {0, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 0},
  {0, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {0, __pyx_k_default_selection_getter, sizeof(__pyx_k_default_selection_getter), 0, 0, 1, 1},
  {0, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {0, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {0, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1},
  {0, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
  {0, __pyx_k_display_format, sizeof(__pyx_k_display_format), 0, 0, 1, 1},
  {0, __pyx_k_draw, sizeof(__pyx_k_draw), 0, 0, 1, 1},
  {0, __pyx_k_draw_data_callback, sizeof(__pyx_k_draw_data_callback), 0, 0, 1, 1},
  {0, __pyx_k_draw_label_callback, sizeof(__pyx_k_draw_label_callback), 0, 0, 1, 1},
  {0, __pyx_k_draw_label_default, sizeof(__pyx_k_draw_label_default), 0, 0, 1, 1},
  {0, __pyx_k_draw_overlay, sizeof(__pyx_k_draw_overlay), 0, 0, 1, 1},
  {0, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {0, __pyx_k_elm, sizeof(__pyx_k_elm), 0, 0, 1, 1},
  {0, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
  {0, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {0, __pyx_k_eval, sizeof(__pyx_k_eval), 0, 0, 1, 1},
  {0, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {0, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
  {0, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {0, __pyx_k_font_name, sizeof(__pyx_k_font_name), 0, 0, 1, 1},
  {0, __pyx_k_font_path, sizeof(__pyx_k_font_path), 0, 0, 1, 1},
  {0, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {0, __pyx_k_forwards, sizeof(__pyx_k_forwards), 0, 1, 0, 1},
  {0, __pyx_k_frange, sizeof(__pyx_k_frange), 0, 0, 1, 1},
  {0, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
  {0, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
  {0, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {0, __pyx_k_get_all_font_paths, sizeof(__pyx_k_get_all_font_paths), 0, 0, 1, 1},
  {0, __pyx_k_get_opensans_font_path, sizeof(__pyx_k_get_opensans_font_path), 0, 0, 1, 1},
  {0, __pyx_k_get_pupil_icons_font_path, sizeof(__pyx_k_get_pupil_icons_font_path), 0, 0, 1, 1},
  {0, __pyx_k_get_roboto_font_path, sizeof(__pyx_k_get_roboto_font_path), 0, 0, 1, 1},
  {0, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {0, __pyx_k_getter, sizeof(__pyx_k_getter), 0, 0, 1, 1},
  {0, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
  {0, __pyx_k_handle_input, sizeof(__pyx_k_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_handle_start_reference, sizeof(__pyx_k_handle_start_reference), 0, 0, 1, 1},
  {0, __pyx_k_has_no_attribute, sizeof(__pyx_k_has_no_attribute), 0, 1, 0, 0},
  {0, __pyx_k_has_no_entry, sizeof(__pyx_k_has_no_entry), 0, 1, 0, 0},
  {0, __pyx_k_header_pos, sizeof(__pyx_k_header_pos), 0, 0, 1, 1},
  {0, __pyx_k_header_pos_id, sizeof(__pyx_k_header_pos_id), 0, 0, 1, 1},
  {0, __pyx_k_headline, sizeof(__pyx_k_headline), 0, 1, 0, 1},
  {0, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1},
  {0, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 1, 0, 1},
  {0, __pyx_k_hotkey, sizeof(__pyx_k_hotkey), 0, 0, 1, 1},
  {0, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {0, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
  {0, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {0, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {0, __pyx_k_indicator_start, sizeof(__pyx_k_indicator_start), 0, 0, 1, 1},
  {0, __pyx_k_indicator_stop, sizeof(__pyx_k_indicator_stop), 0, 0, 1, 1},
  {0, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {0, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
  {0, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1},
  {0, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
  {0, __pyx_k_is_of_type, sizeof(__pyx_k_is_of_type), 0, 1, 0, 0},
  {0, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
  {0, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {0, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {0, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 1, 0, 1},
  {0, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {0, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
  {0, __pyx_k_label, sizeof(__pyx_k_label), 0, 1, 0, 1},
  {0, __pyx_k_label_font, sizeof(__pyx_k_label_font), 0, 0, 1, 1},
  {0, __pyx_k_label_getter, sizeof(__pyx_k_label_getter), 0, 0, 1, 1},
  {0, __pyx_k_label_line_height, sizeof(__pyx_k_label_line_height), 0, 0, 1, 1},
  {0, __pyx_k_label_offset_size, sizeof(__pyx_k_label_offset_size), 0, 0, 1, 1},
  {0, __pyx_k_label_offset_x, sizeof(__pyx_k_label_offset_x), 0, 0, 1, 1},
  {0, __pyx_k_label_offset_y, sizeof(__pyx_k_label_offset_y), 0, 0, 1, 1},
  {0, __pyx_k_labels, sizeof(__pyx_k_labels), 0, 0, 1, 1},
  {0, __pyx_k_left, sizeof(__pyx_k_left), 0, 1, 0, 1},
  {0, __pyx_k_line_color, sizeof(__pyx_k_line_color), 0, 0, 1, 1},
  {0, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
  {0, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {0, __pyx_k_margin, sizeof(__pyx_k_margin), 0, 0, 1, 1},
  {0, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {0, __pyx_k_max_ts, sizeof(__pyx_k_max_ts), 0, 0, 1, 1},
  {0, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
  {0, __pyx_k_min_size, sizeof(__pyx_k_min_size), 0, 0, 1, 1},
  {0, __pyx_k_min_size, sizeof(__pyx_k_min_size), 0, 1, 0, 1},
  {0, __pyx_k_min_ts, sizeof(__pyx_k_min_ts), 0, 0, 1, 1},
  {0, __pyx_k_mods, sizeof(__pyx_k_mods), 0, 0, 1, 1},
  {0, __pyx_k_mouse_over, sizeof(__pyx_k_mouse_over), 0, 0, 1, 1},
  {0, __pyx_k_mouse_over_margin, sizeof(__pyx_k_mouse_over_margin), 0, 0, 1, 1},
  {0, __pyx_k_mx, sizeof(__pyx_k_mx), 0, 0, 1, 1},
  {0, __pyx_k_my, sizeof(__pyx_k_my), 0, 0, 1, 1},
  {0, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {0, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {0, __pyx_k_nested, sizeof(__pyx_k_nested), 0, 0, 1, 1},
  {0, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {0, __pyx_k_new_input, sizeof(__pyx_k_new_input), 0, 0, 1, 1},
  {0, __pyx_k_new_value, sizeof(__pyx_k_new_value), 0, 0, 1, 1},
  {0, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {0, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {0, __pyx_k_objs, sizeof(__pyx_k_objs), 0, 0, 1, 1},
  {0, __pyx_k_off_color, sizeof(__pyx_k_off_color), 0, 0, 1, 1},
  {0, __pyx_k_off_val, sizeof(__pyx_k_off_val), 0, 0, 1, 1},
  {0, __pyx_k_on_change, sizeof(__pyx_k_on_change), 0, 0, 1, 1},
  {0, __pyx_k_on_change_2, sizeof(__pyx_k_on_change_2), 0, 0, 1, 1},
  {0, __pyx_k_on_color, sizeof(__pyx_k_on_color), 0, 0, 1, 1},
  {0, __pyx_k_on_val, sizeof(__pyx_k_on_val), 0, 0, 1, 1},
  {0, __pyx_k_opensans, sizeof(__pyx_k_opensans), 0, 1, 0, 1},
  {0, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {0, __pyx_k_outer_label, sizeof(__pyx_k_outer_label), 0, 0, 1, 1},
  {0, __pyx_k_padding, sizeof(__pyx_k_padding), 0, 0, 1, 1},
  {0, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1},
  {0, __pyx_k_parent_read_only, sizeof(__pyx_k_parent_read_only), 0, 0, 1, 1},
  {0, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {0, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {0, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
  {0, __pyx_k_play, sizeof(__pyx_k_play), 0, 0, 1, 1},
  {0, __pyx_k_play, sizeof(__pyx_k_play), 0, 1, 0, 1},
  {0, __pyx_k_playback_speed, sizeof(__pyx_k_playback_speed), 0, 1, 0, 1},
  {0, __pyx_k_playback_time_setter, sizeof(__pyx_k_playback_time_setter), 0, 0, 1, 1},
  {0, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {0, __pyx_k_pop_state, sizeof(__pyx_k_pop_state), 0, 0, 1, 1},
  {0, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {0, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 1, 0, 1},
  {0, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1},
  {0, __pyx_k_pre_handle_input, sizeof(__pyx_k_pre_handle_input), 0, 0, 1, 1},
  {0, __pyx_k_precompute, sizeof(__pyx_k_precompute), 0, 0, 1, 1},
  {0, __pyx_k_pupil_icons, sizeof(__pyx_k_pupil_icons), 0, 1, 0, 1},
  {0, __pyx_k_pupil_icons_ttf, sizeof(__pyx_k_pupil_icons_ttf), 0, 1, 0, 0},
  {0, __pyx_k_purge, sizeof(__pyx_k_purge), 0, 0, 1, 1},
  {0, __pyx_k_push_state, sizeof(__pyx_k_push_state), 0, 0, 1, 1},
  {0, __pyx_k_pyglui_ui, sizeof(__pyx_k_pyglui_ui), 0, 0, 1, 1},
  {0, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {0, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {0, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {0, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {0, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Base_Menu, sizeof(__pyx_k_pyx_unpickle_Base_Menu), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Movable_Menu, sizeof(__pyx_k_pyx_unpickle_Movable_Menu), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_UI_element, sizeof(__pyx_k_pyx_unpickle_UI_element), 0, 0, 1, 1},
  {0, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {0, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {0, __pyx_k_recent_idx_ts_getter, sizeof(__pyx_k_recent_idx_ts_getter), 0, 0, 1, 1},
  {0, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {0, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {0, __pyx_k_refresh, sizeof(__pyx_k_refresh), 0, 0, 1, 1},
  {0, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {0, __pyx_k_right, sizeof(__pyx_k_right), 0, 1, 0, 1},
  {0, __pyx_k_roboto, sizeof(__pyx_k_roboto), 0, 1, 0, 1},
  {0, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {0, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
  {0, __pyx_k_scancode, sizeof(__pyx_k_scancode), 0, 0, 1, 1},
  {0, __pyx_k_scrollstate, sizeof(__pyx_k_scrollstate), 0, 1, 0, 1},
  {0, __pyx_k_seeking_cb, sizeof(__pyx_k_seeking_cb), 0, 0, 1, 1},
  {0, __pyx_k_selection, sizeof(__pyx_k_selection), 0, 0, 1, 1},
  {0, __pyx_k_selection_getter, sizeof(__pyx_k_selection_getter), 0, 0, 1, 1},
  {0, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {0, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {0, __pyx_k_set_align, sizeof(__pyx_k_set_align), 0, 0, 1, 1},
  {0, __pyx_k_set_blur, sizeof(__pyx_k_set_blur), 0, 0, 1, 1},
  {0, __pyx_k_set_font, sizeof(__pyx_k_set_font), 0, 0, 1, 1},
  {0, __pyx_k_set_play, sizeof(__pyx_k_set_play), 0, 0, 1, 1},
  {0, __pyx_k_set_size, sizeof(__pyx_k_set_size), 0, 0, 1, 1},
  {0, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {0, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1},
  {0, __pyx_k_sig_on_off, sizeof(__pyx_k_sig_on_off), 0, 0, 1, 1},
  {0, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
  {0, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {0, __pyx_k_size, sizeof(__pyx_k_size), 0, 1, 0, 1},
  {0, __pyx_k_size_2, sizeof(__pyx_k_size_2), 0, 1, 0, 0},
  {0, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1},
  {0, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {0, __pyx_k_src_pyglui_custom_pxi, sizeof(__pyx_k_src_pyglui_custom_pxi), 0, 0, 1, 0},
  {0, __pyx_k_src_pyglui_helpers_pxi, sizeof(__pyx_k_src_pyglui_helpers_pxi), 0, 0, 1, 0},
  {0, __pyx_k_src_pyglui_menus_pxi, sizeof(__pyx_k_src_pyglui_menus_pxi), 0, 0, 1, 0},
  {0, __pyx_k_src_pyglui_timelines_pxi, sizeof(__pyx_k_src_pyglui_timelines_pxi), 0, 0, 1, 0},
  {0, __pyx_k_src_pyglui_ui_elements_pxi, sizeof(__pyx_k_src_pyglui_ui_elements_pxi), 0, 0, 1, 0},
  {0, __pyx_k_src_pyglui_ui_pyx, sizeof(__pyx_k_src_pyglui_ui_pyx), 0, 0, 1, 0},
  {0, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {0, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {0, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
  {0, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {0, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {0, __pyx_k_submenus, sizeof(__pyx_k_submenus), 0, 1, 0, 1},
  {0, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
  {0, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {0, __pyx_k_sx, sizeof(__pyx_k_sx), 0, 0, 1, 1},
  {0, __pyx_k_sy, sizeof(__pyx_k_sy), 0, 0, 1, 1},
  {0, __pyx_k_sync, sizeof(__pyx_k_sync), 0, 0, 1, 1},
  {0, __pyx_k_sync_ctx, sizeof(__pyx_k_sync_ctx), 0, 0, 1, 1},
  {0, __pyx_k_system, sizeof(__pyx_k_system), 0, 0, 1, 1},
  {0, __pyx_k_terminate, sizeof(__pyx_k_terminate), 0, 0, 1, 1},
  {0, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {0, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
  {0, __pyx_k_text_bounds, sizeof(__pyx_k_text_bounds), 0, 0, 1, 1},
  {0, __pyx_k_text_color, sizeof(__pyx_k_text_color), 0, 0, 1, 1},
  {0, __pyx_k_text_size, sizeof(__pyx_k_text_size), 0, 0, 1, 1},
  {0, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {0, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {0, __pyx_k_to_str, sizeof(__pyx_k_to_str), 0, 0, 1, 1},
  {0, __pyx_k_toggle_iconified, sizeof(__pyx_k_toggle_iconified), 0, 0, 1, 1},
  {0, __pyx_k_tooltip, sizeof(__pyx_k_tooltip), 0, 0, 1, 1},
  {0, __pyx_k_top, sizeof(__pyx_k_top), 0, 1, 0, 1},
  {0, __pyx_k_trigger_overlay_only, sizeof(__pyx_k_trigger_overlay_only), 0, 0, 1, 1},
  {0, __pyx_k_trim_left_ts, sizeof(__pyx_k_trim_left_ts), 0, 1, 0, 1},
  {0, __pyx_k_trim_right_ts, sizeof(__pyx_k_trim_right_ts), 0, 1, 0, 1},
  {0, __pyx_k_typed_val, sizeof(__pyx_k_typed_val), 0, 0, 1, 1},
  {0, __pyx_k_uncollapsed_min_size, sizeof(__pyx_k_uncollapsed_min_size), 0, 1, 0, 1},
  {0, __pyx_k_uncollapsed_pos, sizeof(__pyx_k_uncollapsed_pos), 0, 1, 0, 1},
  {0, __pyx_k_uncollapsed_size, sizeof(__pyx_k_uncollapsed_size), 0, 1, 0, 1},
  {0, __pyx_k_unichr, sizeof(__pyx_k_unichr), 0, 0, 1, 1},
  {0, __pyx_k_unused_Input, sizeof(__pyx_k_unused_Input), 0, 0, 1, 1},
  {0, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {0, __pyx_k_update_button, sizeof(__pyx_k_update_button), 0, 0, 1, 1},
  {0, __pyx_k_update_char, sizeof(__pyx_k_update_char), 0, 0, 1, 1},
  {0, __pyx_k_update_clipboard, sizeof(__pyx_k_update_clipboard), 0, 0, 1, 1},
  {0, __pyx_k_update_key, sizeof(__pyx_k_update_key), 0, 0, 1, 1},
  {0, __pyx_k_update_mouse, sizeof(__pyx_k_update_mouse), 0, 0, 1, 1},
  {0, __pyx_k_update_scroll, sizeof(__pyx_k_update_scroll), 0, 0, 1, 1},
  {0, __pyx_k_update_window, sizeof(__pyx_k_update_window), 0, 0, 1, 1},
  {0, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {0, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
  {0, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {0, __pyx_k_validate, sizeof(__pyx_k_validate), 0, 0, 1, 1},
  {0, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {0, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {0, __pyx_k_visible, sizeof(__pyx_k_visible), 0, 0, 1, 1},
  {0, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {0, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
  {0, __pyx_k_window, sizeof(__pyx_k_window), 0, 0, 1, 1},
  {0, __pyx_k_window_size, sizeof(__pyx_k_window_size), 0, 0, 1, 1},
  {0, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1},
  {0, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {0, __pyx_k_x_2, sizeof(__pyx_k_x_2), 0, 1, 0, 0},
  {0, __pyx_k_x_3, sizeof(__pyx_k_x_3), 0, 1, 0, 0},
  {0, __pyx_k_xpad, sizeof(__pyx_k_xpad), 0, 0, 1, 1},
  {0, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {0, __pyx_k_y_2, sizeof(__pyx_k_y_2), 0, 1, 0, 0},
  {0, __pyx_k_ypad, sizeof(__pyx_k_ypad), 0, 0, 1, 1},
  {0, __pyx_k_zero_crossing, sizeof(__pyx_k_zero_crossing), 0, 0, 1, 1},
  #else
  {&__pyx_kp_u_02_0f_06_3f, __pyx_k_02_0f_06_3f, sizeof(__pyx_k_02_0f_06_3f), 0, 1, 0, 0},
  {&__pyx_kp_u_0_2f, __pyx_k_0_2f, sizeof(__pyx_k_0_2f), 0, 1, 0, 0},
  {&__pyx_kp_u_1_31_0, __pyx_k_1_31_0, sizeof(__pyx_k_1_31_0), 0, 1, 0, 0},
  {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu, __pyx_k_Base_Menu, sizeof(__pyx_k_Base_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu___reduce_cython, __pyx_k_Base_Menu___reduce_cython, sizeof(__pyx_k_Base_Menu___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu___setstate_cython, __pyx_k_Base_Menu___setstate_cython, sizeof(__pyx_k_Base_Menu___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu_append, __pyx_k_Base_Menu_append, sizeof(__pyx_k_Base_Menu_append), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu_collect_in_window, __pyx_k_Base_Menu_collect_in_window, sizeof(__pyx_k_Base_Menu_collect_in_window), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu_extend, __pyx_k_Base_Menu_extend, sizeof(__pyx_k_Base_Menu_extend), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu_insert, __pyx_k_Base_Menu_insert, sizeof(__pyx_k_Base_Menu_insert), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu_remove, __pyx_k_Base_Menu_remove, sizeof(__pyx_k_Base_Menu_remove), 0, 0, 1, 1},
  {&__pyx_n_s_Base_Menu_sync, __pyx_k_Base_Menu_sync, sizeof(__pyx_k_Base_Menu_sync), 0, 0, 1, 1},
  {&__pyx_n_s_Button, __pyx_k_Button, sizeof(__pyx_k_Button), 0, 0, 1, 1},
  {&__pyx_n_s_Button___reduce_cython, __pyx_k_Button___reduce_cython, sizeof(__pyx_k_Button___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Button___setstate_cython, __pyx_k_Button___setstate_cython, sizeof(__pyx_k_Button___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Button_draw, __pyx_k_Button_draw, sizeof(__pyx_k_Button_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Button_handle_input, __pyx_k_Button_handle_input, sizeof(__pyx_k_Button_handle_input), 0, 0, 1, 1},
  {&__pyx_kp_u_Buttons, __pyx_k_Buttons, sizeof(__pyx_k_Buttons), 0, 1, 0, 0},
  {&__pyx_kp_u_Can_only_append_UI_elements_not, __pyx_k_Can_only_append_UI_elements_not, sizeof(__pyx_k_Can_only_append_UI_elements_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Chars, __pyx_k_Chars, sizeof(__pyx_k_Chars), 0, 1, 0, 0},
  {&__pyx_n_s_Color_Legend, __pyx_k_Color_Legend, sizeof(__pyx_k_Color_Legend), 0, 0, 1, 1},
  {&__pyx_n_s_Color_Legend___reduce_cython, __pyx_k_Color_Legend___reduce_cython, sizeof(__pyx_k_Color_Legend___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Color_Legend___setstate_cython, __pyx_k_Color_Legend___setstate_cython, sizeof(__pyx_k_Color_Legend___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Color_Legend_draw, __pyx_k_Color_Legend_draw, sizeof(__pyx_k_Color_Legend_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Color_Legend_precompute, __pyx_k_Color_Legend_precompute, sizeof(__pyx_k_Color_Legend_precompute), 0, 0, 1, 1},
  {&__pyx_n_s_Container, __pyx_k_Container, sizeof(__pyx_k_Container), 0, 0, 1, 1},
  {&__pyx_n_u_Container, __pyx_k_Container, sizeof(__pyx_k_Container), 0, 1, 0, 1},
  {&__pyx_n_s_Container___reduce_cython, __pyx_k_Container___reduce_cython, sizeof(__pyx_k_Container___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Container___setstate_cython, __pyx_k_Container___setstate_cython, sizeof(__pyx_k_Container___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Container_draw, __pyx_k_Container_draw, sizeof(__pyx_k_Container_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Container_draw_overlay, __pyx_k_Container_draw_overlay, sizeof(__pyx_k_Container_draw_overlay), 0, 0, 1, 1},
  {&__pyx_n_s_Container_handle_input, __pyx_k_Container_handle_input, sizeof(__pyx_k_Container_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Container_init, __pyx_k_Container_init, sizeof(__pyx_k_Container_init), 0, 0, 1, 1},
  {&__pyx_kp_u_Current_Input_Mouse_pos, __pyx_k_Current_Input_Mouse_pos, sizeof(__pyx_k_Current_Input_Mouse_pos), 0, 1, 0, 0},
  {&__pyx_n_u_Darwin, __pyx_k_Darwin, sizeof(__pyx_k_Darwin), 0, 1, 0, 1},
  {&__pyx_kp_u_Dict, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 1, 0, 0},
  {&__pyx_n_s_Draggable, __pyx_k_Draggable, sizeof(__pyx_k_Draggable), 0, 0, 1, 1},
  {&__pyx_n_s_Draggable___reduce_cython, __pyx_k_Draggable___reduce_cython, sizeof(__pyx_k_Draggable___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Draggable___setstate_cython, __pyx_k_Draggable___setstate_cython, sizeof(__pyx_k_Draggable___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Draggable_pre_handle_input, __pyx_k_Draggable_pre_handle_input, sizeof(__pyx_k_Draggable_pre_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_FitBox, __pyx_k_FitBox, sizeof(__pyx_k_FitBox), 0, 0, 1, 1},
  {&__pyx_n_s_FitBox___reduce_cython, __pyx_k_FitBox___reduce_cython, sizeof(__pyx_k_FitBox___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_FitBox___setstate_cython, __pyx_k_FitBox___setstate_cython, sizeof(__pyx_k_FitBox___setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_FitBox_design_org, __pyx_k_FitBox_design_org, sizeof(__pyx_k_FitBox_design_org), 0, 1, 0, 0},
  {&__pyx_n_s_FitBox_mouse_over, __pyx_k_FitBox_mouse_over, sizeof(__pyx_k_FitBox_mouse_over), 0, 0, 1, 1},
  {&__pyx_n_s_FitBox_mouse_over_margin, __pyx_k_FitBox_mouse_over_margin, sizeof(__pyx_k_FitBox_mouse_over_margin), 0, 0, 1, 1},
  {&__pyx_n_s_Growing_Menu, __pyx_k_Growing_Menu, sizeof(__pyx_k_Growing_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_Growing_Menu___reduce_cython, __pyx_k_Growing_Menu___reduce_cython, sizeof(__pyx_k_Growing_Menu___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Growing_Menu___setstate_cython, __pyx_k_Growing_Menu___setstate_cython, sizeof(__pyx_k_Growing_Menu___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Growing_Menu_draw, __pyx_k_Growing_Menu_draw, sizeof(__pyx_k_Growing_Menu_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Growing_Menu_draw_overlay, __pyx_k_Growing_Menu_draw_overlay, sizeof(__pyx_k_Growing_Menu_draw_overlay), 0, 0, 1, 1},
  {&__pyx_n_s_Growing_Menu_handle_input, __pyx_k_Growing_Menu_handle_input, sizeof(__pyx_k_Growing_Menu_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Growing_Menu_precompute, __pyx_k_Growing_Menu_precompute, sizeof(__pyx_k_Growing_Menu_precompute), 0, 0, 1, 1},
  {&__pyx_n_s_Growing_Menu_toggle_iconified, __pyx_k_Growing_Menu_toggle_iconified, sizeof(__pyx_k_Growing_Menu_toggle_iconified), 0, 0, 1, 1},
  {&__pyx_kp_u_Header_Positon_argument_needs_to, __pyx_k_Header_Positon_argument_needs_to, sizeof(__pyx_k_Header_Positon_argument_needs_to), 0, 1, 0, 0},
  {&__pyx_n_s_Horizontally_Stretching_Menu, __pyx_k_Horizontally_Stretching_Menu, sizeof(__pyx_k_Horizontally_Stretching_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_Horizontally_Stretching_Menu___r, __pyx_k_Horizontally_Stretching_Menu___r, sizeof(__pyx_k_Horizontally_Stretching_Menu___r), 0, 0, 1, 1},
  {&__pyx_n_s_Horizontally_Stretching_Menu___s, __pyx_k_Horizontally_Stretching_Menu___s, sizeof(__pyx_k_Horizontally_Stretching_Menu___s), 0, 0, 1, 1},
  {&__pyx_n_s_Horizontally_Stretching_Menu_dra, __pyx_k_Horizontally_Stretching_Menu_dra, sizeof(__pyx_k_Horizontally_Stretching_Menu_dra), 0, 0, 1, 1},
  {&__pyx_n_s_Horizontally_Stretching_Menu_dra_2, __pyx_k_Horizontally_Stretching_Menu_dra_2, sizeof(__pyx_k_Horizontally_Stretching_Menu_dra_2), 0, 0, 1, 1},
  {&__pyx_n_s_Horizontally_Stretching_Menu_han, __pyx_k_Horizontally_Stretching_Menu_han, sizeof(__pyx_k_Horizontally_Stretching_Menu_han), 0, 0, 1, 1},
  {&__pyx_n_s_Hot_Key, __pyx_k_Hot_Key, sizeof(__pyx_k_Hot_Key), 0, 0, 1, 1},
  {&__pyx_n_s_Hot_Key___reduce_cython, __pyx_k_Hot_Key___reduce_cython, sizeof(__pyx_k_Hot_Key___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Hot_Key___setstate_cython, __pyx_k_Hot_Key___setstate_cython, sizeof(__pyx_k_Hot_Key___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Hot_Key_handle_input, __pyx_k_Hot_Key_handle_input, sizeof(__pyx_k_Hot_Key_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Hot_Key_sync, __pyx_k_Hot_Key_sync, sizeof(__pyx_k_Hot_Key_sync), 0, 0, 1, 1},
  {&__pyx_n_s_Icon, __pyx_k_Icon, sizeof(__pyx_k_Icon), 0, 0, 1, 1},
  {&__pyx_n_s_Icon___reduce_cython, __pyx_k_Icon___reduce_cython, sizeof(__pyx_k_Icon___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Icon___setstate_cython, __pyx_k_Icon___setstate_cython, sizeof(__pyx_k_Icon___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Icon_draw, __pyx_k_Icon_draw, sizeof(__pyx_k_Icon_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Icon_draw_overlay, __pyx_k_Icon_draw_overlay, sizeof(__pyx_k_Icon_draw_overlay), 0, 0, 1, 1},
  {&__pyx_n_s_Icon_handle_input, __pyx_k_Icon_handle_input, sizeof(__pyx_k_Icon_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_u_Indicator_values_are_required_to, __pyx_k_Indicator_values_are_required_to, sizeof(__pyx_k_Indicator_values_are_required_to), 0, 1, 0, 0},
  {&__pyx_n_s_Info_Text, __pyx_k_Info_Text, sizeof(__pyx_k_Info_Text), 0, 0, 1, 1},
  {&__pyx_n_s_Info_Text___reduce_cython, __pyx_k_Info_Text___reduce_cython, sizeof(__pyx_k_Info_Text___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Info_Text___setstate_cython, __pyx_k_Info_Text___setstate_cython, sizeof(__pyx_k_Info_Text___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Info_Text_draw, __pyx_k_Info_Text_draw, sizeof(__pyx_k_Info_Text_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Info_Text_precompute, __pyx_k_Info_Text_precompute, sizeof(__pyx_k_Info_Text_precompute), 0, 0, 1, 1},
  {&__pyx_n_s_Input, __pyx_k_Input, sizeof(__pyx_k_Input), 0, 0, 1, 1},
  {&__pyx_n_s_Input___reduce_cython, __pyx_k_Input___reduce_cython, sizeof(__pyx_k_Input___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Input___setstate_cython, __pyx_k_Input___setstate_cython, sizeof(__pyx_k_Input___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Input_purge, __pyx_k_Input_purge, sizeof(__pyx_k_Input_purge), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_kp_u_Keys, __pyx_k_Keys, sizeof(__pyx_k_Keys), 0, 1, 0, 0},
  {&__pyx_kp_u_Mouse_delta, __pyx_k_Mouse_delta, sizeof(__pyx_k_Mouse_delta), 0, 1, 0, 0},
  {&__pyx_n_s_Movable_Menu, __pyx_k_Movable_Menu, sizeof(__pyx_k_Movable_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_Movable_Menu___reduce_cython, __pyx_k_Movable_Menu___reduce_cython, sizeof(__pyx_k_Movable_Menu___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Movable_Menu___setstate_cython, __pyx_k_Movable_Menu___setstate_cython, sizeof(__pyx_k_Movable_Menu___setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0},
  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
  {&__pyx_kp_u_OpenSans_Regular_ttf, __pyx_k_OpenSans_Regular_ttf, sizeof(__pyx_k_OpenSans_Regular_ttf), 0, 1, 0, 0},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_float__lParenUI_elem, __pyx_k_Pyx_CFunc_float__lParenUI_elem, sizeof(__pyx_k_Pyx_CFunc_float__lParenUI_elem), 0, 0, 1, 1},
  {&__pyx_kp_u_Roboto_Regular_ttf, __pyx_k_Roboto_Regular_ttf, sizeof(__pyx_k_Roboto_Regular_ttf), 0, 1, 0, 0},
  {&__pyx_kp_u_Scroll, __pyx_k_Scroll, sizeof(__pyx_k_Scroll), 0, 1, 0, 0},
  {&__pyx_kp_u_Scrolling_Menu, __pyx_k_Scrolling_Menu, sizeof(__pyx_k_Scrolling_Menu), 0, 1, 0, 0},
  {&__pyx_n_s_Scrolling_Menu_2, __pyx_k_Scrolling_Menu_2, sizeof(__pyx_k_Scrolling_Menu_2), 0, 0, 1, 1},
  {&__pyx_n_s_Scrolling_Menu___reduce_cython, __pyx_k_Scrolling_Menu___reduce_cython, sizeof(__pyx_k_Scrolling_Menu___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Scrolling_Menu___setstate_cython, __pyx_k_Scrolling_Menu___setstate_cython, sizeof(__pyx_k_Scrolling_Menu___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Scrolling_Menu_draw, __pyx_k_Scrolling_Menu_draw, sizeof(__pyx_k_Scrolling_Menu_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Scrolling_Menu_draw_overlay, __pyx_k_Scrolling_Menu_draw_overlay, sizeof(__pyx_k_Scrolling_Menu_draw_overlay), 0, 0, 1, 1},
  {&__pyx_n_s_Scrolling_Menu_handle_input, __pyx_k_Scrolling_Menu_handle_input, sizeof(__pyx_k_Scrolling_Menu_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Scrolling_Menu_toggle_iconified, __pyx_k_Scrolling_Menu_toggle_iconified, sizeof(__pyx_k_Scrolling_Menu_toggle_iconified), 0, 0, 1, 1},
  {&__pyx_n_s_Seek_Bar, __pyx_k_Seek_Bar, sizeof(__pyx_k_Seek_Bar), 0, 0, 1, 1},
  {&__pyx_n_s_Seek_Bar___reduce_cython, __pyx_k_Seek_Bar___reduce_cython, sizeof(__pyx_k_Seek_Bar___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Seek_Bar___setstate_cython, __pyx_k_Seek_Bar___setstate_cython, sizeof(__pyx_k_Seek_Bar___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Seek_Bar_draw, __pyx_k_Seek_Bar_draw, sizeof(__pyx_k_Seek_Bar_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Seek_Bar_draw_overlay, __pyx_k_Seek_Bar_draw_overlay, sizeof(__pyx_k_Seek_Bar_draw_overlay), 0, 0, 1, 1},
  {&__pyx_n_s_Seek_Bar_handle_input, __pyx_k_Seek_Bar_handle_input, sizeof(__pyx_k_Seek_Bar_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Seek_Bar_sync, __pyx_k_Seek_Bar_sync, sizeof(__pyx_k_Seek_Bar_sync), 0, 0, 1, 1},
  {&__pyx_n_s_Selector, __pyx_k_Selector, sizeof(__pyx_k_Selector), 0, 0, 1, 1},
  {&__pyx_n_s_Selector___reduce_cython, __pyx_k_Selector___reduce_cython, sizeof(__pyx_k_Selector___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Selector___setstate_cython, __pyx_k_Selector___setstate_cython, sizeof(__pyx_k_Selector___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Selector__on_change, __pyx_k_Selector__on_change, sizeof(__pyx_k_Selector__on_change), 0, 0, 1, 1},
  {&__pyx_n_s_Selector_draw, __pyx_k_Selector_draw, sizeof(__pyx_k_Selector_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Selector_handle_input, __pyx_k_Selector_handle_input, sizeof(__pyx_k_Selector_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Selector_sync, __pyx_k_Selector_sync, sizeof(__pyx_k_Selector_sync), 0, 0, 1, 1},
  {&__pyx_n_s_Separator, __pyx_k_Separator, sizeof(__pyx_k_Separator), 0, 0, 1, 1},
  {&__pyx_n_s_Separator___reduce_cython, __pyx_k_Separator___reduce_cython, sizeof(__pyx_k_Separator___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Separator___setstate_cython, __pyx_k_Separator___setstate_cython, sizeof(__pyx_k_Separator___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Separator_draw, __pyx_k_Separator_draw, sizeof(__pyx_k_Separator_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Separator_precompute, __pyx_k_Separator_precompute, sizeof(__pyx_k_Separator_precompute), 0, 0, 1, 1},
  {&__pyx_n_s_Slider, __pyx_k_Slider, sizeof(__pyx_k_Slider), 0, 0, 1, 1},
  {&__pyx_n_s_Slider_Text_Input, __pyx_k_Slider_Text_Input, sizeof(__pyx_k_Slider_Text_Input), 0, 0, 1, 1},
  {&__pyx_n_s_Slider_Text_Input___reduce_cytho, __pyx_k_Slider_Text_Input___reduce_cytho, sizeof(__pyx_k_Slider_Text_Input___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_Slider_Text_Input___setstate_cyt, __pyx_k_Slider_Text_Input___setstate_cyt, sizeof(__pyx_k_Slider_Text_Input___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_Slider___reduce_cython, __pyx_k_Slider___reduce_cython, sizeof(__pyx_k_Slider___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Slider___setstate_cython, __pyx_k_Slider___setstate_cython, sizeof(__pyx_k_Slider___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Slider_draw, __pyx_k_Slider_draw, sizeof(__pyx_k_Slider_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Slider_handle_input, __pyx_k_Slider_handle_input, sizeof(__pyx_k_Slider_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Slider_sync, __pyx_k_Slider_sync, sizeof(__pyx_k_Slider_sync), 0, 0, 1, 1},
  {&__pyx_n_s_Slider_validate, __pyx_k_Slider_validate, sizeof(__pyx_k_Slider_validate), 0, 0, 1, 1},
  {&__pyx_kp_u_Slider_values_should_be_float_or, __pyx_k_Slider_values_should_be_float_or, sizeof(__pyx_k_Slider_values_should_be_float_or), 0, 1, 0, 0},
  {&__pyx_n_s_Stretching_Menu, __pyx_k_Stretching_Menu, sizeof(__pyx_k_Stretching_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_Stretching_Menu___reduce_cython, __pyx_k_Stretching_Menu___reduce_cython, sizeof(__pyx_k_Stretching_Menu___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Stretching_Menu___setstate_cytho, __pyx_k_Stretching_Menu___setstate_cytho, sizeof(__pyx_k_Stretching_Menu___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_Stretching_Menu_draw, __pyx_k_Stretching_Menu_draw, sizeof(__pyx_k_Stretching_Menu_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Stretching_Menu_draw_overlay, __pyx_k_Stretching_Menu_draw_overlay, sizeof(__pyx_k_Stretching_Menu_draw_overlay), 0, 0, 1, 1},
  {&__pyx_n_s_Stretching_Menu_handle_input, __pyx_k_Stretching_Menu_handle_input, sizeof(__pyx_k_Stretching_Menu_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Switch, __pyx_k_Switch, sizeof(__pyx_k_Switch), 0, 0, 1, 1},
  {&__pyx_n_s_Switch___reduce_cython, __pyx_k_Switch___reduce_cython, sizeof(__pyx_k_Switch___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Switch___setstate_cython, __pyx_k_Switch___setstate_cython, sizeof(__pyx_k_Switch___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Switch_draw, __pyx_k_Switch_draw, sizeof(__pyx_k_Switch_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Switch_handle_input, __pyx_k_Switch_handle_input, sizeof(__pyx_k_Switch_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Switch_sync, __pyx_k_Switch_sync, sizeof(__pyx_k_Switch_sync), 0, 0, 1, 1},
  {&__pyx_n_s_Synced_Value, __pyx_k_Synced_Value, sizeof(__pyx_k_Synced_Value), 0, 0, 1, 1},
  {&__pyx_n_s_Synced_Value___reduce_cython, __pyx_k_Synced_Value___reduce_cython, sizeof(__pyx_k_Synced_Value___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Synced_Value___setstate_cython, __pyx_k_Synced_Value___setstate_cython, sizeof(__pyx_k_Synced_Value___setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_Synced_value_s_is_not_part_of_se, __pyx_k_Synced_value_s_is_not_part_of_se, sizeof(__pyx_k_Synced_value_s_is_not_part_of_se), 0, 1, 0, 0},
  {&__pyx_n_s_Text_Input, __pyx_k_Text_Input, sizeof(__pyx_k_Text_Input), 0, 0, 1, 1},
  {&__pyx_n_s_Text_Input___reduce_cython, __pyx_k_Text_Input___reduce_cython, sizeof(__pyx_k_Text_Input___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Text_Input___setstate_cython, __pyx_k_Text_Input___setstate_cython, sizeof(__pyx_k_Text_Input___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Text_Input_draw, __pyx_k_Text_Input_draw, sizeof(__pyx_k_Text_Input_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Text_Input_handle_input, __pyx_k_Text_Input_handle_input, sizeof(__pyx_k_Text_Input_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Text_Input_pre_handle_input, __pyx_k_Text_Input_pre_handle_input, sizeof(__pyx_k_Text_Input_pre_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Text_Input_sync, __pyx_k_Text_Input_sync, sizeof(__pyx_k_Text_Input_sync), 0, 0, 1, 1},
  {&__pyx_n_s_Thumb, __pyx_k_Thumb, sizeof(__pyx_k_Thumb), 0, 0, 1, 1},
  {&__pyx_n_s_Thumb___reduce_cython, __pyx_k_Thumb___reduce_cython, sizeof(__pyx_k_Thumb___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Thumb___setstate_cython, __pyx_k_Thumb___setstate_cython, sizeof(__pyx_k_Thumb___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Thumb_draw, __pyx_k_Thumb_draw, sizeof(__pyx_k_Thumb_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Thumb_handle_input, __pyx_k_Thumb_handle_input, sizeof(__pyx_k_Thumb_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_Thumb_sync, __pyx_k_Thumb_sync, sizeof(__pyx_k_Thumb_sync), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline, __pyx_k_Timeline, sizeof(__pyx_k_Timeline), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu, __pyx_k_Timeline_Menu, sizeof(__pyx_k_Timeline_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu___reduce_cython, __pyx_k_Timeline_Menu___reduce_cython, sizeof(__pyx_k_Timeline_Menu___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu___setstate_cython, __pyx_k_Timeline_Menu___setstate_cython, sizeof(__pyx_k_Timeline_Menu___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu_append, __pyx_k_Timeline_Menu_append, sizeof(__pyx_k_Timeline_Menu_append), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu_draw, __pyx_k_Timeline_Menu_draw, sizeof(__pyx_k_Timeline_Menu_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu_extend, __pyx_k_Timeline_Menu_extend, sizeof(__pyx_k_Timeline_Menu_extend), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu_insert, __pyx_k_Timeline_Menu_insert, sizeof(__pyx_k_Timeline_Menu_insert), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu_remove, __pyx_k_Timeline_Menu_remove, sizeof(__pyx_k_Timeline_Menu_remove), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_Menu_toggle_iconified, __pyx_k_Timeline_Menu_toggle_iconified, sizeof(__pyx_k_Timeline_Menu_toggle_iconified), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline___reduce_cython, __pyx_k_Timeline___reduce_cython, sizeof(__pyx_k_Timeline___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline___setstate_cython, __pyx_k_Timeline___setstate_cython, sizeof(__pyx_k_Timeline___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_draw, __pyx_k_Timeline_draw, sizeof(__pyx_k_Timeline_draw), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_draw_label_default, __pyx_k_Timeline_draw_label_default, sizeof(__pyx_k_Timeline_draw_label_default), 0, 0, 1, 1},
  {&__pyx_n_s_Timeline_refresh, __pyx_k_Timeline_refresh, sizeof(__pyx_k_Timeline_refresh), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_UI, __pyx_k_UI, sizeof(__pyx_k_UI), 0, 0, 1, 1},
  {&__pyx_kp_u_UI_Framebuffer_could_not_be_crea, __pyx_k_UI_Framebuffer_could_not_be_crea, sizeof(__pyx_k_UI_Framebuffer_could_not_be_crea), 0, 1, 0, 0},
  {&__pyx_n_s_UI___reduce_cython, __pyx_k_UI___reduce_cython, sizeof(__pyx_k_UI___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_UI___setstate_cython, __pyx_k_UI___setstate_cython, sizeof(__pyx_k_UI___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_UI_add_font, __pyx_k_UI_add_font, sizeof(__pyx_k_UI_add_font), 0, 0, 1, 1},
  {&__pyx_n_s_UI_append, __pyx_k_UI_append, sizeof(__pyx_k_UI_append), 0, 0, 1, 1},
  {&__pyx_n_s_UI_collect_menus, __pyx_k_UI_collect_menus, sizeof(__pyx_k_UI_collect_menus), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element, __pyx_k_UI_element, sizeof(__pyx_k_UI_element), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element___reduce_cython, __pyx_k_UI_element___reduce_cython, sizeof(__pyx_k_UI_element___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element___setstate_cython, __pyx_k_UI_element___setstate_cython, sizeof(__pyx_k_UI_element___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element_draw, __pyx_k_UI_element_draw, sizeof(__pyx_k_UI_element_draw), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element_draw_overlay, __pyx_k_UI_element_draw_overlay, sizeof(__pyx_k_UI_element_draw_overlay), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element_handle_input, __pyx_k_UI_element_handle_input, sizeof(__pyx_k_UI_element_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element_pre_handle_input, __pyx_k_UI_element_pre_handle_input, sizeof(__pyx_k_UI_element_pre_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element_precompute, __pyx_k_UI_element_precompute, sizeof(__pyx_k_UI_element_precompute), 0, 0, 1, 1},
  {&__pyx_n_s_UI_element_sync, __pyx_k_UI_element_sync, sizeof(__pyx_k_UI_element_sync), 0, 0, 1, 1},
  {&__pyx_n_s_UI_extend, __pyx_k_UI_extend, sizeof(__pyx_k_UI_extend), 0, 0, 1, 1},
  {&__pyx_n_s_UI_remove, __pyx_k_UI_remove, sizeof(__pyx_k_UI_remove), 0, 0, 1, 1},
  {&__pyx_n_s_UI_terminate, __pyx_k_UI_terminate, sizeof(__pyx_k_UI_terminate), 0, 0, 1, 1},
  {&__pyx_n_s_UI_update, __pyx_k_UI_update, sizeof(__pyx_k_UI_update), 0, 0, 1, 1},
  {&__pyx_n_s_UI_update_button, __pyx_k_UI_update_button, sizeof(__pyx_k_UI_update_button), 0, 0, 1, 1},
  {&__pyx_n_s_UI_update_char, __pyx_k_UI_update_char, sizeof(__pyx_k_UI_update_char), 0, 0, 1, 1},
  {&__pyx_n_s_UI_update_clipboard, __pyx_k_UI_update_clipboard, sizeof(__pyx_k_UI_update_clipboard), 0, 0, 1, 1},
  {&__pyx_n_s_UI_update_key, __pyx_k_UI_update_key, sizeof(__pyx_k_UI_update_key), 0, 0, 1, 1},
  {&__pyx_n_s_UI_update_mouse, __pyx_k_UI_update_mouse, sizeof(__pyx_k_UI_update_mouse), 0, 0, 1, 1},
  {&__pyx_n_s_UI_update_scroll, __pyx_k_UI_update_scroll, sizeof(__pyx_k_UI_update_scroll), 0, 0, 1, 1},
  {&__pyx_n_s_UI_update_window, __pyx_k_UI_update_window, sizeof(__pyx_k_UI_update_window), 0, 0, 1, 1},
  {&__pyx_n_s_Unused_Input, __pyx_k_Unused_Input, sizeof(__pyx_k_Unused_Input), 0, 0, 1, 1},
  {&__pyx_n_u_Unused_Input, __pyx_k_Unused_Input, sizeof(__pyx_k_Unused_Input), 0, 1, 0, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Vec2, __pyx_k_Vec2, sizeof(__pyx_k_Vec2), 0, 0, 1, 1},
  {&__pyx_n_s_Vec2___reduce_cython, __pyx_k_Vec2___reduce_cython, sizeof(__pyx_k_Vec2___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Vec2___setstate_cython, __pyx_k_Vec2___setstate_cython, sizeof(__pyx_k_Vec2___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s__330, __pyx_k__330, sizeof(__pyx_k__330), 0, 0, 1, 1},
  {&__pyx_kp_u__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 1, 0, 0},
  {&__pyx_n_s__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 0, 1, 1},
  {&__pyx_kp_u__88, __pyx_k__88, sizeof(__pyx_k__88), 0, 1, 0, 0},
  {&__pyx_kp_u__93, __pyx_k__93, sizeof(__pyx_k__93), 0, 1, 0, 0},
  {&__pyx_n_s__97, __pyx_k__97, sizeof(__pyx_k__97), 0, 0, 1, 1},
  {&__pyx_n_s_action, __pyx_k_action, sizeof(__pyx_k_action), 0, 0, 1, 1},
  {&__pyx_n_s_add_font, __pyx_k_add_font, sizeof(__pyx_k_add_font), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_arrest_axis, __pyx_k_arrest_axis, sizeof(__pyx_k_arrest_axis), 0, 0, 1, 1},
  {&__pyx_n_s_as_tuple, __pyx_k_as_tuple, sizeof(__pyx_k_as_tuple), 0, 0, 1, 1},
  {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
  {&__pyx_n_s_attribute_context, __pyx_k_attribute_context, sizeof(__pyx_k_attribute_context), 0, 0, 1, 1},
  {&__pyx_n_s_attribute_name, __pyx_k_attribute_name, sizeof(__pyx_k_attribute_name), 0, 0, 1, 1},
  {&__pyx_n_u_backwards, __pyx_k_backwards, sizeof(__pyx_k_backwards), 0, 1, 0, 1},
  {&__pyx_n_u_bottom, __pyx_k_bottom, sizeof(__pyx_k_bottom), 0, 1, 0, 1},
  {&__pyx_n_s_button, __pyx_k_button, sizeof(__pyx_k_button), 0, 0, 1, 1},
  {&__pyx_n_u_buttons, __pyx_k_buttons, sizeof(__pyx_k_buttons), 0, 1, 0, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_s_catch_input, __pyx_k_catch_input, sizeof(__pyx_k_catch_input), 0, 0, 1, 1},
  {&__pyx_n_s_center, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1},
  {&__pyx_n_s_centered, __pyx_k_centered, sizeof(__pyx_k_centered), 0, 0, 1, 1},
  {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1},
  {&__pyx_n_s_char, __pyx_k_char, sizeof(__pyx_k_char), 0, 0, 1, 1},
  {&__pyx_n_u_chars, __pyx_k_chars, sizeof(__pyx_k_chars), 0, 1, 0, 1},
  {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
  {&__pyx_n_s_cinit___locals_default_selecti, __pyx_k_cinit___locals_default_selecti, sizeof(__pyx_k_cinit___locals_default_selecti), 0, 0, 1, 1},
  {&__pyx_n_s_cinit___locals_default_selecti_2, __pyx_k_cinit___locals_default_selecti_2, sizeof(__pyx_k_cinit___locals_default_selecti_2), 0, 0, 1, 1},
  {&__pyx_n_s_cinit___locals_lambda, __pyx_k_cinit___locals_lambda, sizeof(__pyx_k_cinit___locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_cinit___locals_set_play, __pyx_k_cinit___locals_set_play, sizeof(__pyx_k_cinit___locals_set_play), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
  {&__pyx_n_s_clear_state, __pyx_k_clear_state, sizeof(__pyx_k_clear_state), 0, 0, 1, 1},
  {&__pyx_n_s_click_cb, __pyx_k_click_cb, sizeof(__pyx_k_click_cb), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_clipboard, __pyx_k_clipboard, sizeof(__pyx_k_clipboard), 0, 0, 1, 1},
  {&__pyx_n_u_clipboard, __pyx_k_clipboard, sizeof(__pyx_k_clipboard), 0, 1, 0, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_collapsed, __pyx_k_collapsed, sizeof(__pyx_k_collapsed), 0, 0, 1, 1},
  {&__pyx_n_u_collapsed, __pyx_k_collapsed, sizeof(__pyx_k_collapsed), 0, 1, 0, 1},
  {&__pyx_n_s_collect_in_window, __pyx_k_collect_in_window, sizeof(__pyx_k_collect_in_window), 0, 0, 1, 1},
  {&__pyx_n_s_collect_menus, __pyx_k_collect_menus, sizeof(__pyx_k_collect_menus), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_kp_u_comptd_org, __pyx_k_comptd_org, sizeof(__pyx_k_comptd_org), 0, 1, 0, 0},
  {&__pyx_n_s_configuration, __pyx_k_configuration, sizeof(__pyx_k_configuration), 0, 0, 1, 1},
  {&__pyx_n_s_content_height, __pyx_k_content_height, sizeof(__pyx_k_content_height), 0, 0, 1, 1},
  {&__pyx_n_s_contextlib, __pyx_k_contextlib, sizeof(__pyx_k_contextlib), 0, 0, 1, 1},
  {&__pyx_n_s_contextmanager, __pyx_k_contextmanager, sizeof(__pyx_k_contextmanager), 0, 0, 1, 1},
  {&__pyx_n_s_cysignals, __pyx_k_cysignals, sizeof(__pyx_k_cysignals), 0, 0, 1, 1},
  {&__pyx_kp_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 0},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_default_selection_getter, __pyx_k_default_selection_getter, sizeof(__pyx_k_default_selection_getter), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {&__pyx_n_s_dirname, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1},
  {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
  {&__pyx_n_s_display_format, __pyx_k_display_format, sizeof(__pyx_k_display_format), 0, 0, 1, 1},
  {&__pyx_n_s_draw, __pyx_k_draw, sizeof(__pyx_k_draw), 0, 0, 1, 1},
  {&__pyx_n_s_draw_data_callback, __pyx_k_draw_data_callback, sizeof(__pyx_k_draw_data_callback), 0, 0, 1, 1},
  {&__pyx_n_s_draw_label_callback, __pyx_k_draw_label_callback, sizeof(__pyx_k_draw_label_callback), 0, 0, 1, 1},
  {&__pyx_n_s_draw_label_default, __pyx_k_draw_label_default, sizeof(__pyx_k_draw_label_default), 0, 0, 1, 1},
  {&__pyx_n_s_draw_overlay, __pyx_k_draw_overlay, sizeof(__pyx_k_draw_overlay), 0, 0, 1, 1},
  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {&__pyx_n_s_elm, __pyx_k_elm, sizeof(__pyx_k_elm), 0, 0, 1, 1},
  {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_eval, __pyx_k_eval, sizeof(__pyx_k_eval), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_font_name, __pyx_k_font_name, sizeof(__pyx_k_font_name), 0, 0, 1, 1},
  {&__pyx_n_s_font_path, __pyx_k_font_path, sizeof(__pyx_k_font_path), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_u_forwards, __pyx_k_forwards, sizeof(__pyx_k_forwards), 0, 1, 0, 1},
  {&__pyx_n_s_frange, __pyx_k_frange, sizeof(__pyx_k_frange), 0, 0, 1, 1},
  {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
  {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_all_font_paths, __pyx_k_get_all_font_paths, sizeof(__pyx_k_get_all_font_paths), 0, 0, 1, 1},
  {&__pyx_n_s_get_opensans_font_path, __pyx_k_get_opensans_font_path, sizeof(__pyx_k_get_opensans_font_path), 0, 0, 1, 1},
  {&__pyx_n_s_get_pupil_icons_font_path, __pyx_k_get_pupil_icons_font_path, sizeof(__pyx_k_get_pupil_icons_font_path), 0, 0, 1, 1},
  {&__pyx_n_s_get_roboto_font_path, __pyx_k_get_roboto_font_path, sizeof(__pyx_k_get_roboto_font_path), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_getter, __pyx_k_getter, sizeof(__pyx_k_getter), 0, 0, 1, 1},
  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
  {&__pyx_n_s_handle_input, __pyx_k_handle_input, sizeof(__pyx_k_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_handle_start_reference, __pyx_k_handle_start_reference, sizeof(__pyx_k_handle_start_reference), 0, 0, 1, 1},
  {&__pyx_kp_u_has_no_attribute, __pyx_k_has_no_attribute, sizeof(__pyx_k_has_no_attribute), 0, 1, 0, 0},
  {&__pyx_kp_u_has_no_entry, __pyx_k_has_no_entry, sizeof(__pyx_k_has_no_entry), 0, 1, 0, 0},
  {&__pyx_n_s_header_pos, __pyx_k_header_pos, sizeof(__pyx_k_header_pos), 0, 0, 1, 1},
  {&__pyx_n_s_header_pos_id, __pyx_k_header_pos_id, sizeof(__pyx_k_header_pos_id), 0, 0, 1, 1},
  {&__pyx_n_u_headline, __pyx_k_headline, sizeof(__pyx_k_headline), 0, 1, 0, 1},
  {&__pyx_n_s_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1},
  {&__pyx_n_u_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 1, 0, 1},
  {&__pyx_n_s_hotkey, __pyx_k_hotkey, sizeof(__pyx_k_hotkey), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_indicator_start, __pyx_k_indicator_start, sizeof(__pyx_k_indicator_start), 0, 0, 1, 1},
  {&__pyx_n_s_indicator_stop, __pyx_k_indicator_stop, sizeof(__pyx_k_indicator_stop), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
  {&__pyx_n_s_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1},
  {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
  {&__pyx_kp_u_is_of_type, __pyx_k_is_of_type, sizeof(__pyx_k_is_of_type), 0, 1, 0, 0},
  {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_u_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 1, 0, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
  {&__pyx_n_u_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 1, 0, 1},
  {&__pyx_n_s_label_font, __pyx_k_label_font, sizeof(__pyx_k_label_font), 0, 0, 1, 1},
  {&__pyx_n_s_label_getter, __pyx_k_label_getter, sizeof(__pyx_k_label_getter), 0, 0, 1, 1},
  {&__pyx_n_s_label_line_height, __pyx_k_label_line_height, sizeof(__pyx_k_label_line_height), 0, 0, 1, 1},
  {&__pyx_n_s_label_offset_size, __pyx_k_label_offset_size, sizeof(__pyx_k_label_offset_size), 0, 0, 1, 1},
  {&__pyx_n_s_label_offset_x, __pyx_k_label_offset_x, sizeof(__pyx_k_label_offset_x), 0, 0, 1, 1},
  {&__pyx_n_s_label_offset_y, __pyx_k_label_offset_y, sizeof(__pyx_k_label_offset_y), 0, 0, 1, 1},
  {&__pyx_n_s_labels, __pyx_k_labels, sizeof(__pyx_k_labels), 0, 0, 1, 1},
  {&__pyx_n_u_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 1, 0, 1},
  {&__pyx_n_s_line_color, __pyx_k_line_color, sizeof(__pyx_k_line_color), 0, 0, 1, 1},
  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_margin, __pyx_k_margin, sizeof(__pyx_k_margin), 0, 0, 1, 1},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_max_ts, __pyx_k_max_ts, sizeof(__pyx_k_max_ts), 0, 0, 1, 1},
  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
  {&__pyx_n_s_min_size, __pyx_k_min_size, sizeof(__pyx_k_min_size), 0, 0, 1, 1},
  {&__pyx_n_u_min_size, __pyx_k_min_size, sizeof(__pyx_k_min_size), 0, 1, 0, 1},
  {&__pyx_n_s_min_ts, __pyx_k_min_ts, sizeof(__pyx_k_min_ts), 0, 0, 1, 1},
  {&__pyx_n_s_mods, __pyx_k_mods, sizeof(__pyx_k_mods), 0, 0, 1, 1},
  {&__pyx_n_s_mouse_over, __pyx_k_mouse_over, sizeof(__pyx_k_mouse_over), 0, 0, 1, 1},
  {&__pyx_n_s_mouse_over_margin, __pyx_k_mouse_over_margin, sizeof(__pyx_k_mouse_over_margin), 0, 0, 1, 1},
  {&__pyx_n_s_mx, __pyx_k_mx, sizeof(__pyx_k_mx), 0, 0, 1, 1},
  {&__pyx_n_s_my, __pyx_k_my, sizeof(__pyx_k_my), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {&__pyx_n_s_nested, __pyx_k_nested, sizeof(__pyx_k_nested), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_new_input, __pyx_k_new_input, sizeof(__pyx_k_new_input), 0, 0, 1, 1},
  {&__pyx_n_s_new_value, __pyx_k_new_value, sizeof(__pyx_k_new_value), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_objs, __pyx_k_objs, sizeof(__pyx_k_objs), 0, 0, 1, 1},
  {&__pyx_n_s_off_color, __pyx_k_off_color, sizeof(__pyx_k_off_color), 0, 0, 1, 1},
  {&__pyx_n_s_off_val, __pyx_k_off_val, sizeof(__pyx_k_off_val), 0, 0, 1, 1},
  {&__pyx_n_s_on_change, __pyx_k_on_change, sizeof(__pyx_k_on_change), 0, 0, 1, 1},
  {&__pyx_n_s_on_change_2, __pyx_k_on_change_2, sizeof(__pyx_k_on_change_2), 0, 0, 1, 1},
  {&__pyx_n_s_on_color, __pyx_k_on_color, sizeof(__pyx_k_on_color), 0, 0, 1, 1},
  {&__pyx_n_s_on_val, __pyx_k_on_val, sizeof(__pyx_k_on_val), 0, 0, 1, 1},
  {&__pyx_n_u_opensans, __pyx_k_opensans, sizeof(__pyx_k_opensans), 0, 1, 0, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_outer_label, __pyx_k_outer_label, sizeof(__pyx_k_outer_label), 0, 0, 1, 1},
  {&__pyx_n_s_padding, __pyx_k_padding, sizeof(__pyx_k_padding), 0, 0, 1, 1},
  {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1},
  {&__pyx_n_s_parent_read_only, __pyx_k_parent_read_only, sizeof(__pyx_k_parent_read_only), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
  {&__pyx_n_s_play, __pyx_k_play, sizeof(__pyx_k_play), 0, 0, 1, 1},
  {&__pyx_n_u_play, __pyx_k_play, sizeof(__pyx_k_play), 0, 1, 0, 1},
  {&__pyx_n_u_playback_speed, __pyx_k_playback_speed, sizeof(__pyx_k_playback_speed), 0, 1, 0, 1},
  {&__pyx_n_s_playback_time_setter, __pyx_k_playback_time_setter, sizeof(__pyx_k_playback_time_setter), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_pop_state, __pyx_k_pop_state, sizeof(__pyx_k_pop_state), 0, 0, 1, 1},
  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {&__pyx_n_u_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 1, 0, 1},
  {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1},
  {&__pyx_n_s_pre_handle_input, __pyx_k_pre_handle_input, sizeof(__pyx_k_pre_handle_input), 0, 0, 1, 1},
  {&__pyx_n_s_precompute, __pyx_k_precompute, sizeof(__pyx_k_precompute), 0, 0, 1, 1},
  {&__pyx_n_u_pupil_icons, __pyx_k_pupil_icons, sizeof(__pyx_k_pupil_icons), 0, 1, 0, 1},
  {&__pyx_kp_u_pupil_icons_ttf, __pyx_k_pupil_icons_ttf, sizeof(__pyx_k_pupil_icons_ttf), 0, 1, 0, 0},
  {&__pyx_n_s_purge, __pyx_k_purge, sizeof(__pyx_k_purge), 0, 0, 1, 1},
  {&__pyx_n_s_push_state, __pyx_k_push_state, sizeof(__pyx_k_push_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyglui_ui, __pyx_k_pyglui_ui, sizeof(__pyx_k_pyglui_ui), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Base_Menu, __pyx_k_pyx_unpickle_Base_Menu, sizeof(__pyx_k_pyx_unpickle_Base_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Movable_Menu, __pyx_k_pyx_unpickle_Movable_Menu, sizeof(__pyx_k_pyx_unpickle_Movable_Menu), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_UI_element, __pyx_k_pyx_unpickle_UI_element, sizeof(__pyx_k_pyx_unpickle_UI_element), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_recent_idx_ts_getter, __pyx_k_recent_idx_ts_getter, sizeof(__pyx_k_recent_idx_ts_getter), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_refresh, __pyx_k_refresh, sizeof(__pyx_k_refresh), 0, 0, 1, 1},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_u_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 1, 0, 1},
  {&__pyx_n_u_roboto, __pyx_k_roboto, sizeof(__pyx_k_roboto), 0, 1, 0, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
  {&__pyx_n_s_scancode, __pyx_k_scancode, sizeof(__pyx_k_scancode), 0, 0, 1, 1},
  {&__pyx_n_u_scrollstate, __pyx_k_scrollstate, sizeof(__pyx_k_scrollstate), 0, 1, 0, 1},
  {&__pyx_n_s_seeking_cb, __pyx_k_seeking_cb, sizeof(__pyx_k_seeking_cb), 0, 0, 1, 1},
  {&__pyx_n_s_selection, __pyx_k_selection, sizeof(__pyx_k_selection), 0, 0, 1, 1},
  {&__pyx_n_s_selection_getter, __pyx_k_selection_getter, sizeof(__pyx_k_selection_getter), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_set_align, __pyx_k_set_align, sizeof(__pyx_k_set_align), 0, 0, 1, 1},
  {&__pyx_n_s_set_blur, __pyx_k_set_blur, sizeof(__pyx_k_set_blur), 0, 0, 1, 1},
  {&__pyx_n_s_set_font, __pyx_k_set_font, sizeof(__pyx_k_set_font), 0, 0, 1, 1},
  {&__pyx_n_s_set_play, __pyx_k_set_play, sizeof(__pyx_k_set_play), 0, 0, 1, 1},
  {&__pyx_n_s_set_size, __pyx_k_set_size, sizeof(__pyx_k_set_size), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_setter, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1},
  {&__pyx_n_s_sig_on_off, __pyx_k_sig_on_off, sizeof(__pyx_k_sig_on_off), 0, 0, 1, 1},
  {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_u_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 1, 0, 1},
  {&__pyx_kp_u_size_2, __pyx_k_size_2, sizeof(__pyx_k_size_2), 0, 1, 0, 0},
  {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1},
  {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {&__pyx_kp_s_src_pyglui_custom_pxi, __pyx_k_src_pyglui_custom_pxi, sizeof(__pyx_k_src_pyglui_custom_pxi), 0, 0, 1, 0},
  {&__pyx_kp_s_src_pyglui_helpers_pxi, __pyx_k_src_pyglui_helpers_pxi, sizeof(__pyx_k_src_pyglui_helpers_pxi), 0, 0, 1, 0},
  {&__pyx_kp_s_src_pyglui_menus_pxi, __pyx_k_src_pyglui_menus_pxi, sizeof(__pyx_k_src_pyglui_menus_pxi), 0, 0, 1, 0},
  {&__pyx_kp_s_src_pyglui_timelines_pxi, __pyx_k_src_pyglui_timelines_pxi, sizeof(__pyx_k_src_pyglui_timelines_pxi), 0, 0, 1, 0},
  {&__pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_k_src_pyglui_ui_elements_pxi, sizeof(__pyx_k_src_pyglui_ui_elements_pxi), 0, 0, 1, 0},
  {&__pyx_kp_s_src_pyglui_ui_pyx, __pyx_k_src_pyglui_ui_pyx, sizeof(__pyx_k_src_pyglui_ui_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_u_submenus, __pyx_k_submenus, sizeof(__pyx_k_submenus), 0, 1, 0, 1},
  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_sx, __pyx_k_sx, sizeof(__pyx_k_sx), 0, 0, 1, 1},
  {&__pyx_n_s_sy, __pyx_k_sy, sizeof(__pyx_k_sy), 0, 0, 1, 1},
  {&__pyx_n_s_sync, __pyx_k_sync, sizeof(__pyx_k_sync), 0, 0, 1, 1},
  {&__pyx_n_s_sync_ctx, __pyx_k_sync_ctx, sizeof(__pyx_k_sync_ctx), 0, 0, 1, 1},
  {&__pyx_n_s_system, __pyx_k_system, sizeof(__pyx_k_system), 0, 0, 1, 1},
  {&__pyx_n_s_terminate, __pyx_k_terminate, sizeof(__pyx_k_terminate), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
  {&__pyx_n_s_text_bounds, __pyx_k_text_bounds, sizeof(__pyx_k_text_bounds), 0, 0, 1, 1},
  {&__pyx_n_s_text_color, __pyx_k_text_color, sizeof(__pyx_k_text_color), 0, 0, 1, 1},
  {&__pyx_n_s_text_size, __pyx_k_text_size, sizeof(__pyx_k_text_size), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_to_str, __pyx_k_to_str, sizeof(__pyx_k_to_str), 0, 0, 1, 1},
  {&__pyx_n_s_toggle_iconified, __pyx_k_toggle_iconified, sizeof(__pyx_k_toggle_iconified), 0, 0, 1, 1},
  {&__pyx_n_s_tooltip, __pyx_k_tooltip, sizeof(__pyx_k_tooltip), 0, 0, 1, 1},
  {&__pyx_n_u_top, __pyx_k_top, sizeof(__pyx_k_top), 0, 1, 0, 1},
  {&__pyx_n_s_trigger_overlay_only, __pyx_k_trigger_overlay_only, sizeof(__pyx_k_trigger_overlay_only), 0, 0, 1, 1},
  {&__pyx_n_u_trim_left_ts, __pyx_k_trim_left_ts, sizeof(__pyx_k_trim_left_ts), 0, 1, 0, 1},
  {&__pyx_n_u_trim_right_ts, __pyx_k_trim_right_ts, sizeof(__pyx_k_trim_right_ts), 0, 1, 0, 1},
  {&__pyx_n_s_typed_val, __pyx_k_typed_val, sizeof(__pyx_k_typed_val), 0, 0, 1, 1},
  {&__pyx_n_u_uncollapsed_min_size, __pyx_k_uncollapsed_min_size, sizeof(__pyx_k_uncollapsed_min_size), 0, 1, 0, 1},
  {&__pyx_n_u_uncollapsed_pos, __pyx_k_uncollapsed_pos, sizeof(__pyx_k_uncollapsed_pos), 0, 1, 0, 1},
  {&__pyx_n_u_uncollapsed_size, __pyx_k_uncollapsed_size, sizeof(__pyx_k_uncollapsed_size), 0, 1, 0, 1},
  {&__pyx_n_s_unichr, __pyx_k_unichr, sizeof(__pyx_k_unichr), 0, 0, 1, 1},
  {&__pyx_n_s_unused_Input, __pyx_k_unused_Input, sizeof(__pyx_k_unused_Input), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_update_button, __pyx_k_update_button, sizeof(__pyx_k_update_button), 0, 0, 1, 1},
  {&__pyx_n_s_update_char, __pyx_k_update_char, sizeof(__pyx_k_update_char), 0, 0, 1, 1},
  {&__pyx_n_s_update_clipboard, __pyx_k_update_clipboard, sizeof(__pyx_k_update_clipboard), 0, 0, 1, 1},
  {&__pyx_n_s_update_key, __pyx_k_update_key, sizeof(__pyx_k_update_key), 0, 0, 1, 1},
  {&__pyx_n_s_update_mouse, __pyx_k_update_mouse, sizeof(__pyx_k_update_mouse), 0, 0, 1, 1},
  {&__pyx_n_s_update_scroll, __pyx_k_update_scroll, sizeof(__pyx_k_update_scroll), 0, 0, 1, 1},
  {&__pyx_n_s_update_window, __pyx_k_update_window, sizeof(__pyx_k_update_window), 0, 0, 1, 1},
  {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_validate, __pyx_k_validate, sizeof(__pyx_k_validate), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_visible, __pyx_k_visible, sizeof(__pyx_k_visible), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
  {&__pyx_n_s_window, __pyx_k_window, sizeof(__pyx_k_window), 0, 0, 1, 1},
  {&__pyx_n_s_window_size, __pyx_k_window_size, sizeof(__pyx_k_window_size), 0, 0, 1, 1},
  {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_kp_u_x_2, __pyx_k_x_2, sizeof(__pyx_k_x_2), 0, 1, 0, 0},
  {&__pyx_kp_u_x_3, __pyx_k_x_3, sizeof(__pyx_k_x_3), 0, 1, 0, 0},
  {&__pyx_n_s_xpad, __pyx_k_xpad, sizeof(__pyx_k_xpad), 0, 0, 1, 1},
  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {&__pyx_kp_u_y_2, __pyx_k_y_2, sizeof(__pyx_k_y_2), 0, 1, 0, 0},
  {&__pyx_n_s_ypad, __pyx_k_ypad, sizeof(__pyx_k_ypad), 0, 0, 1, 1},
  {&__pyx_n_s_zero_crossing, __pyx_k_zero_crossing, sizeof(__pyx_k_zero_crossing), 0, 0, 1, 1},
  #endif
  {0, 0, 0, 0, 0, 0, 0}
};
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 63, __pyx_L1_error)
  __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) __PYX_ERR(0, 132, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 222, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(2, 98, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 174, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 391, __pyx_L1_error)
  __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(2, 726, __pyx_L1_error)
  __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) __PYX_ERR(2, 771, __pyx_L1_error)
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(2, 1406, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(2, 1427, __pyx_L1_error)
  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(3, 523, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 341, __pyx_L1_error)
  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 810, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 820, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "src/pyglui/gldraw.pxi":233
 * 
 *     if gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER) != gl.GL_FRAMEBUFFER_COMPLETE:
 *         raise Exception("UI Framebuffer could not be created.")             # <<<<<<<<<<<<<<
 * 
 *     #unbind fbo and texture
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_UI_Framebuffer_could_not_be_crea); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(4, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "pyglui/ui.pyx":84
 *             self.elements = []
 *             self.new_input = Input()
 *             self.window = FitBox(Vec2(0,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 *             self.ui_layer = create_ui_texture(Vec2(200,200))
 *             self.overlay_layer = create_ui_texture(Vec2(200,200))
 */
  __pyx_tuple__5 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "pyglui/ui.pyx":85
 *             self.new_input = Input()
 *             self.window = FitBox(Vec2(0,0),Vec2(0,0))
 *             self.ui_layer = create_ui_texture(Vec2(200,200))             # <<<<<<<<<<<<<<
 *             self.overlay_layer = create_ui_texture(Vec2(200,200))
 * 
 */
  __pyx_tuple__6 = PyTuple_Pack(2, __pyx_int_200, __pyx_int_200); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "pyglui/ui.pyx":81
 * 
 *     def __cinit__(self):
 *         with sig_on_off():             # <<<<<<<<<<<<<<
 *             self.elements = []
 *             self.new_input = Input()
 */
  __pyx_tuple__7 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "pyglui/ui.pyx":155
 *             #now everybody
 *             # ontop level in reverse so that menus drawn above other take precedence
 *             for e in self.elements[::-1]:             # <<<<<<<<<<<<<<
 *                 e.handle_input(self.new_input,True)
 * 
 */
  __pyx_slice__8 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__8);
  __Pyx_GIVEREF(__pyx_slice__8);

  /* "pyglui/ui.pyx":180
 *             glfont.set_font('opensans')
 *             glfont.set_size(int(ui_scale * text_size))
 *             glfont.set_color_float(color_text_default)             # <<<<<<<<<<<<<<
 *             glfont.set_blur(.1)
 *             glfont.set_align(fs.FONS_ALIGN_TOP)
 */
  __pyx_tuple__9 = PyTuple_Pack(4, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_1_0); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "src/pyglui/ui_elements.pxi":106
 *         else:
 *             self.maximum = max
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,slider_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.slider_pos = Vec2(0,slider_label_org_y)
 */
  __pyx_tuple__10 = PyTuple_Pack(2, __pyx_int_0, __pyx_float_65_0); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "src/pyglui/ui_elements.pxi":107
 *             self.maximum = max
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,slider_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))             # <<<<<<<<<<<<<<
 *         self.slider_pos = Vec2(0,slider_label_org_y)
 *         self.selected = False
 */
  __pyx_tuple__11 = PyTuple_Pack(2, __pyx_int_10, __pyx_int_10); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);
  __pyx_tuple__12 = PyTuple_Pack(2, __pyx_int_neg_10, __pyx_int_neg_10); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "src/pyglui/ui_elements.pxi":108
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,slider_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.slider_pos = Vec2(0,slider_label_org_y)             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         self._read_only = False
 */
  __pyx_tuple__13 = PyTuple_Pack(2, __pyx_int_0, __pyx_float_20_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(2, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "src/pyglui/ui_elements.pxi":115
 *         else:
 *             self.steps = 0
 *         self.line_default_color = RGBA(*slider_line_color_default)             # <<<<<<<<<<<<<<
 *         self.line_highlight_color = RGBA(*slider_line_color_highlight)
 *         self.text_color = RGBA(*color_text_default)
 */
  __pyx_tuple__14 = PyTuple_Pack(4, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_0_4); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "src/pyglui/ui_elements.pxi":116
 *             self.steps = 0
 *         self.line_default_color = RGBA(*slider_line_color_default)
 *         self.line_highlight_color = RGBA(*slider_line_color_highlight)             # <<<<<<<<<<<<<<
 *         self.text_color = RGBA(*color_text_default)
 *         self.button_color = RGBA(*color_default)
 */
  __pyx_tuple__15 = PyTuple_Pack(4, __pyx_float_0_5, __pyx_float_0_8, __pyx_float_0_75, __pyx_float_0_9); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "src/pyglui/ui_elements.pxi":118
 *         self.line_highlight_color = RGBA(*slider_line_color_highlight)
 *         self.text_color = RGBA(*color_text_default)
 *         self.button_color = RGBA(*color_default)             # <<<<<<<<<<<<<<
 *         self.button_selected_color = RGBA(*color_selected)
 *         self.button_shadow_color = RGBA(*color_shadow)
 */
  __pyx_tuple__16 = PyTuple_Pack(4, __pyx_float_0_5, __pyx_float_0_5, __pyx_float_0_5, __pyx_float_0_9); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "src/pyglui/ui_elements.pxi":120
 *         self.button_color = RGBA(*color_default)
 *         self.button_selected_color = RGBA(*color_selected)
 *         self.button_shadow_color = RGBA(*color_shadow)             # <<<<<<<<<<<<<<
 *         self.step_color = RGBA(*slider_color_step)
 *         self.display_format = '%0.2f'
 */
  __pyx_tuple__17 = PyTuple_Pack(4, __pyx_float_0_0, __pyx_float_0_0, __pyx_float_0_0, __pyx_float_0_8); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "src/pyglui/ui_elements.pxi":121
 *         self.button_selected_color = RGBA(*color_selected)
 *         self.button_shadow_color = RGBA(*color_shadow)
 *         self.step_color = RGBA(*slider_color_step)             # <<<<<<<<<<<<<<
 *         self.display_format = '%0.2f'
 * 
 */
  __pyx_tuple__18 = PyTuple_Pack(4, __pyx_float_0_8, __pyx_float_0_8, __pyx_float_0_8, __pyx_float_0_6); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "src/pyglui/ui_elements.pxi":148
 *         if self._read_only or parent_read_only:
 *             self.line_default_color = RGBA(*slider_line_color_default_read_only)
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)             # <<<<<<<<<<<<<<
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color = RGBA(*color_default_read_only)
 */
  __pyx_tuple__19 = PyTuple_Pack(4, __pyx_float_0_5, __pyx_float_0_8, __pyx_float_0_75, __pyx_float_0_75); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(2, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "src/pyglui/ui_elements.pxi":149
 *             self.line_default_color = RGBA(*slider_line_color_default_read_only)
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)
 *             self.text_color = RGBA(*color_text_read_only)             # <<<<<<<<<<<<<<
 *             self.button_color = RGBA(*color_default_read_only)
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)
 */
  __pyx_tuple__20 = PyTuple_Pack(4, __pyx_float_0_5, __pyx_float_0_5, __pyx_float_0_5, __pyx_float_0_5); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(2, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "src/pyglui/ui_elements.pxi":150
 *             self.line_highlight_color = RGBA(*slider_line_color_highlight_read_only)
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color = RGBA(*color_default_read_only)             # <<<<<<<<<<<<<<
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)
 *         else:
 */
  __pyx_tuple__21 = PyTuple_Pack(4, __pyx_float_0_5, __pyx_float_0_5, __pyx_float_0_5, __pyx_float_0_75); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(2, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "src/pyglui/ui_elements.pxi":151
 *             self.text_color = RGBA(*color_text_read_only)
 *             self.button_color = RGBA(*color_default_read_only)
 *             self.button_shadow_color = RGBA(*color_shadow_read_only)             # <<<<<<<<<<<<<<
 *         else:
 *             self.line_default_color = RGBA(*slider_line_color_default)
 */
  __pyx_tuple__22 = PyTuple_Pack(4, __pyx_float_0_0, __pyx_float_0_0, __pyx_float_0_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "src/pyglui/ui_elements.pxi":249
 *         self.on_val = on_val
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,switch_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.button = FitBox(Vec2(-switch_button_size-x_spacer,0),Vec2(switch_button_size,switch_button_size))
 */
  __pyx_tuple__23 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_40); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(2, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "src/pyglui/ui_elements.pxi":251
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,switch_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.button = FitBox(Vec2(-switch_button_size-x_spacer,0),Vec2(switch_button_size,switch_button_size))             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         # rendering variables
 */
  __pyx_tuple__24 = PyTuple_Pack(2, __pyx_int_neg_25, __pyx_int_0); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(2, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_int_20, __pyx_int_20); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(2, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "src/pyglui/ui_elements.pxi":304
 * 
 *         glfont.push_state()
 *         glfont.set_color_float(self.text_color[:])             # <<<<<<<<<<<<<<
 * 
 *         glfont.draw_limited_text(x_spacer,0,self._label,self.field.size.x-(switch_button_size_on+switch_button_shadow))
 */
  __pyx_slice__26 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__26)) __PYX_ERR(2, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__26);
  __Pyx_GIVEREF(__pyx_slice__26);

  /* "src/pyglui/ui_elements.pxi":363
 * 
 *         def default_selection_getter():
 *             def to_str(obj):             # <<<<<<<<<<<<<<
 *                 if isinstance(obj,basestring):
 *                     return obj
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(2, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_to_str, 363, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(2, 363, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":362
 *         self.triangle_color = RGBA(*selector_triangle_color_default)
 * 
 *         def default_selection_getter():             # <<<<<<<<<<<<<<
 *             def to_str(obj):
 *                 if isinstance(obj,basestring):
 */
  __pyx_tuple__30 = PyTuple_Pack(3, __pyx_n_s_to_str, __pyx_n_s_to_str, __pyx_n_s_s); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_default_selection_getter, 362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(2, 362, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":377
 *         self.sync_val = Synced_Value(attribute_name,attribute_context,getter,setter,self._on_change)
 * 
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,selector_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.select_field = FitBox(Vec2(x_spacer,0),Vec2(0,0))
 */
  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_int_0, __pyx_float_40_0); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(2, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "src/pyglui/ui_elements.pxi":379
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,selector_outline_size_y)) # we only fix the height
 *         self.field = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self.select_field = FitBox(Vec2(x_spacer,0),Vec2(0,0))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,*args,**kwargs):
 */
  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_int_5, __pyx_int_0); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(2, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "src/pyglui/ui_elements.pxi":526
 *         self.start_highlight_idx = 0
 *         self.text_color = RGBA(*color_text_default)
 *         self.text_input_highlight_color = RGBA(*text_input_highlight_color)             # <<<<<<<<<<<<<<
 *         self.text_input_line_highlight_color = RGBA(*text_input_line_highlight_color)
 *         self.data_type = type(self.sync_val.value)
 */
  __pyx_tuple__35 = PyTuple_Pack(4, __pyx_float_0_5, __pyx_float_0_5, __pyx_float_0_9, __pyx_float_0_5); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "src/pyglui/ui_elements.pxi":906
 *         self._label = label
 *         self._outer_label = outer_label
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,button_outline_size_y)) # we only fix the height             # <<<<<<<<<<<<<<
 *         self.field = FitBox(Vec2(0,0),Vec2(0,0))  # depends on string length
 *         self.button = FitBox(Vec2(0,0),Vec2(0,0))  # will be computed on demand
 */
  __pyx_tuple__36 = PyTuple_Pack(2, __pyx_int_0, __pyx_float_44_0); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "src/pyglui/ui_elements.pxi":922
 *         if self._read_only or parent_read_only:
 *             self.text_color = RGBA(*button_read_only_text_color)
 *             bg_color = RGBA(*button_read_only_color)             # <<<<<<<<<<<<<<
 *         elif self.selected:
 *             self.text_color = RGBA(*button_active_text_color)
 */
  __pyx_tuple__37 = PyTuple_Pack(4, __pyx_float_0_25, __pyx_float_0_25, __pyx_float_0_25, __pyx_float_0_75); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(2, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "src/pyglui/ui_elements.pxi":1019
 *              Vec2(self.outline.org.x - outline_padding + self.outline.size.x,
 *                   self.outline.org.y + outline_padding),
 *              RGBA(*menu_line))             # <<<<<<<<<<<<<<
 * 
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 */
  __pyx_tuple__38 = PyTuple_Pack(4, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_0_8); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(2, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "src/pyglui/ui_elements.pxi":1043
 *         self.text_area = FitBox(Vec2(outline_padding,outline_padding),Vec2(-outline_padding,-outline_padding))
 *         self._text_size = size_text_info
 *         self._text_color = RGBA(*color_text_info)             # <<<<<<<<<<<<<<
 *         self._centered = False
 * 
 */
  __pyx_tuple__39 = PyTuple_Pack(4, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_0_6); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(2, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "src/pyglui/ui_elements.pxi":1135
 *         self.outline = FitBox(Vec2(0,0),Vec2(0,0))
 *         self.text_area = FitBox(
 *             Vec2(outline_padding * 6, outline_padding),             # <<<<<<<<<<<<<<
 *             Vec2(-outline_padding, -outline_padding)
 *         )
 */
  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_int_60, __pyx_int_10); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "src/pyglui/ui_elements.pxi":1227
 *         hotkey = None,
 *         on_color=thumb_color_on,
 *         off_color=thumb_color_off,             # <<<<<<<<<<<<<<
 *         label_getter=None
 *     ):
 */
  __pyx_tuple__41 = PyTuple_Pack(4, __pyx_int_1, __pyx_int_1, __pyx_int_1, __pyx_float_0_6); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(2, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "src/pyglui/ui_elements.pxi":1241
 *         self.on_val = on_val
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(thumb_outline_size,thumb_outline_size))             # <<<<<<<<<<<<<<
 *         self.button = FitBox(Vec2(thumb_outline_pad,thumb_outline_pad),Vec2(-thumb_outline_pad,-thumb_outline_pad))
 *         self.selected = False
 */
  __pyx_tuple__42 = PyTuple_Pack(2, __pyx_float_80_0, __pyx_float_80_0); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(2, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "src/pyglui/ui_elements.pxi":1242
 *         self.off_val = off_val
 *         self.outline = FitBox(Vec2(0,0),Vec2(thumb_outline_size,thumb_outline_size))
 *         self.button = FitBox(Vec2(thumb_outline_pad,thumb_outline_pad),Vec2(-thumb_outline_pad,-thumb_outline_pad))             # <<<<<<<<<<<<<<
 *         self.selected = False
 *         self._on_color = RGBA(*on_color)
 */
  __pyx_tuple__43 = PyTuple_Pack(2, __pyx_float_0_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(2, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "src/pyglui/ui_elements.pxi":1314
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_CENTER)
 *         glfont.set_size(max(1,int(min(self.button.size)+self.offset_size*ui_scale)-thumb_font_padding*ui_scale))
 *         glfont.set_color_float((0,0,0,0.5))             # <<<<<<<<<<<<<<
 *         glfont.set_blur(10.5)
 *         cdef int text_x = self.button.center[0]+int(self.offset_x*ui_scale)
 */
  __pyx_tuple__44 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_float_0_5); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(2, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "src/pyglui/ui_elements.pxi":1330
 *         glfont.set_align(fs.FONS_ALIGN_MIDDLE | fs.FONS_ALIGN_LEFT)
 *         glfont.set_size( max(1, int( (min(self.button.size) )-thumb_font_padding*ui_scale)/2.) )
 *         glfont.set_color_float((0,0,0,1))             # <<<<<<<<<<<<<<
 *         glfont.set_blur(10.5)
 *         glfont.draw_multi_line_text(self.button.center[0]+self.button.size.x/2.,self.button.center[1],self._status_text)
 */
  __pyx_tuple__45 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(2, 1330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "src/pyglui/ui_elements.pxi":1387
 *         self._tooltip = ''
 *         self.being_hovered = False
 *         self.outline = FitBox(Vec2(0,0),Vec2(icon_outline_size, icon_outline_size))             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_float_50_0, __pyx_float_50_0); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(2, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "src/pyglui/ui_elements.pxi":1456
 *             should_redraw = True
 * 
 *         utils.draw_points([self.button.center], size=int(ref_size*.7), color=RGBA(1., 1., 1., .3), sharpness=0.7)             # <<<<<<<<<<<<<<
 *         utils.draw_points([self.button.center], size=int(ref_size*.7), color=RGBA(1., 1., 1., bg_alpha), sharpness=0.9)
 * 
 */
  __pyx_tuple__47 = PyTuple_Pack(4, __pyx_float_1_, __pyx_float_1_, __pyx_float_1_, __pyx_float__3); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(2, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "src/pyglui/ui_elements.pxi":1501
 * 
 *         utils.draw_tooltip((tip_loc_x, vert_loc), (text_width, text_height),
 *                            padding=(pad_x, pad_y), tooltip_color=RGBA(.8, .8, .8, .9),             # <<<<<<<<<<<<<<
 *                            sharpness=.9)
 * 
 */
  __pyx_tuple__48 = PyTuple_Pack(4, __pyx_float__8, __pyx_float__8, __pyx_float__8, __pyx_float__9); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(2, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "src/pyglui/ui_elements.pxi":1508
 *         # glfont.draw_text(text_loc_x, vert_loc, T)
 * 
 *         glfont.set_color_float((0., 0., 0., 8.))             # <<<<<<<<<<<<<<
 *         glfont.draw_text(text_loc_x, vert_loc, T)
 * 
 */
  __pyx_tuple__49 = PyTuple_Pack(4, __pyx_float_0_, __pyx_float_0_, __pyx_float_0_, __pyx_float_8_); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(2, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "src/pyglui/custom.pxi":56
 * 
 *         self.point_click_seek_loc = Vec2(0., 0.)
 *         self.outline = FitBox(Vec2(0., -50.), Vec2(0., 0.))             # <<<<<<<<<<<<<<
 *         self.bar = FitBox(Vec2(130., 21.), Vec2(-30., 3.))
 *         self.seek_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 */
  __pyx_tuple__51 = PyTuple_Pack(2, __pyx_float_0_, __pyx_float_neg_50_); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(6, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "src/pyglui/custom.pxi":57
 *         self.point_click_seek_loc = Vec2(0., 0.)
 *         self.outline = FitBox(Vec2(0., -50.), Vec2(0., 0.))
 *         self.bar = FitBox(Vec2(130., 21.), Vec2(-30., 3.))             # <<<<<<<<<<<<<<
 *         self.seek_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 *         self.trim_left_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 */
  __pyx_tuple__52 = PyTuple_Pack(2, __pyx_float_130_, __pyx_float_21_); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(6, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_tuple__53 = PyTuple_Pack(2, __pyx_float_neg_30_, __pyx_float_3_); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(6, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "src/pyglui/custom.pxi":62
 *         self.trim_right_handle = FitBox(Vec2(0., 0.), Vec2(0., 0.))
 * 
 *         play_icon = chr(0xE037)             # <<<<<<<<<<<<<<
 *         pause_icon = chr(0xe034)
 *         step_fwd_icon = chr(0xe044)
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_int_57399); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(6, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "src/pyglui/custom.pxi":63
 * 
 *         play_icon = chr(0xE037)
 *         pause_icon = chr(0xe034)             # <<<<<<<<<<<<<<
 *         step_fwd_icon = chr(0xe044)
 *         step_bwd_icon = chr(0xe045)
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_int_57396); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(6, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "src/pyglui/custom.pxi":64
 *         play_icon = chr(0xE037)
 *         pause_icon = chr(0xe034)
 *         step_fwd_icon = chr(0xe044)             # <<<<<<<<<<<<<<
 *         step_bwd_icon = chr(0xe045)
 *         incr_pbs_icon = chr(0xE01F)  # pbs: playback speed
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_int_57412); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(6, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "src/pyglui/custom.pxi":65
 *         pause_icon = chr(0xe034)
 *         step_fwd_icon = chr(0xe044)
 *         step_bwd_icon = chr(0xe045)             # <<<<<<<<<<<<<<
 *         incr_pbs_icon = chr(0xE01F)  # pbs: playback speed
 *         decr_pbs_icon = chr(0xE020)
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_int_57413); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(6, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "src/pyglui/custom.pxi":66
 *         step_fwd_icon = chr(0xe044)
 *         step_bwd_icon = chr(0xe045)
 *         incr_pbs_icon = chr(0xE01F)  # pbs: playback speed             # <<<<<<<<<<<<<<
 *         decr_pbs_icon = chr(0xE020)
 * 
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_int_57375); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(6, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "src/pyglui/custom.pxi":67
 *         step_bwd_icon = chr(0xe045)
 *         incr_pbs_icon = chr(0xE01F)  # pbs: playback speed
 *         decr_pbs_icon = chr(0xE020)             # <<<<<<<<<<<<<<
 * 
 *         def set_play(_):
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_int_57376); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(6, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "src/pyglui/custom.pxi":69
 *         decr_pbs_icon = chr(0xE020)
 * 
 *         def set_play(_):             # <<<<<<<<<<<<<<
 *             sync_ctx.play = not sync_ctx.play
 * 
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_n_s__50); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(6, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_custom_pxi, __pyx_n_s_set_play, 69, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(6, 69, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":87
 *                          getter=lambda: True)
 * 
 *         self.backwards.outline = FitBox(Vec2(5, 0),Vec2(40, 40))             # <<<<<<<<<<<<<<
 *         self.play.outline = FitBox(Vec2(40, 0),Vec2(40, 40))
 *         self.forwards.outline = FitBox(Vec2(75, 0),Vec2(40, 40))
 */
  __pyx_tuple__62 = PyTuple_Pack(2, __pyx_int_40, __pyx_int_40); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(6, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "src/pyglui/custom.pxi":88
 * 
 *         self.backwards.outline = FitBox(Vec2(5, 0),Vec2(40, 40))
 *         self.play.outline = FitBox(Vec2(40, 0),Vec2(40, 40))             # <<<<<<<<<<<<<<
 *         self.forwards.outline = FitBox(Vec2(75, 0),Vec2(40, 40))
 * 
 */
  __pyx_tuple__63 = PyTuple_Pack(2, __pyx_int_40, __pyx_int_0); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(6, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "src/pyglui/custom.pxi":89
 *         self.backwards.outline = FitBox(Vec2(5, 0),Vec2(40, 40))
 *         self.play.outline = FitBox(Vec2(40, 0),Vec2(40, 40))
 *         self.forwards.outline = FitBox(Vec2(75, 0),Vec2(40, 40))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args, **kwargs):
 */
  __pyx_tuple__64 = PyTuple_Pack(2, __pyx_int_75, __pyx_int_0); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(6, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "src/pyglui/custom.pxi":111
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):
 *         self.outline.compute(parent)
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))             # <<<<<<<<<<<<<<
 *         self.bar.compute(self.outline)
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))
 */
  __pyx_tuple__65 = PyTuple_Pack(4, __pyx_float_0_, __pyx_float_0_, __pyx_float_0_, __pyx_float_0_3); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(6, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "src/pyglui/custom.pxi":135
 *         handle.size.x = selection_height
 *         handle.size.y = selection_height
 *         self.trim_left_handle = draw_trim_handle(handle, 0.25, RGBA(*seekbar_trim_color_hover if self.hovering == 3 else seekbar_trim_color))             # <<<<<<<<<<<<<<
 * 
 *         cdef double trim_r_x = clampmap(trim_right_val, self.min_ts, self.max_ts, 0, self.bar.size.x)
 */
  __pyx_tuple__66 = PyTuple_Pack(4, __pyx_float_1_0, __pyx_float_0_84, __pyx_float_0_4, __pyx_float_0_8); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(6, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "src/pyglui/timelines.pxi":15
 *         self.draw_label = draw_label_callback
 *         self.ypad = ypad
 *         self.outline = FitBox(Vec2(0, 0.), Vec2(0, content_height + 2*self.ypad))             # <<<<<<<<<<<<<<
 *         self.data_area = FitBox(Vec2(xpad[0], self.ypad), Vec2(-xpad[1], -self.ypad))
 * 
 */
  __pyx_tuple__68 = PyTuple_Pack(2, __pyx_int_0, __pyx_float_0_); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(7, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "src/pyglui/menus.pxi":216
 * 
 *             if header_pos == 'top':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_topbar_pad),Vec2(-menu_pad,-menu_pad- menu_bottom_pad))             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),
 *                                             self.outline.design_org,
 */
  __pyx_tuple__69 = PyTuple_Pack(2, __pyx_float_10_0, __pyx_float_38_0); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(3, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "src/pyglui/menus.pxi":217
 *             if header_pos == 'top':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_topbar_pad),Vec2(-menu_pad,-menu_pad- menu_bottom_pad))
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(0,menu_topbar_pad),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
  __pyx_tuple__70 = PyTuple_Pack(2, __pyx_int_0, __pyx_float_38_0); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(3, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "src/pyglui/menus.pxi":221
 *                                             arrest_axis=0,zero_crossing = False,
 *                                             catch_input = catch_input )
 *                 self.minimize_corner = Draggable(Vec2(0,0),Vec2(menu_topbar_pad,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_org,
 *                                             arrest_axis=0,zero_crossing = False,
 */
  __pyx_tuple__71 = PyTuple_Pack(2, __pyx_float_38_0, __pyx_int_0); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(3, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "src/pyglui/menus.pxi":226
 *                                             click_cb=self.toggle_iconified,catch_input = catch_input )
 *                 if self.outline.design_size.x:
 *                     self.resize_corner = Draggable(Vec2(-resize_corner_size,-resize_corner_size),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                                 self.outline.design_size,
 *                                                 arrest_axis=0,zero_crossing = False)
 */
  __pyx_tuple__72 = PyTuple_Pack(2, __pyx_float_neg_20_0, __pyx_float_neg_20_0); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(3, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "src/pyglui/menus.pxi":234
 *             elif header_pos == 'bottom':
 *                 self.element_space = FitBox(Vec2(menu_pad,menu_bottom_pad + menu_pad),Vec2(-menu_pad,-menu_pad- menu_topbar_pad))
 *                 self.menu_bar = Draggable(Vec2(0,-menu_pad),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,
 */
  __pyx_tuple__73 = PyTuple_Pack(2, __pyx_int_0, __pyx_float_neg_10_0); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(3, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "src/pyglui/menus.pxi":245
 * 
 *             elif header_pos == 'right':
 *                 self.element_space = FitBox(Vec2(menu_pad,0),Vec2(-menu_pad-menu_sidebar_pad,0))             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),
 *                                             self.outline.design_size,
 */
  __pyx_tuple__74 = PyTuple_Pack(2, __pyx_float_10_0, __pyx_int_0); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(3, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "src/pyglui/menus.pxi":246
 *             elif header_pos == 'right':
 *                 self.element_space = FitBox(Vec2(menu_pad,0),Vec2(-menu_pad-menu_sidebar_pad,0))
 *                 self.menu_bar = Draggable(Vec2(-menu_sidebar_pad,0),Vec2(0,0),             # <<<<<<<<<<<<<<
 *                                             self.outline.design_size,
 *                                             arrest_axis=0,zero_crossing = False,
 */
  __pyx_tuple__75 = PyTuple_Pack(2, __pyx_float_neg_38_0, __pyx_int_0); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(3, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "src/pyglui/menus.pxi":257
 * 
 *             elif header_pos == 'left':
 *                 self.element_space = FitBox(Vec2(menu_sidebar_pad+menu_pad,0),Vec2(-menu_pad,0))             # <<<<<<<<<<<<<<
 *                 self.menu_bar = Draggable(Vec2(0,0),Vec2(menu_sidebar_pad,0),
 *                                             self.outline.design_org,
 */
  __pyx_tuple__76 = PyTuple_Pack(2, __pyx_float_neg_10_0, __pyx_int_0); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(3, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "src/pyglui/menus.pxi":300
 *     cdef public bint collapsed
 * 
 *     def __cinit__(self,label,pos=(0,0),size=(200,100)):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */
  __pyx_tuple__77 = PyTuple_Pack(2, __pyx_int_200, __pyx_int_100); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(3, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "src/pyglui/menus.pxi":304
 *         self._label = label
 *         self.outline = FitBox(position=Vec2(*pos),size=Vec2(*size),min_size=Vec2(0,0))
 *         self.element_space = FitBox(position=Vec2(menu_pad,menu_pad),size=Vec2(-menu_pad,-menu_pad))             # <<<<<<<<<<<<<<
 *         self.elements = []
 *         self.color = RGBA(*rect_color_default)
 */
  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_float_10_0, __pyx_float_10_0); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(3, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_tuple__79 = PyTuple_Pack(2, __pyx_float_neg_10_0, __pyx_float_neg_10_0); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(3, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "src/pyglui/menus.pxi":447
 *         #design height will be overwritten in draw.
 *         if header_pos in ('top','bottom'):
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)             # <<<<<<<<<<<<<<
 *         elif header_pos in ('left','right'):
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 */
  __pyx_tuple__80 = PyTuple_Pack(2, __pyx_float_300_0, __pyx_float_38_0); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(3, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "src/pyglui/menus.pxi":449
 *             min_size = Vec2(menu_topbar_min_width,menu_topbar_pad)
 *         elif header_pos in ('left','right'):
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)             # <<<<<<<<<<<<<<
 *         else:
 *             min_size = Vec2(0,0)
 */
  __pyx_tuple__81 = PyTuple_Pack(2, __pyx_float_38_0, __pyx_float_20_0); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(3, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "src/pyglui/menus.pxi":575
 *     cdef bint _collapsed
 * 
 *     def __cinit__(self,label,pos=(100,100),size=(200,100),header_pos = 'top'):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self._label = label
 */
  __pyx_tuple__82 = PyTuple_Pack(2, __pyx_int_100, __pyx_int_100); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(3, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "src/pyglui/menus.pxi":584
 *             min_size = Vec2(menu_sidebar_pad,menu_sidebar_min_height)
 *         elif header_pos in ('left'):
 *             min_size = Vec2(menu_topbar_min_width,menu_sidebar_min_height)             # <<<<<<<<<<<<<<
 *         else:
 *             min_size = Vec2(0,0)
 */
  __pyx_tuple__83 = PyTuple_Pack(2, __pyx_float_300_0, __pyx_float_20_0); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(3, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "src/pyglui/menus.pxi":763
 *         self.outline.design_org[:] = new_conf.get('pos', self.outline.design_org[:])
 *         self.outline.design_size[:] = new_conf.get('size', self.outline.design_size[:])
 *         self.outline.min_size[:] = new_conf.get('min_size', None)             # <<<<<<<<<<<<<<
 * 
 *         if new_conf.get('collapsed', False):
 */
  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_u_min_size, Py_None); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(3, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "src/pyglui/menus.pxi":765
 *         self.outline.min_size[:] = new_conf.get('min_size', None)
 * 
 *         if new_conf.get('collapsed', False):             # <<<<<<<<<<<<<<
 * 
 *             self.uncollapsed_outline.design_org[:] = new_conf.get('uncollapsed_pos',self.outline.design_org[:])
 */
  __pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_u_collapsed, Py_False); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(3, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "src/pyglui/menus.pxi":769
 *             self.uncollapsed_outline.design_org[:] = new_conf.get('uncollapsed_pos',self.outline.design_org[:])
 *             self.uncollapsed_outline.design_size[:] = new_conf.get('uncollapsed_size',self.outline.design_size[:])
 *             self.uncollapsed_outline.min_size[:] = new_conf.get('uncollapsed_min_size',None)             # <<<<<<<<<<<<<<
 * 
 *         self.collapsed = new_conf.get('collapsed', False)
 */
  __pyx_tuple__86 = PyTuple_Pack(2, __pyx_n_u_uncollapsed_min_size, Py_None); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(3, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "src/pyglui/menus.pxi":773
 *         self.collapsed = new_conf.get('collapsed', False)
 *         self.header_pos = self.header_pos #update layout
 *         self.scrollstate[:] = new_conf.get('scrollstate',(0,0))             # <<<<<<<<<<<<<<
 *         self.set_submenu_config(new_conf.get('submenus',{}))
 * 
 */
  __pyx_tuple__87 = PyTuple_Pack(2, __pyx_n_u_scrollstate, __pyx_tuple__5); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(3, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7842cdf, 0x44bb70b, 0xac02bc6):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7842cdf, 0x44bb70b, 0xac02bc6) = (_label, _order, _read_only, outline, uid))" % __pyx_checksum
 */
  __pyx_tuple__92 = PyTuple_Pack(3, __pyx_int_126102751, __pyx_int_72070923, __pyx_int_180366278); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_tuple__94 = PyTuple_Pack(3, __pyx_int_150088119, __pyx_int_251175041, __pyx_int_64022378); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "cfunc.to_py":67
 * @cname("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm")
 * cdef object __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*f)(UI_element) except *):
 *     def wrap(UI_element elm):             # <<<<<<<<<<<<<<
 *         """wrap(elm: 'UI_element') -> 'float'"""
 *         return f(elm)
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_elm); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(1, 67, __pyx_L1_error)

  /* "pyglui/ui.pyx":8
 *     from cysignals.signals cimport sig_off, sig_on
 * 
 *     @contextmanager             # <<<<<<<<<<<<<<
 *     def sig_on_off():
 *         sig_on()
 */
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_sig_on_off, 8, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 8, __pyx_L1_error)

  /* "src/pyglui/gldraw.pxi":45
 *     gl.glEnd()
 * 
 * cdef inline tripple_h(Vec2 org, Vec2 size, RGBA color=RGBA(1.,1.,1.,.5)):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.6*ui_scale)
 */
  __pyx_tuple__98 = PyTuple_Pack(4, __pyx_float_1_, __pyx_float_1_, __pyx_float_1_, __pyx_float__5); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(4, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "src/pyglui/helpers.pxi":31
 *     return value
 * 
 * def frange(start, stop, step):             # <<<<<<<<<<<<<<
 *     '''
 *     todo: translate to cython function
 */
  __pyx_tuple__99 = PyTuple_Pack(3, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_step); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(5, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_helpers_pxi, __pyx_n_s_frange, 31, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(5, 31, __pyx_L1_error)

  /* "pyglui/ui.pyx":49
 * cdef bint should_redraw_overlay = True
 * 
 * def get_roboto_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')
 * 
 */
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_get_roboto_font_path, 49, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 49, __pyx_L1_error)

  /* "pyglui/ui.pyx":52
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')
 * 
 * def get_opensans_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')
 * 
 */
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_get_opensans_font_path, 52, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 52, __pyx_L1_error)

  /* "pyglui/ui.pyx":55
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')
 * 
 * def get_pupil_icons_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')
 * 
 */
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_get_pupil_icons_font_path, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 55, __pyx_L1_error)

  /* "pyglui/ui.pyx":58
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')
 * 
 * def get_all_font_paths():             # <<<<<<<<<<<<<<
 *     return get_roboto_font_path(),get_opensans_font_path(),get_pupil_icons_font_path()
 * 
 */
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_get_all_font_paths, 58, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 58, __pyx_L1_error)

  /* "pyglui/ui.pyx":98
 *         pass
 * 
 *     def add_font(self,font_name,font_path):             # <<<<<<<<<<<<<<
 *         if glfont:
 *             glfont.add_font(font_name,font_path)
 */
  __pyx_tuple__104 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_font_name, __pyx_n_s_font_path); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_add_font, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 98, __pyx_L1_error)

  /* "pyglui/ui.pyx":102
 *             glfont.add_font(font_name,font_path)
 * 
 *     def terminate(self):             # <<<<<<<<<<<<<<
 *         global glfont
 *         glfont = None
 */
  __pyx_tuple__106 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_terminate, 102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 102, __pyx_L1_error)

  /* "pyglui/ui.pyx":109
 *         self.elements = []
 * 
 *     def update_mouse(self,mx,my):             # <<<<<<<<<<<<<<
 *         if self.window.mouse_over(Vec2(mx,my)):
 *             self.new_input.dm.x,self.new_input.dm.y = mx-self.new_input.m.x, my-self.new_input.m.y
 */
  __pyx_tuple__108 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_mx, __pyx_n_s_my); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_update_mouse, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 109, __pyx_L1_error)

  /* "pyglui/ui.pyx":115
 * 
 * 
 *     def update_window(self,w,h):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  __pyx_tuple__110 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_w, __pyx_n_s_h); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_update_window, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 115, __pyx_L1_error)

  /* "pyglui/ui.pyx":123
 *         resize_ui_texture(self.overlay_layer,self.window.size)
 * 
 *     def update_scroll(self, sx,sy):             # <<<<<<<<<<<<<<
 *         self.new_input.s.x = sx
 *         self.new_input.s.y = sy
 */
  __pyx_tuple__112 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_sx, __pyx_n_s_sy); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_update_scroll, 123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 123, __pyx_L1_error)

  /* "pyglui/ui.pyx":127
 *         self.new_input.s.y = sy
 * 
 *     def update_key(self, key, scancode, action, mods):             # <<<<<<<<<<<<<<
 *         self.new_input.keys.append((key,scancode,action,mods))
 * 
 */
  __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_scancode, __pyx_n_s_action, __pyx_n_s_mods); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_update_key, 127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 127, __pyx_L1_error)

  /* "pyglui/ui.pyx":130
 *         self.new_input.keys.append((key,scancode,action,mods))
 * 
 *     def update_char(self,c):             # <<<<<<<<<<<<<<
 *         try:
 *             self.new_input.chars.append(chr(c))
 */
  __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_update_char, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 130, __pyx_L1_error)

  /* "pyglui/ui.pyx":136
 *             pass
 * 
 *     def update_button(self,button,action,mods):             # <<<<<<<<<<<<<<
 *         self.new_input.buttons.append((button,action,mods))
 * 
 */
  __pyx_tuple__118 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_button, __pyx_n_s_action, __pyx_n_s_mods); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_update_button, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 136, __pyx_L1_error)

  /* "pyglui/ui.pyx":139
 *         self.new_input.buttons.append((button,action,mods))
 * 
 *     def update_clipboard(self, clipboard):             # <<<<<<<<<<<<<<
 *         self.new_input.cb = clipboard
 * 
 */
  __pyx_tuple__120 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_clipboard); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_update_clipboard, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 139, __pyx_L1_error)

  /* "pyglui/ui.pyx":212
 * 
 * 
 *     def update(self):             # <<<<<<<<<<<<<<
 *         unused_Input = self.handle_input()
 *         self.sync()
 */
  __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_unused_Input); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_update, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 212, __pyx_L1_error)

  /* "pyglui/ui.pyx":218
 *         return unused_Input
 * 
 *     def collect_menus(self):             # <<<<<<<<<<<<<<
 *         for e in self.elements:
 *             try:
 */
  __pyx_tuple__124 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_e); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_collect_menus, 218, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 218, __pyx_L1_error)

  /* "pyglui/ui.pyx":226
 * 
 *     ###special methods to make UI behave like a list
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  __pyx_tuple__126 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_append, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 226, __pyx_L1_error)

  /* "pyglui/ui.pyx":233
 *         should_redraw = True
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 */
  __pyx_tuple__128 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_objs, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_extend, 233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 233, __pyx_L1_error)

  /* "pyglui/ui.pyx":241
 *         should_redraw = True
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 */
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_remove, 241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 241, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_tuple__132 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":15
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         pass
 */
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_sync, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(2, 15, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":19
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_tuple__135 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_parent, __pyx_n_s_nested, __pyx_n_s_parent_read_only); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 19, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(2, 19, __pyx_L1_error)
  __pyx_tuple__137 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);

  /* "src/pyglui/ui_elements.pxi":22
 *         pass
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw_overlay, 22, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(2, 22, __pyx_L1_error)
  __pyx_tuple__139 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);

  /* "src/pyglui/ui_elements.pxi":25
 *         pass
 * 
 *     cpdef handle_input(self,Input new_input,bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_tuple__140 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_new_input, __pyx_n_s_visible, __pyx_n_s_parent_read_only); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 25, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(2, 25, __pyx_L1_error)
  __pyx_tuple__142 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "src/pyglui/ui_elements.pxi":30
 *             pass
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         # if your element needs to catch input event in front of everybody else:
 *         # add yourself to new_input.active_ui_elements during handle_input
 */
  __pyx_tuple__143 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_new_input); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(2, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_pre_handle_input, 30, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(2, 30, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":37
 *         pass
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_tuple__145 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_parent); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_precompute, 37, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(2, 37, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__147 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_UI_element__set_state(self, __pyx_state)
 */
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":130
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_sync, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(2, 130, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":133
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance:
 *         self.outline.compute(parent)
 */
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(2, 133, __pyx_L1_error)
  __pyx_tuple__152 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(2, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "src/pyglui/ui_elements.pxi":189
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 189, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(2, 189, __pyx_L1_error)
  __pyx_tuple__154 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(2, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "src/pyglui/ui_elements.pxi":217
 *             self.label_field.handle_input(new_input, visible, False)
 * 
 *     cpdef validate(self, val):             # <<<<<<<<<<<<<<
 *         return step(clamp(val, self.minimum, self.maximum), self.minimum, self.maximum, self.step)
 * 
 */
  __pyx_tuple__155 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_val); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(2, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_validate, 217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(2, 217, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":265
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_sync, 265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(2, 265, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":268
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 268, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(2, 268, __pyx_L1_error)
  __pyx_tuple__161 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(2, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);

  /* "src/pyglui/ui_elements.pxi":311
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(2, 311, __pyx_L1_error)
  __pyx_tuple__163 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(2, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":384
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_sync, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(2, 384, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":387
 *         self.sync_val.sync()
 * 
 *     def _on_change(self,new_value):             # <<<<<<<<<<<<<<
 *         self.selection,self.selection_labels = self.selection_getter()
 *         try:
 */
  __pyx_tuple__167 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_new_value); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(2, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_on_change, 387, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(2, 387, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":399
 * 
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         #update appearance
 */
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(2, 399, __pyx_L1_error)
  __pyx_tuple__170 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(2, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);

  /* "src/pyglui/ui_elements.pxi":450
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(2, 450, __pyx_L1_error)
  __pyx_tuple__172 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(2, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":537
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_sync, 537, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(2, 537, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":540
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         # read only rendering rules
 */
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(2, 540, __pyx_L1_error)
  __pyx_tuple__177 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(2, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);

  /* "src/pyglui/ui_elements.pxi":569
 * 
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         while new_input.keys:
 */
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_pre_handle_input, 569, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(2, 569, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":705
 *             return unicode(obj)
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef double d_double_click = 0.5  # delay used for double click
 */
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(2, 705, __pyx_L1_error)
  __pyx_tuple__180 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(2, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":916
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef tuple text_color
 *         cdef RGBA bg_color
 */
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 916, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(2, 916, __pyx_L1_error)
  __pyx_tuple__186 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(2, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);

  /* "src/pyglui/ui_elements.pxi":977
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 977, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(2, 977, __pyx_L1_error)
  __pyx_tuple__188 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(2, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":1012
 *         pass
 * 
 *     cpdef draw(self, FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 1012, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(2, 1012, __pyx_L1_error)
  __pyx_tuple__192 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(2, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);

  /* "src/pyglui/ui_elements.pxi":1024
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self, FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 */
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_precompute, 1024, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(2, 1024, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":1090
 *                 self._centered = new_value
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 1090, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(2, 1090, __pyx_L1_error)
  __pyx_tuple__197 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(2, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);

  /* "src/pyglui/ui_elements.pxi":1109
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 */
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_precompute, 1109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(2, 1109, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":1145
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 1145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(2, 1145, __pyx_L1_error)
  __pyx_tuple__202 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(2, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);

  /* "src/pyglui/ui_elements.pxi":1173
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self, FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 */
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_precompute, 1173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(2, 1173, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":1279
 *                 self._off_color = new_color
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         if self.label_getter is not None:
 *             # only redraws if label_getter returns a new value
 */
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_sync, 1279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(2, 1279, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":1285
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 1285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(2, 1285, __pyx_L1_error)
  __pyx_tuple__208 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(2, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);

  /* "src/pyglui/ui_elements.pxi":1339
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 1339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(2, 1339, __pyx_L1_error)
  __pyx_tuple__210 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(2, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":1426
 *         self._indicator_stop = val
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         unused = super(Icon, self).handle_input(new_input, visible, parent_read_only)
 *         global should_redraw_overlay
 */
  __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 1426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(2, 1426, __pyx_L1_error)
  __pyx_tuple__214 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(2, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);

  /* "src/pyglui/ui_elements.pxi":1438
 *         return unused
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw, 1438, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(2, 1438, __pyx_L1_error)
  __pyx_tuple__216 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(2, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);

  /* "src/pyglui/ui_elements.pxi":1473
 *         glfont.pop_state()
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef basestring T = self.tooltip
 *         cdef float ref_size = min(self.button.size)
 */
  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_draw_overlay, 1473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(2, 1473, __pyx_L1_error)
  __pyx_tuple__218 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(2, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":1536
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_sync, 1536, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(2, 1536, __pyx_L1_error)

  /* "src/pyglui/ui_elements.pxi":1539
 *         self.sync_val.sync()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):
 */
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_elements_pxi, __pyx_n_s_handle_input, 1539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(2, 1539, __pyx_L1_error)
  __pyx_tuple__223 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(2, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":94
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw_overlay
 *         self.trim_left.sync()
 */
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_custom_pxi, __pyx_n_s_sync, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(6, 94, __pyx_L1_error)

  /* "src/pyglui/custom.pxi":109
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))
 */
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_custom_pxi, __pyx_n_s_draw, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(6, 109, __pyx_L1_error)
  __pyx_tuple__228 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(6, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);

  /* "src/pyglui/custom.pxi":115
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         self.backwards.draw(self.outline, nested=True, parent_read_only=False)
 */
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_custom_pxi, __pyx_n_s_draw_overlay, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(6, 115, __pyx_L1_error)
  __pyx_tuple__230 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(6, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "src/pyglui/custom.pxi":213
 *         return '{:02.0f}:{:06.3f}'.format(minutes, seconds)
 * 
 *     cpdef handle_input(self,Input new_input, bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.backwards.handle_input(new_input, True, parent_read_only=False)
 *         self.play.handle_input(new_input, True, parent_read_only=False)
 */
  __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_custom_pxi, __pyx_n_s_handle_input, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(6, 213, __pyx_L1_error)
  __pyx_tuple__232 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(6, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/timelines.pxi":9
 *     def __cinit__(self, basestring label, object draw_data_callback,
 *                   object draw_label_callback=None, double content_height=30.,
 *                   xpad=Vec2(130, 30), ypad=5., *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self.label = label
 */
  __pyx_tuple__235 = PyTuple_Pack(2, __pyx_int_130, __pyx_int_30); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);

  /* "src/pyglui/timelines.pxi":21
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.data_area.compute(self.outline)
 */
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_timelines_pxi, __pyx_n_s_draw, 21, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(7, 21, __pyx_L1_error)
  __pyx_tuple__237 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(7, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);

  /* "src/pyglui/timelines.pxi":83
 *                             line_type=gl.GL_LINES, thickness=ui_scale)
 * 
 *     cpdef refresh(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_timelines_pxi, __pyx_n_s_refresh, 83, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(7, 83, __pyx_L1_error)

  /* "src/pyglui/timelines.pxi":99
 *             self.refresh()
 * 
 *     cpdef draw_label_default(self, width, height, scale):             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_font('opensans')
 */
  __pyx_tuple__239 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_scale); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(7, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_timelines_pxi, __pyx_n_s_draw_label_default, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(7, 99, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":19
 *     cdef public RGBA color
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             for e in self.elements:
 */
  __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_sync, 19, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(3, 19, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":24
 *                 e.sync()
 * 
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_append, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(3, 24, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":31
 *         should_redraw = True
 * 
 *     def insert(self,idx, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  __pyx_tuple__245 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_idx, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(3, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_insert, 31, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(3, 31, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":38
 *         should_redraw = True
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 */
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_extend, 38, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(3, 38, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":46
 *         should_redraw = True
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 */
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_remove, 46, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(3, 46, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":184
 * 
 *             # (botton not implemented)
 *     def collect_in_window(self,FitBox window):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if self.outline.design_org.x > 0:
 */
  __pyx_tuple__249 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_window); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(3, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_collect_in_window, 184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(3, 184, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Base_Menu__set_state(self, __pyx_state)
 */
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Movable_Menu__set_state(self, __pyx_state)
 */
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":312
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float h = 0,y_spacing=0,org_y=0
 *         if not self.collapsed:
 */
  __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw, 312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(3, 312, __pyx_L1_error)
  __pyx_tuple__256 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(3, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "src/pyglui/menus.pxi":333
 *                 self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw_overlay, 333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(3, 333, __pyx_L1_error)
  __pyx_tuple__258 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(3, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "src/pyglui/menus.pxi":340
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_handle_input, 340, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(3, 340, __pyx_L1_error)
  __pyx_tuple__260 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(3, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":379
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float w=0, x_spacing=0, org_x=0
 *         if not self.collapsed:
 */
  __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(3, 379, __pyx_L1_error)
  __pyx_tuple__264 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(3, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);

  /* "src/pyglui/menus.pxi":400
 *                 self.outline.org.x = org_x
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw_overlay, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(3, 400, __pyx_L1_error)
  __pyx_tuple__266 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(3, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);

  /* "src/pyglui/menus.pxi":407
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
  __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_handle_input, 407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(3, 407, __pyx_L1_error)
  __pyx_tuple__268 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(3, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":461
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
  __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw, 461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(3, 461, __pyx_L1_error)
  __pyx_tuple__272 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(3, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);

  /* "src/pyglui/menus.pxi":481
 *             self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw_overlay, 481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(3, 481, __pyx_L1_error)
  __pyx_tuple__274 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(3, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);

  /* "src/pyglui/menus.pxi":488
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 */
  __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_handle_input, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(3, 488, __pyx_L1_error)
  __pyx_tuple__276 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(3, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);

  /* "src/pyglui/menus.pxi":502
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         #here we compute the requred design height of this menu.
 *         self.outline.design_size.y  = self.height/ui_scale
 */
  __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_precompute, 502, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(3, 502, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":527
 * 
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         self.collapsed = not self.collapsed
 * 
 */
  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_toggle_iconified, 527, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(3, 527, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":603
 *         return "Scrolling_Menu {}".format(self._label)
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
  __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw, 603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(3, 603, __pyx_L1_error)
  __pyx_tuple__282 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(3, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);

  /* "src/pyglui/menus.pxi":628
 *             self.draw_scroll_window_elements(parent_read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw_overlay, 628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(3, 628, __pyx_L1_error)
  __pyx_tuple__284 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(3, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);

  /* "src/pyglui/menus.pxi":695
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef bint mouse_over_menu = 0
 */
  __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_handle_input, 695, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(3, 695, __pyx_L1_error)
  __pyx_tuple__286 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(3, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__286);
  __Pyx_GIVEREF(__pyx_tuple__286);

  /* "src/pyglui/menus.pxi":726
 * 
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         self.collapsed = not self.collapsed
 * 
 */
  __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_toggle_iconified, 726, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(3, 726, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":789
 *         self.label = 'Container'
 * 
 *     def init(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_tuple__290 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(3, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);
  __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_init, 789, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(3, 789, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":792
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         # compute constraints
 *         cdef FitBox copy = parent.computed_copy()
 */
  __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw, 792, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(3, 792, __pyx_L1_error)
  __pyx_tuple__293 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(3, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);

  /* "src/pyglui/menus.pxi":814
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw_overlay, 814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(3, 814, __pyx_L1_error)
  __pyx_tuple__295 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(3, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "src/pyglui/menus.pxi":821
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_handle_input, 821, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(3, 821, __pyx_L1_error)
  __pyx_tuple__297 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(3, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":840
 * 
 * cdef class Timeline_Menu(Scrolling_Menu):
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
  __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_draw, 840, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(3, 840, __pyx_L1_error)
  __pyx_tuple__301 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(3, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "src/pyglui/menus.pxi":855
 *             self.toggle_iconified()
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_toggle_iconified, 855, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(3, 855, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":865
 *             self.outline.collapse()
 * 
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */
  __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_append, 865, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) __PYX_ERR(3, 865, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":870
 *         super(Timeline_Menu, self).append(obj)
 * 
 *     def insert(self, idx, obj):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */
  __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_insert, 870, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(3, 870, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":875
 *         super(Timeline_Menu, self).insert(idx, obj)
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */
  __pyx_tuple__305 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_objs); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(3, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);
  __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_extend, 875, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(3, 875, __pyx_L1_error)

  /* "src/pyglui/menus.pxi":880
 *         super(Timeline_Menu, self).extend(objs)
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         super(Timeline_Menu, self).remove(obj)
 *         if len(self.elements) == 0:
 */
  __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_menus_pxi, __pyx_n_s_remove, 880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(3, 880, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "pyglui/ui.pyx":422
 *         return bool(self.keys or self.chars or self.buttons or self.dm or self.s)
 * 
 *     def purge(self):             # <<<<<<<<<<<<<<
 *         self.keys = []
 *         self.buttons = []
 */
  __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_purge, 422, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(0, 422, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__313 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__313)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__314 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__314)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "pyglui/ui.pyx":473
 * 
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         # we need to check for new clicks as touch pads can isse
 *         # a button down that is not follow by a button up.
 */
  __pyx_codeobj__315 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_pre_handle_input, 473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__315)) __PYX_ERR(0, 473, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__316 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__316)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "pyglui/ui.pyx":707
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2
 * 
 *     cpdef bint mouse_over(self,Vec2 m):             # <<<<<<<<<<<<<<
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y
 * 
 */
  __pyx_tuple__318 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_m); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);
  __pyx_codeobj__319 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_mouse_over, 707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__319)) __PYX_ERR(0, 707, __pyx_L1_error)

  /* "pyglui/ui.pyx":710
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y
 * 
 *     cpdef bint mouse_over_margin(self, Vec2 m, Vec2 margin):             # <<<<<<<<<<<<<<
 *         return self.org.x - margin.x <= m.x <= self.org.x + self.size.x + margin.x and self.org.y - margin.y <= m.y <= self.org.y + self.size.y + margin.y
 * 
 */
  __pyx_tuple__320 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_m, __pyx_n_s_margin); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);
  __pyx_codeobj__321 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyglui_ui_pyx, __pyx_n_s_mouse_over_margin, 710, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__321)) __PYX_ERR(0, 710, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__322 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__322)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__323 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__323)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__324 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__324)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_UI_element(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__326 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);
  __pyx_codeobj__327 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_UI_element, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__327)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_codeobj__328 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Base_Menu, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__328)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_codeobj__329 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Movable_Menu, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__329)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_get.method_name = &__pyx_n_s_get;
  __pyx_umethod_PyList_Type_index.type = (PyObject*)&PyList_Type;
  __pyx_umethod_PyList_Type_index.method_name = &__pyx_n_s_index;
  #if CYTHON_USE_MODULE_STATE
  if (__Pyx_InitString(__pyx_string_tab[0], &__pyx_kp_u_02_0f_06_3f) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[1], &__pyx_kp_u_0_2f) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[2], &__pyx_kp_u_1_31_0) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[3], &__pyx_n_s_AssertionError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[4], &__pyx_n_s_AttributeError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[5], &__pyx_n_s_Base_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[6], &__pyx_n_s_Base_Menu___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[7], &__pyx_n_s_Base_Menu___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[8], &__pyx_n_s_Base_Menu_append) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[9], &__pyx_n_s_Base_Menu_collect_in_window) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[10], &__pyx_n_s_Base_Menu_extend) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[11], &__pyx_n_s_Base_Menu_insert) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[12], &__pyx_n_s_Base_Menu_remove) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[13], &__pyx_n_s_Base_Menu_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[14], &__pyx_n_s_Button) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[15], &__pyx_n_s_Button___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[16], &__pyx_n_s_Button___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[17], &__pyx_n_s_Button_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[18], &__pyx_n_s_Button_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[19], &__pyx_kp_u_Buttons) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[20], &__pyx_kp_u_Can_only_append_UI_elements_not) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[21], &__pyx_kp_u_Chars) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[22], &__pyx_n_s_Color_Legend) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[23], &__pyx_n_s_Color_Legend___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[24], &__pyx_n_s_Color_Legend___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[25], &__pyx_n_s_Color_Legend_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[26], &__pyx_n_s_Color_Legend_precompute) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[27], &__pyx_n_s_Container) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[28], &__pyx_n_u_Container) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[29], &__pyx_n_s_Container___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[30], &__pyx_n_s_Container___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[31], &__pyx_n_s_Container_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[32], &__pyx_n_s_Container_draw_overlay) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[33], &__pyx_n_s_Container_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[34], &__pyx_n_s_Container_init) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[35], &__pyx_kp_u_Current_Input_Mouse_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[36], &__pyx_n_u_Darwin) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[37], &__pyx_kp_u_Dict) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[38], &__pyx_n_s_Draggable) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[39], &__pyx_n_s_Draggable___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[40], &__pyx_n_s_Draggable___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[41], &__pyx_n_s_Draggable_pre_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[42], &__pyx_n_s_FitBox) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[43], &__pyx_n_s_FitBox___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[44], &__pyx_n_s_FitBox___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[45], &__pyx_kp_u_FitBox_design_org) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[46], &__pyx_n_s_FitBox_mouse_over) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[47], &__pyx_n_s_FitBox_mouse_over_margin) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[48], &__pyx_n_s_Growing_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[49], &__pyx_n_s_Growing_Menu___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[50], &__pyx_n_s_Growing_Menu___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[51], &__pyx_n_s_Growing_Menu_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[52], &__pyx_n_s_Growing_Menu_draw_overlay) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[53], &__pyx_n_s_Growing_Menu_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[54], &__pyx_n_s_Growing_Menu_precompute) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[55], &__pyx_n_s_Growing_Menu_toggle_iconified) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[56], &__pyx_kp_u_Header_Positon_argument_needs_to) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[57], &__pyx_n_s_Horizontally_Stretching_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[58], &__pyx_n_s_Horizontally_Stretching_Menu___r) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[59], &__pyx_n_s_Horizontally_Stretching_Menu___s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[60], &__pyx_n_s_Horizontally_Stretching_Menu_dra) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[61], &__pyx_n_s_Horizontally_Stretching_Menu_dra_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[62], &__pyx_n_s_Horizontally_Stretching_Menu_han) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[63], &__pyx_n_s_Hot_Key) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[64], &__pyx_n_s_Hot_Key___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[65], &__pyx_n_s_Hot_Key___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[66], &__pyx_n_s_Hot_Key_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[67], &__pyx_n_s_Hot_Key_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[68], &__pyx_n_s_Icon) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[69], &__pyx_n_s_Icon___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[70], &__pyx_n_s_Icon___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[71], &__pyx_n_s_Icon_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[72], &__pyx_n_s_Icon_draw_overlay) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[73], &__pyx_n_s_Icon_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[74], &__pyx_n_s_ImportError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[75], &__pyx_kp_s_Incompatible_checksums_0x_x_vs_0) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[76], &__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[77], &__pyx_n_s_IndexError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[78], &__pyx_kp_u_Indicator_values_are_required_to) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[79], &__pyx_n_s_Info_Text) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[80], &__pyx_n_s_Info_Text___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[81], &__pyx_n_s_Info_Text___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[82], &__pyx_n_s_Info_Text_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[83], &__pyx_n_s_Info_Text_precompute) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[84], &__pyx_n_s_Input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[85], &__pyx_n_s_Input___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[86], &__pyx_n_s_Input___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[87], &__pyx_n_s_Input_purge) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[88], &__pyx_n_s_KeyError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[89], &__pyx_kp_u_Keys) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[90], &__pyx_kp_u_Mouse_delta) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[91], &__pyx_n_s_Movable_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[92], &__pyx_n_s_Movable_Menu___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[93], &__pyx_n_s_Movable_Menu___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[94], &__pyx_kp_u_None) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[95], &__pyx_n_s_NotImplemented) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[96], &__pyx_kp_u_OpenSans_Regular_ttf) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[97], &__pyx_n_s_PickleError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[98], &__pyx_n_s_Pyx_CFunc_float__lParenUI_elem) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[99], &__pyx_kp_u_Roboto_Regular_ttf) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[100], &__pyx_kp_u_Scroll) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[101], &__pyx_kp_u_Scrolling_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[102], &__pyx_n_s_Scrolling_Menu_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[103], &__pyx_n_s_Scrolling_Menu___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[104], &__pyx_n_s_Scrolling_Menu___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[105], &__pyx_n_s_Scrolling_Menu_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[106], &__pyx_n_s_Scrolling_Menu_draw_overlay) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[107], &__pyx_n_s_Scrolling_Menu_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[108], &__pyx_n_s_Scrolling_Menu_toggle_iconified) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[109], &__pyx_n_s_Seek_Bar) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[110], &__pyx_n_s_Seek_Bar___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[111], &__pyx_n_s_Seek_Bar___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[112], &__pyx_n_s_Seek_Bar_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[113], &__pyx_n_s_Seek_Bar_draw_overlay) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[114], &__pyx_n_s_Seek_Bar_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[115], &__pyx_n_s_Seek_Bar_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[116], &__pyx_n_s_Selector) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[117], &__pyx_n_s_Selector___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[118], &__pyx_n_s_Selector___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[119], &__pyx_n_s_Selector__on_change) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[120], &__pyx_n_s_Selector_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[121], &__pyx_n_s_Selector_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[122], &__pyx_n_s_Selector_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[123], &__pyx_n_s_Separator) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[124], &__pyx_n_s_Separator___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[125], &__pyx_n_s_Separator___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[126], &__pyx_n_s_Separator_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[127], &__pyx_n_s_Separator_precompute) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[128], &__pyx_n_s_Slider) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[129], &__pyx_n_s_Slider_Text_Input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[130], &__pyx_n_s_Slider_Text_Input___reduce_cytho) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[131], &__pyx_n_s_Slider_Text_Input___setstate_cyt) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[132], &__pyx_n_s_Slider___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[133], &__pyx_n_s_Slider___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[134], &__pyx_n_s_Slider_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[135], &__pyx_n_s_Slider_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[136], &__pyx_n_s_Slider_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[137], &__pyx_n_s_Slider_validate) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[138], &__pyx_kp_u_Slider_values_should_be_float_or) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[139], &__pyx_n_s_Stretching_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[140], &__pyx_n_s_Stretching_Menu___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[141], &__pyx_n_s_Stretching_Menu___setstate_cytho) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[142], &__pyx_n_s_Stretching_Menu_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[143], &__pyx_n_s_Stretching_Menu_draw_overlay) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[144], &__pyx_n_s_Stretching_Menu_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[145], &__pyx_n_s_Switch) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[146], &__pyx_n_s_Switch___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[147], &__pyx_n_s_Switch___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[148], &__pyx_n_s_Switch_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[149], &__pyx_n_s_Switch_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[150], &__pyx_n_s_Switch_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[151], &__pyx_n_s_Synced_Value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[152], &__pyx_n_s_Synced_Value___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[153], &__pyx_n_s_Synced_Value___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[154], &__pyx_kp_u_Synced_value_s_is_not_part_of_se) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[155], &__pyx_n_s_Text_Input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[156], &__pyx_n_s_Text_Input___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[157], &__pyx_n_s_Text_Input___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[158], &__pyx_n_s_Text_Input_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[159], &__pyx_n_s_Text_Input_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[160], &__pyx_n_s_Text_Input_pre_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[161], &__pyx_n_s_Text_Input_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[162], &__pyx_n_s_Thumb) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[163], &__pyx_n_s_Thumb___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[164], &__pyx_n_s_Thumb___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[165], &__pyx_n_s_Thumb_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[166], &__pyx_n_s_Thumb_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[167], &__pyx_n_s_Thumb_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[168], &__pyx_n_s_Timeline) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[169], &__pyx_n_s_Timeline_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[170], &__pyx_n_s_Timeline_Menu___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[171], &__pyx_n_s_Timeline_Menu___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[172], &__pyx_n_s_Timeline_Menu_append) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[173], &__pyx_n_s_Timeline_Menu_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[174], &__pyx_n_s_Timeline_Menu_extend) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[175], &__pyx_n_s_Timeline_Menu_insert) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[176], &__pyx_n_s_Timeline_Menu_remove) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[177], &__pyx_n_s_Timeline_Menu_toggle_iconified) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[178], &__pyx_n_s_Timeline___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[179], &__pyx_n_s_Timeline___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[180], &__pyx_n_s_Timeline_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[181], &__pyx_n_s_Timeline_draw_label_default) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[182], &__pyx_n_s_Timeline_refresh) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[183], &__pyx_n_s_TypeError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[184], &__pyx_n_s_UI) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[185], &__pyx_kp_u_UI_Framebuffer_could_not_be_crea) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[186], &__pyx_n_s_UI___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[187], &__pyx_n_s_UI___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[188], &__pyx_n_s_UI_add_font) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[189], &__pyx_n_s_UI_append) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[190], &__pyx_n_s_UI_collect_menus) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[191], &__pyx_n_s_UI_element) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[192], &__pyx_n_s_UI_element___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[193], &__pyx_n_s_UI_element___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[194], &__pyx_n_s_UI_element_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[195], &__pyx_n_s_UI_element_draw_overlay) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[196], &__pyx_n_s_UI_element_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[197], &__pyx_n_s_UI_element_pre_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[198], &__pyx_n_s_UI_element_precompute) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[199], &__pyx_n_s_UI_element_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[200], &__pyx_n_s_UI_extend) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[201], &__pyx_n_s_UI_remove) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[202], &__pyx_n_s_UI_terminate) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[203], &__pyx_n_s_UI_update) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[204], &__pyx_n_s_UI_update_button) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[205], &__pyx_n_s_UI_update_char) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[206], &__pyx_n_s_UI_update_clipboard) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[207], &__pyx_n_s_UI_update_key) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[208], &__pyx_n_s_UI_update_mouse) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[209], &__pyx_n_s_UI_update_scroll) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[210], &__pyx_n_s_UI_update_window) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[211], &__pyx_n_s_Unused_Input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[212], &__pyx_n_u_Unused_Input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[213], &__pyx_n_s_ValueError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[214], &__pyx_n_s_Vec2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[215], &__pyx_n_s_Vec2___reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[216], &__pyx_n_s_Vec2___setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[217], &__pyx_n_s__330) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[218], &__pyx_kp_u__34) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[219], &__pyx_n_s__50) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[220], &__pyx_kp_u__88) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[221], &__pyx_kp_u__93) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[222], &__pyx_n_s__97) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[223], &__pyx_n_s_action) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[224], &__pyx_n_s_add_font) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[225], &__pyx_n_s_append) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[226], &__pyx_n_s_args) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[227], &__pyx_n_s_arrest_axis) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[228], &__pyx_n_s_as_tuple) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[229], &__pyx_n_s_asyncio_coroutines) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[230], &__pyx_n_s_attribute_context) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[231], &__pyx_n_s_attribute_name) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[232], &__pyx_n_u_backwards) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[233], &__pyx_n_u_bottom) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[234], &__pyx_n_s_button) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[235], &__pyx_n_u_buttons) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[236], &__pyx_n_s_c) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[237], &__pyx_n_s_catch_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[238], &__pyx_n_s_center) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[239], &__pyx_n_s_centered) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[240], &__pyx_n_s_cfunc_to_py) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[241], &__pyx_n_s_char) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[242], &__pyx_n_u_chars) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[243], &__pyx_n_s_chr) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[244], &__pyx_n_s_cinit___locals_default_selecti) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[245], &__pyx_n_s_cinit___locals_default_selecti_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[246], &__pyx_n_s_cinit___locals_lambda) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[247], &__pyx_n_s_cinit___locals_set_play) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[248], &__pyx_n_s_class) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[249], &__pyx_n_s_class_getitem) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[250], &__pyx_n_s_clear_state) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[251], &__pyx_n_s_click_cb) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[252], &__pyx_n_s_cline_in_traceback) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[253], &__pyx_n_s_clipboard) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[254], &__pyx_n_u_clipboard) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[255], &__pyx_n_s_close) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[256], &__pyx_n_s_collapsed) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[257], &__pyx_n_u_collapsed) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[258], &__pyx_n_s_collect_in_window) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[259], &__pyx_n_s_collect_menus) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[260], &__pyx_n_s_collections) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[261], &__pyx_kp_u_comptd_org) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[262], &__pyx_n_s_configuration) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[263], &__pyx_n_s_content_height) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[264], &__pyx_n_s_contextlib) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[265], &__pyx_n_s_contextmanager) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[266], &__pyx_n_s_cysignals) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[267], &__pyx_kp_u_d) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[268], &__pyx_n_s_decode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[269], &__pyx_n_s_default_selection_getter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[270], &__pyx_n_s_dict) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[271], &__pyx_n_s_dict_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[272], &__pyx_n_s_dirname) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[273], &__pyx_kp_u_disable) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[274], &__pyx_n_s_display_format) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[275], &__pyx_n_s_draw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[276], &__pyx_n_s_draw_data_callback) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[277], &__pyx_n_s_draw_label_callback) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[278], &__pyx_n_s_draw_label_default) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[279], &__pyx_n_s_draw_overlay) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[280], &__pyx_n_s_e) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[281], &__pyx_n_s_elm) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[282], &__pyx_kp_u_enable) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[283], &__pyx_n_s_enter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[284], &__pyx_n_s_eval) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[285], &__pyx_n_s_exit) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[286], &__pyx_n_s_extend) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[287], &__pyx_n_s_file) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[288], &__pyx_n_s_font_name) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[289], &__pyx_n_s_font_path) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[290], &__pyx_n_s_format) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[291], &__pyx_n_u_forwards) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[292], &__pyx_n_s_frange) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[293], &__pyx_n_s_function) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[294], &__pyx_kp_u_gc) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[295], &__pyx_n_s_get) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[296], &__pyx_n_s_get_all_font_paths) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[297], &__pyx_n_s_get_opensans_font_path) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[298], &__pyx_n_s_get_pupil_icons_font_path) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[299], &__pyx_n_s_get_roboto_font_path) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[300], &__pyx_n_s_getstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[301], &__pyx_n_s_getter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[302], &__pyx_n_s_h) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[303], &__pyx_n_s_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[304], &__pyx_n_s_handle_start_reference) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[305], &__pyx_kp_u_has_no_attribute) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[306], &__pyx_kp_u_has_no_entry) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[307], &__pyx_n_s_header_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[308], &__pyx_n_s_header_pos_id) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[309], &__pyx_n_u_headline) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[310], &__pyx_n_s_height) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[311], &__pyx_n_u_hidden) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[312], &__pyx_n_s_hotkey) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[313], &__pyx_n_s_id) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[314], &__pyx_n_s_idx) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[315], &__pyx_n_s_import) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[316], &__pyx_n_s_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[317], &__pyx_n_s_indicator_start) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[318], &__pyx_n_s_indicator_stop) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[319], &__pyx_n_s_init) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[320], &__pyx_n_s_initializing) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[321], &__pyx_n_s_insert) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[322], &__pyx_n_s_is_coroutine) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[323], &__pyx_kp_u_is_of_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[324], &__pyx_kp_u_isenabled) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[325], &__pyx_n_s_join) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[326], &__pyx_n_s_key) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[327], &__pyx_n_u_keys) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[328], &__pyx_n_s_kwargs) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[329], &__pyx_n_s_label) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[330], &__pyx_n_u_label) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[331], &__pyx_n_s_label_font) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[332], &__pyx_n_s_label_getter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[333], &__pyx_n_s_label_line_height) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[334], &__pyx_n_s_label_offset_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[335], &__pyx_n_s_label_offset_x) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[336], &__pyx_n_s_label_offset_y) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[337], &__pyx_n_s_labels) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[338], &__pyx_n_u_left) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[339], &__pyx_n_s_line_color) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[340], &__pyx_n_s_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[341], &__pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[342], &__pyx_n_s_margin) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[343], &__pyx_n_s_max) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[344], &__pyx_n_s_max_ts) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[345], &__pyx_n_s_min) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[346], &__pyx_n_s_min_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[347], &__pyx_n_u_min_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[348], &__pyx_n_s_min_ts) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[349], &__pyx_n_s_mods) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[350], &__pyx_n_s_mouse_over) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[351], &__pyx_n_s_mouse_over_margin) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[352], &__pyx_n_s_mx) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[353], &__pyx_n_s_my) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[354], &__pyx_n_s_name) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[355], &__pyx_n_s_namedtuple) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[356], &__pyx_n_s_nested) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[357], &__pyx_n_s_new) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[358], &__pyx_n_s_new_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[359], &__pyx_n_s_new_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[360], &__pyx_kp_s_no_default___reduce___due_to_non) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[361], &__pyx_n_s_obj) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[362], &__pyx_n_s_objs) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[363], &__pyx_n_s_off_color) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[364], &__pyx_n_s_off_val) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[365], &__pyx_n_s_on_change) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[366], &__pyx_n_s_on_change_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[367], &__pyx_n_s_on_color) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[368], &__pyx_n_s_on_val) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[369], &__pyx_n_u_opensans) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[370], &__pyx_n_s_os) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[371], &__pyx_n_s_outer_label) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[372], &__pyx_n_s_padding) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[373], &__pyx_n_s_parent) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[374], &__pyx_n_s_parent_read_only) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[375], &__pyx_n_s_path) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[376], &__pyx_n_s_pickle) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[377], &__pyx_n_s_platform) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[378], &__pyx_n_s_play) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[379], &__pyx_n_u_play) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[380], &__pyx_n_u_playback_speed) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[381], &__pyx_n_s_playback_time_setter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[382], &__pyx_n_s_pop) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[383], &__pyx_n_s_pop_state) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[384], &__pyx_n_s_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[385], &__pyx_n_u_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[386], &__pyx_n_s_position) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[387], &__pyx_n_s_pre_handle_input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[388], &__pyx_n_s_precompute) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[389], &__pyx_n_u_pupil_icons) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[390], &__pyx_kp_u_pupil_icons_ttf) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[391], &__pyx_n_s_purge) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[392], &__pyx_n_s_push_state) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[393], &__pyx_n_s_pyglui_ui) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[394], &__pyx_n_s_pyx_PickleError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[395], &__pyx_n_s_pyx_checksum) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[396], &__pyx_n_s_pyx_result) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[397], &__pyx_n_s_pyx_state) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[398], &__pyx_n_s_pyx_type) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[399], &__pyx_n_s_pyx_unpickle_Base_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[400], &__pyx_n_s_pyx_unpickle_Movable_Menu) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[401], &__pyx_n_s_pyx_unpickle_UI_element) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[402], &__pyx_n_s_pyx_vtable) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[403], &__pyx_n_s_range) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[404], &__pyx_n_s_recent_idx_ts_getter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[405], &__pyx_n_s_reduce) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[406], &__pyx_n_s_reduce_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[407], &__pyx_n_s_reduce_ex) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[408], &__pyx_n_s_refresh) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[409], &__pyx_n_s_remove) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[410], &__pyx_n_u_right) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[411], &__pyx_n_u_roboto) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[412], &__pyx_n_s_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[413], &__pyx_n_s_scale) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[414], &__pyx_n_s_scancode) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[415], &__pyx_n_u_scrollstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[416], &__pyx_n_s_seeking_cb) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[417], &__pyx_n_s_selection) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[418], &__pyx_n_s_selection_getter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[419], &__pyx_n_s_self) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[420], &__pyx_n_s_send) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[421], &__pyx_n_s_set_align) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[422], &__pyx_n_s_set_blur) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[423], &__pyx_n_s_set_font) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[424], &__pyx_n_s_set_play) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[425], &__pyx_n_s_set_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[426], &__pyx_n_s_setstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[427], &__pyx_n_s_setstate_cython) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[428], &__pyx_n_s_setter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[429], &__pyx_n_s_sig_on_off) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[430], &__pyx_n_s_six) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[431], &__pyx_n_s_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[432], &__pyx_n_u_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[433], &__pyx_kp_u_size_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[434], &__pyx_n_s_sort) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[435], &__pyx_n_s_spec) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[436], &__pyx_kp_s_src_pyglui_custom_pxi) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[437], &__pyx_kp_s_src_pyglui_helpers_pxi) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[438], &__pyx_kp_s_src_pyglui_menus_pxi) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[439], &__pyx_kp_s_src_pyglui_timelines_pxi) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[440], &__pyx_kp_s_src_pyglui_ui_elements_pxi) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[441], &__pyx_kp_s_src_pyglui_ui_pyx) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[442], &__pyx_n_s_start) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[443], &__pyx_n_s_state) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[444], &__pyx_n_s_step) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[445], &__pyx_n_s_stop) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[446], &__pyx_kp_s_stringsource) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[447], &__pyx_n_u_submenus) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[448], &__pyx_n_s_sum) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[449], &__pyx_n_s_super) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[450], &__pyx_n_s_sx) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[451], &__pyx_n_s_sy) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[452], &__pyx_n_s_sync) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[453], &__pyx_n_s_sync_ctx) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[454], &__pyx_n_s_system) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[455], &__pyx_n_s_terminate) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[456], &__pyx_n_s_test) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[457], &__pyx_n_s_text) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[458], &__pyx_n_s_text_bounds) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[459], &__pyx_n_s_text_color) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[460], &__pyx_n_s_text_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[461], &__pyx_n_s_throw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[462], &__pyx_n_s_time) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[463], &__pyx_n_s_to_str) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[464], &__pyx_n_s_toggle_iconified) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[465], &__pyx_n_s_tooltip) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[466], &__pyx_n_u_top) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[467], &__pyx_n_s_trigger_overlay_only) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[468], &__pyx_n_u_trim_left_ts) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[469], &__pyx_n_u_trim_right_ts) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[470], &__pyx_n_s_typed_val) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[471], &__pyx_n_u_uncollapsed_min_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[472], &__pyx_n_u_uncollapsed_pos) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[473], &__pyx_n_u_uncollapsed_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[474], &__pyx_n_s_unichr) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[475], &__pyx_n_s_unused_Input) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[476], &__pyx_n_s_update) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[477], &__pyx_n_s_update_button) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[478], &__pyx_n_s_update_char) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[479], &__pyx_n_s_update_clipboard) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[480], &__pyx_n_s_update_key) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[481], &__pyx_n_s_update_mouse) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[482], &__pyx_n_s_update_scroll) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[483], &__pyx_n_s_update_window) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[484], &__pyx_n_s_use_setstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[485], &__pyx_kp_u_utf_8) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[486], &__pyx_n_s_val) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[487], &__pyx_n_s_validate) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[488], &__pyx_n_s_value) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[489], &__pyx_n_s_version) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[490], &__pyx_n_s_visible) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[491], &__pyx_n_s_w) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[492], &__pyx_n_s_width) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[493], &__pyx_n_s_window) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[494], &__pyx_n_s_window_size) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[495], &__pyx_n_s_wrap) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[496], &__pyx_n_s_x) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[497], &__pyx_kp_u_x_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[498], &__pyx_kp_u_x_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[499], &__pyx_n_s_xpad) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[500], &__pyx_n_s_y) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[501], &__pyx_kp_u_y_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[502], &__pyx_n_s_ypad) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[503], &__pyx_n_s_zero_crossing) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  #endif
  #if !CYTHON_USE_MODULE_STATE
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  #endif
  __pyx_float__0 = PyFloat_FromDouble(.0); if (unlikely(!__pyx_float__0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__1 = PyFloat_FromDouble(.1); if (unlikely(!__pyx_float__1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__3 = PyFloat_FromDouble(.3); if (unlikely(!__pyx_float__3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__5 = PyFloat_FromDouble(.5); if (unlikely(!__pyx_float__5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__8 = PyFloat_FromDouble(.8); if (unlikely(!__pyx_float__8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__9 = PyFloat_FromDouble(.9); if (unlikely(!__pyx_float__9)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_ = PyFloat_FromDouble(0.); if (unlikely(!__pyx_float_0_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_ = PyFloat_FromDouble(1.); if (unlikely(!__pyx_float_1_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_ = PyFloat_FromDouble(2.); if (unlikely(!__pyx_float_2_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_3_ = PyFloat_FromDouble(3.); if (unlikely(!__pyx_float_3_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_5_ = PyFloat_FromDouble(5.); if (unlikely(!__pyx_float_5_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_8_ = PyFloat_FromDouble(8.); if (unlikely(!__pyx_float_8_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__77 = PyFloat_FromDouble(.77); if (unlikely(!__pyx_float__77)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_3 = PyFloat_FromDouble(0.3); if (unlikely(!__pyx_float_0_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_4 = PyFloat_FromDouble(0.4); if (unlikely(!__pyx_float_0_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_6 = PyFloat_FromDouble(0.6); if (unlikely(!__pyx_float_0_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_8 = PyFloat_FromDouble(0.8); if (unlikely(!__pyx_float_0_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_9 = PyFloat_FromDouble(0.9); if (unlikely(!__pyx_float_0_9)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_21_ = PyFloat_FromDouble(21.); if (unlikely(!__pyx_float_21_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_25 = PyFloat_FromDouble(0.25); if (unlikely(!__pyx_float_0_25)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_75 = PyFloat_FromDouble(0.75); if (unlikely(!__pyx_float_0_75)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_84 = PyFloat_FromDouble(0.84); if (unlikely(!__pyx_float_0_84)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_10_0 = PyFloat_FromDouble(10.0); if (unlikely(!__pyx_float_10_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_10_5 = PyFloat_FromDouble(10.5); if (unlikely(!__pyx_float_10_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_130_ = PyFloat_FromDouble(130.); if (unlikely(!__pyx_float_130_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_18_0 = PyFloat_FromDouble(18.0); if (unlikely(!__pyx_float_18_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_20_0 = PyFloat_FromDouble(20.0); if (unlikely(!__pyx_float_20_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_38_0 = PyFloat_FromDouble(38.0); if (unlikely(!__pyx_float_38_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_40_0 = PyFloat_FromDouble(40.0); if (unlikely(!__pyx_float_40_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_44_0 = PyFloat_FromDouble(44.0); if (unlikely(!__pyx_float_44_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_50_0 = PyFloat_FromDouble(50.0); if (unlikely(!__pyx_float_50_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_65_0 = PyFloat_FromDouble(65.0); if (unlikely(!__pyx_float_65_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_80_0 = PyFloat_FromDouble(80.0); if (unlikely(!__pyx_float_80_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_300_0 = PyFloat_FromDouble(300.0); if (unlikely(!__pyx_float_300_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float__0000001 = PyFloat_FromDouble(.0000001); if (unlikely(!__pyx_float__0000001)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_0_0 = PyFloat_FromDouble(-0.0); if (unlikely(!__pyx_float_neg_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_30_ = PyFloat_FromDouble(-30.); if (unlikely(!__pyx_float_neg_30_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_50_ = PyFloat_FromDouble(-50.); if (unlikely(!__pyx_float_neg_50_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_10_0 = PyFloat_FromDouble(-10.0); if (unlikely(!__pyx_float_neg_10_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_20_0 = PyFloat_FromDouble(-20.0); if (unlikely(!__pyx_float_neg_20_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_38_0 = PyFloat_FromDouble(-38.0); if (unlikely(!__pyx_float_neg_38_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_65 = PyInt_FromLong(65); if (unlikely(!__pyx_int_65)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_67 = PyInt_FromLong(67); if (unlikely(!__pyx_int_67)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_75 = PyInt_FromLong(75); if (unlikely(!__pyx_int_75)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_86 = PyInt_FromLong(86); if (unlikely(!__pyx_int_86)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_88 = PyInt_FromLong(88); if (unlikely(!__pyx_int_88)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_130 = PyInt_FromLong(130); if (unlikely(!__pyx_int_130)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_200 = PyInt_FromLong(200); if (unlikely(!__pyx_int_200)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_257 = PyInt_FromLong(257); if (unlikely(!__pyx_int_257)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_259 = PyInt_FromLong(259); if (unlikely(!__pyx_int_259)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_261 = PyInt_FromLong(261); if (unlikely(!__pyx_int_261)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_262 = PyInt_FromLong(262); if (unlikely(!__pyx_int_262)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_263 = PyInt_FromLong(263); if (unlikely(!__pyx_int_263)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_268 = PyInt_FromLong(268); if (unlikely(!__pyx_int_268)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_269 = PyInt_FromLong(269); if (unlikely(!__pyx_int_269)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57375 = PyInt_FromLong(57375L); if (unlikely(!__pyx_int_57375)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57376 = PyInt_FromLong(57376L); if (unlikely(!__pyx_int_57376)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57396 = PyInt_FromLong(57396L); if (unlikely(!__pyx_int_57396)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57399 = PyInt_FromLong(57399L); if (unlikely(!__pyx_int_57399)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57412 = PyInt_FromLong(57412L); if (unlikely(!__pyx_int_57412)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57413 = PyInt_FromLong(57413L); if (unlikely(!__pyx_int_57413)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_64022378 = PyInt_FromLong(64022378L); if (unlikely(!__pyx_int_64022378)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_72070923 = PyInt_FromLong(72070923L); if (unlikely(!__pyx_int_72070923)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_126102751 = PyInt_FromLong(126102751L); if (unlikely(!__pyx_int_126102751)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_150088119 = PyInt_FromLong(150088119L); if (unlikely(!__pyx_int_150088119)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_180366278 = PyInt_FromLong(180366278L); if (unlikely(!__pyx_int_180366278)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_251175041 = PyInt_FromLong(251175041L); if (unlikely(!__pyx_int_251175041)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_10 = PyInt_FromLong(-10); if (unlikely(!__pyx_int_neg_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_25 = PyInt_FromLong(-25); if (unlikely(!__pyx_int_neg_25)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  return 0;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_6pyglui_2ui_glfont = ((struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context *)Py_None); Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_6pyglui_2ui_UI = &__pyx_vtable_6pyglui_2ui_UI;
  __pyx_vtable_6pyglui_2ui_UI.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI *))__pyx_f_6pyglui_2ui_2UI_sync;
  __pyx_vtable_6pyglui_2ui_UI.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI *))__pyx_f_6pyglui_2ui_2UI_handle_input;
  __pyx_vtable_6pyglui_2ui_UI.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI *))__pyx_f_6pyglui_2ui_2UI_draw;
  __pyx_vtable_6pyglui_2ui_UI.get_submenu_config = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI *))__pyx_f_6pyglui_2ui_2UI_get_submenu_config;
  __pyx_vtable_6pyglui_2ui_UI.set_submenu_config = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI *, PyObject *))__pyx_f_6pyglui_2ui_2UI_set_submenu_config;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui_UI = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_UI_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui_UI)) __PYX_ERR(0, 69, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_UI_spec, __pyx_ptype_6pyglui_2ui_UI) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_UI = &__pyx_type_6pyglui_2ui_UI;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_UI) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_UI->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_UI->tp_dictoffset && __pyx_ptype_6pyglui_2ui_UI->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_UI->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_UI, __pyx_vtabptr_6pyglui_2ui_UI) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_UI) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UI, (PyObject *) __pyx_ptype_6pyglui_2ui_UI) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_UI) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_UI_element = &__pyx_vtable_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_UI_element.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_10UI_element_sync;
  __pyx_vtable_6pyglui_2ui_UI_element.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_10UI_element_draw;
  __pyx_vtable_6pyglui_2ui_UI_element.draw_overlay = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args))__pyx_f_6pyglui_2ui_10UI_element_draw_overlay;
  __pyx_vtable_6pyglui_2ui_UI_element.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_10UI_element_handle_input;
  __pyx_vtable_6pyglui_2ui_UI_element.pre_handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_10UI_element_pre_handle_input;
  __pyx_vtable_6pyglui_2ui_UI_element.precompute = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_10UI_element_precompute;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui_UI_element = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_UI_element_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui_UI_element)) __PYX_ERR(2, 4, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_UI_element_spec, __pyx_ptype_6pyglui_2ui_UI_element) < 0) __PYX_ERR(2, 4, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_UI_element = &__pyx_type_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_UI_element) < 0) __PYX_ERR(2, 4, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_UI_element->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_UI_element->tp_dictoffset && __pyx_ptype_6pyglui_2ui_UI_element->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_UI_element->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_UI_element, __pyx_vtabptr_6pyglui_2ui_UI_element) < 0) __PYX_ERR(2, 4, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_UI_element) < 0) __PYX_ERR(2, 4, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UI_element, (PyObject *) __pyx_ptype_6pyglui_2ui_UI_element) < 0) __PYX_ERR(2, 4, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_UI_element) < 0) __PYX_ERR(2, 4, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Slider = &__pyx_vtable_6pyglui_2ui_Slider;
  __pyx_vtable_6pyglui_2ui_Slider.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Slider.__pyx_base.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_6Slider_sync;
  __pyx_vtable_6pyglui_2ui_Slider.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_6Slider_draw;
  __pyx_vtable_6pyglui_2ui_Slider.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_6Slider_handle_input;
  __pyx_vtable_6pyglui_2ui_Slider.validate = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Slider *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_6Slider_validate;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Slider = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Slider_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Slider)) __PYX_ERR(2, 82, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Slider_spec, __pyx_ptype_6pyglui_2ui_Slider) < 0) __PYX_ERR(2, 82, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Slider = &__pyx_type_6pyglui_2ui_Slider;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Slider->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Slider) < 0) __PYX_ERR(2, 82, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Slider->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Slider->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Slider->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Slider->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Slider, __pyx_vtabptr_6pyglui_2ui_Slider) < 0) __PYX_ERR(2, 82, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Slider) < 0) __PYX_ERR(2, 82, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Slider, (PyObject *) __pyx_ptype_6pyglui_2ui_Slider) < 0) __PYX_ERR(2, 82, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Slider) < 0) __PYX_ERR(2, 82, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Switch = &__pyx_vtable_6pyglui_2ui_Switch;
  __pyx_vtable_6pyglui_2ui_Switch.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Switch.__pyx_base.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_6Switch_sync;
  __pyx_vtable_6pyglui_2ui_Switch.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_6Switch_draw;
  __pyx_vtable_6pyglui_2ui_Switch.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_6Switch_handle_input;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Switch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Switch_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Switch)) __PYX_ERR(2, 236, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Switch_spec, __pyx_ptype_6pyglui_2ui_Switch) < 0) __PYX_ERR(2, 236, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Switch = &__pyx_type_6pyglui_2ui_Switch;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Switch->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Switch) < 0) __PYX_ERR(2, 236, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Switch->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Switch->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Switch->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Switch->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Switch, __pyx_vtabptr_6pyglui_2ui_Switch) < 0) __PYX_ERR(2, 236, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Switch) < 0) __PYX_ERR(2, 236, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Switch, (PyObject *) __pyx_ptype_6pyglui_2ui_Switch) < 0) __PYX_ERR(2, 236, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Switch) < 0) __PYX_ERR(2, 236, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Selector = &__pyx_vtable_6pyglui_2ui_Selector;
  __pyx_vtable_6pyglui_2ui_Selector.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Selector.__pyx_base.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_8Selector_sync;
  __pyx_vtable_6pyglui_2ui_Selector.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_8Selector_draw;
  __pyx_vtable_6pyglui_2ui_Selector.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_8Selector_handle_input;
  __pyx_vtable_6pyglui_2ui_Selector.init_selection = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Selector *))__pyx_f_6pyglui_2ui_8Selector_init_selection;
  __pyx_vtable_6pyglui_2ui_Selector.finish_selection = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Selector *, float))__pyx_f_6pyglui_2ui_8Selector_finish_selection;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Selector = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Selector_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Selector)) __PYX_ERR(2, 341, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Selector_spec, __pyx_ptype_6pyglui_2ui_Selector) < 0) __PYX_ERR(2, 341, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Selector = &__pyx_type_6pyglui_2ui_Selector;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Selector->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Selector) < 0) __PYX_ERR(2, 341, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Selector->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Selector->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Selector->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Selector->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Selector, __pyx_vtabptr_6pyglui_2ui_Selector) < 0) __PYX_ERR(2, 341, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Selector) < 0) __PYX_ERR(2, 341, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Selector, (PyObject *) __pyx_ptype_6pyglui_2ui_Selector) < 0) __PYX_ERR(2, 341, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Selector) < 0) __PYX_ERR(2, 341, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Text_Input = &__pyx_vtable_6pyglui_2ui_Text_Input;
  __pyx_vtable_6pyglui_2ui_Text_Input.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Text_Input.__pyx_base.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_10Text_Input_sync;
  __pyx_vtable_6pyglui_2ui_Text_Input.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_10Text_Input_draw;
  __pyx_vtable_6pyglui_2ui_Text_Input.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_10Text_Input_handle_input;
  __pyx_vtable_6pyglui_2ui_Text_Input.__pyx_base.pre_handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_10Text_Input_pre_handle_input;
  __pyx_vtable_6pyglui_2ui_Text_Input.to_unicode = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Text_Input *, PyObject *))__pyx_f_6pyglui_2ui_10Text_Input_to_unicode;
  __pyx_vtable_6pyglui_2ui_Text_Input.finish_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Text_Input *))__pyx_f_6pyglui_2ui_10Text_Input_finish_input;
  __pyx_vtable_6pyglui_2ui_Text_Input.update_input_val = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Text_Input *))__pyx_f_6pyglui_2ui_10Text_Input_update_input_val;
  __pyx_vtable_6pyglui_2ui_Text_Input.abort_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Text_Input *))__pyx_f_6pyglui_2ui_10Text_Input_abort_input;
  __pyx_vtable_6pyglui_2ui_Text_Input.calculate_start_idx = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Text_Input *))__pyx_f_6pyglui_2ui_10Text_Input_calculate_start_idx;
  __pyx_vtable_6pyglui_2ui_Text_Input.draw_text_field = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Text_Input *))__pyx_f_6pyglui_2ui_10Text_Input_draw_text_field;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Text_Input = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Text_Input_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Text_Input)) __PYX_ERR(2, 498, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Text_Input_spec, __pyx_ptype_6pyglui_2ui_Text_Input) < 0) __PYX_ERR(2, 498, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Text_Input = &__pyx_type_6pyglui_2ui_Text_Input;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Text_Input->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Text_Input) < 0) __PYX_ERR(2, 498, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Text_Input->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Text_Input->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Text_Input->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Text_Input->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Text_Input, __pyx_vtabptr_6pyglui_2ui_Text_Input) < 0) __PYX_ERR(2, 498, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Text_Input) < 0) __PYX_ERR(2, 498, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Text_Input, (PyObject *) __pyx_ptype_6pyglui_2ui_Text_Input) < 0) __PYX_ERR(2, 498, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Text_Input) < 0) __PYX_ERR(2, 498, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Slider_Text_Input = &__pyx_vtable_6pyglui_2ui_Slider_Text_Input;
  __pyx_vtable_6pyglui_2ui_Slider_Text_Input.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Text_Input;
  __pyx_vtable_6pyglui_2ui_Slider_Text_Input.__pyx_base.to_unicode = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Text_Input *, PyObject *))__pyx_f_6pyglui_2ui_17Slider_Text_Input_to_unicode;
  __pyx_vtable_6pyglui_2ui_Slider_Text_Input.__pyx_base.update_input_val = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Text_Input *))__pyx_f_6pyglui_2ui_17Slider_Text_Input_update_input_val;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Text_Input); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Slider_Text_Input = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Slider_Text_Input_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Slider_Text_Input)) __PYX_ERR(2, 854, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Slider_Text_Input_spec, __pyx_ptype_6pyglui_2ui_Slider_Text_Input) < 0) __PYX_ERR(2, 854, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Slider_Text_Input = &__pyx_type_6pyglui_2ui_Slider_Text_Input;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Slider_Text_Input->tp_base = __pyx_ptype_6pyglui_2ui_Text_Input;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Slider_Text_Input) < 0) __PYX_ERR(2, 854, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Slider_Text_Input->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Slider_Text_Input->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Slider_Text_Input->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Slider_Text_Input->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Slider_Text_Input, __pyx_vtabptr_6pyglui_2ui_Slider_Text_Input) < 0) __PYX_ERR(2, 854, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Slider_Text_Input) < 0) __PYX_ERR(2, 854, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Slider_Text_Input, (PyObject *) __pyx_ptype_6pyglui_2ui_Slider_Text_Input) < 0) __PYX_ERR(2, 854, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Slider_Text_Input) < 0) __PYX_ERR(2, 854, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Button = &__pyx_vtable_6pyglui_2ui_Button;
  __pyx_vtable_6pyglui_2ui_Button.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Button.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_6Button_draw;
  __pyx_vtable_6pyglui_2ui_Button.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_6Button_handle_input;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Button = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Button_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Button)) __PYX_ERR(2, 895, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Button_spec, __pyx_ptype_6pyglui_2ui_Button) < 0) __PYX_ERR(2, 895, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Button = &__pyx_type_6pyglui_2ui_Button;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Button->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Button) < 0) __PYX_ERR(2, 895, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Button->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Button->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Button->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Button->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Button, __pyx_vtabptr_6pyglui_2ui_Button) < 0) __PYX_ERR(2, 895, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Button) < 0) __PYX_ERR(2, 895, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Button, (PyObject *) __pyx_ptype_6pyglui_2ui_Button) < 0) __PYX_ERR(2, 895, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Button) < 0) __PYX_ERR(2, 895, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Separator = &__pyx_vtable_6pyglui_2ui_Separator;
  __pyx_vtable_6pyglui_2ui_Separator.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Separator.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_9Separator_draw;
  __pyx_vtable_6pyglui_2ui_Separator.__pyx_base.precompute = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_9Separator_precompute;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Separator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Separator_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Separator)) __PYX_ERR(2, 1003, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Separator_spec, __pyx_ptype_6pyglui_2ui_Separator) < 0) __PYX_ERR(2, 1003, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Separator = &__pyx_type_6pyglui_2ui_Separator;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Separator->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Separator) < 0) __PYX_ERR(2, 1003, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Separator->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Separator->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Separator->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Separator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Separator, __pyx_vtabptr_6pyglui_2ui_Separator) < 0) __PYX_ERR(2, 1003, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Separator) < 0) __PYX_ERR(2, 1003, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Separator, (PyObject *) __pyx_ptype_6pyglui_2ui_Separator) < 0) __PYX_ERR(2, 1003, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Separator) < 0) __PYX_ERR(2, 1003, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Info_Text = &__pyx_vtable_6pyglui_2ui_Info_Text;
  __pyx_vtable_6pyglui_2ui_Info_Text.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Info_Text.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_9Info_Text_draw;
  __pyx_vtable_6pyglui_2ui_Info_Text.__pyx_base.precompute = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_9Info_Text_precompute;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Info_Text = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Info_Text_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Info_Text)) __PYX_ERR(2, 1029, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Info_Text_spec, __pyx_ptype_6pyglui_2ui_Info_Text) < 0) __PYX_ERR(2, 1029, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Info_Text = &__pyx_type_6pyglui_2ui_Info_Text;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Info_Text->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Info_Text) < 0) __PYX_ERR(2, 1029, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Info_Text->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Info_Text->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Info_Text->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Info_Text->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Info_Text, __pyx_vtabptr_6pyglui_2ui_Info_Text) < 0) __PYX_ERR(2, 1029, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Info_Text) < 0) __PYX_ERR(2, 1029, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Info_Text, (PyObject *) __pyx_ptype_6pyglui_2ui_Info_Text) < 0) __PYX_ERR(2, 1029, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Info_Text) < 0) __PYX_ERR(2, 1029, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Color_Legend = &__pyx_vtable_6pyglui_2ui_Color_Legend;
  __pyx_vtable_6pyglui_2ui_Color_Legend.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Color_Legend.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_12Color_Legend_draw;
  __pyx_vtable_6pyglui_2ui_Color_Legend.__pyx_base.precompute = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_12Color_Legend_precompute;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Color_Legend = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Color_Legend_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Color_Legend)) __PYX_ERR(2, 1122, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Color_Legend_spec, __pyx_ptype_6pyglui_2ui_Color_Legend) < 0) __PYX_ERR(2, 1122, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Color_Legend = &__pyx_type_6pyglui_2ui_Color_Legend;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Color_Legend->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Color_Legend) < 0) __PYX_ERR(2, 1122, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Color_Legend->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Color_Legend->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Color_Legend->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Color_Legend->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Color_Legend, __pyx_vtabptr_6pyglui_2ui_Color_Legend) < 0) __PYX_ERR(2, 1122, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Color_Legend) < 0) __PYX_ERR(2, 1122, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Color_Legend, (PyObject *) __pyx_ptype_6pyglui_2ui_Color_Legend) < 0) __PYX_ERR(2, 1122, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Color_Legend) < 0) __PYX_ERR(2, 1122, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Thumb = &__pyx_vtable_6pyglui_2ui_Thumb;
  __pyx_vtable_6pyglui_2ui_Thumb.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Thumb.__pyx_base.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_5Thumb_sync;
  __pyx_vtable_6pyglui_2ui_Thumb.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_5Thumb_draw;
  __pyx_vtable_6pyglui_2ui_Thumb.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_5Thumb_handle_input;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Thumb = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Thumb_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Thumb)) __PYX_ERR(2, 1195, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Thumb_spec, __pyx_ptype_6pyglui_2ui_Thumb) < 0) __PYX_ERR(2, 1195, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Thumb = &__pyx_type_6pyglui_2ui_Thumb;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Thumb->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Thumb) < 0) __PYX_ERR(2, 1195, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Thumb->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Thumb->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Thumb->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Thumb->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Thumb, __pyx_vtabptr_6pyglui_2ui_Thumb) < 0) __PYX_ERR(2, 1195, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Thumb) < 0) __PYX_ERR(2, 1195, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Thumb, (PyObject *) __pyx_ptype_6pyglui_2ui_Thumb) < 0) __PYX_ERR(2, 1195, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Thumb) < 0) __PYX_ERR(2, 1195, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Icon = &__pyx_vtable_6pyglui_2ui_Icon;
  __pyx_vtable_6pyglui_2ui_Icon.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Thumb;
  __pyx_vtable_6pyglui_2ui_Icon.__pyx_base.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_4Icon_draw;
  __pyx_vtable_6pyglui_2ui_Icon.__pyx_base.__pyx_base.draw_overlay = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args))__pyx_f_6pyglui_2ui_4Icon_draw_overlay;
  __pyx_vtable_6pyglui_2ui_Icon.__pyx_base.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_4Icon_handle_input;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Thumb); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Icon = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Icon_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Icon)) __PYX_ERR(2, 1377, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Icon_spec, __pyx_ptype_6pyglui_2ui_Icon) < 0) __PYX_ERR(2, 1377, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Icon = &__pyx_type_6pyglui_2ui_Icon;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Icon->tp_base = __pyx_ptype_6pyglui_2ui_Thumb;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Icon) < 0) __PYX_ERR(2, 1377, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Icon->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Icon->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Icon->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Icon->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Icon, __pyx_vtabptr_6pyglui_2ui_Icon) < 0) __PYX_ERR(2, 1377, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Icon) < 0) __PYX_ERR(2, 1377, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Icon, (PyObject *) __pyx_ptype_6pyglui_2ui_Icon) < 0) __PYX_ERR(2, 1377, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Icon) < 0) __PYX_ERR(2, 1377, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Hot_Key = &__pyx_vtable_6pyglui_2ui_Hot_Key;
  __pyx_vtable_6pyglui_2ui_Hot_Key.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Hot_Key.__pyx_base.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_7Hot_Key_sync;
  __pyx_vtable_6pyglui_2ui_Hot_Key.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_7Hot_Key_handle_input;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Hot_Key = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Hot_Key_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Hot_Key)) __PYX_ERR(2, 1514, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Hot_Key_spec, __pyx_ptype_6pyglui_2ui_Hot_Key) < 0) __PYX_ERR(2, 1514, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Hot_Key = &__pyx_type_6pyglui_2ui_Hot_Key;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Hot_Key->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Hot_Key) < 0) __PYX_ERR(2, 1514, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Hot_Key->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Hot_Key->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Hot_Key->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Hot_Key->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Hot_Key, __pyx_vtabptr_6pyglui_2ui_Hot_Key) < 0) __PYX_ERR(2, 1514, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Hot_Key) < 0) __PYX_ERR(2, 1514, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Hot_Key, (PyObject *) __pyx_ptype_6pyglui_2ui_Hot_Key) < 0) __PYX_ERR(2, 1514, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Hot_Key) < 0) __PYX_ERR(2, 1514, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Seek_Bar = &__pyx_vtable_6pyglui_2ui_Seek_Bar;
  __pyx_vtable_6pyglui_2ui_Seek_Bar.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Seek_Bar.__pyx_base.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_8Seek_Bar_sync;
  __pyx_vtable_6pyglui_2ui_Seek_Bar.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_8Seek_Bar_draw;
  __pyx_vtable_6pyglui_2ui_Seek_Bar.__pyx_base.draw_overlay = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args))__pyx_f_6pyglui_2ui_8Seek_Bar_draw_overlay;
  __pyx_vtable_6pyglui_2ui_Seek_Bar.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_8Seek_Bar_handle_input;
  __pyx_vtable_6pyglui_2ui_Seek_Bar.format_ts = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Seek_Bar *, double))__pyx_f_6pyglui_2ui_8Seek_Bar_format_ts;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Seek_Bar = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Seek_Bar_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Seek_Bar)) __PYX_ERR(6, 5, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Seek_Bar_spec, __pyx_ptype_6pyglui_2ui_Seek_Bar) < 0) __PYX_ERR(6, 5, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Seek_Bar = &__pyx_type_6pyglui_2ui_Seek_Bar;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Seek_Bar->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Seek_Bar) < 0) __PYX_ERR(6, 5, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Seek_Bar->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Seek_Bar->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Seek_Bar->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Seek_Bar->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Seek_Bar, __pyx_vtabptr_6pyglui_2ui_Seek_Bar) < 0) __PYX_ERR(6, 5, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Seek_Bar) < 0) __PYX_ERR(6, 5, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Seek_Bar, (PyObject *) __pyx_ptype_6pyglui_2ui_Seek_Bar) < 0) __PYX_ERR(6, 5, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Seek_Bar) < 0) __PYX_ERR(6, 5, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Timeline = &__pyx_vtable_6pyglui_2ui_Timeline;
  __pyx_vtable_6pyglui_2ui_Timeline.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Timeline.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_8Timeline_draw;
  __pyx_vtable_6pyglui_2ui_Timeline.refresh = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Timeline *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_8Timeline_refresh;
  __pyx_vtable_6pyglui_2ui_Timeline.draw_label_default = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Timeline *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_8Timeline_draw_label_default;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Timeline = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Timeline_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Timeline)) __PYX_ERR(7, 1, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Timeline_spec, __pyx_ptype_6pyglui_2ui_Timeline) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Timeline = &__pyx_type_6pyglui_2ui_Timeline;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Timeline->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Timeline) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Timeline->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Timeline->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Timeline->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Timeline->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Timeline, __pyx_vtabptr_6pyglui_2ui_Timeline) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Timeline) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Timeline, (PyObject *) __pyx_ptype_6pyglui_2ui_Timeline) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Timeline) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Base_Menu = &__pyx_vtable_6pyglui_2ui_Base_Menu;
  __pyx_vtable_6pyglui_2ui_Base_Menu.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_UI_element;
  __pyx_vtable_6pyglui_2ui_Base_Menu.__pyx_base.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_9Base_Menu_sync;
  __pyx_vtable_6pyglui_2ui_Base_Menu.get_submenu_config = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Base_Menu *))__pyx_f_6pyglui_2ui_9Base_Menu_get_submenu_config;
  __pyx_vtable_6pyglui_2ui_Base_Menu.set_submenu_config = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Base_Menu *, PyObject *))__pyx_f_6pyglui_2ui_9Base_Menu_set_submenu_config;
  __pyx_vtable_6pyglui_2ui_Base_Menu.draw_menu = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Base_Menu *, int))__pyx_f_6pyglui_2ui_9Base_Menu_draw_menu;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_UI_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Base_Menu = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Base_Menu_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Base_Menu)) __PYX_ERR(3, 7, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Base_Menu_spec, __pyx_ptype_6pyglui_2ui_Base_Menu) < 0) __PYX_ERR(3, 7, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Base_Menu = &__pyx_type_6pyglui_2ui_Base_Menu;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Base_Menu->tp_base = __pyx_ptype_6pyglui_2ui_UI_element;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Base_Menu) < 0) __PYX_ERR(3, 7, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Base_Menu->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Base_Menu->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Base_Menu->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Base_Menu, __pyx_vtabptr_6pyglui_2ui_Base_Menu) < 0) __PYX_ERR(3, 7, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Base_Menu) < 0) __PYX_ERR(3, 7, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Base_Menu, (PyObject *) __pyx_ptype_6pyglui_2ui_Base_Menu) < 0) __PYX_ERR(3, 7, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Base_Menu) < 0) __PYX_ERR(3, 7, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Movable_Menu = &__pyx_vtable_6pyglui_2ui_Movable_Menu;
  __pyx_vtable_6pyglui_2ui_Movable_Menu.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Base_Menu;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Movable_Menu = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Movable_Menu_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Movable_Menu)) __PYX_ERR(3, 200, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Movable_Menu_spec, __pyx_ptype_6pyglui_2ui_Movable_Menu) < 0) __PYX_ERR(3, 200, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Movable_Menu = &__pyx_type_6pyglui_2ui_Movable_Menu;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Movable_Menu->tp_base = __pyx_ptype_6pyglui_2ui_Base_Menu;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Movable_Menu) < 0) __PYX_ERR(3, 200, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Movable_Menu->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Movable_Menu->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Movable_Menu->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Movable_Menu->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Movable_Menu, __pyx_vtabptr_6pyglui_2ui_Movable_Menu) < 0) __PYX_ERR(3, 200, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Movable_Menu) < 0) __PYX_ERR(3, 200, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Movable_Menu, (PyObject *) __pyx_ptype_6pyglui_2ui_Movable_Menu) < 0) __PYX_ERR(3, 200, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Movable_Menu) < 0) __PYX_ERR(3, 200, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Stretching_Menu = &__pyx_vtable_6pyglui_2ui_Stretching_Menu;
  __pyx_vtable_6pyglui_2ui_Stretching_Menu.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Base_Menu;
  __pyx_vtable_6pyglui_2ui_Stretching_Menu.__pyx_base.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_15Stretching_Menu_draw;
  __pyx_vtable_6pyglui_2ui_Stretching_Menu.__pyx_base.__pyx_base.draw_overlay = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args))__pyx_f_6pyglui_2ui_15Stretching_Menu_draw_overlay;
  __pyx_vtable_6pyglui_2ui_Stretching_Menu.__pyx_base.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_15Stretching_Menu_handle_input;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Stretching_Menu = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Stretching_Menu_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Stretching_Menu)) __PYX_ERR(3, 292, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Stretching_Menu_spec, __pyx_ptype_6pyglui_2ui_Stretching_Menu) < 0) __PYX_ERR(3, 292, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Stretching_Menu = &__pyx_type_6pyglui_2ui_Stretching_Menu;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Stretching_Menu->tp_base = __pyx_ptype_6pyglui_2ui_Base_Menu;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Stretching_Menu) < 0) __PYX_ERR(3, 292, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Stretching_Menu->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Stretching_Menu->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Stretching_Menu->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Stretching_Menu->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Stretching_Menu, __pyx_vtabptr_6pyglui_2ui_Stretching_Menu) < 0) __PYX_ERR(3, 292, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Stretching_Menu) < 0) __PYX_ERR(3, 292, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Stretching_Menu, (PyObject *) __pyx_ptype_6pyglui_2ui_Stretching_Menu) < 0) __PYX_ERR(3, 292, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Stretching_Menu) < 0) __PYX_ERR(3, 292, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Horizontally_Stretching_Menu = &__pyx_vtable_6pyglui_2ui_Horizontally_Stretching_Menu;
  __pyx_vtable_6pyglui_2ui_Horizontally_Stretching_Menu.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Base_Menu;
  __pyx_vtable_6pyglui_2ui_Horizontally_Stretching_Menu.__pyx_base.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_draw;
  __pyx_vtable_6pyglui_2ui_Horizontally_Stretching_Menu.__pyx_base.__pyx_base.draw_overlay = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args))__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_draw_overlay;
  __pyx_vtable_6pyglui_2ui_Horizontally_Stretching_Menu.__pyx_base.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_28Horizontally_Stretching_Menu_handle_input;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu)) __PYX_ERR(3, 359, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu_spec, __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu) < 0) __PYX_ERR(3, 359, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu = &__pyx_type_6pyglui_2ui_Horizontally_Stretching_Menu;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu->tp_base = __pyx_ptype_6pyglui_2ui_Base_Menu;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu) < 0) __PYX_ERR(3, 359, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu, __pyx_vtabptr_6pyglui_2ui_Horizontally_Stretching_Menu) < 0) __PYX_ERR(3, 359, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu) < 0) __PYX_ERR(3, 359, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Horizontally_Stretching_Menu, (PyObject *) __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu) < 0) __PYX_ERR(3, 359, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu) < 0) __PYX_ERR(3, 359, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Growing_Menu = &__pyx_vtable_6pyglui_2ui_Growing_Menu;
  __pyx_vtable_6pyglui_2ui_Growing_Menu.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Movable_Menu;
  __pyx_vtable_6pyglui_2ui_Growing_Menu.__pyx_base.__pyx_base.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_12Growing_Menu_draw;
  __pyx_vtable_6pyglui_2ui_Growing_Menu.__pyx_base.__pyx_base.__pyx_base.draw_overlay = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args))__pyx_f_6pyglui_2ui_12Growing_Menu_draw_overlay;
  __pyx_vtable_6pyglui_2ui_Growing_Menu.__pyx_base.__pyx_base.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_12Growing_Menu_handle_input;
  __pyx_vtable_6pyglui_2ui_Growing_Menu.__pyx_base.__pyx_base.__pyx_base.precompute = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_12Growing_Menu_precompute;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Movable_Menu); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Growing_Menu = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Growing_Menu_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Growing_Menu)) __PYX_ERR(3, 426, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Growing_Menu_spec, __pyx_ptype_6pyglui_2ui_Growing_Menu) < 0) __PYX_ERR(3, 426, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Growing_Menu = &__pyx_type_6pyglui_2ui_Growing_Menu;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Growing_Menu->tp_base = __pyx_ptype_6pyglui_2ui_Movable_Menu;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Growing_Menu) < 0) __PYX_ERR(3, 426, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Growing_Menu->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Growing_Menu->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Growing_Menu->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Growing_Menu->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Growing_Menu, __pyx_vtabptr_6pyglui_2ui_Growing_Menu) < 0) __PYX_ERR(3, 426, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Growing_Menu) < 0) __PYX_ERR(3, 426, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Growing_Menu, (PyObject *) __pyx_ptype_6pyglui_2ui_Growing_Menu) < 0) __PYX_ERR(3, 426, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Growing_Menu) < 0) __PYX_ERR(3, 426, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Scrolling_Menu = &__pyx_vtable_6pyglui_2ui_Scrolling_Menu;
  __pyx_vtable_6pyglui_2ui_Scrolling_Menu.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Movable_Menu;
  __pyx_vtable_6pyglui_2ui_Scrolling_Menu.__pyx_base.__pyx_base.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw;
  __pyx_vtable_6pyglui_2ui_Scrolling_Menu.__pyx_base.__pyx_base.__pyx_base.draw_overlay = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args))__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw_overlay;
  __pyx_vtable_6pyglui_2ui_Scrolling_Menu.__pyx_base.__pyx_base.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_14Scrolling_Menu_handle_input;
  __pyx_vtable_6pyglui_2ui_Scrolling_Menu.draw_scroll_window_elements = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *, int))__pyx_f_6pyglui_2ui_14Scrolling_Menu_draw_scroll_window_elements;
  __pyx_vtable_6pyglui_2ui_Scrolling_Menu.push_scissor = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *))__pyx_f_6pyglui_2ui_14Scrolling_Menu_push_scissor;
  __pyx_vtable_6pyglui_2ui_Scrolling_Menu.pop_scissor = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Scrolling_Menu *))__pyx_f_6pyglui_2ui_14Scrolling_Menu_pop_scissor;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Movable_Menu); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Scrolling_Menu = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Scrolling_Menu_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Scrolling_Menu)) __PYX_ERR(3, 557, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Scrolling_Menu_spec, __pyx_ptype_6pyglui_2ui_Scrolling_Menu) < 0) __PYX_ERR(3, 557, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Scrolling_Menu = &__pyx_type_6pyglui_2ui_Scrolling_Menu;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_base = __pyx_ptype_6pyglui_2ui_Movable_Menu;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Scrolling_Menu) < 0) __PYX_ERR(3, 557, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Scrolling_Menu, __pyx_vtabptr_6pyglui_2ui_Scrolling_Menu) < 0) __PYX_ERR(3, 557, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Scrolling_Menu) < 0) __PYX_ERR(3, 557, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Scrolling_Menu_2, (PyObject *) __pyx_ptype_6pyglui_2ui_Scrolling_Menu) < 0) __PYX_ERR(3, 557, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Scrolling_Menu) < 0) __PYX_ERR(3, 557, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Container = &__pyx_vtable_6pyglui_2ui_Container;
  __pyx_vtable_6pyglui_2ui_Container.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Base_Menu;
  __pyx_vtable_6pyglui_2ui_Container.__pyx_base.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_9Container_draw;
  __pyx_vtable_6pyglui_2ui_Container.__pyx_base.__pyx_base.draw_overlay = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw_overlay *__pyx_optional_args))__pyx_f_6pyglui_2ui_9Container_draw_overlay;
  __pyx_vtable_6pyglui_2ui_Container.__pyx_base.__pyx_base.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_Input *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_handle_input *__pyx_optional_args))__pyx_f_6pyglui_2ui_9Container_handle_input;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Container = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Container_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Container)) __PYX_ERR(3, 777, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Container_spec, __pyx_ptype_6pyglui_2ui_Container) < 0) __PYX_ERR(3, 777, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Container = &__pyx_type_6pyglui_2ui_Container;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Container->tp_base = __pyx_ptype_6pyglui_2ui_Base_Menu;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Container) < 0) __PYX_ERR(3, 777, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Container->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Container->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Container->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Container->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Container, __pyx_vtabptr_6pyglui_2ui_Container) < 0) __PYX_ERR(3, 777, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Container) < 0) __PYX_ERR(3, 777, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Container, (PyObject *) __pyx_ptype_6pyglui_2ui_Container) < 0) __PYX_ERR(3, 777, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Container) < 0) __PYX_ERR(3, 777, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Timeline_Menu = &__pyx_vtable_6pyglui_2ui_Timeline_Menu;
  __pyx_vtable_6pyglui_2ui_Timeline_Menu.__pyx_base = *__pyx_vtabptr_6pyglui_2ui_Scrolling_Menu;
  __pyx_vtable_6pyglui_2ui_Timeline_Menu.__pyx_base.__pyx_base.__pyx_base.__pyx_base.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_UI_element *, struct __pyx_obj_6pyglui_2ui_FitBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_2ui_10UI_element_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_13Timeline_Menu_draw;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6pyglui_2ui_Scrolling_Menu); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_2ui_Timeline_Menu = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Timeline_Menu_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6pyglui_2ui_Timeline_Menu)) __PYX_ERR(3, 839, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Timeline_Menu_spec, __pyx_ptype_6pyglui_2ui_Timeline_Menu) < 0) __PYX_ERR(3, 839, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Timeline_Menu = &__pyx_type_6pyglui_2ui_Timeline_Menu;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_base = __pyx_ptype_6pyglui_2ui_Scrolling_Menu;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Timeline_Menu) < 0) __PYX_ERR(3, 839, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Timeline_Menu, __pyx_vtabptr_6pyglui_2ui_Timeline_Menu) < 0) __PYX_ERR(3, 839, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Timeline_Menu) < 0) __PYX_ERR(3, 839, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Timeline_Menu, (PyObject *) __pyx_ptype_6pyglui_2ui_Timeline_Menu) < 0) __PYX_ERR(3, 839, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Timeline_Menu) < 0) __PYX_ERR(3, 839, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Synced_Value = &__pyx_vtable_6pyglui_2ui_Synced_Value;
  __pyx_vtable_6pyglui_2ui_Synced_Value.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Synced_Value *))__pyx_f_6pyglui_2ui_12Synced_Value_sync;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui_Synced_Value = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Synced_Value_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui_Synced_Value)) __PYX_ERR(0, 308, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Synced_Value_spec, __pyx_ptype_6pyglui_2ui_Synced_Value) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Synced_Value = &__pyx_type_6pyglui_2ui_Synced_Value;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Synced_Value) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Synced_Value->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Synced_Value->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Synced_Value->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Synced_Value->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Synced_Value, __pyx_vtabptr_6pyglui_2ui_Synced_Value) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Synced_Value) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Synced_Value, (PyObject *) __pyx_ptype_6pyglui_2ui_Synced_Value) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Synced_Value) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui_Input = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Input_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui_Input)) __PYX_ERR(0, 397, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Input_spec, __pyx_ptype_6pyglui_2ui_Input) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Input = &__pyx_type_6pyglui_2ui_Input;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Input) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Input->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Input->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Input->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Input->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Input, (PyObject *) __pyx_ptype_6pyglui_2ui_Input) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Input) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_Draggable = &__pyx_vtable_6pyglui_2ui_Draggable;
  __pyx_vtable_6pyglui_2ui_Draggable.draw = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Draggable *, struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_opt_args_6pyglui_2ui_9Draggable_draw *__pyx_optional_args))__pyx_f_6pyglui_2ui_9Draggable_draw;
  __pyx_vtable_6pyglui_2ui_Draggable.pre_handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Draggable *, struct __pyx_obj_6pyglui_2ui_Input *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_9Draggable_pre_handle_input;
  __pyx_vtable_6pyglui_2ui_Draggable.handle_input = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Draggable *, struct __pyx_obj_6pyglui_2ui_Input *, int))__pyx_f_6pyglui_2ui_9Draggable_handle_input;
  __pyx_vtable_6pyglui_2ui_Draggable.sync = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_Draggable *))__pyx_f_6pyglui_2ui_9Draggable_sync;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui_Draggable = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Draggable_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui_Draggable)) __PYX_ERR(0, 439, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Draggable_spec, __pyx_ptype_6pyglui_2ui_Draggable) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Draggable = &__pyx_type_6pyglui_2ui_Draggable;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Draggable) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Draggable->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Draggable->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Draggable->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Draggable->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_Draggable, __pyx_vtabptr_6pyglui_2ui_Draggable) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_Draggable) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Draggable, (PyObject *) __pyx_ptype_6pyglui_2ui_Draggable) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Draggable) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pyglui_2ui_FitBox = &__pyx_vtable_6pyglui_2ui_FitBox;
  __pyx_vtable_6pyglui_2ui_FitBox.collapse = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *))__pyx_f_6pyglui_2ui_6FitBox_collapse;
  __pyx_vtable_6pyglui_2ui_FitBox.inflate = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_FitBox *))__pyx_f_6pyglui_2ui_6FitBox_inflate;
  __pyx_vtable_6pyglui_2ui_FitBox.compute = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_FitBox *))__pyx_f_6pyglui_2ui_6FitBox_compute;
  __pyx_vtable_6pyglui_2ui_FitBox.mouse_over = (int (*)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_Vec2 *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_6FitBox_mouse_over;
  __pyx_vtable_6pyglui_2ui_FitBox.mouse_over_margin = (int (*)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_Vec2 *, struct __pyx_obj_6pyglui_2ui_Vec2 *, int __pyx_skip_dispatch))__pyx_f_6pyglui_2ui_6FitBox_mouse_over_margin;
  __pyx_vtable_6pyglui_2ui_FitBox.same_design = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_FitBox *))__pyx_f_6pyglui_2ui_6FitBox_same_design;
  __pyx_vtable_6pyglui_2ui_FitBox.design_distance = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_obj_6pyglui_2ui_FitBox *))__pyx_f_6pyglui_2ui_6FitBox_design_distance;
  __pyx_vtable_6pyglui_2ui_FitBox.sketch = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *, struct __pyx_opt_args_6pyglui_2ui_6FitBox_sketch *__pyx_optional_args))__pyx_f_6pyglui_2ui_6FitBox_sketch;
  __pyx_vtable_6pyglui_2ui_FitBox.copy = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *))__pyx_f_6pyglui_2ui_6FitBox_copy;
  __pyx_vtable_6pyglui_2ui_FitBox.computed_copy = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *))__pyx_f_6pyglui_2ui_6FitBox_computed_copy;
  __pyx_vtable_6pyglui_2ui_FitBox.has_area = (PyObject *(*)(struct __pyx_obj_6pyglui_2ui_FitBox *))__pyx_f_6pyglui_2ui_6FitBox_has_area;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui_FitBox = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_FitBox_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui_FitBox)) __PYX_ERR(0, 537, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_FitBox_spec, __pyx_ptype_6pyglui_2ui_FitBox) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_FitBox = &__pyx_type_6pyglui_2ui_FitBox;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_FitBox) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_FitBox->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_FitBox->tp_dictoffset && __pyx_ptype_6pyglui_2ui_FitBox->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_FitBox->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pyglui_2ui_FitBox, __pyx_vtabptr_6pyglui_2ui_FitBox) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pyglui_2ui_FitBox) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FitBox, (PyObject *) __pyx_ptype_6pyglui_2ui_FitBox) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_FitBox) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui_Vec2 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui_Vec2_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui_Vec2)) __PYX_ERR(0, 743, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui_Vec2_spec, __pyx_ptype_6pyglui_2ui_Vec2) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui_Vec2 = &__pyx_type_6pyglui_2ui_Vec2;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui_Vec2) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui_Vec2->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui_Vec2->tp_dictoffset && __pyx_ptype_6pyglui_2ui_Vec2->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui_Vec2->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Vec2, (PyObject *) __pyx_ptype_6pyglui_2ui_Vec2) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pyglui_2ui_Vec2) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off)) __PYX_ERR(0, 8, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off_spec, __pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off = &__pyx_type_6pyglui_2ui___pyx_scope_struct__sig_on_off;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off->tp_dictoffset && __pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui___pyx_scope_struct__sig_on_off->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange_spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange)) __PYX_ERR(5, 31, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange_spec, __pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange) < 0) __PYX_ERR(5, 31, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange = &__pyx_type_6pyglui_2ui___pyx_scope_struct_1_frange;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange) < 0) __PYX_ERR(5, 31, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange->tp_dictoffset && __pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui___pyx_scope_struct_1_frange->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit___spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__)) __PYX_ERR(2, 351, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit___spec, __pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__) < 0) __PYX_ERR(2, 351, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__ = &__pyx_type_6pyglui_2ui___pyx_scope_struct_2___cinit__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__) < 0) __PYX_ERR(2, 351, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__->tp_dictoffset && __pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui___pyx_scope_struct_2___cinit__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit___spec, NULL); if (unlikely(!__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__)) __PYX_ERR(6, 27, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit___spec, __pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__) < 0) __PYX_ERR(6, 27, __pyx_L1_error)
  #else
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__ = &__pyx_type_6pyglui_2ui___pyx_scope_struct_3___cinit__;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__) < 0) __PYX_ERR(6, 27, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__->tp_dictoffset && __pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pyglui_2ui___pyx_scope_struct_3___cinit__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_spec, NULL); if (unlikely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm)) __PYX_ERR(1, 66, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm_spec, __pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm) < 0) __PYX_ERR(1, 66, __pyx_L1_error)
  #else
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm = &__pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm) < 0) __PYX_ERR(1, 66, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm->tp_dictoffset && __pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype___pyx_scope_struct____Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(8, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyglui.cygl.utils"); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_4cygl_5utils_RGBA = __Pyx_ImportType(__pyx_t_1, "pyglui.cygl.utils", "RGBA", sizeof(struct __pyx_obj_6pyglui_4cygl_5utils_RGBA), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_6pyglui_4cygl_5utils_RGBA),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pyglui_4cygl_5utils_RGBA) __PYX_ERR(9, 8, __pyx_L1_error)
  __pyx_ptype_6pyglui_4cygl_5utils_Render_Target = __Pyx_ImportType(__pyx_t_1, "pyglui.cygl.utils", "Render_Target", sizeof(struct __pyx_obj_6pyglui_4cygl_5utils_Render_Target), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_6pyglui_4cygl_5utils_Render_Target),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pyglui_4cygl_5utils_Render_Target) __PYX_ERR(9, 33, __pyx_L1_error)
  __pyx_ptype_6pyglui_4cygl_5utils_Named_Texture = __Pyx_ImportType(__pyx_t_1, "pyglui.cygl.utils", "Named_Texture", sizeof(struct __pyx_obj_6pyglui_4cygl_5utils_Named_Texture), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_6pyglui_4cygl_5utils_Named_Texture),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pyglui_4cygl_5utils_Named_Texture) __PYX_ERR(9, 36, __pyx_L1_error)
  __pyx_ptype_6pyglui_4cygl_5utils_Sphere = __Pyx_ImportType(__pyx_t_1, "pyglui.cygl.utils", "Sphere", sizeof(struct __pyx_obj_6pyglui_4cygl_5utils_Sphere), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_6pyglui_4cygl_5utils_Sphere),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pyglui_4cygl_5utils_Sphere) __PYX_ERR(9, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyglui.pyfontstash.fontstash"); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context = __Pyx_ImportType(__pyx_t_1, "pyglui.pyfontstash.fontstash", "Context", sizeof(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_6pyglui_11pyfontstash_9fontstash_Context),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context) __PYX_ERR(10, 16, __pyx_L1_error)
  __pyx_vtabptr_6pyglui_11pyfontstash_9fontstash_Context = (struct __pyx_vtabstruct_6pyglui_11pyfontstash_9fontstash_Context*)__Pyx_GetVtable(__pyx_ptype_6pyglui_11pyfontstash_9fontstash_Context); if (unlikely(!__pyx_vtabptr_6pyglui_11pyfontstash_9fontstash_Context)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __pyx_t_1 = PyImport_ImportModule("cysignals.signals"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "cysigs", (void **)&__pyx_vp_9cysignals_7signals_cysigs, "cysigs_t") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyglui.pyfontstash.fontstash"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ALIGN_LEFT", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_LEFT, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ALIGN_CENTER", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_CENTER, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ALIGN_RIGHT", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_RIGHT, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ALIGN_TOP", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_TOP, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ALIGN_MIDDLE", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_MIDDLE, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ALIGN_BOTTOM", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BOTTOM, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ALIGN_BASELINE", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ALIGN_BASELINE, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ZERO_TOPLEFT", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ZERO_TOPLEFT, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "FONS_ZERO_BOTTOMLEFT", (void **)&__pyx_vp_6pyglui_11pyfontstash_9fontstash_FONS_ZERO_BOTTOMLEFT, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("cysignals.signals"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "verify_exc_value", (void (**)(void))&__pyx_f_9cysignals_7signals_verify_exc_value, "void (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_sig_on_interrupt_received", (void (**)(void))&_sig_on_interrupt_received, "void (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_sig_on_recover", (void (**)(void))&_sig_on_recover, "void (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_sig_off_warning", (void (**)(void))&_sig_off_warning, "void (char const *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "print_backtrace", (void (**)(void))&print_backtrace, "void (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyglui.cygl.utils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "draw_polyline", (void (**)(void))&__pyx_f_6pyglui_4cygl_5utils_draw_polyline, "PyObject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_polyline *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "draw_points", (void (**)(void))&__pyx_f_6pyglui_4cygl_5utils_draw_points, "PyObject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_points *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "draw_progress", (void (**)(void))&__pyx_f_6pyglui_4cygl_5utils_draw_progress, "PyObject *(PyObject *, float, float, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_progress *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "draw_tooltip", (void (**)(void))&__pyx_f_6pyglui_4cygl_5utils_draw_tooltip, "PyObject *(PyObject *, PyObject *, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_tooltip *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "draw_circle", (void (**)(void))&__pyx_f_6pyglui_4cygl_5utils_draw_circle, "PyObject *(int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_circle *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "draw_rounded_rect", (void (**)(void))&__pyx_f_6pyglui_4cygl_5utils_draw_rounded_rect, "PyObject *(PyObject *, PyObject *, float, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyglui_4cygl_5utils_draw_rounded_rect *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_ui(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_ui},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "ui",
      0, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* m_size */
    #else
      -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initui(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initui(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_ui(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_ui(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_ui(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'ui' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("ui", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #elif CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_ui(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_pyglui__ui) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pyglui.ui")) {
      if (unlikely((PyDict_SetItemString(modules, "pyglui.ui", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_variable_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "pyglui/ui.pyx":2
 * # cython: language_level=3, profile=False
 * from contextlib import contextmanager             # <<<<<<<<<<<<<<
 * 
 * IF UNAME_SYSNAME != 'Windows':
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_contextmanager);
  __Pyx_GIVEREF(__pyx_n_s_contextmanager);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_contextmanager);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_contextlib, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_contextmanager); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_contextmanager, __pyx_t_2) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyglui/ui.pyx":5
 * 
 * IF UNAME_SYSNAME != 'Windows':
 *     import cysignals             # <<<<<<<<<<<<<<
 *     from cysignals.signals cimport sig_off, sig_on
 * 
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_cysignals, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cysignals, __pyx_t_3) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyglui/ui.pyx":8
 *     from cysignals.signals cimport sig_off, sig_on
 * 
 *     @contextmanager             # <<<<<<<<<<<<<<
 *     def sig_on_off():
 *         sig_on()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_contextmanager); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_1sig_on_off, 0, __pyx_n_s_sig_on_off, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sig_on_off, __pyx_t_4) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyglui/ui.pyx":26
 * from pyglui.pyfontstash cimport fontstash as fs
 * 
 * __version__ = "1.31.0"             # <<<<<<<<<<<<<<
 * include 'gldraw.pxi'
 * include 'helpers.pxi'
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_1_31_0) < 0) __PYX_ERR(0, 26, __pyx_L1_error)

  /* "src/pyglui/gldraw.pxi":45
 *     gl.glEnd()
 * 
 * cdef inline tripple_h(Vec2 org, Vec2 size, RGBA color=RGBA(1.,1.,1.,.5)):             # <<<<<<<<<<<<<<
 *     gl.glColor4f(color.r, color.g, color.b, color.a)
 *     gl.glLineWidth(1.6*ui_scale)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__2 = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_4);
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/helpers.pxi":31
 *     return value
 * 
 * def frange(start, stop, step):             # <<<<<<<<<<<<<<
 *     '''
 *     todo: translate to cython function
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_4frange, 0, __pyx_n_s_frange, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_frange, __pyx_t_4) < 0) __PYX_ERR(5, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyglui/ui.pyx":31
 * include 'design_params.pxi'
 * 
 * import platform             # <<<<<<<<<<<<<<
 * from collections import namedtuple
 * from os import path
 */
  __pyx_t_4 = __Pyx_ImportDottedModule(__pyx_n_s_platform, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_platform, __pyx_t_4) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyglui/ui.pyx":32
 * 
 * import platform
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * from os import path
 * from time import time
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_namedtuple);
  __Pyx_GIVEREF(__pyx_n_s_namedtuple);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_namedtuple);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_4, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_4) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":33
 * import platform
 * from collections import namedtuple
 * from os import path             # <<<<<<<<<<<<<<
 * from time import time
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_path);
  __Pyx_GIVEREF(__pyx_n_s_path);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_path);
  __pyx_t_4 = __Pyx_Import(__pyx_n_s_os, __pyx_t_2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_path, __pyx_t_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyglui/ui.pyx":34
 * from collections import namedtuple
 * from os import path
 * from time import time             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_time);
  __Pyx_GIVEREF(__pyx_n_s_time);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_time);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, __pyx_t_4, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_4) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":38
 * 
 * cdef int UI_MOD_KEY  # defines modifier key for cut/copy/paste
 * if platform.system() == 'Darwin':             # <<<<<<<<<<<<<<
 *     UI_MOD_KEY = 8  # glfw.GLFW_MOD_SUPER
 * else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_Darwin, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "pyglui/ui.pyx":39
 * cdef int UI_MOD_KEY  # defines modifier key for cut/copy/paste
 * if platform.system() == 'Darwin':
 *     UI_MOD_KEY = 8  # glfw.GLFW_MOD_SUPER             # <<<<<<<<<<<<<<
 * else:
 *     UI_MOD_KEY = 2  # glfw.GLFW_MOD_CONTROL
 */
    __pyx_v_6pyglui_2ui_UI_MOD_KEY = 8;

    /* "pyglui/ui.pyx":38
 * 
 * cdef int UI_MOD_KEY  # defines modifier key for cut/copy/paste
 * if platform.system() == 'Darwin':             # <<<<<<<<<<<<<<
 *     UI_MOD_KEY = 8  # glfw.GLFW_MOD_SUPER
 * else:
 */
    goto __pyx_L2;
  }

  /* "pyglui/ui.pyx":41
 *     UI_MOD_KEY = 8  # glfw.GLFW_MOD_SUPER
 * else:
 *     UI_MOD_KEY = 2  # glfw.GLFW_MOD_CONTROL             # <<<<<<<<<<<<<<
 * 
 * #global cdefs
 */
  /*else*/ {
    __pyx_v_6pyglui_2ui_UI_MOD_KEY = 2;
  }
  __pyx_L2:;

  /* "pyglui/ui.pyx":45
 * #global cdefs
 * cdef fs.Context glfont
 * cdef double ui_scale = 1.0             # <<<<<<<<<<<<<<
 * cdef bint should_redraw = True
 * cdef bint should_redraw_overlay = True
 */
  __pyx_v_6pyglui_2ui_ui_scale = 1.0;

  /* "pyglui/ui.pyx":46
 * cdef fs.Context glfont
 * cdef double ui_scale = 1.0
 * cdef bint should_redraw = True             # <<<<<<<<<<<<<<
 * cdef bint should_redraw_overlay = True
 * 
 */
  __pyx_v_6pyglui_2ui_should_redraw = 1;

  /* "pyglui/ui.pyx":47
 * cdef double ui_scale = 1.0
 * cdef bint should_redraw = True
 * cdef bint should_redraw_overlay = True             # <<<<<<<<<<<<<<
 * 
 * def get_roboto_font_path():
 */
  __pyx_v_6pyglui_2ui_should_redraw_overlay = 1;

  /* "pyglui/ui.pyx":49
 * cdef bint should_redraw_overlay = True
 * 
 * def get_roboto_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_7get_roboto_font_path, 0, __pyx_n_s_get_roboto_font_path, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_roboto_font_path, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":52
 *     return path.join(path.dirname(__file__),'Roboto-Regular.ttf')
 * 
 * def get_opensans_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9get_opensans_font_path, 0, __pyx_n_s_get_opensans_font_path, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_opensans_font_path, __pyx_t_2) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":55
 *     return path.join(path.dirname(__file__),'OpenSans-Regular.ttf')
 * 
 * def get_pupil_icons_font_path():             # <<<<<<<<<<<<<<
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_11get_pupil_icons_font_path, 0, __pyx_n_s_get_pupil_icons_font_path, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_pupil_icons_font_path, __pyx_t_2) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":58
 *     return path.join(path.dirname(__file__),'pupil_icons.ttf')
 * 
 * def get_all_font_paths():             # <<<<<<<<<<<<<<
 *     return get_roboto_font_path(),get_opensans_font_path(),get_pupil_icons_font_path()
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13get_all_font_paths, 0, __pyx_n_s_get_all_font_paths, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_all_font_paths, __pyx_t_2) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":61
 *     return get_roboto_font_path(),get_opensans_font_path(),get_pupil_icons_font_path()
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from six import unichr
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "pyglui/ui.pyx":62
 * 
 * try:
 *     from six import unichr             # <<<<<<<<<<<<<<
 * except ImportError:
 *     pass
 */
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_n_s_unichr);
      __Pyx_GIVEREF(__pyx_n_s_unichr);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_unichr);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_six, __pyx_t_2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_unichr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_unichr, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyglui/ui.pyx":61
 *     return get_roboto_font_path(),get_opensans_font_path(),get_pupil_icons_font_path()
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from six import unichr
 * except ImportError:
 */
    }

    /* "pyglui/ui.pyx":66
 *     pass
 * else:
 *     char = unichr             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_unichr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_char, __pyx_t_4) < 0) __PYX_ERR(0, 66, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyglui/ui.pyx":63
 * try:
 *     from six import unichr
 * except ImportError:             # <<<<<<<<<<<<<<
 *     pass
 * else:
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_8) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pyglui/ui.pyx":61
 *     return get_roboto_font_path(),get_opensans_font_path(),get_pupil_icons_font_path()
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from six import unichr
 * except ImportError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    __pyx_L8_try_end:;
  }

  /* "pyglui/ui.pyx":98
 *         pass
 * 
 *     def add_font(self,font_name,font_path):             # <<<<<<<<<<<<<<
 *         if glfont:
 *             glfont.add_font(font_name,font_path)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_5add_font, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_add_font, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_add_font, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":102
 *             glfont.add_font(font_name,font_path)
 * 
 *     def terminate(self):             # <<<<<<<<<<<<<<
 *         global glfont
 *         glfont = None
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_7terminate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_terminate, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_terminate, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":109
 *         self.elements = []
 * 
 *     def update_mouse(self,mx,my):             # <<<<<<<<<<<<<<
 *         if self.window.mouse_over(Vec2(mx,my)):
 *             self.new_input.dm.x,self.new_input.dm.y = mx-self.new_input.m.x, my-self.new_input.m.y
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_9update_mouse, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_update_mouse, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_update_mouse, __pyx_t_4) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":115
 * 
 * 
 *     def update_window(self,w,h):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_11update_window, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_update_window, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_update_window, __pyx_t_4) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":123
 *         resize_ui_texture(self.overlay_layer,self.window.size)
 * 
 *     def update_scroll(self, sx,sy):             # <<<<<<<<<<<<<<
 *         self.new_input.s.x = sx
 *         self.new_input.s.y = sy
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_13update_scroll, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_update_scroll, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_update_scroll, __pyx_t_4) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":127
 *         self.new_input.s.y = sy
 * 
 *     def update_key(self, key, scancode, action, mods):             # <<<<<<<<<<<<<<
 *         self.new_input.keys.append((key,scancode,action,mods))
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_15update_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_update_key, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_update_key, __pyx_t_4) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":130
 *         self.new_input.keys.append((key,scancode,action,mods))
 * 
 *     def update_char(self,c):             # <<<<<<<<<<<<<<
 *         try:
 *             self.new_input.chars.append(chr(c))
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_17update_char, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_update_char, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_update_char, __pyx_t_4) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":136
 *             pass
 * 
 *     def update_button(self,button,action,mods):             # <<<<<<<<<<<<<<
 *         self.new_input.buttons.append((button,action,mods))
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_19update_button, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_update_button, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_update_button, __pyx_t_4) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":139
 *         self.new_input.buttons.append((button,action,mods))
 * 
 *     def update_clipboard(self, clipboard):             # <<<<<<<<<<<<<<
 *         self.new_input.cb = clipboard
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_21update_clipboard, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_update_clipboard, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_update_clipboard, __pyx_t_4) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":212
 * 
 * 
 *     def update(self):             # <<<<<<<<<<<<<<
 *         unused_Input = self.handle_input()
 *         self.sync()
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_23update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_update, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_update, __pyx_t_4) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":218
 *         return unused_Input
 * 
 *     def collect_menus(self):             # <<<<<<<<<<<<<<
 *         for e in self.elements:
 *             try:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_25collect_menus, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_collect_menus, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_collect_menus, __pyx_t_4) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":226
 * 
 *     ###special methods to make UI behave like a list
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_27append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_append, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_append, __pyx_t_4) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":233
 *         should_redraw = True
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_29extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_extend, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_extend, __pyx_t_4) < 0) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "pyglui/ui.pyx":241
 *         should_redraw = True
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_31remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_remove, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI->tp_dict, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_43__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_2UI_45__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":15
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         pass
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10UI_element_1sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_element_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI_element);

  /* "src/pyglui/ui_elements.pxi":19
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10UI_element_3draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_element_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__137);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI_element);

  /* "src/pyglui/ui_elements.pxi":22
 *         pass
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10UI_element_5draw_overlay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_element_draw_overlay, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__139);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element->tp_dict, __pyx_n_s_draw_overlay, __pyx_t_4) < 0) __PYX_ERR(2, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI_element);

  /* "src/pyglui/ui_elements.pxi":25
 *         pass
 * 
 *     cpdef handle_input(self,Input new_input,bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10UI_element_7handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_element_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__142);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI_element);

  /* "src/pyglui/ui_elements.pxi":30
 *             pass
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         # if your element needs to catch input event in front of everybody else:
 *         # add yourself to new_input.active_ui_elements during handle_input
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10UI_element_9pre_handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_element_pre_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element->tp_dict, __pyx_n_s_pre_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI_element);

  /* "src/pyglui/ui_elements.pxi":37
 *         pass
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10UI_element_11precompute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_element_precompute, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element->tp_dict, __pyx_n_s_precompute, __pyx_t_4) < 0) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI_element);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10UI_element_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_element___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI_element);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_UI_element, (type(self), 0x7842cdf, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_UI_element__set_state(self, __pyx_state)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10UI_element_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UI_element___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_UI_element->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_UI_element);

  /* "src/pyglui/ui_elements.pxi":130
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Slider_5sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Slider_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Slider->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(2, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Slider);

  /* "src/pyglui/ui_elements.pxi":133
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance:
 *         self.outline.compute(parent)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Slider_7draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Slider_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__152);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Slider->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Slider);

  /* "src/pyglui/ui_elements.pxi":189
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Slider_9handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Slider_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__154);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Slider->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Slider);

  /* "src/pyglui/ui_elements.pxi":217
 *             self.label_field.handle_input(new_input, visible, False)
 * 
 *     cpdef validate(self, val):             # <<<<<<<<<<<<<<
 *         return step(clamp(val, self.minimum, self.maximum), self.minimum, self.maximum, self.step)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Slider_11validate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Slider_validate, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Slider->tp_dict, __pyx_n_s_validate, __pyx_t_4) < 0) __PYX_ERR(2, 217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Slider);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Slider_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Slider___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Slider_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Slider___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":265
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Switch_5sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Switch_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Switch->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(2, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Switch);

  /* "src/pyglui/ui_elements.pxi":268
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Switch_7draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Switch_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__161);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Switch->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Switch);

  /* "src/pyglui/ui_elements.pxi":311
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Switch_9handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Switch_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__163);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Switch->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Switch);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Switch_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Switch___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Switch_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Switch___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":351
 *     cdef object selection_getter
 * 
 *     def __cinit__(self,str attribute_name, object attribute_context = None, selection = [], labels=None, label=None, setter=None, getter=None, selection_getter = None):             # <<<<<<<<<<<<<<
 *         # NOTE: implementing a custom selection_getter can lead to race-conditions. Make
 *         # sure that the current set value is always contained in the returned selections
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__27 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":384
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Selector_5sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Selector_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Selector->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(2, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Selector);

  /* "src/pyglui/ui_elements.pxi":387
 *         self.sync_val.sync()
 * 
 *     def _on_change(self,new_value):             # <<<<<<<<<<<<<<
 *         self.selection,self.selection_labels = self.selection_getter()
 *         try:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Selector_7_on_change, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Selector__on_change, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Selector->tp_dict, __pyx_n_s_on_change, __pyx_t_4) < 0) __PYX_ERR(2, 387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Selector);

  /* "src/pyglui/ui_elements.pxi":399
 * 
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         #update appearance
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Selector_9draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Selector_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__170);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Selector->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Selector);

  /* "src/pyglui/ui_elements.pxi":450
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Selector_11handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Selector_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__172);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Selector->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Selector);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Selector_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Selector___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Selector_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Selector___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":537
 * 
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10Text_Input_5sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Text_Input_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Text_Input->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(2, 537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Text_Input);

  /* "src/pyglui/ui_elements.pxi":540
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         # read only rendering rules
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10Text_Input_7draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Text_Input_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__177);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Text_Input->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 540, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Text_Input);

  /* "src/pyglui/ui_elements.pxi":569
 * 
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         while new_input.keys:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10Text_Input_9pre_handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Text_Input_pre_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Text_Input->tp_dict, __pyx_n_s_pre_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Text_Input);

  /* "src/pyglui/ui_elements.pxi":705
 *             return unicode(obj)
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef double d_double_click = 0.5  # delay used for double click
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10Text_Input_11handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Text_Input_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__180);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Text_Input->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Text_Input);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10Text_Input_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Text_Input___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_10Text_Input_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Text_Input___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_17Slider_Text_Input_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Slider_Text_Input___reduce_cytho, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_17Slider_Text_Input_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Slider_Text_Input___setstate_cyt, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":916
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef tuple text_color
 *         cdef RGBA bg_color
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Button_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Button_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__186);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Button->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Button);

  /* "src/pyglui/ui_elements.pxi":977
 *         gl.glPopMatrix()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Button_7handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Button_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__188);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Button->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Button);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Button_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Button___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6Button_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Button___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1012
 *         pass
 * 
 *     cpdef draw(self, FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Separator_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Separator_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__192);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Separator->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 1012, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Separator);

  /* "src/pyglui/ui_elements.pxi":1024
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self, FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.design_size.y = 1.5 * ui_scale * outline_padding * 2
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Separator_7precompute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Separator_precompute, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Separator->tp_dict, __pyx_n_s_precompute, __pyx_t_4) < 0) __PYX_ERR(2, 1024, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Separator);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Separator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Separator___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Separator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Separator___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1090
 *                 self._centered = new_value
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Info_Text_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Info_Text_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__197);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Info_Text->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 1090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Info_Text);

  /* "src/pyglui/ui_elements.pxi":1109
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Info_Text_7precompute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Info_Text_precompute, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Info_Text->tp_dict, __pyx_n_s_precompute, __pyx_t_4) < 0) __PYX_ERR(2, 1109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Info_Text);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Info_Text_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Info_Text___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Info_Text_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Info_Text___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1145
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Color_Legend_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Color_Legend_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__202);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Color_Legend->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 1145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Color_Legend);

  /* "src/pyglui/ui_elements.pxi":1173
 *         self.outline.compute(parent)
 * 
 *     cpdef precompute(self, FitBox parent):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.text_area.compute(self.outline)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Color_Legend_7precompute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Color_Legend_precompute, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Color_Legend->tp_dict, __pyx_n_s_precompute, __pyx_t_4) < 0) __PYX_ERR(2, 1173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Color_Legend);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Color_Legend_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Color_Legend___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Color_Legend_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Color_Legend___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1279
 *                 self._off_color = new_color
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         if self.label_getter is not None:
 *             # only redraws if label_getter returns a new value
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_5Thumb_5sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Thumb_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Thumb->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(2, 1279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Thumb);

  /* "src/pyglui/ui_elements.pxi":1285
 *         self.sync_val.sync()
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_5Thumb_7draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Thumb_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__208);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Thumb->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 1285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Thumb);

  /* "src/pyglui/ui_elements.pxi":1339
 * 
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not (self._read_only or parent_read_only):
 *             global should_redraw
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_5Thumb_9handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Thumb_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__210);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Thumb->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 1339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Thumb);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_5Thumb_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Thumb___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_5Thumb_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Thumb___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1426
 *         self._indicator_stop = val
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         unused = super(Icon, self).handle_input(new_input, visible, parent_read_only)
 *         global should_redraw_overlay
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_4Icon_3handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Icon_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__214);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Icon->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 1426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Icon);

  /* "src/pyglui/ui_elements.pxi":1438
 *         return unused
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #update appearance
 *         self.outline.compute(parent)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_4Icon_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Icon_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__216);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Icon->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(2, 1438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Icon);

  /* "src/pyglui/ui_elements.pxi":1473
 *         glfont.pop_state()
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         cdef basestring T = self.tooltip
 *         cdef float ref_size = min(self.button.size)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_4Icon_7draw_overlay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Icon_draw_overlay, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__218);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Icon->tp_dict, __pyx_n_s_draw_overlay, __pyx_t_4) < 0) __PYX_ERR(2, 1473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Icon);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_4Icon_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Icon___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_4Icon_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Icon___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/ui_elements.pxi":1536
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         self.sync_val.sync()
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_7Hot_Key_5sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Hot_Key_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Hot_Key->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(2, 1536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Hot_Key);

  /* "src/pyglui/ui_elements.pxi":1539
 *         self.sync_val.sync()
 * 
 *     cpdef handle_input(self,Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if not (self._read_only or parent_read_only):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_7Hot_Key_7handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Hot_Key_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__223);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Hot_Key->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(2, 1539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Hot_Key);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_7Hot_Key_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Hot_Key___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_7Hot_Key_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Hot_Key___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/custom.pxi":94
 *         pass
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         global should_redraw_overlay
 *         self.trim_left.sync()
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_5sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Seek_Bar_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Seek_Bar->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(6, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Seek_Bar);

  /* "src/pyglui/custom.pxi":109
 *         self.recent_idx, self.recent_ts = recent_idx, recent_ts
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.outline.sketch(RGBA(0., 0., 0., 0.3))
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_7draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Seek_Bar_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__228);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Seek_Bar->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(6, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Seek_Bar);

  /* "src/pyglui/custom.pxi":115
 *         self.bar.sketch(RGBA(1., 1., 1., 0.4))
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 * 
 *         self.backwards.draw(self.outline, nested=True, parent_read_only=False)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_9draw_overlay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Seek_Bar_draw_overlay, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__230);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Seek_Bar->tp_dict, __pyx_n_s_draw_overlay, __pyx_t_4) < 0) __PYX_ERR(6, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Seek_Bar);

  /* "src/pyglui/custom.pxi":213
 *         return '{:02.0f}:{:06.3f}'.format(minutes, seconds)
 * 
 *     cpdef handle_input(self,Input new_input, bint visible, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.backwards.handle_input(new_input, True, parent_read_only=False)
 *         self.play.handle_input(new_input, True, parent_read_only=False)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_11handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Seek_Bar_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__232);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Seek_Bar->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(6, 213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Seek_Bar);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Seek_Bar___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Seek_Bar_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Seek_Bar___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/timelines.pxi":9
 *     def __cinit__(self, basestring label, object draw_data_callback,
 *                   object draw_label_callback=None, double content_height=30.,
 *                   xpad=Vec2(130, 30), ypad=5., *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.uid = id(self)
 *         self.label = label
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__235, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__67 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "src/pyglui/timelines.pxi":21
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.data_area.compute(self.outline)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Timeline_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__237);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(7, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline);

  /* "src/pyglui/timelines.pxi":83
 *                             line_type=gl.GL_LINES, thickness=ui_scale)
 * 
 *     cpdef refresh(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Timeline_7refresh, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_refresh, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline->tp_dict, __pyx_n_s_refresh, __pyx_t_4) < 0) __PYX_ERR(7, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline);

  /* "src/pyglui/timelines.pxi":99
 *             self.refresh()
 * 
 *     cpdef draw_label_default(self, width, height, scale):             # <<<<<<<<<<<<<<
 *         glfont.push_state()
 *         glfont.set_font('opensans')
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Timeline_9draw_label_default, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_draw_label_default, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline->tp_dict, __pyx_n_s_draw_label_default, __pyx_t_4) < 0) __PYX_ERR(7, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Timeline_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_8Timeline_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":19
 *     cdef public RGBA color
 * 
 *     cpdef sync(self):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             for e in self.elements:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Base_Menu_1sync, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Base_Menu_sync, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dict, __pyx_n_s_sync, __pyx_t_4) < 0) __PYX_ERR(3, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Base_Menu);

  /* "src/pyglui/menus.pxi":24
 *                 e.sync()
 * 
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Base_Menu_3append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Base_Menu_append, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dict, __pyx_n_s_append, __pyx_t_4) < 0) __PYX_ERR(3, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Base_Menu);

  /* "src/pyglui/menus.pxi":31
 *         should_redraw = True
 * 
 *     def insert(self,idx, obj):             # <<<<<<<<<<<<<<
 *         if not issubclass(obj.__class__,UI_element):
 *             raise Exception("Can only append UI elements, not: '%s'"%obj )
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Base_Menu_5insert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Base_Menu_insert, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dict, __pyx_n_s_insert, __pyx_t_4) < 0) __PYX_ERR(3, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Base_Menu);

  /* "src/pyglui/menus.pxi":38
 *         should_redraw = True
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         for obj in objs:
 *             if not issubclass(obj.__class__,UI_element):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Base_Menu_7extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Base_Menu_extend, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dict, __pyx_n_s_extend, __pyx_t_4) < 0) __PYX_ERR(3, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Base_Menu);

  /* "src/pyglui/menus.pxi":46
 *         should_redraw = True
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         del self.elements[self.elements.index(obj)]
 *         global should_redraw
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Base_Menu_9remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Base_Menu_remove, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dict, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(3, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Base_Menu);

  /* "src/pyglui/menus.pxi":184
 * 
 *             # (botton not implemented)
 *     def collect_in_window(self,FitBox window):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         if self.outline.design_org.x > 0:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Base_Menu_23collect_in_window, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Base_Menu_collect_in_window, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dict, __pyx_n_s_collect_in_window, __pyx_t_4) < 0) __PYX_ERR(3, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Base_Menu);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Base_Menu_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Base_Menu___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Base_Menu);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Base_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Base_Menu__set_state(self, __pyx_state)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Base_Menu_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Base_Menu___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Base_Menu->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Base_Menu);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Movable_Menu_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Movable_Menu___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Movable_Menu->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Movable_Menu);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Movable_Menu, (type(self), 0x8f229b7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Movable_Menu__set_state(self, __pyx_state)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Movable_Menu_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Movable_Menu___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Movable_Menu->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Movable_Menu);

  /* "src/pyglui/menus.pxi":312
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float h = 0,y_spacing=0,org_y=0
 *         if not self.collapsed:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_15Stretching_Menu_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Stretching_Menu_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__256);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Stretching_Menu->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(3, 312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Stretching_Menu);

  /* "src/pyglui/menus.pxi":333
 *                 self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_15Stretching_Menu_7draw_overlay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Stretching_Menu_draw_overlay, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__258);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Stretching_Menu->tp_dict, __pyx_n_s_draw_overlay, __pyx_t_4) < 0) __PYX_ERR(3, 333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Stretching_Menu);

  /* "src/pyglui/menus.pxi":340
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_15Stretching_Menu_9handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Stretching_Menu_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__260);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Stretching_Menu->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(3, 340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Stretching_Menu);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_15Stretching_Menu_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Stretching_Menu___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_15Stretching_Menu_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Stretching_Menu___setstate_cytho, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__262)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":379
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         cdef float w=0, x_spacing=0, org_x=0
 *         if not self.collapsed:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Horizontally_Stretching_Menu_dra, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__264);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(3, 379, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu);

  /* "src/pyglui/menus.pxi":400
 *                 self.outline.org.x = org_x
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if not self.collapsed and self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_7draw_overlay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Horizontally_Stretching_Menu_dra_2, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__266);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu->tp_dict, __pyx_n_s_draw_overlay, __pyx_t_4) < 0) __PYX_ERR(3, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu);

  /* "src/pyglui/menus.pxi":407
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_9handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Horizontally_Stretching_Menu_han, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__268);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(3, 407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Horizontally_Stretching_Menu);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Horizontally_Stretching_Menu___r, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_28Horizontally_Stretching_Menu_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Horizontally_Stretching_Menu___s, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":461
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Growing_Menu_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Growing_Menu_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__272);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Growing_Menu->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(3, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Growing_Menu);

  /* "src/pyglui/menus.pxi":481
 *             self.outline.org.y = org_y
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Growing_Menu_7draw_overlay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Growing_Menu_draw_overlay, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__274);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Growing_Menu->tp_dict, __pyx_n_s_draw_overlay, __pyx_t_4) < 0) __PYX_ERR(3, 481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Growing_Menu);

  /* "src/pyglui/menus.pxi":488
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.resize_corner is not None:
 *             self.resize_corner.handle_input(new_input,visible)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Growing_Menu_9handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Growing_Menu_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__276);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Growing_Menu->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(3, 488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Growing_Menu);

  /* "src/pyglui/menus.pxi":502
 *                 e.handle_input(new_input, visible,self._read_only or parent_read_only)
 * 
 *     cpdef precompute(self,FitBox parent):             # <<<<<<<<<<<<<<
 *         #here we compute the requred design height of this menu.
 *         self.outline.design_size.y  = self.height/ui_scale
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Growing_Menu_11precompute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Growing_Menu_precompute, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Growing_Menu->tp_dict, __pyx_n_s_precompute, __pyx_t_4) < 0) __PYX_ERR(3, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Growing_Menu);

  /* "src/pyglui/menus.pxi":527
 * 
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         self.collapsed = not self.collapsed
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Growing_Menu_13toggle_iconified, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Growing_Menu_toggle_iconified, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Growing_Menu->tp_dict, __pyx_n_s_toggle_iconified, __pyx_t_4) < 0) __PYX_ERR(3, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Growing_Menu);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Growing_Menu_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Growing_Menu___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Growing_Menu_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Growing_Menu___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__280)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":603
 *         return "Scrolling_Menu {}".format(self._label)
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_14Scrolling_Menu_7draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Scrolling_Menu_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__282);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(3, 603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Scrolling_Menu);

  /* "src/pyglui/menus.pxi":628
 *             self.draw_scroll_window_elements(parent_read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_14Scrolling_Menu_9draw_overlay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Scrolling_Menu_draw_overlay, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__284);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_dict, __pyx_n_s_draw_overlay, __pyx_t_4) < 0) __PYX_ERR(3, 628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Scrolling_Menu);

  /* "src/pyglui/menus.pxi":695
 * 
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         cdef bint mouse_over_menu = 0
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_14Scrolling_Menu_11handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Scrolling_Menu_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__286);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(3, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Scrolling_Menu);

  /* "src/pyglui/menus.pxi":726
 * 
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         self.collapsed = not self.collapsed
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_14Scrolling_Menu_13toggle_iconified, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Scrolling_Menu_toggle_iconified, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Scrolling_Menu->tp_dict, __pyx_n_s_toggle_iconified, __pyx_t_4) < 0) __PYX_ERR(3, 726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Scrolling_Menu);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_14Scrolling_Menu_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Scrolling_Menu___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__288)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_14Scrolling_Menu_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Scrolling_Menu___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":789
 *         self.label = 'Container'
 * 
 *     def init(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Container_3init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Container_init, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Container->tp_dict, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(3, 789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Container);

  /* "src/pyglui/menus.pxi":792
 *         pass
 * 
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         # compute constraints
 *         cdef FitBox copy = parent.computed_copy()
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Container_5draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Container_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__293);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Container->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(3, 792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Container);

  /* "src/pyglui/menus.pxi":814
 *                 e.draw(self.element_space,nested= False, parent_read_only = parent_read_only or self._read_only)
 * 
 *     cpdef draw_overlay(self,FitBox parent,bint nested=True, bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         if self.element_space.has_area():
 *             self.elements.sort(key=sort_key)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Container_7draw_overlay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Container_draw_overlay, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__295);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Container->tp_dict, __pyx_n_s_draw_overlay, __pyx_t_4) < 0) __PYX_ERR(3, 814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Container);

  /* "src/pyglui/menus.pxi":821
 *                                              parent_read_only=parent_read_only or self._read_only)
 * 
 *     cpdef handle_input(self, Input new_input,bint visible,bint parent_read_only = False):             # <<<<<<<<<<<<<<
 *         #if elements are not visible, no need to interact with them.
 *         if self.element_space.has_area():
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Container_9handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Container_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__297);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Container->tp_dict, __pyx_n_s_handle_input, __pyx_t_4) < 0) __PYX_ERR(3, 821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Container);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Container_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Container___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Container_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Container___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyglui/menus.pxi":840
 * 
 * cdef class Timeline_Menu(Scrolling_Menu):
 *     cpdef draw(self,FitBox parent,bint nested=True, bint parent_read_only=False):             # <<<<<<<<<<<<<<
 *         self.outline.compute(parent)
 *         self.element_space.compute(self.outline)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13Timeline_Menu_1draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_Menu_draw, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__300)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__301);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_dict, __pyx_n_s_draw, __pyx_t_4) < 0) __PYX_ERR(3, 840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline_Menu);

  /* "src/pyglui/menus.pxi":855
 *             self.toggle_iconified()
 * 
 *     def toggle_iconified(self):             # <<<<<<<<<<<<<<
 *         global should_redraw
 *         should_redraw = True
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13Timeline_Menu_3toggle_iconified, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_Menu_toggle_iconified, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__302)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_dict, __pyx_n_s_toggle_iconified, __pyx_t_4) < 0) __PYX_ERR(3, 855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline_Menu);

  /* "src/pyglui/menus.pxi":865
 *             self.outline.collapse()
 * 
 *     def append(self, obj):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13Timeline_Menu_5append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_Menu_append, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__303)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_dict, __pyx_n_s_append, __pyx_t_4) < 0) __PYX_ERR(3, 865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline_Menu);

  /* "src/pyglui/menus.pxi":870
 *         super(Timeline_Menu, self).append(obj)
 * 
 *     def insert(self, idx, obj):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13Timeline_Menu_7insert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_Menu_insert, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__304)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_dict, __pyx_n_s_insert, __pyx_t_4) < 0) __PYX_ERR(3, 870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline_Menu);

  /* "src/pyglui/menus.pxi":875
 *         super(Timeline_Menu, self).insert(idx, obj)
 * 
 *     def extend(self, objs):             # <<<<<<<<<<<<<<
 *         if len(self.elements) == 0:
 *             self.collapsed = False
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13Timeline_Menu_9extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_Menu_extend, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__306)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_dict, __pyx_n_s_extend, __pyx_t_4) < 0) __PYX_ERR(3, 875, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline_Menu);

  /* "src/pyglui/menus.pxi":880
 *         super(Timeline_Menu, self).extend(objs)
 * 
 *     def remove(self, obj):             # <<<<<<<<<<<<<<
 *         super(Timeline_Menu, self).remove(obj)
 *         if len(self.elements) == 0:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13Timeline_Menu_11remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_Menu_remove, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Timeline_Menu->tp_dict, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(3, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Timeline_Menu);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13Timeline_Menu_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_Menu___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__308)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_13Timeline_Menu_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Timeline_Menu___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Synced_Value_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Synced_Value___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__310)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_12Synced_Value_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Synced_Value___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyglui/ui.pyx":422
 *         return bool(self.keys or self.chars or self.buttons or self.dm or self.s)
 * 
 *     def purge(self):             # <<<<<<<<<<<<<<
 *         self.keys = []
 *         self.buttons = []
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_5Input_7purge, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input_purge, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__312)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Input->tp_dict, __pyx_n_s_purge, __pyx_t_4) < 0) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Input);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_5Input_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__313)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_5Input_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Input___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__314)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyglui/ui.pyx":435
 *         return 'Current Input: \n   Mouse pos  : %s\n   Mouse delta: %s\n   Scroll: %s\n   Buttons: %s\n   Keys: %s\n   Chars: %s' %(self.m,self.dm,self.s,self.buttons,self.keys,self.chars)
 * 
 * Unused_Input = namedtuple('Unused_Input', ['buttons', 'keys', 'chars', 'clipboard'])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_buttons);
  __Pyx_GIVEREF(__pyx_n_u_buttons);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_buttons);
  __Pyx_INCREF(__pyx_n_u_keys);
  __Pyx_GIVEREF(__pyx_n_u_keys);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_keys);
  __Pyx_INCREF(__pyx_n_u_chars);
  __Pyx_GIVEREF(__pyx_n_u_chars);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_chars);
  __Pyx_INCREF(__pyx_n_u_clipboard);
  __Pyx_GIVEREF(__pyx_n_u_clipboard);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_clipboard);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_u_Unused_Input);
  __Pyx_GIVEREF(__pyx_n_u_Unused_Input);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_Unused_Input);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Unused_Input, __pyx_t_2) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":473
 * 
 * 
 *     cpdef pre_handle_input(self,Input new_input):             # <<<<<<<<<<<<<<
 *         # we need to check for new clicks as touch pads can isse
 *         # a button down that is not follow by a button up.
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Draggable_5pre_handle_input, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Draggable_pre_handle_input, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__315)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_Draggable->tp_dict, __pyx_n_s_pre_handle_input, __pyx_t_2) < 0) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_Draggable);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Draggable_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Draggable___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__316)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_9Draggable_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Draggable___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__317)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":565
 *     cdef Vec2 design_org,org,design_size,size,min_size
 * 
 *     def __cinit__(self,Vec2 position,Vec2 size, Vec2 min_size = Vec2(0,0)):             # <<<<<<<<<<<<<<
 *         self.design_org = Vec2(position.x,position.y)
 *         self.design_size = Vec2(size.x,size.y)
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__89 = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":577
 * 
 * 
 *     def __init__(self,Vec2 position,Vec2 size, Vec2 min_size = Vec2(0,0)):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_2ui_Vec2), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__90 = ((struct __pyx_obj_6pyglui_2ui_Vec2 *)__pyx_t_2);
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":707
 *             return self.org.x+self.size.x/2,self.org.y+self.size.y/2
 * 
 *     cpdef bint mouse_over(self,Vec2 m):             # <<<<<<<<<<<<<<
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6FitBox_5mouse_over, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FitBox_mouse_over, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__319)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox->tp_dict, __pyx_n_s_mouse_over, __pyx_t_2) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_FitBox);

  /* "pyglui/ui.pyx":710
 *         return self.org.x <= m.x <= self.org.x+self.size.x and self.org.y <= m.y <=self.org.y+self.size.y
 * 
 *     cpdef bint mouse_over_margin(self, Vec2 m, Vec2 margin):             # <<<<<<<<<<<<<<
 *         return self.org.x - margin.x <= m.x <= self.org.x + self.size.x + margin.x and self.org.y - margin.y <= m.y <= self.org.y + self.size.y + margin.y
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6FitBox_7mouse_over_margin, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FitBox_mouse_over_margin, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__321)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyglui_2ui_FitBox->tp_dict, __pyx_n_s_mouse_over_margin, __pyx_t_2) < 0) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pyglui_2ui_FitBox);

  /* "pyglui/ui.pyx":727
 *         return d
 * 
 *     cdef sketch(self, RGBA color=RGBA(*rect_color_default)):             # <<<<<<<<<<<<<<
 *         rect(self.org, self.size, color)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pyglui_4cygl_5utils_RGBA), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__91 = ((struct __pyx_obj_6pyglui_4cygl_5utils_RGBA *)__pyx_t_2);
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6FitBox_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FitBox___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__322)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_6FitBox_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FitBox___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__323)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_4Vec2_35__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Vec2___reduce_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__324)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_4Vec2_37__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Vec2___setstate_cython, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__325)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_UI_element(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_15__pyx_unpickle_UI_element, 0, __pyx_n_s_pyx_unpickle_UI_element, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__327)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_UI_element, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_UI_element__set_state(<UI_element> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UI_element__set_state(UI_element __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._label = __pyx_state[0]; __pyx_result._order = __pyx_state[1]; __pyx_result._read_only = __pyx_state[2]; __pyx_result.outline = __pyx_state[3]; __pyx_result.uid = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_17__pyx_unpickle_Base_Menu, 0, __pyx_n_s_pyx_unpickle_Base_Menu, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__328)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Base_Menu, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Movable_Menu(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pyglui_2ui_19__pyx_unpickle_Movable_Menu, 0, __pyx_n_s_pyx_unpickle_Movable_Menu, NULL, __pyx_n_s_pyglui_ui, __pyx_d, ((PyObject *)__pyx_codeobj__329)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Movable_Menu, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyglui/ui.pyx":1
 * # cython: language_level=3, profile=False             # <<<<<<<<<<<<<<
 * from contextlib import contextmanager
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cfunc.to_py":66
 * 
 * @cname("__Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm")
 * cdef object __Pyx_CFunc_float__lParenUI_element__rParen_to_py_3elm(float (*f)(UI_element) except *):             # <<<<<<<<<<<<<<
 *     def wrap(UI_element elm):
 *         """wrap(elm: 'UI_element') -> 'float'"""
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init pyglui.ui", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pyglui.ui");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#if _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* TupleAndListFromArray */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        Py_INCREF(__pyx_empty_tuple);
        return __pyx_empty_tuple;
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;  // error
            return kwvalues[i];
        }
    }
    return NULL;  // not found (no exception set)
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        tmp_tb = PyException_GetTraceback(tmp_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* pep479 */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) {
    PyObject *exc, *val, *tb, *cur_exc;
    __Pyx_PyThreadState_declare
    #ifdef __Pyx_StopAsyncIteration_USED
    int is_async_stopiteration = 0;
    #endif
    CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
    cur_exc = PyErr_Occurred();
    if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
        #ifdef __Pyx_StopAsyncIteration_USED
        if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) {
            is_async_stopiteration = 1;
        } else
        #endif
            return;
    }
    __Pyx_PyThreadState_assign
    __Pyx_GetException(&exc, &val, &tb);
    Py_XDECREF(exc);
    Py_XDECREF(val);
    Py_XDECREF(tb);
    PyErr_SetString(PyExc_RuntimeError,
        #ifdef __Pyx_StopAsyncIteration_USED
        is_async_stopiteration ? "async generator raised StopAsyncIteration" :
        in_async_gen ? "async generator raised StopIteration" :
        #endif
        "generator raised StopIteration");
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* ModFloat[double] */
static CYTHON_INLINE double __Pyx_mod_double(double a, double b) {
    double r = fmod(a, b);
    r += ((r != 0) & ((r < 0) ^ (b < 0))) * b;
    return r;
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    __Pyx_PyThreadState_declare
    CYTHON_UNUSED_VAR(cause);
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY ||  CYTHON_COMPILING_IN_LIMITED_API
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)-1;
#endif
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        if (kwds_is_tuple) {
            if (pos >= PyTuple_GET_SIZE(kwds)) break;
            key = PyTuple_GET_ITEM(kwds, pos);
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
        }
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key)
                );
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]);
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
    Py_DECREF(argstuple);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
#ifdef __Pyx_CyFunction_USED
        if (__Pyx_IsCyOrPyCFunction(func))
#else
        if (PyCFunction_Check(func))
#endif
        {
            if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
                return __Pyx_PyObject_CallMethO(func, NULL);
            }
        }
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (PyCFunction_Check(func))
        {
            if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
                return __Pyx_PyObject_CallMethO(func, args[0]);
            }
        }
    }
#endif
    #if PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    #if CYTHON_VECTORCALL
    vectorcallfunc f = _PyVectorcall_Function(func);
    if (f) {
        return f(func, args, (size_t)nargs, kwargs);
    }
    #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
    if (__Pyx_CyFunction_CheckExact(func)) {
        __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
        if (f) return f(func, args, (size_t)nargs, kwargs);
    }
    #endif
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
    }
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kw,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
        if (unlikely(PyTuple_GET_SIZE(kw) == 0))
            return 1;
        if (!kw_allowed) {
            key = PyTuple_GET_ITEM(kw, 0);
            goto invalid_keyword;
        }
#if PY_VERSION_HEX < 0x03090000
        for (pos = 0; pos < PyTuple_GET_SIZE(kw); pos++) {
            key = PyTuple_GET_ITEM(kw, pos);
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
        }
#endif
        return 1;
    }
    while (PyDict_Next(kw, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if (!kw_allowed && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* PyObjectLookupSpecial */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg = NULL;
    return __Pyx_PyObject_FastCall(func, (&arg)+1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectCallOneArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
        if (meth) {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* PyIntFromDouble */
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value) {
    if (value >= (double)LONG_MIN && value <= (double)LONG_MAX) {
        return PyInt_FromLong((long)value);
    }
    return PyLong_FromDouble(value);
}
#endif

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) {
            if ((PY_VERSION_HEX >= 0x030700A0)) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* PyObjectCall2Args */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#elif PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* pop_index */
static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) {
    PyObject *r;
    if (unlikely(!py_ix)) return NULL;
    r = __Pyx__PyObject_PopIndex(L, py_ix);
    Py_DECREF(py_ix);
    return r;
}
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) {
    return __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix);
}
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) {
    Py_ssize_t size = PyList_GET_SIZE(L);
    if (likely(size > (((PyListObject*)L)->allocated >> 1))) {
        Py_ssize_t cix = ix;
        if (cix < 0) {
            cix += size;
        }
        if (likely(__Pyx_is_valid_index(cix, size))) {
            PyObject* v = PyList_GET_ITEM(L, cix);
            __Pyx_SET_SIZE(L, Py_SIZE(L) - 1);
            size -= 1;
            memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*));
            return v;
        }
    }
    if (py_ix == Py_None) {
        return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix));
    } else {
        return __Pyx__PyObject_PopIndex(L, py_ix);
    }
}
#endif

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if CYTHON_USE_TYPE_SLOTS
    if (likely(PyString_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
#endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* py_abs */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            __Pyx_SET_SIZE(copy, -Py_SIZE(copy));
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#endif

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    (void)inplace; (void)zerodivision_check;
    if (likely(PyFloat_CheckExact(op1))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        a = __pyx_PyFloat_AsDouble(op1);
#else
        a = PyFloat_AS_DOUBLE(op1);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        switch (size) {
            case  0: a = 0.0;  break;
            case -1: a = -(double) digits[0]; break;
            case  1: a = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #endif
            a = PyLong_AsDouble(op1);
            if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
    }
        PyFPE_START_PROTECT("add", return NULL)
        result = a + b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* pybytes_as_double */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
    PyObject *float_value;
#if PY_MAJOR_VERSION >= 3
    float_value = PyFloat_FromString(obj);
#else
    float_value = PyFloat_FromString(obj, 0);
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
    return (double)-1;
}
static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
    int last_was_punctuation = 1;
    Py_ssize_t i;
    for (i=0; i < length; i++) {
        char chr = start[i];
        int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
        *buffer = chr;
        buffer += (chr != '_');
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
    int matches = 1;
    char sign = start[0];
    int is_signed = (sign == '+') | (sign == '-');
    start += is_signed;
    length -= is_signed;
    switch (start[0]) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            matches &= (start[1] == 'a' || start[1] == 'A');
            matches &= (start[2] == 'n' || start[2] == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            matches &= (start[1] == 'n' || start[1] == 'N');
            matches &= (start[2] == 'f' || start[2] == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            matches &= (start[3] == 'i' || start[3] == 'I');
            matches &= (start[4] == 'n' || start[4] == 'N');
            matches &= (start[5] == 'i' || start[5] == 'I');
            matches &= (start[6] == 't' || start[6] == 'T');
            matches &= (start[7] == 'y' || start[7] == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
    return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
}
static CYTHON_UNUSED double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
    double value;
    Py_ssize_t i, digits;
    const char *last = start + length;
    char *end;
    while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
        start++;
    while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
        last--;
    length = last - start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    digits = 0;
    for (i=0; i < length; digits += start[i++] != '_');
    if (likely(digits == length)) {
        value = PyOS_string_to_double(start, &end, NULL);
    } else if (digits < 40) {
        char number[40];
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}

/* pyobject_as_double */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    if (PyUnicode_CheckExact(obj)) {
        return __Pyx_PyUnicode_AsDouble(obj);
    } else if (PyBytes_CheckExact(obj)) {
        return __Pyx_PyBytes_AsDouble(obj);
    } else if (PyByteArray_CheckExact(obj)) {
        return __Pyx_PyByteArray_AsDouble(obj);
    } else {
        PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
        float_value = PyNumber_Float(obj);  if ((0)) goto bad;
        (void)__Pyx_PyObject_CallOneArg;
#else
        PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
        if (likely(nb) && likely(nb->nb_float)) {
            float_value = nb->nb_float(obj);
            if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
                __Pyx_TypeName float_value_type_name = __Pyx_PyType_GetName(Py_TYPE(float_value));
                PyErr_Format(PyExc_TypeError,
                    "__float__ returned non-float (type " __Pyx_FMT_TYPENAME ")",
                    float_value_type_name);
                __Pyx_DECREF_TypeName(float_value_type_name);
                Py_DECREF(float_value);
                goto bad;
            }
        } else {
            float_value = __Pyx_PyObject_CallOneArg((PyObject*)&PyFloat_Type, obj);
        }
#endif
        if (likely(float_value)) {
            double value = PyFloat_AS_DOUBLE(float_value);
            Py_DECREF(float_value);
            return value;
        }
    }
bad:
    return (double)-1;
}

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    CYTHON_MAYBE_UNUSED_VAR(max_char);
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    CYTHON_UNUSED_VAR(value_count);
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* SliceTupleAndList */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (length <= 0) {
        return PyList_New(0);
    }
    return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length);
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length);
}
#endif

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, int wraparound) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return NULL;
}

/* FixUpExtensionType */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    (void) spec;
    (void) type;
#else
    const PyType_Slot *slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
        int changed = 0;
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
        const
#endif
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
#if PY_VERSION_HEX < 0x030900b1
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    changed = 1;
                }
#endif
#else
                if ((0));
#endif
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
                        Py_DECREF(descr);
                        return -1;
                    }
                    Py_DECREF(descr);
                    changed = 1;
                }
#endif
            }
            memb++;
        }
        if (changed)
            PyType_Modified(type);
    }
#endif
    return 0;
}
#endif

/* FetchSharedCythonModule */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME);
    if (unlikely(!abi_module)) return NULL;
    Py_INCREF(abi_module);
    return abi_module;
}

/* FetchCommonType */
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    const char* object_name;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    object_name = strrchr(type->tp_name, '.');
    object_name = object_name ? object_name+1 : type->tp_name;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              object_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#else
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *cached_type = NULL;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *py_basicsize;
        py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
        if (unlikely(!py_basicsize)) goto bad;
        basicsize = PyLong_AsSsize_t(py_basicsize);
        Py_DECREF(py_basicsize);
        py_basicsize = 0;
        if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
#else
        basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
#endif
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    (void) module;
    cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i, pos;
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
{
    CYTHON_UNUSED_VAR(closure);
    if (unlikely(op->func_doc == NULL)) {
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_tuple;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_kwdict;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->func_annotations;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    int is_coroutine;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
#if PY_VERSION_HEX >= 0x03050000
    if (is_coroutine) {
        PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
        PyList_SET_ITEM(fromlist, 0, marker);
        module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(op->func_is_coroutine)) {
            return __Pyx_NewRef(op->func_is_coroutine);
        }
ignore:
        PyErr_Clear();
    }
#endif
    op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
    return __Pyx_NewRef(op->func_is_coroutine);
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#endif
#if PY_VERSION_HEX < 0x030500A0
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    cf->m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
}
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(PyCFunctionObject, vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#ifdef _Py_TPFLAGS_HAVE_VECTORCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
#else
    (void) module;
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* RaiseClosureNameError */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_TRUE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* PyUnicode_Substring */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length;
    if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL;
    length = __Pyx_PyUnicode_GET_LENGTH(text);
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    if (stop <= start)
        return __Pyx_NewRef(__pyx_empty_unicode);
    if (start == 0 && stop == length)
        return __Pyx_NewRef(text);
#if CYTHON_PEP393_ENABLED
    return PyUnicode_FromKindAndData(PyUnicode_KIND(text),
        PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start);
#else
    return PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(text)+start, stop-start);
#endif
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
static int
__Pyx_unicode_modifiable(PyObject *unicode)
{
    if (Py_REFCNT(unicode) != 1)
        return 0;
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        __Pyx_GIVEREF(*p_left);
        if (unlikely(PyUnicode_Resize(p_left, new_len) != 0)) {
            __Pyx_GOTREF(*p_left);
            return NULL;
        }
        __Pyx_INCREF(*p_left);
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* GetItemIntUnicode */
static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i,
                                                           int wraparound, int boundscheck) {
    Py_ssize_t length;
    if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return (Py_UCS4)-1;
    if (wraparound | boundscheck) {
        length = __Pyx_PyUnicode_GET_LENGTH(ustring);
        if (wraparound & unlikely(i < 0)) i += length;
        if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) {
            return __Pyx_PyUnicode_READ_CHAR(ustring, i);
        } else {
            PyErr_SetString(PyExc_IndexError, "string index out of range");
            return (Py_UCS4)-1;
        }
    } else {
        return __Pyx_PyUnicode_READ_CHAR(ustring, i);
    }
}

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    (void)inplace; (void)zerodivision_check;
    if (likely(PyFloat_CheckExact(op1))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        a = __pyx_PyFloat_AsDouble(op1);
#else
        a = PyFloat_AS_DOUBLE(op1);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        switch (size) {
            case  0: a = 0.0;  break;
            case -1: a = -(double) digits[0]; break;
            case  1: a = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #endif
            a = PyLong_AsDouble(op1);
            if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
    }
        PyFPE_START_PROTECT("divide", return NULL)
        result = a / b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_RemainderObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    (void)inplace; (void)zerodivision_check;
    if (likely(PyFloat_CheckExact(op1))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        a = __pyx_PyFloat_AsDouble(op1);
#else
        a = PyFloat_AS_DOUBLE(op1);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        switch (size) {
            case  0: a = 0.0;  break;
            case -1: a = -(double) digits[0]; break;
            case  1: a = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #endif
            a = PyLong_AsDouble(op1);
            if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2);
    }
        PyFPE_START_PROTECT("remainder", return NULL)
        result = fmod(a, b);
        if (result)
            result += ((result < 0) ^ (b < 0)) * b;
        else
            result = copysign(0.0, b);
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* SliceObject */
static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, int wraparound) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_ass_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_ass_slice(obj, cstart, cstop, value);
    }
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_ass_subscript))
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    {
        int result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_ass_subscript(obj, py_slice, value);
#else
        result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object does not support slice %.10s",
        obj_type_name, value ? "assignment" : "deletion");
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return -1;
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                #if CYTHON_COMPILING_IN_LIMITED_API
                module = PyImport_ImportModuleLevelObject(
                    name, empty_dict, empty_dict, from_list, 1);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                #endif
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            #if CYTHON_COMPILING_IN_LIMITED_API
            module = PyImport_ImportModuleLevelObject(
                name, empty_dict, empty_dict, from_list, level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__93);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (!r) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* ValidateBasesTuple */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n = PyTuple_GET_SIZE(bases);
    for (i = 1; i < n; i++)
    {
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
        PyTypeObject *b;
#if PY_MAJOR_VERSION < 3
        if (PyClass_Check(b0))
        {
            PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
                         PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
            return -1;
        }
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
            return -1;
        }
        if (dictoffset == 0 && b->tp_dictoffset)
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "extension type '%.200s' has no __dict__ slot, "
                "but base type '" __Pyx_FMT_TYPENAME "' has: "
                "either add 'cdef dict __dict__' to the extension type "
                "or add '__slots__ = [...]' to the base type",
                type_name, b_name);
            __Pyx_DECREF_TypeName(b_name);
            return -1;
        }
    }
    return 0;
}
#endif

/* PyType_Ready */
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
        gc = PyImport_GetModule(__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, attr_name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(attr_name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* MergeVTables */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i;
    void** base_vtables;
    __Pyx_TypeName tp_base_name;
    __Pyx_TypeName base_name;
    void* unknown = (void*)-1;
    PyObject* bases = type->tp_bases;
    int base_depth = 0;
    {
        PyTypeObject* base = type->tp_base;
        while (base) {
            base_depth += 1;
            base = base->tp_base;
        }
    }
    base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
    for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
        void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = type->tp_base;
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = base->tp_base;
            }
        }
    }
    PyErr_Clear();
    free(base_vtables);
    return 0;
bad:
    tp_base_name = __Pyx_PyType_GetName(type->tp_base);
    base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
    free(base_vtables);
    return -1;
}
#endif

/* SetupReduce */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}
#endif

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !CYTHON_COMPILING_IN_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s__97;
    CYTHON_UNUSED_VAR(parts_tuple);
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    Py_ssize_t i, nparts;
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (likely(module))
        return module;
    return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    if (c_line) {
        (void) __pyx_cfilenm;
        (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    _PyTraceback_Add(funcname, filename, py_line);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(int) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(int) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(long) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(long) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE GLsizei __Pyx_PyInt_As_GLsizei(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const GLsizei neg_one = (GLsizei) -1, const_zero = (GLsizei) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(GLsizei) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(GLsizei, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (GLsizei) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (GLsizei) 0;
                case  1: __PYX_VERIFY_RETURN_INT(GLsizei, digit, digits[0])
                case 2:
                    if ((8 * sizeof(GLsizei) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) >= 2 * PyLong_SHIFT)) {
                            return (GLsizei) (((((GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(GLsizei) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) >= 3 * PyLong_SHIFT)) {
                            return (GLsizei) (((((((GLsizei)digits[2]) << PyLong_SHIFT) | (GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(GLsizei) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) >= 4 * PyLong_SHIFT)) {
                            return (GLsizei) (((((((((GLsizei)digits[3]) << PyLong_SHIFT) | (GLsizei)digits[2]) << PyLong_SHIFT) | (GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (GLsizei) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(GLsizei) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(GLsizei, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(GLsizei) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(GLsizei, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (GLsizei) 0;
                case -1: __PYX_VERIFY_RETURN_INT(GLsizei, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(GLsizei,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(GLsizei) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) - 1 > 2 * PyLong_SHIFT)) {
                            return (GLsizei) (((GLsizei)-1)*(((((GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(GLsizei) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) - 1 > 2 * PyLong_SHIFT)) {
                            return (GLsizei) ((((((GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(GLsizei) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) - 1 > 3 * PyLong_SHIFT)) {
                            return (GLsizei) (((GLsizei)-1)*(((((((GLsizei)digits[2]) << PyLong_SHIFT) | (GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(GLsizei) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) - 1 > 3 * PyLong_SHIFT)) {
                            return (GLsizei) ((((((((GLsizei)digits[2]) << PyLong_SHIFT) | (GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(GLsizei) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) - 1 > 4 * PyLong_SHIFT)) {
                            return (GLsizei) (((GLsizei)-1)*(((((((((GLsizei)digits[3]) << PyLong_SHIFT) | (GLsizei)digits[2]) << PyLong_SHIFT) | (GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(GLsizei) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLsizei, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLsizei) - 1 > 4 * PyLong_SHIFT)) {
                            return (GLsizei) ((((((((((GLsizei)digits[3]) << PyLong_SHIFT) | (GLsizei)digits[2]) << PyLong_SHIFT) | (GLsizei)digits[1]) << PyLong_SHIFT) | (GLsizei)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(GLsizei) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(GLsizei, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(GLsizei) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(GLsizei, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            GLsizei val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (GLsizei) -1;
        }
    } else {
        GLsizei val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (GLsizei) -1;
        val = __Pyx_PyInt_As_GLsizei(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to GLsizei");
    return (GLsizei) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to GLsizei");
    return (GLsizei) -1;
}

/* CIntFromPy */
static CYTHON_INLINE GLint __Pyx_PyInt_As_GLint(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const GLint neg_one = (GLint) -1, const_zero = (GLint) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(GLint) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(GLint, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (GLint) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (GLint) 0;
                case  1: __PYX_VERIFY_RETURN_INT(GLint, digit, digits[0])
                case 2:
                    if ((8 * sizeof(GLint) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) >= 2 * PyLong_SHIFT)) {
                            return (GLint) (((((GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(GLint) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) >= 3 * PyLong_SHIFT)) {
                            return (GLint) (((((((GLint)digits[2]) << PyLong_SHIFT) | (GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(GLint) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) >= 4 * PyLong_SHIFT)) {
                            return (GLint) (((((((((GLint)digits[3]) << PyLong_SHIFT) | (GLint)digits[2]) << PyLong_SHIFT) | (GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (GLint) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(GLint) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(GLint, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(GLint) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(GLint, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (GLint) 0;
                case -1: __PYX_VERIFY_RETURN_INT(GLint, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(GLint,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(GLint) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) - 1 > 2 * PyLong_SHIFT)) {
                            return (GLint) (((GLint)-1)*(((((GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(GLint) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) - 1 > 2 * PyLong_SHIFT)) {
                            return (GLint) ((((((GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(GLint) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) - 1 > 3 * PyLong_SHIFT)) {
                            return (GLint) (((GLint)-1)*(((((((GLint)digits[2]) << PyLong_SHIFT) | (GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(GLint) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) - 1 > 3 * PyLong_SHIFT)) {
                            return (GLint) ((((((((GLint)digits[2]) << PyLong_SHIFT) | (GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(GLint) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) - 1 > 4 * PyLong_SHIFT)) {
                            return (GLint) (((GLint)-1)*(((((((((GLint)digits[3]) << PyLong_SHIFT) | (GLint)digits[2]) << PyLong_SHIFT) | (GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(GLint) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(GLint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(GLint) - 1 > 4 * PyLong_SHIFT)) {
                            return (GLint) ((((((((((GLint)digits[3]) << PyLong_SHIFT) | (GLint)digits[2]) << PyLong_SHIFT) | (GLint)digits[1]) << PyLong_SHIFT) | (GLint)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(GLint) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(GLint, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(GLint) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(GLint, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            GLint val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (GLint) -1;
        }
    } else {
        GLint val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (GLint) -1;
        val = __Pyx_PyInt_As_GLint(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to GLint");
    return (GLint) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to GLint");
    return (GLint) -1;
}

/* Globals */
static PyObject* __Pyx_Globals(void) {
    return __Pyx_NewRef(__pyx_d);
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XSETREF(name, __Pyx_NewRef(__pyx_n_s__330));
    }
    return name;
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CoroutineBase */
#include <frameobject.h>
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    CYTHON_UNUSED_VAR(__pyx_tstate);
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
#if PY_VERSION_HEX >= 0x030B00a4
    Py_CLEAR(exc_state->exc_value);
#else
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
#endif
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(PyObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    CYTHON_MAYBE_UNUSED_VAR(closing);
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_value) {
        #if CYTHON_COMPILING_IN_PYPY
        #else
        PyObject *exc_tb;
        #if PY_VERSION_HEX >= 0x030B00a4
        exc_tb = PyException_GetTraceback(exc_state->exc_value);
        #else
        exc_tb = exc_state->exc_traceback;
        #endif
        if (exc_tb) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
            #if PY_VERSION_HEX >= 0x030B00a4
            Py_DECREF(exc_tb);
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body(self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
#if CYTHON_COMPILING_IN_PYPY
#else
    PyObject *exc_tb;
    #if PY_VERSION_HEX >= 0x030B00a4
    if (!exc_state->exc_value) return;
    exc_tb = PyException_GetTraceback(exc_state->exc_value);
    #else
    exc_tb = exc_state->exc_traceback;
    #endif
    if (likely(exc_tb)) {
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
        #if PY_VERSION_HEX >= 0x030B00a4
        Py_DECREF(exc_tb);
        #endif
    }
#endif
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
            _PyGen_SetStopIterationValue(result);
        }
        Py_CLEAR(result);
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (unlikely(PyErr_Occurred())) {
                PyErr_WriteUnraisable(yf);
            }
        } else {
            retval = __Pyx_PyObject_CallNoArg(meth);
            Py_DECREF(meth);
            if (unlikely(!retval))
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
    CYTHON_UNUSED_VAR(arg);
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (unlikely(PyErr_Occurred())) {
                    gen->is_running = 0;
                    return NULL;
                }
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = __Pyx_PyObject_Call(meth, args, NULL);
            } else {
                PyObject *cargs[4] = {NULL, typ, val, tb};
                ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (unlikely(!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
#if PY_VERSION_HEX >= 0x030B00a4
    Py_VISIT(exc_state->exc_value);
#else
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
#endif
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (unlikely(PyObject_CallFinalizerFromDealloc(self)))
#else
        Py_TYPE(gen)->tp_del(self);
        if (unlikely(Py_REFCNT(self) > 0))
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    __Pyx_PyHeapTypeObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (likely(--self->ob_refcnt == 0)) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_name;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_name, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_qualname;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context)
{
    PyObject *frame = self->gi_frame;
    CYTHON_UNUSED_VAR(context);
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    #if PY_VERSION_HEX >= 0x030B00a4
    gen->gi_exc_state.exc_value = NULL;
    #else
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
    #endif
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (unlikely(!module)) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_GeneratorType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc},
    {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse},
    {Py_tp_iter, (void *)PyObject_SelfIter},
    {Py_tp_iternext, (void *)__Pyx_Generator_Next},
    {Py_tp_methods, (void *)__pyx_Generator_methods},
    {Py_tp_members, (void *)__pyx_Generator_memberlist},
    {Py_tp_getset, (void *)__pyx_Generator_getsets},
    {Py_tp_getattro, (void *) __Pyx_PyObject_GenericGetAttrNoDict},
#if CYTHON_USE_TP_FINALIZE
    {Py_tp_finalize, (void *)__Pyx_Coroutine_del},
#endif
    {0, 0},
};
static PyType_Spec __pyx_GeneratorType_spec = {
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    __pyx_GeneratorType_slots
};
#else
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
#endif
static int __pyx_Generator_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL);
#else
    (void) module;
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
#endif
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compile time version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* VoidPtrImport */
#ifndef __PYX_HAVE_RT_ImportVoidPtr
#define __PYX_HAVE_RT_ImportVoidPtr
static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, name);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C variable %.200s",
                PyModule_GetName(module), name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}
#endif

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: utility_code_pragmas_end ### */
#if _MSV_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
