Beispiel #1
0
    def __init__(self, stack, action_log, source):
        Overlay.__init__(self, stack, source)

        self.__clicked_handle = None
        self.__click_diagonal_sign = None

        self.__action_log = action_log
        self.hovered_handle = None

        # Corner handles need to be ordered for drawing.
        self.corner_handles = OrderedDict([
            ((Edge.top, Edge.left), CornerHandle(self)),
            ((Edge.bottom, Edge.left), CornerHandle(self)),
            ((Edge.bottom, Edge.right), CornerHandle(self)),
            ((Edge.top, Edge.right), CornerHandle(self))
        ])

        self.handles = self.corner_handles.copy()
        for edge in range(1, 5):
            self.handles[(edge, )] = EdgeHandle(self)

        for key in self.handles:
            self.handles[key].set_placement(key)

        self._source.connect("deep-notify", self.__source_property_changed_cb)
        self.update_from_source()
Beispiel #2
0
    def __init__(self, stack, action_log, source):
        Overlay.__init__(self, stack, source)

        self.__clicked_handle = None
        self.__click_diagonal_sign = None
        self.__box_hovered = False

        self.__action_log = action_log
        self.hovered_handle = None

        # Corner handles need to be ordered for drawing.
        self.corner_handles = OrderedDict([
            ((Edge.top, Edge.left), CornerHandle(self)),
            ((Edge.bottom, Edge.left), CornerHandle(self)),
            ((Edge.bottom, Edge.right), CornerHandle(self)),
            ((Edge.top, Edge.right), CornerHandle(self))])

        self.handles = self.corner_handles.copy()
        for edge in range(1, 5):
            self.handles[(edge,)] = EdgeHandle(self)

        for key in self.handles:
            self.handles[key].set_placement(key)

        self._source.connect("deep-notify", self.__source_property_changed_cb)
        self.update_from_source()
Beispiel #3
0
    def __init__(self, stack, source):
        Overlay.__init__(self, stack, source)
        self.__position = numpy.array([0, 0])
        self.__size = None
        self.__click_source_position = None
        self.__click_window_position = None
        self.update_from_source()

        stack.app.project_manager.current_project.pipeline.connect("async-done", self.on_async_done)
    def __init__(self, stack, source):
        Overlay.__init__(self, stack, source)
        self.__position = numpy.array([0, 0])
        self.__size = None
        self.__click_source_position = None
        self.__click_window_position = None
        self.update_from_source()

        stack.app.project_manager.current_project.pipeline.connect(
            "async-done", self.on_async_done)
Beispiel #5
0
 def unhover(self):
     if self.hovered_handle:
         self.hovered_handle.on_hover(None)
     Overlay.unhover(self)
Beispiel #6
0
 def unhover(self):
     if self.hovered_handle:
         self.hovered_handle.on_hover(None)
     Overlay.unhover(self)