def event_nameChange(self): if self in api.getFocusAncestors(): speech.speakObjectProperties(self, name=True, reason=controlTypes.REASON_CHANGE) braille.handler.handleUpdate(self) self.handlePossibleProfileSwitch()
def event_mouseMove(self,x,y): if not self._mouseEntered and config.conf['mouse']['reportObjectRoleOnMouseEnter']: speech.cancelSpeech() speech.speakObjectProperties(self,role=True) speechWasCanceled=True else: speechWasCanceled=False self._mouseEntered=True try: info=self.makeTextInfo(textInfos.Point(x,y)) except NotImplementedError: info=NVDAObjectTextInfo(self,textInfos.POSITION_FIRST) except LookupError: return if config.conf["reviewCursor"]["followMouse"]: api.setReviewPosition(info) info.expand(info.unit_mouseChunk) oldInfo=getattr(self,'_lastMouseTextInfoObject',None) self._lastMouseTextInfoObject=info if not oldInfo or info.__class__!=oldInfo.__class__ or info.compareEndPoints(oldInfo,"startToStart")!=0 or info.compareEndPoints(oldInfo,"endToEnd")!=0: text=info.text notBlank=False if text: for ch in text: if not ch.isspace() and ch!=u'\ufffc': notBlank=True if notBlank: if not speechWasCanceled: speech.cancelSpeech() speech.speakText(text)
def event_IA2AttributeChange(self): super().event_IA2AttributeChange() if self is api.getFocusObject(): # Report aria-current if it changed. speech.speakObjectProperties(self, current=True, reason=controlTypes.REASON_CHANGE)
def event_valueChange(self): focusParent = api.getFocusObject().parent if self == focusParent: speech.speakObjectProperties(self, value=True, reason=controlTypes.REASON_CHANGE) else: super(SensitiveSlider, self).event_valueChange()
def event_gainFocus(self,obj,nextHandler): if obj.windowClassName=="DirectUIHWND" and obj.role==controlTypes.ROLE_BUTTON and not obj.next: prev=obj.previous if prev and prev.role==controlTypes.ROLE_STATICTEXT: # This is for a popup message in the logon dialog. # Present the dialog again so the message will be reported. speech.speakObjectProperties(api.getForegroundObject(),name=True,role=True,description=True) braille.invalidateCachedFocusAncestors(1) nextHandler()
def announceSelectionChange(self): if self is api.getFocusObject(): speech.speakObjectProperties( self, states=True, cellCoordsText=True, reason=controlTypes.OutputReason.CHANGE) braille.handler.handleUpdate(self) vision.handler.handleUpdate(self, property="states")
def event_gainFocus(self,obj,nextHandler): # #6010: Windows 10 version uses a different window class name. if obj.windowClassName in ("DirectUIHWND", "LogonUI Logon Window") and obj.role==controlTypes.ROLE_BUTTON and not obj.next: prev=obj.previous if prev and prev.role in (controlTypes.ROLE_STATICTEXT, controlTypes.ROLE_PANE): # This is for a popup message in the logon dialog. # Present the dialog again so the message will be reported. speech.speakObjectProperties(api.getForegroundObject(),name=True,role=True,description=True) braille.invalidateCachedFocusAncestors(1) nextHandler()
def script_navigatorObject_moveToFlatReviewAtObjectPosition(self,gesture): obj=api.getNavigatorObject() pos=obj.flatReviewPosition if pos: api.setReviewPosition(pos) pos=pos.copy() obj=api.getNavigatorObject() speech.speakObjectProperties(obj,name=True,role=True) pos.expand(textInfos.UNIT_LINE) speech.speakTextInfo(pos) else: speech.speakMessage(_("No flat review for this object"))
def reportFocus(self): speech.speakObjectProperties(self,name=True,role=True) info=self.makeTextInfo(textInfos.POSITION_CARET) info.move(textInfos.UNIT_WORD,-1,endPoint="start") try: error=info._rangeObj.spellingErrors[1].text except: info.expand(textInfos.UNIT_STORY) speech.speakText(info.text) return speech.speakText(error) speech.speakSpelling(error)
def reportFocus(self): speech.speakObjectProperties(self, name=True, role=True)
def reportFocus(self): speech.speakObjectProperties(self,name=True,role=True)
def event_descriptionChange(self): if self is api.getFocusObject(): speech.speakObjectProperties(self, description=True, reason=speech.REASON_CHANGE) braille.handler.handleUpdate(self)
def event_descriptionChange(self): if self is api.getFocusObject(): speech.speakObjectProperties(self, description=True, reason=controlTypes.REASON_CHANGE) braille.handler.handleUpdate(self)
def event_typedCharacter(self,ch): super(Display,self).event_typedCharacter(ch) if ch in self.calcCommandChars: speech.speakObjectProperties(self,value=True)
def event_nameChange(self): if self is api.getFocusObject(): speech.speakObjectProperties(self, name=True, reason=controlTypes.REASON_CHANGE) braille.handler.handleUpdate(self)
def script_executeAndRead(self,gesture): gesture.send() speech.speakObjectProperties(self,value=True)
def event_valueChange(self): focusParent=api.getFocusObject().parent if self==focusParent: speech.speakObjectProperties(self,value=True,reason=controlTypes.REASON_CHANGE) else: super(SensitiveSlider,self).event_valueChange()
def script_executeAndRead(self, gesture): gesture.send() speech.speakObjectProperties(self, value=True)
def event_typedCharacter(self, ch): super(Display, self).event_typedCharacter(ch) if ch in self.calcCommandChars: speech.speakObjectProperties(self, value=True)
def reportFocus(self): errorText=self.errorText speech.speakObjectProperties(self,name=True,role=True) if errorText: speech.speakText(errorText) speech.speakSpelling(errorText)
def reportFocus(self): errorText = self.errorText speech.speakObjectProperties(self, name=True, role=True) if errorText: speech.speakText(errorText) speech.speakSpelling(errorText)