#include <Text.h>
Public Types | |
| enum | Alignment { LEFT, CENTER, RIGHT } |
| enum | { GROW = 0 } |
| typedef enum cinder::TextBox::Alignment | Alignment |
Public Member Functions | |
| TextBox () | |
| TextBox & | size (Vec2i sz) |
| TextBox & | size (int width, int height) |
| Vec2i | getSize () const |
| void | setSize (Vec2i sz) |
| TextBox & | text (const std::string &t) |
| const std::string & | getText () const |
| void | setText (const std::string &t) |
| void | appendText (const std::string &t) |
| TextBox & | font (const Font &f) |
| const Font & | getFont () const |
| void | setFont (const Font &f) |
| TextBox & | alignment (Alignment align) |
| Alignment | getAlignment () const |
| void | setAlignment (Alignment align) |
| TextBox & | color (ColorA color) |
| ColorA | getColor () const |
| void | setColor (ColorA color) |
| TextBox & | backgroundColor (ColorA bgColor) |
| ColorA | getBackgroundColor () const |
| void | setBackgroundColor (ColorA bgColor) |
| TextBox & | premultiplied (bool premult=true) |
| bool | getPremultiplied () const |
| void | setPremultiplied (bool premult) |
| TextBox & | ligate (bool ligateText=true) |
| bool | getLigate () const |
| void | setLigate (bool ligateText) |
| Vec2f | measure () const |
| std::vector< std::pair < uint16_t, Vec2f > > | measureGlyphs () const |
| Surface | render (Vec2f offset=Vec2f::zero()) |
Protected Member Functions | |
| void | createLines () const |
| std::vector< std::string > | calculateLineBreaks () const |
| void | calculate () const |
Protected Attributes | |
| Alignment | mAlign |
| Vec2i | mSize |
| std::string | mText |
| Font | mFont |
| ColorA | mColor |
| ColorA | mBackgroundColor |
| bool | mPremultiplied |
| bool | mLigate |
| bool | mInvalid |
| Vec2f | mCalculatedSize |
| std::vector< std::pair < std::shared_ptr< const __CTLine >, Vec2f > > | mLines |
| std::wstring | mWideText |
| typedef enum cinder::TextBox::Alignment cinder::TextBox::Alignment |
| TextBox& cinder::TextBox::size | ( | Vec2i | sz | ) |
| TextBox& cinder::TextBox::size | ( | int | width, |
| int | height | ||
| ) |
| Vec2i cinder::TextBox::getSize | ( | ) | const |
| void cinder::TextBox::setSize | ( | Vec2i | sz | ) |
| TextBox& cinder::TextBox::text | ( | const std::string & | t | ) |
| const std::string& cinder::TextBox::getText | ( | ) | const |
| void cinder::TextBox::setText | ( | const std::string & | t | ) |
| void cinder::TextBox::appendText | ( | const std::string & | t | ) |
| TextBox& cinder::TextBox::font | ( | const Font & | f | ) |
| const Font& cinder::TextBox::getFont | ( | ) | const |
| void cinder::TextBox::setFont | ( | const Font & | f | ) |
| TextBox& cinder::TextBox::alignment | ( | Alignment | align | ) |
| Alignment cinder::TextBox::getAlignment | ( | ) | const |
| void cinder::TextBox::setAlignment | ( | Alignment | align | ) |
| TextBox& cinder::TextBox::color | ( | ColorA | color | ) |
| ColorA cinder::TextBox::getColor | ( | ) | const |
| void cinder::TextBox::setColor | ( | ColorA | color | ) |
| TextBox& cinder::TextBox::backgroundColor | ( | ColorA | bgColor | ) |
| ColorA cinder::TextBox::getBackgroundColor | ( | ) | const |
| void cinder::TextBox::setBackgroundColor | ( | ColorA | bgColor | ) |
| TextBox& cinder::TextBox::premultiplied | ( | bool | premult = true | ) |
| bool cinder::TextBox::getPremultiplied | ( | ) | const |
| void cinder::TextBox::setPremultiplied | ( | bool | premult | ) |
| TextBox& cinder::TextBox::ligate | ( | bool | ligateText = true | ) |
| bool cinder::TextBox::getLigate | ( | ) | const |
| void cinder::TextBox::setLigate | ( | bool | ligateText | ) |
| Vec2f cinder::TextBox::measure | ( | ) | const |
| vector< pair< uint16_t, Vec2f > > cinder::TextBox::measureGlyphs | ( | ) | const |
Returns a vector of pairs of glyph indices and the position of their left baselines
| Surface cinder::TextBox::render | ( | Vec2f | offset = Vec2f::zero() | ) |
| void cinder::TextBox::createLines | ( | ) | const [protected] |
| vector< string > cinder::TextBox::calculateLineBreaks | ( | ) | const [protected] |
| void cinder::TextBox::calculate | ( | ) | const [protected] |
Alignment cinder::TextBox::mAlign [protected] |
Vec2i cinder::TextBox::mSize [protected] |
std::string cinder::TextBox::mText [protected] |
Font cinder::TextBox::mFont [protected] |
ColorA cinder::TextBox::mColor [protected] |
ColorA cinder::TextBox::mBackgroundColor [protected] |
bool cinder::TextBox::mPremultiplied [protected] |
bool cinder::TextBox::mLigate [protected] |
bool cinder::TextBox::mInvalid [mutable, protected] |
Vec2f cinder::TextBox::mCalculatedSize [mutable, protected] |
std::vector<std::pair<std::shared_ptr<const __CTLine>,Vec2f> > cinder::TextBox::mLines [mutable, protected] |
std::wstring cinder::TextBox::mWideText [mutable, protected] |