Go to the documentation of this file.
30 void UIWidget::initText()
56 m_textMustRecache =
true;
59 void UIWidget::parseTextStyle(
const OTMLNodePtr& styleNode)
62 if(node->tag() ==
"text")
64 else if(node->tag() ==
"text-align")
66 else if(node->tag() ==
"text-offset")
68 else if(node->tag() ==
"text-wrap")
70 else if(node->tag() ==
"text-auto-resize")
72 else if(node->tag() ==
"text-horizontal-auto-resize")
74 else if(node->tag() ==
"text-vertical-auto-resize")
76 else if(node->tag() ==
"text-only-upper-case")
78 else if(node->tag() ==
"font")
88 if(screenCoords != m_textCachedScreenCoords || m_textMustRecache) {
92 m_textMustRecache =
false;
93 m_textCachedScreenCoords = coords;
95 m_textCoordsBuffer.
clear();
125 std::string oldText =
m_text;
131 if(!dontFireLuaCall) {
virtual void setColor(const Color &color)
TSize< T > toSize() const
void enableHardwareCaching(HardwareBuffer::UsagePattern usagePattern=HardwareBuffer::DynamicDraw)
TPoint< T > topLeft() const
std::string wrapText(const std::string &text, int maxWidth)
R callLuaField(const std::string &field, const T &... args)
void calculateDrawTextCoords(CoordsBuffer &coordsBuffer, const std::string &text, const Rect &screenCoords, Fw::AlignmentFlag align=Fw::AlignTopLeft)
const TexturePtr & getTexture()
void toupper(std::string &str)
BitmapFontPtr getFont(const std::string &fontName)
AlignmentFlag translateAlignment(std::string aligment)
BitmapFontPtr getDefaultFont()
TPoint< T > bottomRight() const
virtual void drawTextureCoords(CoordsBuffer &coordsBuffer, const TexturePtr &texture)=0