Beispiel #1
0
    def __init__(self, element, composition, timeline):
        goocanvas.Group.__init__(self)
        View.__init__(self)
        Zoomable.__init__(self)

        self.element = element
        self.comp = composition
        self.timeline = timeline

        self.bg = goocanvas.Rect(height=self.__HEIGHT__,
                                 fill_color_rgba=self.__NORMAL__,
                                 line_width=0)

        self.content = Preview(self.element)
        self.name = goocanvas.Text(x=10,
                                   text=os.path.basename(
                                       unquote(element.factory.name)),
                                   font="Sans 9",
                                   fill_color_rgba=0x000000FF,
                                   alignment=pango.ALIGN_LEFT)

        self.start_handle = StartHandle(element,
                                        timeline,
                                        height=self.__HEIGHT__)
        self.end_handle = EndHandle(element, timeline, height=self.__HEIGHT__)

        for thing in (self.bg, self.content, self.start_handle,
                      self.end_handle, self.name):
            self.add_child(thing)

        if element:
            self.zoomChanged()
        self.normal()
Beispiel #2
0
    def __init__(self, element, composition, timeline):
        goocanvas.Group.__init__(self)
        View.__init__(self)
        Zoomable.__init__(self)

        self.element = element
        self.comp = composition
        self.timeline = timeline

        self.bg = goocanvas.Rect(
            height=self.__HEIGHT__, 
            fill_color_rgba=self.__NORMAL__,
            line_width=0)

        self.content = Preview(self.element)
        self.name = goocanvas.Text(
            x=10,
            text=os.path.basename(unquote(element.factory.name)),
            font="Sans 9",
            fill_color_rgba=0x000000FF,
            alignment=pango.ALIGN_LEFT)
 
        self.start_handle = StartHandle(element, timeline,
            height=self.__HEIGHT__)
        self.end_handle = EndHandle(element, timeline,
            height=self.__HEIGHT__)

        for thing in (self.bg, self.content, self.start_handle, self.end_handle, self.name):
            self.add_child(thing)

        if element:
            self.zoomChanged()
        self.normal()
Beispiel #3
0
 def __init__(self, instance, element, timeline, **kwargs):
     self.app = instance
     self.element = element
     self.timeline = timeline
     goocanvas.Image.__init__(self,
                              pixbuf=TRIMBAR_PIXBUF,
                              line_width=0,
                              **kwargs)
     View.__init__(self)
     Zoomable.__init__(self)
Beispiel #4
0
 def __init__(self, element, timeline, **kwargs):
     self.element = element
     self.timeline = timeline
     goocanvas.Rect.__init__(self,
                             width=5,
                             fill_color_rgba=0x00000022,
                             line_width=0,
                             **kwargs)
     View.__init__(self)
     Zoomable.__init__(self)
Beispiel #5
0
 def __init__(self, element, timeline, **kwargs):
     self.element = element
     self.timeline = timeline
     goocanvas.Rect.__init__(self,
         width=5,
         fill_color_rgba=0x00000022,
         line_width=0,
         **kwargs
     )
     View.__init__(self)
     Zoomable.__init__(self)
 def __init__(self, instance, element, timeline, **kwargs):
     self.app = instance
     self.element = element
     self.timeline = timeline
     goocanvas.Image.__init__(self,
         pixbuf = TRIMBAR_PIXBUF,
         line_width=0,
         pointer_events=goocanvas.EVENTS_FILL,
         **kwargs
     )
     View.__init__(self)
     Zoomable.__init__(self)
