Prima::TextView 1.20 review

Download
by rbytes.net on

Prima::TextView is a rich text browser widget. Prima::TextView accepts blocks of formatted text, and provides basic functionality

License: Perl Artistic License
File size: 1389K
Developer: Dmitry Karasik, Anton Berezin and Vadim Belman
0 stars award from rbytes.net

Prima::TextView is a rich text browser widget.

Prima::TextView accepts blocks of formatted text, and provides basic functionality - scrolling and user selection. The text strings are stored as one large text chunk, available by the ::text and ::textRef properties. A block of a formatted text is an array with fixed-length header and the following instructions.

A special package tb:: provides the block constants and simple functions for text block access.

Capabilities

Prima::TextView is mainly the text block functions and helpers. It provides function for wrapping text block, calculating block dimensions, drawing and converting coordinates from (X,Y) to a block position. Prima::TextView is centered around the text functionality, and although any custom graphic of arbitrary complexity can be embedded in a text block, the internal coordinate system is used ( TEXT_OFFSET, BLOCK ), where TEXT_OFFSET is a text offset from the beginning of a block and BLOCK is an index of a block.

The functionality does not imply any text layout - this is up to the class descendants, they must provide they own layout policy. The only policy Prima::TextView requires is that blocks' BLK_TEXT_OFFSET field must be strictly increasing, and the block text chunks must not overlap. The text gaps are allowed though.

A text block basic drawing function includes change of color, backColor and font, and the painting of text strings. Other types of graphics can be achieved by supplying custom code.

Requirements:
Perl

Prima::TextView 1.20 search tags