Logo Search packages:      
Sourcecode: jokosher version File versions  Download package

def EventViewer::EventViewer::OnMouseDown (   self,
  widget,
  mouse 
)

Possible clicks to capture:
   {L|R}MB: deselect all events, remove any existing selection in this event,
      select this event, begin moving the event
   LMB+shift: remove any existing selection in this event, begin 
      selecting part of this event
   {L|R}MB+ctrl: select this event without deselecting other events
   RMB: context menu
   LMB double-click: split here
   LMB over a fadeMarker: drag that marker

Definition at line 396 of file EventViewer.py.

00396                                           :
            """ Possible clicks to capture:
               {L|R}MB: deselect all events, remove any existing selection in this event,
                  select this event, begin moving the event
               LMB+shift: remove any existing selection in this event, begin 
                  selecting part of this event
               {L|R}MB+ctrl: select this event without deselecting other events
               RMB: context menu
               LMB double-click: split here
               LMB over a fadeMarker: drag that marker
            """
            
            # {L|R}MB: deselect all events, select this event, begin moving the event
            # {L|R}MB+ctrl: select this event without deselecting other events
            if 'GDK_CONTROL_MASK' not in mouse.state.value_names:
                  self.project.ClearEventSelections()
                  self.project.ClearInstrumentSelections()
            self.event.SetSelected(True)
            
            # RMB: context menu
            if mouse.button == 3:
                  self.ContextMenu(mouse)
            elif mouse.button == 1:
                  if 'GDK_SHIFT_MASK' in mouse.state.value_names:
                        # LMB+shift: remove any existing selection in this event, begin 
                        #   selecting part of this event
                        self.isSelecting = True
                        self.Selection[0] = mouse.x
                        self.fadePoints = [100,100]
                        if not self.selmessageID: 
                              self.selmessageID = self.mainview.SetStatusBar("<b>Click</b> the buttons below the selection to do something to that portion of audio.")
                  else:
                        if self.fadeMarkersContext and self.fadeMarkersContext.in_fill(mouse.x, mouse.y):
                              # LMB over a fadeMarker: drag that marker
                              self.isDraggingFade = True
                              if mouse.x > self.Selection[1]:
                                    self.fadeBeingDragged = 1
                                    return True
                              else:
                                    self.fadeBeingDragged = 0
                                    return True
                        if mouse.type == gtk.gdk._2BUTTON_PRESS:
                              # LMB double-click: split here
                              self.mouseAnchor[0] = mouse.x
                              self.OnSplit(None)
                              return True
                        
                        # remove any existing selection in this event
                        self.Selection = [0,0]
                        if self.drawer.parent == self.lane.fixed:
                              self.lane.fixed.remove(self.drawer)
                              if self.volmessageID:   #clesr status bar if not already clear
                                    self.mainview.ClearStatusBar(self.volmessageID)
                                    self.volmessageID = None
                              if self.selmessageID:   #clesr status bar if not already clear
                                    self.mainview.ClearStatusBar(self.selmessageID)
                                    self.selmessageID = None      
                        self.isDragging = True
                        
                        self.eventStart = self.event.start
                        ptr = gtk.gdk.display_get_default().get_pointer()
                        self.mouseAnchor = [ptr[1], ptr[2]]
      
            return True

      #_____________________________________________________________________
            
      def ContextMenu(self,mouse):


Generated by  Doxygen 1.6.0   Back to index