MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / MouseMove

Method MouseMove

gui/builtinShipBrowser/fitItem.py:414–440  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

412 self.dragging = True
413
414 def MouseMove(self, event):
415 pos = self.ClientToScreen(event.GetPosition())
416 if self.dragging:
417 if not self.dragged:
418 if self.dragMotionTrigger < 0:
419 if not self.dragTLFBmp:
420 tdc = wx.MemoryDC()
421 bmpWidth = self.toolbarx if self.toolbarx < 200 else 200
422 self.dragTLFBmp = wx.Bitmap(round(bmpWidth), round(self.GetRect().height))
423 tdc.SelectObject(self.dragTLFBmp)
424 tdc.SetBrush(wx.Brush(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)))
425 tdc.DrawRectangle(0, 0, bmpWidth, self.GetRect().height)
426 self.DrawItem(tdc)
427 tdc.SelectObject(wx.NullBitmap)
428 if not self.HasCapture():
429 self.CaptureMouse()
430 self.dragWindow = PFBitmapFrame(self, pos, self.dragTLFBmp)
431 self.dragWindow.Show()
432 self.dragged = True
433 self.dragMotionTrigger = self.dragMotionTrail
434 else:
435 self.dragMotionTrigger -= 1
436 if self.dragWindow:
437 pos.x += 3
438 pos.y += 3
439 self.dragWindow.SetPosition(pos)
440 return
441
442 def selectFit(self, event=None, newTab=False):
443 if newTab:

Callers

nothing calls this directly

Calls 5

DrawItemMethod · 0.95
PFBitmapFrameClass · 0.90
GetPositionMethod · 0.45
ShowMethod · 0.45
SetPositionMethod · 0.45

Tested by

no test coverage detected