2 #include "oxygine-include.h" 5 #include "VisualStyle.h" 9 DECLARE_SMART(TextField, spTextField);
14 static void setDefaultFont(
ResFont*);
15 static ResFont* getDefaultFont();
17 enum {EVENT_REBUILD = sysEventID(
'T',
'F',
'r') };
31 const std::string&
getText()
const {
return _text; }
34 int getFontSize()
const;
35 int getLinesOffset()
const;
36 int getKerning()
const;
37 TextStyle::VerticalAlign getVAlign()
const;
38 TextStyle::HorizontalAlign getHAlign()
const;
39 bool getMultiline()
const;
40 bool getBreakLongWords()
const;
41 text::Symbol* getSymbolAt(
int pos)
const;
42 const Color& getOutlineColor()
const;
43 float getOutline()
const;
44 const Color& getStyleColor()
const;
45 float getWeight()
const;
46 float getBaselineScale()
const;
47 unsigned int getOptions()
const;
50 bool getBounds(
RectF&)
const override;
53 void setVAlign(TextStyle::VerticalAlign align);
55 void setHAlign(TextStyle::HorizontalAlign align);
56 void setAlign(TextStyle::VerticalAlign, TextStyle::HorizontalAlign);
86 void setText(
const std::string& str);
88 void setText(
const std::wstring& str);
98 bool isOn(
const Vector2& localPosition,
float localScale = 1.0f)
override;
106 std::string
dump(
const dumpOptions& options)
const override;
109 text::Node* getRootNode(
float scale);
113 flag_html = flag_last << 1,
114 flag_rebuild = flag_last << 2,
126 void sizeChanged(
const Vector2& size)
override;
130 EDITOR_INCLUDE(TextField);
Definition: Serialize.h:28
void setFontSize(int size)
void setOptions(unsigned int opt)
void setHAlign(TextStyle::HorizontalAlign align)
Definition: TextField.h:10
Definition: Property.h:73
void setMultiline(bool multiline)
void setVAlign(TextStyle::VerticalAlign align)
void setBreakLongWords(bool val)
void setText(const std::string &str)
Definition: RenderState.h:27
const std::string & getText() const
Definition: TextField.h:31
void setFont(const ResFont *rs)
void setOutlineColor(const Color &)
Definition: Serialize.h:21
void setHtmlText(const std::string &str)
void setLinesOffset(int offset)
void setKerning(int kerning)
–oxgl-end–!
Definition: Actor.h:14
Definition: VisualStyle.h:29
void setStyleColor(const Color &)
Definition: TextStyle.h:8
void setBaselineScale(float scale)
std::string dump(const dumpOptions &options) const override
bool isOn(const Vector2 &localPosition, float localScale=1.0f) override
const TextStyle & getStyle() const
Definition: TextField.h:27
const Rect & getTextRect(float localScale=1.0f) const