#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# Support module generated by PAGE version 4.23a
#  in conjunction with Tcl version 8.6
#    Jul 03, 2019 01:16:17 PM -03  platform: Windows NT

import sys

import controllers.Gestos as ctrl

try:
    import Tkinter as tk
except ImportError:
    import tkinter as tk

try:
    import ttk
    py3 = False
except ImportError:
    import tkinter.ttk as ttk
    py3 = True

def set_Tk_var():
    global descripcion
    descripcion = tk.StringVar()
    global punto1
    punto1 = tk.IntVar()
    global punto2
    punto2 = tk.IntVar()

def nuevoGesto():
    success = ctrl.crearGesto(descripcion.get(),punto1.get(),punto2.get())
    if (success != None):
        print("Se creo exitosamente el gesto")
        import views.gestos as gestos
        gestos.top.insertarUltimo(success)
        gestos.top.clear()
    else:
        print("Hubo un error al crear el gesto")

def getAll():
    return ctrl.buscarAllGestos()
        
def destroy_window():
    print('gestos_support.destroy_window')
    sys.stdout.flush()

def init(top, gui, *args, **kwargs):
    global w, top_level, root
    w = gui
    top_level = top
    root = top

def destroy_window():
    # Function which closes the window.
    global top_level
    top_level.destroy()
    top_level = None

if __name__ == '__main__':
    import gestos
    gestos.vp_start_gui()




