Module cursorManager :: Class CursorManager
[hide private]
[frames] | no frames]

Class CursorManager

source code

                   object --+        
                            |        
baseObject.AutoPropertyObject --+    
                                |    
      baseObject.ScriptableObject --+
                                    |
                                   CursorManager

A mix-in providing caret navigation and selection commands for the object's virtual text range. This is required where a text range is not linked to a physical control and thus does not provide commands to move the cursor, select and copy text, etc. This base cursor manager requires that the text range being used stores its own caret and selection information.

This is a mix-in class; i.e. it should be inherited alongside another baseObject.ScriptableObject. The class into which it is inherited must provide a makeTextInfo(position) method.

Nested Classes [hide private]

Inherited from baseObject.AutoPropertyObject: __metaclass__

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
initOverlayClass(self)
Performs automatic initialisation if this is being used as an overlay class.
source code
 
initCursorManager(self)
Initialise this cursor manager.
source code
 
_get_selection(self) source code
 
_set_selection(self, info) source code
 
_caretMovementScriptHelper(self, unit, direction=None, posConstant=textInfos.POSITION_SELECTION, posUnit=None, posUnitEnd=False, extraDetail=False, handleSymbols=False) source code
 
doFindTextDialog(self) source code
 
doFindText(self, text, reverse=False) source code
 
script_find(self, gesture) source code
 
script_findNext(self, gesture) source code
 
script_findPrevious(self, gesture) source code
 
script_moveByPage_back(self, gesture) source code
 
script_moveByPage_forward(self, gesture) source code
 
script_moveByCharacter_back(self, gesture) source code
 
script_moveByCharacter_forward(self, gesture) source code
 
script_moveByWord_back(self, gesture) source code
 
script_moveByWord_forward(self, gesture) source code
 
script_moveByLine_back(self, gesture) source code
 
script_moveByLine_forward(self, gesture) source code
 
script_moveByParagraph_back(self, gesture) source code
 
script_moveByParagraph_forward(self, gesture) source code
 
script_startOfLine(self, gesture) source code
 
script_endOfLine(self, gesture) source code
 
script_topOfDocument(self, gesture) source code
 
script_bottomOfDocument(self, gesture) source code
 
_selectionMovementScriptHelper(self, unit=None, direction=None, toPosition=None) source code
 
script_selectCharacter_forward(self, gesture) source code
 
script_selectCharacter_back(self, gesture) source code
 
script_selectWord_forward(self, gesture) source code
 
script_selectWord_back(self, gesture) source code
 
script_selectLine_forward(self, gesture) source code
 
script_selectLine_back(self, gesture) source code
 
script_selectPage_forward(self, gesture) source code
 
script_selectPage_back(self, gesture) source code
 
script_selectParagraph_forward(self, gesture) source code
 
script_selectParagraph_back(self, gesture) source code
 
script_selectToBeginningOfLine(self, gesture) source code
 
script_selectToEndOfLine(self, gesture) source code
 
script_selectToTopOfDocument(self, gesture) source code
 
script_selectToBottomOfDocument(self, gesture) source code
 
script_selectAll(self, gesture) source code
 
script_copyToClipboard(self, gesture) source code

Inherited from baseObject.ScriptableObject: bindGesture, bindGestures, clearGestureBindings, getScript

Inherited from baseObject.AutoPropertyObject: invalidateCache

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from baseObject.AutoPropertyObject: invalidateCaches

Class Variables [hide private]
  _lastFindText = ""
  __gestures = {"kb:pageUp": "moveByPage_back", "kb:pageDown": "...

Inherited from baseObject.AutoPropertyObject: cachePropertiesByDefault

Instance Variables [hide private]
textInfos.TextInfo selection
The current caret/selection range.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

initCursorManager(self)

source code 

Initialise this cursor manager. This must be called before the cursor manager functionality can be used. It is normally called by __init__ or initOverlayClass.


Class Variable Details [hide private]

__gestures

Value:
{"kb:pageUp": "moveByPage_back", "kb:pageDown": "moveByPage_forward", \
"kb:upArrow": "moveByLine_back", "kb:downArrow": "moveByLine_forward",\
 "kb:leftArrow": "moveByCharacter_back", "kb:rightArrow": "moveByChara\
cter_forward", "kb:control+leftArrow": "moveByWord_back", "kb:control+\
rightArrow": "moveByWord_forward", "kb:control+upArrow": "moveByParagr\
aph_back", "kb:control+downArrow": "moveByParagraph_forward", "kb:home\
": "startOfLine", "kb:end": "endOfLine", "kb:control+home": "topOfDocu\
ment", "kb:control+end": "bottomOfDocument", "kb:shift+rightArrow": "s\
...