def onMouseMotion(self, e): if self._next_click_is_invalid: self._next_click_is_invalid = False return self._app.getView().updateMousePos(e.GetX(), e.GetY()) if self._activeTool is not None: dx, dy = (e.GetX() - self._mousePos[0], e.GetY() - self._mousePos[1]) self._activeTool.onMouseMove(e.GetX(), e.GetY(), dx, dy) focusObj = self._app.getView().getFocusObject() if focusObj is not None and hasattr(focusObj, 'getName') and self._activeTool is None: if hasattr(focusObj, 'getInfoString'): showTooltip(focusObj.getName() + '\n' + focusObj.getInfoString()) else: showTooltip(focusObj.getName()) else: if self._activeTool is not None and self._activeTool.getTooltip() is not None: showTooltip(self._activeTool.getTooltip()) else: hideTooltip() self._mousePos = (e.GetX(), e.GetY())
def OnMouseEnter(self, e): ctrl = e.GetEventObject() showTooltip(ctrl.setting.getTooltip(), ctrl)
def _onEnter(self, e): if self._small: showTooltip(self.GetLabel(), self)
def _onEnter(self, e): showTooltip(self._tooltip, self)