Changes between Version 6 and Version 7 of GROUP_BASE_MODEL_TEXT_R0


Ignore:
Timestamp:
03/19/09 11:47:36 (16 years ago)
Author:
nenko
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GROUP_BASE_MODEL_TEXT_R0

    v6 v7  
    7070 
    7171= Design = 
    72 ^(Describe your design here.)^ 
     72The text is a sequence of symbols. In our case this sequence is a list and it consists of symbol units. Every unit has a symbol id which is a integer.  
     73 
     74Every unit knows the position before it and the position after it. This is important for the purpose of character and paragraph formating and style definitions. Positions denote place between the units, that is, where the user can go with the cursor. Thus, if the contained text is "Hello!\n", The following actual positions are present (denoted with '|'): 
     75 
     76| H | e | l | l | o | ! | \n | 
     77 
     78However, for each actual position, there are at least two logical positions. For example, the position between 'H' and 'e', may be referred as "after H" or "before e". But, if we insert a character between them, they wont point to the same character any more. 
     79 
     80Also every symbol unit can have some styling – font family, size, bold, italic, underline, strike-through, color, etc. And this styling can be defined for a single symbol or for a sequence. For this purpose every symbol unit defines a symbol style before and after it. This way defining styles is just proper nesting of style definitions for symbol units. Also if a new symbol is inserted the style of the previous one won't be automatically applied to it because it will be a closing style definition. 
     81 
     82For easy moving around the text a Navigator is defined. With it you can move through the text and take the symbol units before or after a position. 
     83 
     84For easy applying styles for the text a Styler is defined. With it you can get and set style definition to a range of symbol units. 
     85 
     86Style definition for the text is a list of style values. Every style value has an attribute (something like a key in the sequence) and a value. The purpose of the attribute is to store some meta information like default value, etc. 
     87 
    7388 
    7489= Implementation =