Version 8 (modified by deyan, 16 years ago) (diff) |
---|
Analysis
Overview
Text select -
- Text selection is done by
- clicking and dragging on text
- double clicking on a word (selects the whole word)
- shift + left (right) arrow select text in desired position (one character). On up/down the text is selected to the same position on the previous/next line if there is text on it or to the end of the line otherwise
- Should highlight text (with inversed colors)
- Should apply style to selection only. If nothing is selected, should apply styles from cursor position to the next non-existing character.
- Text selection should be draggable
- Multi select - multi select is done by selecting another part of the text with pressed ctrl key.
- Cursor position is local for non-chained frames. Selection should be kept for each different frame (cursor position - too)
- Text select in Preview mode, Presentation mode and Reader app
- Cursor position is kept, but the carriage is not shown. This allows selecting text by shift+arrow, the behavior is the same as in the author app
- Note that arrows without shift should only scroll and not change the carriage (cursor position)
Task requirements
- Add select support for text frames
- Clicking on a position with mouse sets the carriage to this position. Position is saved.
- Double clicking on a word selects the whole word
- shift + left (right) arrow select text in desired position (one character).
- Should highlight text (with inversed colors)
- Should apply style to selection only. If nothing is selected, should apply styles from cursor position to the following non-existing character.
- Multi select - multi select is done by selecting another part of the text with pressed ctrl key. (optional - if we have time)
Task result
The result should be code
Implementation idea
Selection is local for a frame, so add two new properties in the text frame class - one for the select caret and one for selection list (which hot units are selected). Also add interaction logic for handling selection operations
Related
(Add links to related tasks that could be useful or helpful.)
How to demo
- Start Sophie2.0
- Add text frame
- Write some text - sophie2.0 text selection example
- Select the first word
- Select the third word while first word is selected
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)