25
25
moving the text caret.
28
__id__ = "$Id: braille.py 1995 2007-02-11 16:40:57Z wwalker $"
29
__version__ = "$Revision: 1995 $"
30
__date__ = "$Date: 2007-02-11 11:40:57 -0500 (Sun, 11 Feb 2007) $"
28
__id__ = "$Id: braille.py 2223 2007-03-28 17:06:38Z wwalker $"
29
__version__ = "$Revision: 2223 $"
30
__date__ = "$Date: 2007-03-28 13:06:38 -0400 (Wed, 28 Mar 2007) $"
31
31
__copyright__ = "Copyright (c) 2005-2006 Sun Microsystems Inc."
32
32
__license__ = "LGPL"
158
158
# ATM, the ones used in default.py are:
160
160
command_name = {}
162
# Translators: this is a command for a button on a refreshable braille
163
# display (an external hardware device used by people who are blind).
164
# When pressing the button, the display scrolls to the left.
161
166
command_name[CMD_FWINLT] = _("Line Left")
168
# Translators: this is a command for a button on a refreshable braille
169
# display (an external hardware device used by people who are blind).
170
# When pressing the button, the display scrolls to the right.
162
172
command_name[CMD_FWINRT] = _("Line Right")
174
# Translators: this is a command for a button on a refreshable braille
175
# display (an external hardware device used by people who are blind).
176
# When pressing the button, the display scrolls up.
163
178
command_name[CMD_LNUP] = _("Line Up")
180
# Translators: this is a command for a button on a refreshable braille
181
# display (an external hardware device used by people who are blind).
182
# When pressing the button, the display scrolls down.
164
184
command_name[CMD_LNDN] = _("Line Down")
186
# Translators: this is a command for a button on a refreshable braille
187
# display (an external hardware device used by people who are blind).
188
# When pressing the button, the display scrolls to the top left of the
165
191
command_name[CMD_TOP_LEFT] = _("Top Left")
193
# Translators: this is a command for a button on a refreshable braille
194
# display (an external hardware device used by people who are blind).
195
# When pressing the button, the display scrolls to the bottom right of
166
198
command_name[CMD_BOT_LEFT] = _("Bottom Right")
200
# Translators: this is a command for a button on a refreshable braille
201
# display (an external hardware device used by people who are blind).
202
# When pressing the button, the display scrolls to position containing
167
205
command_name[CMD_HOME] = _("Cursor Position")
169
207
# The size of the physical display (width, height). The coordinate system of
313
351
self.accessible = accessible
314
[string, self.caretOffset, self.lineOffset] = \
315
util.getTextLineAtCaret(self.accessible)
352
if orca_state.activeScript:
353
[string, self.caretOffset, self.lineOffset] = \
354
orca_state.activeScript.getTextLineAtCaret(self.accessible)
317
356
# Sometimes, gnome-terminal will give us very odd values when
318
357
# the user is editing using 'vi' and has positioned the caret
347
386
[string, caretOffset, lineOffset] = \
348
util.getTextLineAtCaret(self.accessible)
387
orca_state.activeScript.getTextLineAtCaret(self.accessible)
349
388
cursorOffset = caretOffset - lineOffset
351
390
cursorOffset += len(self.label.decode("UTF-8")) + 1
689
728
# The name before BrlTTY v3.8 revision 2810
691
730
writeStruct = brlapi.Write()
692
writeStruct.text = substring
693
731
writeStruct.regionBegin = 1
694
732
writeStruct.regionSize = len(substring.decode("UTF-8"))
695
733
while writeStruct.regionSize < _displaySize[0]:
696
writeStruct.text += " "
697
735
writeStruct.regionSize += 1
736
writeStruct.text = substring
698
737
writeStruct.cursor = cursorCell
699
738
writeStruct.charset = "UTF-8"