diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-03-12 20:02:06 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-03-12 20:02:06 (GMT) |
commit | 605132efabf8bf88014145c924ae35d6d862fe52 (patch) | |
tree | 7265aacb30b1d8d79cacd42295404811a7cdcba7 /globos.py | |
parent | 2bd3ad79062647d225c1d9bcf9c6f8ef137fad9c (diff) |
Add a title rectangle globe
The title globe is added when the activity starts with a empty page,
and can't be deleted.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'globos.py')
-rw-r--r-- | globos.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -407,8 +407,8 @@ class Rectangulo(Globo): self.selec = False #Centro del rectangulo - self.x = x * self.ancho / (self.radio * 1.0) - self.y = y * self.alto / (self.radio * 1.0) + self.x = x + self.y = y ancho_text, alto_text = self.calc_area_texto() self.texto = CuadroTexto(self.x, self.y, ancho_text, alto_text) @@ -810,6 +810,13 @@ class CuadroTexto: # Lo uso para acentuar letras con comilla simple self.double_key = None + def set_text(self, text): + self.texto = text + self.renglones = self.texto.split('\r') + for i in range(len(self.renglones)): + self.esp_reg.append(0) + self.cursor = len(text) + def imprimir(self, context): context.set_source_rgb(self.color_r, self.color_g, self.color_b) if self.mostrar_borde: |