Select tab on mouse down and start dragging logic
(self, event)
| 800 | self.AdjustTabsSize() |
| 801 | |
| 802 | def OnLeftDown(self, event): |
| 803 | """ Select tab on mouse down and start dragging logic """ |
| 804 | mposx, mposy = event.GetPosition() |
| 805 | if not self.start_drag: |
| 806 | tab = self.FindTabAtPos(mposx, mposy) |
| 807 | if tab: |
| 808 | self.CheckTabSelected(tab, mposx, mposy) |
| 809 | if self.show_add_button: |
| 810 | # If we can add tabs, we can drag them. Set flag |
| 811 | self.start_drag = True |
| 812 | tx, ty = tab.GetPosition() |
| 813 | self.dragx = mposx - tx |
| 814 | self.dragy = self.container_height - self.height |
| 815 | self.Refresh() |
| 816 | |
| 817 | self.dragged_tab = tab |
| 818 | |
| 819 | def OnMiddleUp(self, event): |
| 820 | mposx, mposy = event.GetPosition() |
nothing calls this directly
no test coverage detected