Beispiel #7
0
    def __init__(self, instance, element, track, timeline):
        goocanvas.Group.__init__(self)
        View.__init__(self)
        Zoomable.__init__(self)
        self.app = instance
        self.track = track
        self.timeline = timeline
        self.namewidth = 0
        self.nameheight = 0

        self.bg = goocanvas.Rect(height=self.height, line_width=0)

        self.content = Preview(element)

        self.name = goocanvas.Text(x=NAME_HOFFSET + NAME_PADDING,
                                   y=NAME_VOFFSET + NAME_PADDING,
                                   operator=cairo.OPERATOR_ADD,
                                   alignment=pango.ALIGN_LEFT)
        self.namebg = goocanvas.Rect(radius_x=2,
                                     radius_y=2,
                                     x=NAME_HOFFSET,
                                     y=NAME_VOFFSET,
                                     line_width=0)

        self.start_handle = StartHandle(self.app,
                                        element,
                                        timeline,
                                        height=self.height)
        self.end_handle = EndHandle(self.app,
                                    element,
                                    timeline,
                                    height=self.height)

        self.selection_indicator = goocanvas.Rect(
            visibility=goocanvas.ITEM_INVISIBLE,
            line_width=0.0,
            height=self.height)

        for thing in (self.bg, self.content, self.selection_indicator,
                      self.start_handle, self.end_handle, self.namebg,
                      self.name):
            self.add_child(thing)

        for prop, interpolator in element.getInterpolators().itervalues():
            self.add_child(Curve(instance, element, interpolator, 50))

        self.element = element
        self.settings = instance.settings
        self.normal()
    def __init__(self, instance, element, track, timeline):
        goocanvas.Group.__init__(self)
        View.__init__(self)
        Zoomable.__init__(self)
        self.app = instance
        self.track = track
        self.timeline = timeline
        self.namewidth = 0
        self.nameheight = 0

        self.bg = goocanvas.Rect(
            height=self.height,
            line_width=1)

        self.content = Preview(self.app, element)

        self.name = goocanvas.Text(
            x= NAME_HOFFSET + NAME_PADDING,
            y= NAME_VOFFSET + NAME_PADDING,
            operator = cairo.OPERATOR_ADD,
            alignment=pango.ALIGN_LEFT)
        self.namebg = goocanvas.Rect(
            radius_x = 2,
            radius_y = 2,
            x = NAME_HOFFSET,
            y = NAME_VOFFSET,
            line_width = 0)

        self.start_handle = StartHandle(self.app, element, timeline,
            height=self.height)
        self.end_handle = EndHandle(self.app, element, timeline,
            height=self.height)

        self.selection_indicator = goocanvas.Rect(
            visibility=goocanvas.ITEM_INVISIBLE,
            line_width = 0.0,
            height=self.height)

        for thing in (self.bg, self.content, self.selection_indicator,
            self.start_handle, self.end_handle, self.namebg, self.name):
            self.add_child(thing)

        for prop, interpolator in element.getInterpolators().itervalues():
            self.add_child(Curve(instance, element, interpolator))

        self.element = element
        self.settings = instance.settings
        self.unfocus()
Beispiel #9
0
    def __init__(self, instance, ui_manager):
        gtk.Table.__init__(self, rows=2, columns=1, homogeneous=False)
        Loggable.__init__(self)
        Zoomable.__init__(self)
        self.log("Creating Timeline")

        self._updateZoom = True
        self.project = None
        self.ui_manager = ui_manager
        self.app = instance
        self._temp_objects = None
        self._factories = None
        self._finish_drag = False
        self._position = 0
        self._state = gst.STATE_NULL
        self._createUI()
        self._prev_duration = 0
        self.rate = gst.Fraction(1, 1)
Beispiel #10
0
    def __init__(self, instance, ui_manager):
        gtk.Table.__init__(self, rows=2, columns=1, homogeneous=False)
        Loggable.__init__(self)
        Zoomable.__init__(self)
        self.log("Creating Timeline")

        self._updateZoom = True
        self.project = None
        self.ui_manager = ui_manager
        self.app = instance
        self._temp_objects = None
        self._factories = None
        self._finish_drag = False
        self._position = 0
        self._state = gst.STATE_NULL
        self._createUI()
        self._prev_duration = 0
        self.rate = gst.Fraction(1, 1)