def RefreshHighlight(self, x_mouse, y_mouse):
for idx, panel in enumerate(self.GraphicPanels):
x, y = panel.GetPosition()
width, height = panel.GetSize()
rect = wx.Rect(x, y, width, height)
if rect.InsideXY(x_mouse, y_mouse) or \
idx == 0 and y_mouse < 0 or \
idx == len(self.GraphicPanels) - 1 and y_mouse > panel.GetPosition()[1]:
panel.RefreshHighlight(x_mouse - x, y_mouse - y)
else:
panel.SetHighlight(HIGHLIGHT_NONE)
if wx.Platform == "__WXMSW__":
self.RefreshView()
else:
self.ForceRefresh()
评论列表
文章目录