How to use the pycairo.examples.cairo_snippets.snippets_gtk.Window function in pycairo

To help you get started, we’ve selected a few pycairo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IntelPython / source-publish / pycairo / examples / cairo_snippets / snippets_gtk.py View on Github external
tselection = tree_view.get_selection()
        tselection.connect("changed", self.cb_selection_changed)
        tselection.set_mode(Gtk.SelectionMode.BROWSE)

        cr = Gtk.CellRendererText()
        tvc = Gtk.TreeViewColumn(None, cr, text=0)
        tree_view.append_column(tvc)

        tselection.select_path(0,)  # select first item

        return sw


if __name__ == '__main__':
    app = Window()
    app.connect('destroy', Gtk.main_quit)
    app.show_all()
    Gtk.main()
github IntelPython / source-publish / pycairo / examples / cairo_snippets / snippets_gtk.py View on Github external
def __init__(self, title=None):
        super(Window, self).__init__()
        self.set_default_size(self.WIDTH, self.HEIGHT)

        self.da = Gtk.DrawingArea()
        self.da.connect('draw', self.da_draw_event)

        def put_in_frame(widget):
            frame = Gtk.Frame(label=None)
            frame.set_property('shadow_type', Gtk.ShadowType.IN)
            frame.add(widget)
            return frame

        self.current_snippet = None

        vpaned = Gtk.VPaned()
        self.add(vpaned)

pycairo

Python interface for cairo

LGPL-2.1-only OR MPL-1.1
Latest version published 3 months ago

Package Health Score

82 / 100
Full package analysis

Similar packages