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

Method FindTabAtPos

gui/chrome_tabs.py:1075–1089  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

1073 break
1074
1075 def FindTabAtPos(self, x, y):
1076 if self.GetTabsCount() == 0:
1077 return None
1078
1079 # test current tab first
1080 sel_tab = self.GetSelectedTab()
1081 if self.TabHitTest(sel_tab, x, y):
1082 return sel_tab
1083
1084 # test all other tabs next
1085 for tab in self.tabs:
1086 if self.TabHitTest(tab, x, y):
1087 return tab
1088
1089 return None
1090
1091 def TabHitTest(self, tab, x, y):
1092 """ Test if x and y are contained within a tabs region """

Callers 3

OnLeftDownMethod · 0.95
OnMiddleUpMethod · 0.95
OnTimerMethod · 0.95

Calls 3

GetTabsCountMethod · 0.95
GetSelectedTabMethod · 0.95
TabHitTestMethod · 0.95

Tested by

no test coverage detected