Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
blob: 76c75c1e4419c199e460085cab21a5c35c7232a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
from sugar.activity import activity
import logging
 
import gtk
 
class SugarBrainActivity(activity.Activity):
    def __init__(self, handle):
        activity.Activity.__init__(self, handle)
        toolbox=activity.ActivityToolbox(self)
        toolbox.show()
        self.set_toolbox(toolbox)
        #El Layout inicial
        l1 = gtk.VBox()

        #encabezado = gtk.Label(' El encabezado, categoria y dificultad')
        #encabezado.show()

        #Preparando el menu
        menu = gtk.HBox()
        alineacion = gtk.Alignment(0.5, 1, 0.5, 1)
        categoriaL = gtk.Label("Categoria:")
        categoriaL.show()
        categorias = gtk.combo_box_new_text()
        categorias.insert_text(0,"Todas")
        categorias.insert_text(1,"Matematica")
        categorias.insert_text(2,"Historia")
        categorias.insert_text(3,"Castellano")
        categorias.set_active(0)
        categorias.show()
        dificultadL = gtk.Label("Dificultad:")
        dificultadL.show()
        dificultades = gtk.combo_box_new_text()
        dificultades.insert_text(0,"nivel 1")
        dificultades.insert_text(1,"nivel 2")
        dificultades.insert_text(2, "nivel 3")
        dificultades.set_active(0)
        dificultades.show()
        iniciarB = gtk.Button("Inicio")
        iniciarB.show()
        finalizarB = gtk.Button("Terminar")
        finalizarB.show()
        menu.pack_start(alineacion)
        menu.pack_start(categoriaL)
        menu.pack_start(categorias)
        menu.pack_start(dificultadL)
        menu.pack_start(dificultades)
        menu.pack_start(iniciarB)
        menu.pack_start(finalizarB)
        menu.show()


        #contenedor = gtk.EventBox()
        #imagen = gtk.Image()
        #imagen.setFromFile("script01.svg")
        #imagen.show()
    
        #respuesta
        respuesta = gtk.HBox()
        respL = gtk.Label("Respuesta:")
        respL.show()
        respT = gtk.Entry()
        respT.show()
        respB = gtk.Button("Respuesta")
        respB.show()
        sgteB = gtk.Button("Siguiente")
        sgteB.show()
        respuesta.pack_start(respL, False, False, 0)
        respuesta.pack_start(respT)
        respuesta.pack_start(respB)
        respuesta.pack_start(sgteB)
        respuesta.show()

        #agrupo todo
        #l1.pack_start(encabezado)
        l1.pack_start(menu, False, False, 4)
        l1.pack_start(respuesta, False, False, 360)
        #l1.pack_start(imagen)

        l1.show()
        self.set_canvas(l1)