wiki:TEXT_CHAINING_BEHAVIOUR_R0
Last modified 16 years ago Last modified on 06/29/09 15:16:06

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=TEXT_CHAINING_BEHAVIOUR_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

  • Text frames should allow chaining between them. That means that when text overflows from one text frame it goes to another if they are linked. Also there should be overflow indicator.
  • There should be opportunity for the user to have multiple flows from different text frames.
  • The user should be able to point which text frame is linked with current flow and witch is not.
  • There should be automatic linking when flow text frame is used. See more at TEXT_AUTO_CHAIN_BEHAVIOUR_R0
  • If there are many linked flow text frames user should have the opportunity to easily reorder/delete/unchain them.

Task requirements

  • Implement chaining prototype
    • Allow linking frames. One frame should allow connecting to it's beginning and end. This means that the beginning point can only be connected with other frame's end point.
    • When the place in unsufficient for the text content (this is related to text layout) :
      • there should be indicator
      • the rest of the content should be put in the next chained frame
    • If all of the chained frames cannot display the content, the content is cut and a notification - a halo in the bottom corner
  • Implement GUI for chained frames
    • Linking will be done through a combo box, that lists all available text frames for chaining
    • The combo box will be in the HUD that appears when the indicating halo is clicked
    • Also label indicating which is the previous frame from the chain, should be in the HUD
    • These requirement is optional due to time boxing :
      • In Sophie 1 halos for the start and end points are present. See Implementation idea
      • Frame connections should be visible by clicking a menu item or a checkbox in the book bottom panel

Task result

  • The result should be code

Implementation idea

  • When the text overflows use arrow at the bottom to indicate it. The arrow should appear only when the frame is selected and there are no other frames linked with linked with the first one.
  • When they are two or more linked text frames on one page. Indicate the linking with two arrows (one at the bottom of the first one and one at the top of second one, with the same color) or with line(drawn from the bottom of the first frame to the top of the second). This should only be visible when the frame is selected.
  • Linking and un-linking should be done by halo buttons. See more at TEXT_CHAIN_HALOS_R0

TEXT_FRAME_SCROLLBARS_R0
TEXT_AUTO_CHAIN_BEHAVIOUR_R0
TEXT_AUTO_CHAIN_MULTI_FLOW_R0
TEXT_CHAIN_HALOS_R0

How to demo

  • Run the application
  • Create a book
  • Place flow text frame inside the first page and populate text that overflows (http://www.lipsum.com/)
  • Create a second text frame and link it with the first one
  • Text should appear in the second one.
  • If selected the link indicators should appear.

Design

To have this implemented the model of text view must be extended. In our case this is HotTextFrameContent. It will be extended with tree properties:

  • next - this is the next frame view where the text that doesn't fit in the current frame will be flowed
  • prev - this is the previous frame in the chaining. Could be null if the current frame is the main one. Also this property should be read only.
  • main - this is the frame content whoes mainResource property will be used through the whole chain.

Also the text layout should be extended. It will support functionality to inform its clients if a text can be fitted in particular bounds and what part of a text can be shown in a frame. A new metohd will be added - canFitText (bounds : ImmRect)

New halo menu will be defined. It will be visible only if the current text frame can't show any more glyphs. This menu will contain one halo button which will open a HUD. In the HUD will be two controls:

  • label - indicating which is the previous frame view
  • combo box that the next frame view can be chosen

This halo buton will appear in the center of the botom border and will have an icon with arrow. The described functionality will use the new defined method in the text layout - if the text can't fit in the current frame the halo will appear.

source:branches/private/nenko/sophie2-platform/doc/uml-design-diagrams/hotText/textChaining_r0.png

Changesets :

Implementation

Implementation lacks :

  • previous content frame property
  • label - indicating which is the previous frame view

Also :

  • halo menu for chaining is always visible for text frames

Changeset :

[3624]

Changesets contain these fixes :

  • performance fix in HotTextLogic#PASTE_TEXT
  • HotTextFrameFactory is added for easy chainginh HotText implementation one day, NaiveHotText's visibility is changed to package visibility
  • BaseLayoutEngine throws more informative exception when no engine implementations are found
  • Hitting BACKSPACE when there's no text doesn't throw "Position Not in Text"

This is how chainig model looks now:

source:branches/private/nenko/nenko-text-chaining/doc/uml-design-diagrams/hotText/textChainingModel_r0.png

Merged to the trunk in [3811].

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)