diff options
Diffstat (limited to 'canvas.py')
-rw-r--r-- | canvas.py | 55 |
1 files changed, 55 insertions, 0 deletions
@@ -1 +1,56 @@ +# Copyright (C) 2013 Cristhofer Travieso <cristhofert97@gmail.com> + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, + +from gi.repository import Gtk +from gi.repository import Gdk + +class Canvas(Gtk.HBox): + def __init__(self): + Gtk.HBox.__init__(self) + + self.presentation = []#save the presentation + + #panel + + scroll = Gtk.ScrolledWindow() + self.pack_start(scroll, True, True, 0) + + liststore = Gtk.ListStore(str) + + for num in range(0, len(self.presentation)): + liststore.append([num]) + + # el contenedor de las filas + treeview = Gtk.TreeView() + # moldear el contenedor + treeview.set_model(liststore) + + # Crear la columna para la lista + treeview.append_column(Gtk.TreeViewColumn('Slide', Gtk.CellRendererText(), text=0)) + scroll.add(treeview) + + + self.show_all() + +if __name__ == "__main__": + window = Gtk.Window() + window.connect('destroy', lambda w: Gtk.main_quit()) + c = Canvas() + window.add(c) + window.set_title('Presentation') + window.maximize() + window.show() + Gtk.main() |