def OnMouseMove(self, event):
"""
Handles the ``wx.EVT_MOTION`` event for :class:`ImageContainerBase`.
:param `event`: a :class:`MouseEvent` event to be processed.
"""
style = self.GetParent().GetAGWWindowStyleFlag()
#print "Mouse move at", event.GetPosition().Get()
imgIdx, where = self.HitTest(event.GetPosition())
#print "imgIdx=", imgIdx, "where=", where
# Allow hovering unless over current tab or tab is disabled
self._nHoveredImgIdx = -1
if imgIdx < len(self._pagesInfoVec) and self.GetEnabled(imgIdx) and imgIdx != self._nIndex:
self._nHoveredImgIdx = imgIdx
if self._nHoveredImgIdx >= 0 and self.HasAGWFlag(INB_WEB_HILITE):
# Change the cursor to be Hand if we have the Web hover style set
wx.SetCursor(wx.StockCursor(wx.CURSOR_HAND))
#elif not self.PointOnSash(event.GetPosition()):
# # Restore the cursor if we are not currently hovering the sash
# wx.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
#self.Refresh()
# ---------------------------------------------------------------------------- #
# Class ImageContainer
# ---------------------------------------------------------------------------- #
评论列表
文章目录