Changes between Version 17 and Version 18 of TEXT_STABLE_SELECTION_R0


Ignore:
Timestamp:
06/15/09 11:00:21 (16 years ago)
Author:
boyan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TEXT_STABLE_SELECTION_R0

    v17 v18  
    44 
    55= Analysis = 
     6 
    67== Overview == 
     8 * Text selection is done by: 
     9  * clicking and dragging on text with the mouse (selects the dragged over text); 
     10  * double-clicking on a word (selects the whole word); 
     11  * navigating with the keyboard (Shift+arrows, Ctrl+Shift+arrows) selects the text in the desired position. The selection is from the previous position to the current carriage position (depends on cursor movement bahavior). 
     12 * It should highlight text (with inversed colors). 
     13 * It should apply style to selection only. If nothing is selected and carriage is in a word, it applies the style to the whole word. Otherwise, it should apply styles from the cursor position to the next non-existing character. 
     14 * Cursor position is local for non-chained frames. Selection should be kept for each different frame (cursor position - too). 
     15 * Selection is dropped when the carriage is moved (by the mouse or by using the arrows without shift). 
     16 * Text select in Preview mode, Presentation mode and Reader app should be the following: 
     17  * 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 
     18  * Using arrows without Shift should only scroll and not change the carriage (cursor position). 
    719 
    8 Text select -  
    9  * Text selection is done by  
    10   * navigate (arrows) select text in desired position. The selection is from the previous position to the current carriage position (depends on cursor movement bahavior) 
    11  * Should highlight text (with inversed colors) 
    12  * Should apply style to selection only. If nothing is selected and carriage is in a word, applies the style to the whole word. Otherwise, should apply styles from cursor position to the next non-existing character. 
    13  * Cursor position is local for non-chained frames. Selection should be kept for each different frame (cursor position - too) 
    14  * Selection is dropped when the carriage is moved (mouse, arrows without shift) 
    15  * Text select in Preview mode, Presentation mode and Reader app 
    16   * 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 
    17   * Note that arrows without shift should only scroll and not change the carriage (cursor position) 
    1820== Task requirements == 
    19  * Add select support for text frames 
    20  * Clicking on a position with mouse sets the carriage to this position. Position is saved. 
    21  * Double clicking on a word selects the whole word 
    22  * shift + left (right) arrow select text in desired position (one character). 
    23  * Should highlight text (with inversed colors) 
    24  * Should apply style to selection only. If nothing is selected, should apply styles from cursor position to the following non-existing character. 
     21 * Add select support for text frames. 
     22 * Clicking on a position with the mouse should set the carriage to this position. Position should be saved. 
     23 * Shift + left/right arrow should select the text in desired position (one character). 
     24 * Ctrl + Shift left/right arrow should select the text in desired position (one word). 
     25 * Selected text should be highlighted (with inversed colors). 
     26 
     27Note: Selection with the mouse or by double-clicking a word will not be supported at this iteration. 
    2528 
    2629== Task result == 
    27 The result should be code 
     30Source code 
    2831 
    2932== Implementation idea == 
    30 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 
     33Selection is local for a frame, so add a new propertiy in the text frame class, holding the selection caret position. Also add interaction logic for handling selection operations. 
    3134 
    3235== Related == 
    33 ^(Add links to related tasks that could be useful or helpful.)^ 
    3436 
    3537== How to demo == 
    3638 * Start Sophie2.0 
    37  * Add text frame 
    38  * Write some text - sophie2.0 text selection example 
    39  * Select the first word 
    40  * Select the third word while first word is selected 
     39 * Add a text frame, write some text and demonstrate the selection. 
    4140 
    4241= Design = 
     
    5352 * When deleting text markPos and caretPos should be positioned in the same place 
    5453 
    55 An initial test can be found here:[source:/branches/private/diana/sophie2-platform/modules/org.sophie2.author/src/test/java/org/sophie2/author/TextSelectionTest.java][3311] 
     54An initial test can be found here:[source:/branches/private/diana/sophie2-platform/modules/org.sophie2.author/src/test/java/org/sophie2/author/TextSelectionTest.java] [3311] 
    5655 
    5756= Implementation = 
    58 Done according to the design. 
    59 [3314] 
     57Done according to the design. Changeset: [3314] 
    6058 
    6159= Testing =