Пример #1
0
    def __init__(self, matrix_size):
        QuadrWidget.__init__(self)

        self.matrix = np.zeros((matrix_size, matrix_size),
                               dtype=np.bool)

        self.connect("expose_event", MatrixWidget.on_redraw)
Пример #2
0
    def __init__(self, go_func, go_args):
        QuadrWidget.__init__(self)
        self.add_events(gtk.gdk.ALL_EVENTS_MASK)

        self.drag = False
        self.coords = []

        self.go_func = go_func
        self.go_args = go_args

        self.connect("expose_event", FigureWidget.on_redraw)
        self.connect("button-press-event", FigureWidget.on_press)
        self.connect("button-release-event", FigureWidget.on_release)
        self.connect("motion-notify-event", FigureWidget.on_motion)
        self.connect("realize", FigureWidget.on_realize)
Пример #3
0
    def __init__(self, matrix_size):
        QuadrWidget.__init__(self)

        self.matrix = np.zeros((matrix_size, matrix_size), dtype=np.bool)

        self.connect("expose_event", MatrixWidget.on_redraw)