Module BrailleMonitor :: Class BrailleMonitor
[hide private]
[frames] | no frames]

Class BrailleMonitor

source code

AccessEngine.AEDevice.AEOutput.AEOutput --+    
                                          |    
                            Braille.Braille --+
                                              |
                                             BrailleMonitor

Nested Classes [hide private]
  STYLE
Settings for BrailleMonitor
Instance Methods [hide private]
 
init(self)
Creates and shows the monitor window and its components.
source code
 
postInit(self)
Called after the init method and after either AccessEngine.AEDevice.AEOutput.Base.AEOutput.loadStyles or AccessEngine.AEDevice.AEOutput.Base.AEOutput.createDistinctStyles.
source code
 
getDescription(self) source code
integer
sendGetMissingCellCount(self)
Returns: integer containing missing cell count
source code
tuple
sendGetEllipsisSizes(self, style)
Returns: tuple containing length of left and right ellipsis
source code
 
_createMonitorWindow(self)
Creates the window for the braille monitor by setting up as many labels as there are braille modules requested along with the same number of drawing areas so at some point the braille dot pattern per character may be shown underneath the labels.
source code
 
sendString(self, text, style)
Adds the given text and associated style to command list.
source code
 
sendTalk(self, style=None)
Iterates through list of commands and builds output string including user selected ellipsis and caret.
source code
 
sendStop(self, style=None)
Stops braille output immediately.
source code
 
print_hello(self, x, data)
Nur zum Testen der Untermenüs
source code
 
_clear(self)
Clears Braille monitor of all contents.
source code
 
_showText(self, textArray)
Set the given text as labels
source code
3-tuple of lists of string, AEPor, AccessEngine.AEOutput.AEOutput.Style
parseString(self, text, style, por, sem)
Overwrites the same method in Braille.Braille Is this the correct place to replace tab and eol characters?
source code
 
sendCaret(self, pos, style)
Sends the current caret position relative to the first cell (zero-offset) on the device.
source code
 
close(self)
Closes the braille monitor.
source code

Inherited from Braille.Braille: getCapabilities, getProxy, send, sendFilename, sendTruncate

Class Variables [hide private]
  USE_THREAD = False
  BRL_MODULE_CNT = 80
  LABEL_MARKUP = "<span size='large'><b><tt>%s</tt></b></span>"
  CARET_MARKUP = "<span foreground='blue' size='large'><u><b><tt...
  EOL = '\xc2\xb6'
  TAB = ' '
  BRLMON_VISIBLE = False
Method Details [hide private]

postInit(self)

source code 
Called after the init method and after either AccessEngine.AEDevice.AEOutput.Base.AEOutput.loadStyles or AccessEngine.AEDevice.AEOutput.Base.AEOutput.createDistinctStyles. missingcellcnt is the number of missing (broken) cells defined by the user and stored in the Setting string "CellMask".
Raises:
  • Error.InitError - When a communication or state problem exists for the specific device

Note: MW: This CellMask setting is part of Braille.BrailleStyle. Since BrailleMonitor inherits from Braille.Braille as does BrlAPIDevice, we are able to access the braille display's settings from here. If no braille display is connected, we do not want any missing cell mask set to our braille monitor. Further testing is needed for this case.

sendGetMissingCellCount(self)

source code 
Returns: integer
integer containing missing cell count
Raises:
  • NotImplementedError - When not overridden in a subclass
Overrides: Braille.Braille.sendGetMissingCellCount

sendGetEllipsisSizes(self, style)

source code 
Parameters:
Returns: tuple
tuple containing length of left and right ellipsis
Raises:
  • NotImplementedError - When not overridden in a subclass
Overrides: Braille.Braille.sendGetEllipsisSizes

_createMonitorWindow(self)

source code 
Creates the window for the braille monitor by setting up as many labels as there are braille modules requested along with the same number of drawing areas so at some point the braille dot pattern per character may be shown underneath the labels. Showing those braille dots should be made optional, so the user decides whether she wants to see them or not.

sendString(self, text, style)

source code 
Adds the given text and associated style to command list. Text will be output to the braille device in sendTalk.
Parameters:
  • text (string) - String to be output
  • style (integer) - Style with which this string should be output; None means no style change should be applied
Overrides: Braille.Braille.sendString

sendTalk(self, style=None)

source code 
Iterates through list of commands and builds output string including user selected ellipsis and caret.
Parameters:
Overrides: Braille.Braille.sendTalk

sendStop(self, style=None)

source code 
Stops braille output immediately.
Parameters:
Overrides: Braille.Braille.sendStop

_showText(self, textArray)

source code 
Set the given text as labels
Parameters:
  • textArray (array) - The text do be displayed

Note: MW: For now the caret on the BrailleMonitor will be styled according to some fixed mark-up. Once a settings dialog has been created for the BrailleMonitor, this needs to be changed.

parseString(self, text, style, por, sem)

source code 
Overwrites the same method in Braille.Braille Is this the correct place to replace tab and eol characters?
Parameters:
  • text (string) - Text to be parsed
  • style (AccessEngine.AEOutput.AEOutput.Style) - Style object defining how the text should be parsed
  • por (AEPor) - Point of regard for the first character in the text, or None if the text is not associated with a POR
  • sem (integer) - Semantic tag for the text
Returns: 3-tuple of lists of string, AEPor, AccessEngine.AEOutput.AEOutput.Style
Parsed words
Overrides: Braille.Braille.parseString

sendCaret(self, pos, style)

source code 
Sends the current caret position relative to the first cell (zero-offset) on the device. The style object is used by the device in deciding how the caret should be presented.
Parameters:
  • pos (string) - Zero-offset cell position of the caret, up to the device to change to one-offset if need be
  • style (AccessEngine.AEOutput.AEOutput.Style) - Style with which the caret should be indicated
Raises:
  • NotImplementedError - When not overridden in a subclass
Overrides: Braille.Braille.sendCaret

Note: braille monitor is zero-based. No offset here.


Class Variable Details [hide private]

CARET_MARKUP

Value:
"<span foreground='blue' size='large'><u><b><tt>%s</tt></b></u></span>\
"