67
edits
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
# Finally, suggest how this new approach can be implemented within the current framework. | # Finally, suggest how this new approach can be implemented within the current framework. | ||
Before starting, one important | Before starting, one important note: | ||
Mozilla currently implements what's known as '''visual caret movement'''. That is, pressing the left (right) arrow key always moves the caret one place to the left (right), regardless of the directionality of the text the caret is on, or of the paragraph directionality. This approach is also the system approach on Mac OS X (and always was on MacOS), but is ''not'' the system behaviour on Windows (which uses '''logical caret movement''' instead). | Mozilla currently implements what's known as '''visual caret movement'''. That is, pressing the left (right) arrow key always moves the caret one place to the left (right), regardless of the directionality of the text the caret is on, or of the paragraph directionality. This approach is also the system approach on Mac OS X (and always was on MacOS), but is ''not'' the system behaviour on Windows (which uses '''logical caret movement''' instead). | ||
Line 27: | Line 27: | ||
Bidirectional text is stored logically, and (obviously) displayed visually. The caret, being a graphical element, corresponds to a visual location. The user can manipulate text and move the caret through a combination of logical operations (such as typing or deleting) and visual operations (such as using the arrow keys). Therefore, the problem of mapping between logical and visual positions in a way which will meet the expectations of the user is the central problem of bidirectional editing. | Bidirectional text is stored logically, and (obviously) displayed visually. The caret, being a graphical element, corresponds to a visual location. The user can manipulate text and move the caret through a combination of logical operations (such as typing or deleting) and visual operations (such as using the arrow keys). Therefore, the problem of mapping between logical and visual positions in a way which will meet the expectations of the user is the central problem of bidirectional editing. | ||
At this point, I would like to recommend reading [http://www-306.ibm.com/software/globalization/topics/bidiui/index.jsp Guidelines of a Logical User Interface (UI) for Editing Bidirectional Text] by Matitiahu Allouche of IBM. This document presents a method for dealing with the problems associated with BiDi editing. It contains some useful definitions, as well as a detailed description of a logical-to-visual mapping algorithm (in the "[http://www-306.ibm.com/software/globalization/topics/bidiui/conversion.jsp Conversion of cursor positions]" section). This document is the basis of the current Mozilla bidi editing implementation (which I'll describe below). I'd like to thank Simon Montagu for introducing me to this document. | |||
==The current state of affairs== | ==The current state of affairs== |
edits