Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbvierci <mbvierci88@gmail.com>2013-01-16 21:00:44 (GMT)
committer mbvierci <mbvierci88@gmail.com>2013-01-16 21:00:44 (GMT)
commit508cefe315f6da1a088e9ad557be994488f9d025 (patch)
tree6ad6fec3afdfbe30ee68586251f7830c9f0be3f9
parenta2b22692dc603452b92e4ba82a66466f298f7e75 (diff)
window.py, inicio de la interfaz grafica con GTK
-rw-r--r--window.py82
1 files changed, 82 insertions, 0 deletions
diff --git a/window.py b/window.py
new file mode 100644
index 0000000..5a02226
--- /dev/null
+++ b/window.py
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+import gtk
+import gobject
+
+
+OPTIONS = ['a', 'b', 'c', 'd']
+OPT_LENGHT = 4
+DELAY = 2000
+
+
+class MyApp():
+
+ def __init__(self):
+ window = gtk.Window()
+ principalVbox = gtk.VBox()
+
+
+
+ cabeceraHbox = gtk.HBox()
+ jugarButton = gtk.Button()
+ jugarButton.set_label('JUGAR')
+ cancelarButton = gtk.Button()
+ cancelarButton.set_label('CANCELAR')
+ cuerpoHbox = gtk.HBox()
+
+ seleccionadosTable = gtk.Table(4, 1, True)
+ seleccionadoUnoButton = gtk.Button()
+ seleccionadoDosButton = gtk.Button()
+ seleccionadoTresButton = gtk.Button()
+ #resultadoButton = gtk.Button()
+
+ opcionesTable = gtk.Table(3,3, True)
+ opcionUno = gtk.Button()
+ opcionDos = gtk.Button()
+ opcionTres = gtk.Button()
+ opcionCuatro = gtk.Button()
+ opcionCinco = gtk.Button()
+ opcionSeis = gtk.Button()
+ opcionSiete = gtk.Button()
+ opcionOcho = gtk.Button()
+ opcionNueve = gtk.Button()
+
+
+
+
+ window.add(principalVbox)
+ principalVbox.add(cabeceraHbox)
+ principalVbox.add(cuerpoHbox)
+
+ cabeceraHbox.add(jugarButton)
+ cabeceraHbox.add(cancelarButton)
+
+ cuerpoHbox.add(seleccionadosTable)
+ cuerpoHbox.add(opcionesTable)
+
+ seleccionadosTable.attach(seleccionadoUnoButton, 0, 1, 0, 1)
+ seleccionadosTable.attach(seleccionadoDosButton, 0, 1, 1, 2)
+ seleccionadosTable.attach(seleccionadoTresButton, 0, 1, 2, 3)
+ #seleccionadosTable.attach(selecionadoUnoButton, 0, 1, 0, 1)
+
+
+ opcionesTable.attach( opcionUno, 0, 1, 0, 1)
+ opcionesTable.attach( opcionDos, 1, 2, 0, 1)
+ opcionesTable.attach( opcionTres, 2, 3, 0, 1)
+ opcionesTable.attach( opcionCuatro, 0, 1, 1, 2)
+ opcionesTable.attach( opcionCinco, 1, 2, 1, 2)
+ opcionesTable.attach( opcionSeis, 2, 3, 1, 2)
+ opcionesTable.attach( opcionSiete, 0, 1, 2, 3)
+ opcionesTable.attach( opcionOcho, 1, 2, 2, 3)
+ opcionesTable.attach( opcionNueve, 2, 3, 2, 3)
+
+
+ window.show_all()
+
+
+
+
+
+
+if __name__ == "__main__":
+ my_app = MyApp()
+ gtk.main()