| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/text/deprecated/textfield.h>

Public Member Functions | |
| TextField (double part=1.0, double lineSpace=0.0) | |
| See comments on the set/get-methods for part. | |
| void | appendLine (Text *text) |
| Appends a line to the displayed text. | |
| bool | deleteLine (int index) |
| Deletes a line by its position beginning with 0 for the first line. | |
| Text * | getLine (int index) const |
| Returns a line by its position (see comment on deleteLine). | |
| void | setBegin (double begin) |
| Changes the starting line of the text. | |
| double | getBegin () const |
| Returns the starting line of the text (see comment on setBegin). | |
| void | setPart (double part) |
| Changes the shown part of the text (see comment on setBegin). | |
| double | getPart () const |
| Changes the shown part of the text (see comment on setBegin). | |
| void | reset () |
| Resets begin_ so that the upper right corner of the whole text is at the origin. | |
| void | setLineSpace (double lineSpace) |
| Sets the line space. | |
| double | getLineSpace () const |
| Returns the line space. | |
| virtual void | evaluate (Engine *engine) |
| Draws the text lines (see comment on setBegin). | |
| virtual Bounds | boundingBox (Engine *) const |
| Returns the bounding box of the shown text lines. | |
| Bounds | maxBoundingBox () const |
| Returns biggest possible bounding box with the current part settings and textlines. | |
| virtual void | modified () |
| Overwritten so that it sets the update bounding box flag. | |
| VRS::TextField::TextField | ( | double | part = 1.0, |
|
| double | lineSpace = 0.0 | |||
| ) |
See comments on the set/get-methods for part.
| void VRS::TextField::appendLine | ( | Text * | text | ) |
Appends a line to the displayed text.
| bool VRS::TextField::deleteLine | ( | int | index | ) |
Deletes a line by its position beginning with 0 for the first line.
Returns false, if the index is to high (greater or equal than the number of lines contained) or to low.
| Text* VRS::TextField::getLine | ( | int | index | ) | const |
Returns a line by its position (see comment on deleteLine).
Returns 0, if the index is invalid (<0 or greater or equal than the number of lines contained.
| void VRS::TextField::setBegin | ( | double | begin | ) |
Changes the starting line of the text.
Begin is from the intervall [-1,1] an determines, from wich line on the text ist shown. Imagine the text lines as continous flow mapped to values from [0,1]. Then the intervall [begin, begin+f(part)] is always shown and the lower left corner of this shown part is always at the origin (as long as the text's alignments are set to LEFT and BOTTOM). ( f(part) calculates the size of the displayed area relative to the size of the textlines, see comment on setPart) As the text lines can only be displayed line wise, the algorithm shows _all_ _neccessary_ lines, this means, if there are 3 line in the node, beginning is set to 0.5 and part is set to 0.33, the lines 2 and 3 are shown and the middle of the left edge of line 3 appears at the origin. So by smoothly incrementing begin while leaving part as it is and hinding the popping lines, e.g. by other shapes or clipping planes, you can create a sliding text.
| double VRS::TextField::getBegin | ( | ) | const |
Returns the starting line of the text (see comment on setBegin).
| void VRS::TextField::setPart | ( | double | part | ) |
Changes the shown part of the text (see comment on setBegin).
Part defines in absolute coordinates how big the displayes area is. If part is set to 0.5 for example, the y-extension of the area is 0.5 and as much textlines are displayed as neccessary to fill that area.
| double VRS::TextField::getPart | ( | ) | const |
Changes the shown part of the text (see comment on setBegin).
| void VRS::TextField::reset | ( | ) |
Resets begin_ so that the upper right corner of the whole text is at the origin.
| void VRS::TextField::setLineSpace | ( | double | lineSpace | ) |
Sets the line space.
The line space is added to the y-extension of the bounding box when calculating the advance from one line to the next.
| double VRS::TextField::getLineSpace | ( | ) | const |
Returns the line space.
| virtual void VRS::TextField::evaluate | ( | Engine * | engine | ) | [virtual] |
| Bounds VRS::TextField::maxBoundingBox | ( | ) | const |
Returns biggest possible bounding box with the current part settings and textlines.
Asking the shape for the current bounding box is almost useless to determine aproximately the size of the shape, when begin is set to -1.0 for example. Even worth, it is almost impossible to figure out, how long the longest line is. So this method calculates a bounding box that will contain every textline, independant of the current begin_ setting.
| virtual void VRS::TextField::modified | ( | ) | [virtual] |