|
CeresEngine 0.2.0
A game development framework
|
A region where text is laid out. More...
#include <CeresEngine/Text/TextLayout.hpp>
Public Attributes | |
| Rect2 | rect |
| The size of the text container's bounding rectangle. | |
| Rect2 | usedRect |
| The size of actually used space on the text container. | |
| LineBreakMode | lineBreakMode = LineBreakMode::ByWordWrapping |
| The behavior of the last line inside the text container. | |
| UInt32 | maximumNumberOfLines = 0 |
| The maximum number of lines that can be stored in the text container. | |
| double | lineFragmentPadding = 5.0 |
| The amount by which text is inset within line fragment rectangles. | |
A region where text is laid out.
A TextLayoutManager uses TextContainer to determine where to break lines, lay out portions of text, and so on. An TextContainer object typically defines rectangular regions, but you can define exclusion paths inside the text container to create regions where text does not flow.
Instances of the TextContainer, LayoutManager, and TextStorage classes can be accessed from threads other than the main thread as long as the app guarantees access from only one thread at a time.
| LineBreakMode CeresEngine::TextContainer::lineBreakMode = LineBreakMode::ByWordWrapping |
The behavior of the last line inside the text container.
The LineBreakMode constants specify what happens when a line is too long for its container. For example, wrapping can occur on word boundaries (the default) or character boundaries, or the line can be clipped or truncated. The default value of this property is ByWordWrapping.
| double CeresEngine::TextContainer::lineFragmentPadding = 5.0 |
The amount by which text is inset within line fragment rectangles.
The padding appears at the beginning and end of the line fragment rectangles. The layout manager uses this value to determine the layout width. The default value of this property is 5.0.
Line fragment padding is not designed to express text margins. Instead, you should use insets on your text view, adjust the paragraph margin attributes, or change the position of the text view within its superview.
| UInt32 CeresEngine::TextContainer::maximumNumberOfLines = 0 |
The maximum number of lines that can be stored in the text container.
The layout manager uses the value of this property to determine the maximum number of lines associated with the text container. The default value of this property is 0, which indicates that there is no limit.
| Rect2 CeresEngine::TextContainer::rect |
The size of the text container's bounding rectangle.
| Rect2 CeresEngine::TextContainer::usedRect |
The size of actually used space on the text container.