Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 167 Details for
Bug 4610
StyledText - DCR - Word wrap (1GABS6C)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Same as comment from 2001-12-11 17:56. May be easier to read and update.
Wordwrap.txt (text/plain), 3.06 KB, created by
Knut Radloff
on 2001-12-11 17:58:04 EST
(
hide
)
Description:
Same as comment from 2001-12-11 17:56. May be easier to read and update.
Filename:
MIME Type:
Creator:
Knut Radloff
Created:
2001-12-11 17:58:04 EST
Size:
3.06 KB
patch
obsolete
>Function >======== >Split lines after spaces (i.e., wrap words). If the last remaining word on the line does not fit entirely wrap character based, i.e. split the word. > > >General Concepts >================ >ContentWidthCache: >Can be used to wrap lines. Wherever ContentWidthCache.calculate is called the line wrapping needs to be recalculated. >Note: During resize all wrapped lines need to be reset and those that are visible need to be recalculated. This is different from the normal use where lines are only reset when they (or their styles) have changed. > >StyledTextContent: >Create a wrapper that works with visual line indices. > getOffsetAtLine(visualLine) > visualLine getLineAtOffset() > String getLine(visualLine) > numVisualLines getLineCount() > >Note that the original, wrapped, StyledTextContent still needs to be accessible for use by StyledText API (e.g., getLineCount). > > >Changes to StyledText >===================== >(ok) means that something is trivial or needs no change to support word wrap. API methods should eventually lead to one of the internal methods. > >Internal Methods >---------------- >computeSize: > Compute preferred size to show as many wrapped lines as possible. Maximum width == screen width followed by maximum height == screen height. > >handlePaint: > topIndex is visual, content wrapper returns visual lines for visual indices >handlePaint->drawLine->getLineBackgroundData: > Called with visual offset & line. same as getLineStyleData below >handlePaint->drawLine->drawLineSelectionBackground: > Change line break selection > >showBidiCaret: > Ok if content.getLineAtOffset/content.getOffsetAtLine return data based on visual (wrapped) lines. Will create a bidi object using the wrapped line. >showBidiCaret->showLocation: > Ok when called with visual line indices and assuming that the top index and bottom index represent visual lines. >showBidiCaret->setBidiCaretLocation: > Similar to showBidiCaret. > >showCaret->getXAtOffset->textWidth->getLineStyleData: > Called with visual line data, needs to send an event using logical line. I.e., needs to convert lineOffset, lineText back to logical. Also needs to (should, really - we may work with leaving bogus styles in the visual line) chop off styles that aren't on the requested visual line. >showCaret->setCaretLocation: > Ok, gets called with visual line > > >API Methods >----------- >No op: >getHorizontalIndex (return 0), getHorizontalPixel (return 0), setHorizontalIndex > >getLineAtOffset > Return logical line > >getLineBackground > Return logical line > >getLocationAtOffset > Change to use visual line. > >getOffsetAtLocation->getOffsetAtX->getLineStyleData: > See textWidth above. > >redraw (ok) > >redrawRange->internalRedrawRange (ok) > >replaceTextRange->handleTextChanging: > change redraw >replaceTextRange->handleTextChanged->claimBottomFreeSpace->setVerticalScrollOffset (ok) > >setText->handleTextSet->reset > ->calculateContentWidth: > calculate line wrap, interact with StyledTextContent wrapper > ->handlePaint (s.a.) > >showSelection->showOffset: > ->getXAtOffset->textWidth (s.a.) > ->showLocation (s.a.)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4610
: 167