Graphics::TextObject Class Reference
A block of text consisting of zero or more segments. More...
#include <Object.h>
Inheritance diagram for Graphics::TextObject:
Collaboration diagram for Graphics::TextObject:
Classes | |
class | ColorElement |
class | Element |
class | FontElement |
class | RunElement |
class | TextElement |
Public Member Functions | |
TextObject (const Rect &bounds) | |
void | write (MetaWriter &meta) const override |
Renderer * | createRenderer (const Location &location) const override |
Create a software renderer for this object. More... | |
template<typename T > | |
T * | addElement (T *elem) |
TextElement * | addText (const TextAsset &text) |
FontElement * | addFont (const Font &font, Scale scale, FontStyles style) |
FontElement * | addFont (const TypeFace &typeface, Scale scale, FontStyles style) |
ColorElement * | addColor (const Brush &fore, const Brush &back) |
RunElement * | addRun (Point pos, uint16_t width, uint16_t offset, uint8_t length) |
![]() | |
Kind | kind () const override |
![]() | |
bool | operator== (const Object &other) const |
virtual String | getTypeStr () const |
![]() | |
Object * | getNext () const |
bool | insertAfter (Object *object) |
Iterator | begin () const |
Iterator | end () const |
Iterator | cbegin () const |
Iterator | cend () const |
![]() | |
virtual | ~LinkedObject () |
virtual LinkedObject * | next () const |
bool | insertAfter (LinkedObject *object) |
bool | operator== (const LinkedObject &other) const |
bool | operator!= (const LinkedObject &other) const |
Public Attributes | |
Rect | bounds {} |
Element::OwnedList | elements |
Additional Inherited Members | |
![]() | |
enum class | Kind { XX } |
using | List = LinkedObjectListTemplate< Object > |
using | OwnedList = OwnedLinkedObjectListTemplate< Object > |
![]() | |
using | Iterator = IteratorTemplate< Object, Object *, Object & > |
using | ConstIterator = IteratorTemplate< const Object, const Object *, const Object & > |
Detailed Description
A block of text consisting of zero or more segments.
A segment is a straight run of text using a specific typeface and style.
Constructor & Destructor Documentation
◆ TextObject()
|
inline |
Member Function Documentation
◆ addColor()
|
inline |
◆ addElement()
template<typename T >
|
inline |
◆ addFont() [1/2]
|
inline |
◆ addFont() [2/2]
|
inline |
◆ addRun()
|
inline |
◆ addText()
|
inline |
◆ createRenderer()
Create a software renderer for this object.
- Parameters
-
location
- Return values
-
renderer Returned renderer object
Return nullptr if object cannot/should not be rendered
Implements Graphics::Object.
◆ write()
|
inlineoverridevirtual |
Implements Graphics::Object.
Member Data Documentation
◆ bounds
Rect Graphics::TextObject::bounds {} |
◆ elements
Element::OwnedList Graphics::TextObject::elements |
The documentation for this class was generated from the following file: