Checks if mouse pos at x, y is over a close button. If so, set the close hovering flag for that tab
(self, x, y)
| 1049 | return True |
| 1050 | |
| 1051 | def CheckCloseHighlighted(self, x, y): |
| 1052 | """ |
| 1053 | Checks if mouse pos at x, y is over a close button. If so, set the |
| 1054 | close hovering flag for that tab |
| 1055 | """ |
| 1056 | dirty = False |
| 1057 | |
| 1058 | for tab in self.tabs: |
| 1059 | region = tab.GetCloseButtonRegion() |
| 1060 | posx, posy = tab.GetPosition() |
| 1061 | region.Offset(round(posx), round(posy)) |
| 1062 | |
| 1063 | if region.Contains(x, y): |
| 1064 | if not tab.GetCloseButtonHoverStatus(): |
| 1065 | tab.ShowCloseButtonHovering(True) |
| 1066 | dirty = True |
| 1067 | else: |
| 1068 | if tab.GetCloseButtonHoverStatus(): |
| 1069 | tab.ShowCloseButtonHovering(False) |
| 1070 | dirty = True |
| 1071 | if dirty: |
| 1072 | self.Refresh() |
| 1073 | break |
| 1074 | |
| 1075 | def FindTabAtPos(self, x, y): |
| 1076 | if self.GetTabsCount() == 0: |
no test coverage detected