JUCE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Public Attributes | List of all members
AttributedString::Attribute Class Reference

An attribute that has been applied to a range of characters in an AttributedString. More...

Public Member Functions

 Attribute (Range< int > range, Colour colour)
 Creates an attribute that changes the colour for a range of characters.
 
 Attribute (Range< int > range, const Font &font)
 Creates an attribute that changes the font for a range of characters.
 
 Attribute (const Attribute &)
 
 ~Attribute ()
 
const FontgetFont () const noexcept
 If this attribute specifies a font, this returns it; otherwise it returns nullptr.
 
const ColourgetColour () const noexcept
 If this attribute specifies a colour, this returns it; otherwise it returns nullptr.
 

Public Attributes

const Range< int > range
 The range of characters to which this attribute will be applied.
 

Detailed Description

An attribute that has been applied to a range of characters in an AttributedString.

Constructor & Destructor Documentation

AttributedString::Attribute::Attribute ( Range< int >  range,
Colour  colour 
)

Creates an attribute that changes the colour for a range of characters.

See Also
AttributedString::setColour()
AttributedString::Attribute::Attribute ( Range< int >  range,
const Font font 
)

Creates an attribute that changes the font for a range of characters.

See Also
AttributedString::setFont()
AttributedString::Attribute::Attribute ( const Attribute )
AttributedString::Attribute::~Attribute ( )

Member Function Documentation

const Font* AttributedString::Attribute::getFont ( ) const
noexcept

If this attribute specifies a font, this returns it; otherwise it returns nullptr.

const Colour* AttributedString::Attribute::getColour ( ) const
noexcept

If this attribute specifies a colour, this returns it; otherwise it returns nullptr.

Member Data Documentation

const Range<int> AttributedString::Attribute::range

The range of characters to which this attribute will be applied.


The documentation for this class was generated from the following file: