graphics/FBD_Objects.py
changeset 287 fab9a51d5b57
parent 283 c4199b88cf60
child 289 151e73a02caf
equal deleted inserted replaced
286:67da12c94d2d 287:fab9a51d5b57
   341         handle_type, handle = self.Handle
   341         handle_type, handle = self.Handle
   342         if handle_type == HANDLE_CONNECTOR:
   342         if handle_type == HANDLE_CONNECTOR:
   343             handle.SetEdge(edge)
   343             handle.SetEdge(edge)
   344             self.RefreshModel(False)
   344             self.RefreshModel(False)
   345     
   345     
       
   346 ##    # Method called when a Motion event have been generated
       
   347 ##    def OnMotion(self, event, dc, scaling):
       
   348 ##        if not event.Dragging():
       
   349 ##            pos = event.GetLogicalPosition(dc)
       
   350 ##            for input in self.Inputs:
       
   351 ##                rect = input.GetRedrawRect()
       
   352 ##                if rect.InsideXY(pos.x, pos.y):
       
   353 ##                    print "Find input"
       
   354 ##                    tip = wx.TipWindow(self.Parent, "Test")
       
   355 ##                    tip.SetBoundingRect(rect)
       
   356 ##        return Graphic_Element.OnMotion(self, event, dc, scaling)
       
   357     
   346     # Method called when a LeftDClick event have been generated
   358     # Method called when a LeftDClick event have been generated
   347     def OnLeftDClick(self, event, dc, scaling):
   359     def OnLeftDClick(self, event, dc, scaling):
   348         # Edit the block properties
   360         # Edit the block properties
   349         self.Parent.EditBlockContent(self)
   361         self.Parent.EditBlockContent(self)
   350     
   362     
   454         return variable
   466         return variable
   455     
   467     
   456     def GetConnectorTranslation(self, element):
   468     def GetConnectorTranslation(self, element):
   457         connectors = {}
   469         connectors = {}
   458         if self.Input is not None:
   470         if self.Input is not None:
   459             connector[self.Input] = element.Input
   471             connectors[self.Input] = element.Input
   460         if self.Output is not None:
   472         if self.Output is not None:
   461             connectors[self.Output] = element.Output
   473             connectors[self.Output] = element.Output
   462         return connectors
   474         return connectors
   463     
   475     
   464     def Flush(self):
   476     def Flush(self):