|
LMMS
|
#include <juce_AttributedString.h>
Classes | |
| class | Attribute |
Public Types | |
| enum | WordWrap { none , byWord , byChar } |
| enum | ReadingDirection { natural , leftToRight , rightToLeft } |
Private Attributes | |
| String | text |
| float | lineSpacing = 0.0f |
| Justification | justification = Justification::left |
| WordWrap | wordWrap = AttributedString::byWord |
| ReadingDirection | readingDirection = AttributedString::natural |
| Array< Attribute > | attributes |
A text string with a set of colour/font settings that are associated with sub-ranges of the text.
An attributed string lets you create a string with varied fonts, colours, word-wrapping, layout, etc., and draw it using AttributedString::draw().
Invariants:
@tags{Graphics}
| enum juce::AttributedString::ReadingDirection |
| enum juce::AttributedString::WordWrap |
|
default |
Creates an empty attributed string.
Creates an attributed string with the given text.
|
default |
|
defaultnoexcept |
| void juce::AttributedString::append | ( | const AttributedString & | other | ) |
Appends another AttributedString to this one. Note that this will only append the text, fonts, and colours - it won't copy any other properties such as justification, line-spacing, etc from the other object.
Appends some text (with a default font and colour).
Appends some text, with a specified colour, and the default font.
Appends some text, with a specified font, and the default colour (black).
| void juce::AttributedString::append | ( | const String & | textToAppend, |
| const Font & | font, | ||
| Colour | colour ) |
Appends some text, with a specified font and colour.
| void juce::AttributedString::clear | ( | ) |
Resets the string, clearing all text and attributes. Note that this won't affect global settings like the justification type, word-wrap mode, etc.
Draws this string within the given area. The layout of the string within the rectangle is controlled by the justification value passed to setJustification().
Returns one of the string's attributes. The index provided must be less than getNumAttributes(), and >= 0.
|
inlinenoexcept |
Returns the justification that should be used for laying-out the text. This may include both vertical and horizontal flags.
|
inlinenoexcept |
Returns the extra line-spacing distance.
|
inlinenoexcept |
Returns the number of attributes that have been added to this string.
|
inlinenoexcept |
Returns the reading direction for the text.
Returns the complete text of this attributed string.
|
inlinenoexcept |
Returns the word-wrapping behaviour.
|
defaultnoexcept |
|
default |
Removes all existing colour attributes, and applies this colour to the whole string.
Adds a colour attribute for the specified range.
Removes all existing font attributes, and applies this font to the whole string.
Adds a font attribute for the specified range.
|
noexcept |
Sets the justification that should be used for laying-out the text. This may include both vertical and horizontal flags.
|
noexcept |
Sets an extra line-spacing distance.
|
noexcept |
Sets the reading direction that should be used for the text.
Replaces all the text. This will change the text, but won't affect any of the colour or font attributes that have been added.
Sets the word-wrapping behaviour.
|
private |
|
private |
|
private |
|
private |
|
private |