Gumbo FxTextArea - Functional and Design Specification
Glossary
The Glossary in the Gumbo Text Primitives spec is useful for understanding this spec.
TextView - A new Gumbo text primitive, covered in the Gumbo Text Primitives spec, which is used in skins for Gumbo's FxTextInput and FxTextArea. It provides a scrollable but chromeless rectangle of editable rich text, without background, border, or scrollbars. TextView is based on FTE and TLF, so it takes advantage of the new text capabilities in Flash Player 10.
FxTextBase - A new Gumbo base class for skinnable components whose skins contain a TextView. It is also covered in the Gumbo Text Primitives spec.
Summary and Background
Gumbo's FxTextArea allows the user to enter and edit multiple lines of rich, scrollable text. It extends FxTextBase – for details, see the Gumbo Text Primitives spec – and uses a TextView primitive in its skin to display the editable text. FxTextBase and TextView do most of the work, so understanding them first is very important.
Its default skin uses an FxScroller to support horizontal and vertical scrolling.
The displayed content is "rich", meaning that it can use all of TLF's formatting capabilities: multiple divs, paragraphs, spans, inline graphics, etc., each with their own format. The formatting is "preserved" as you edit; if you click inside some red text and type, the inserted text will be red. However, FxTextArea does not include any UI for changing the formatting; it can only be changed programmatically.
Usage Scenarios
Gumbo's FxTextArea is used in the same way as Halo's TextArea: when you need multiple lines of editable text, such as for composing a haiku.
Detailed Description
The default skin for a Gumbo FxTextArea includes a TextView as a required [SkinPart]. A typical skin for TextArea will also draw a border and opaque background using <Rect> tags, and use an <FxScroller> to provide horizontal and vertical scrollbars.
Be sure to read about what FxTextInput inherits from FxTextBase. In addition...
Like TextView, FxTextArea determines its measuredWidth and measuredHeight using the widthInChars and heightInLines properties rather than measuring the text assigned to it, because the text frequently starts out empty.
FxTextArea facades TextView's content property so that it can support rich text. It also facades the getSelectionFormat(), setSelectionFormat(), and export() methods.
FxTextArea supports both horizontal and vertical scrolling. It facades FxScroller's horizontalScrollPolicy and verticalScrollPolicy properties. To programmatically scroll, access the textView.
API Description
Class FxTextArea
B Features
None.
Examples and Usage
Additional Implementation Details
None.
Prototype Work
None.
Compiler Work
The MXML compiler has already been modified to support "mixed content".
Web Tier Compiler Impact
None.
Flex Feature Dependencies
FxTextArea is dependent on TextView.
Backwards Compatibility
Syntax changes
None.
Behavior
None.
Warnings/Deprecation
None.
Accessibility
See the TextView spec.
Performance
See the TextView spec.
Globalization
See the TextView spec.
Localization
Compiler Features
None.
Framework Features
None.
Issues and Recommendations
None.
Documentation
None.
QA
TBD
|
 |