Go to the documentation of this file.
19 #ifndef GNASH_TEXTFIELD_H
20 #define GNASH_TEXTFIELD_H
22 #include <boost/intrusive_ptr.hpp>
36 class DefineEditTextTag;
47 ,std::char_traits<wchar_t>
48 ,std::allocator<wchar_t> >
136 virtual int getDefinitionVersion()
const;
139 void mouseEvent(
const event_id&
id);
146 return _variable_name;
155 void set_variable_name(
const std::string& newname);
163 void updateText(
const std::string&
s);
166 std::string get_text_value()
const;
169 std::string get_htmltext_value()
const;
189 void replaceSelection(
const std::string& replace);
198 void setSelection(
int start,
int end);
203 virtual void setWidth(
double width);
222 bool pointInShape(std::int32_t
x, std::int32_t
y)
const;
225 bool getDrawBackground()
const;
230 void setDrawBackground(
bool draw);
233 rgba getBackgroundColor()
const;
240 void setBackgroundColor(
const rgba& col);
243 bool getDrawBorder()
const;
248 void setDrawBorder(
bool draw);
251 rgba getBorderColor()
const;
258 void setBorderColor(
const rgba& col);
270 void setTextColor(
const rgba& col);
322 void setEmbedFonts(
bool use);
331 TextAlignment getTextAlignment();
338 void setAutoSize(AutoSize val);
363 static TypeValue parseTypeValue(
const std::string& val);
373 static const char* typeValueName(TypeValue val);
391 void setWordWrap(
bool on);
425 return isSelectable();
436 void removeTextField();
443 boost::intrusive_ptr<const Font> setFont(
444 boost::intrusive_ptr<const Font> newfont);
454 void setFontHeight(std::uint16_t
h);
461 void setLeftMargin(std::uint16_t
h);
468 void setRightMargin(std::uint16_t
h);
475 void setIndent(std::uint16_t
h);
482 void setBlockIndent(std::uint16_t
h);
489 void setAlignment(TextAlignment
h);
496 void setLeading(std::int16_t
h);
520 return _restrictDefined;
550 return _bottomScroll;
553 void setUnderlined(
bool v);
554 void setTabStops(
const std::vector<int>& tabStops);
555 void setBullet(
bool b);
556 void setURL(std::string
url);
557 void setTarget(std::string target);
558 void setRestrict(
const std::string& restrict);
559 void setDisplay(TextFormatDisplay display);
565 _maxScroll = maxScroll;
573 _maxHScroll = maxHScroll;
577 _bottomScroll = bottomScroll;
583 size_t cursorRecord();
588 return m_text_bounding_box;
595 void setTextValue(
const std::wstring& wstr);
607 void updateText(
const std::wstring&
s);
609 void updateHtmlText(
const std::wstring&
s);
617 virtual bool handleFocus();
620 virtual void killFocus();
626 void reset_bounding_box(std::int32_t
x, std::int32_t
y)
628 m_text_bounding_box.set_to_point(
x,
y);
640 void newLine(std::int32_t&
x, std::int32_t&
y,
641 SWF::TextRecord& rec,
int& last_space_glyph,
642 LineStarts::value_type& last_line_start_record,
float div);
645 void handleChar(std::wstring::const_iterator& it,
646 const std::wstring::const_iterator&
e, std::int32_t&
x,
647 std::int32_t&
y, SWF::TextRecord& rec,
int& last_code,
648 int& last_space_glyph,
649 LineStarts::value_type& last_line_start_record);
661 bool parseHTML(std::wstring& tag,
662 std::map<std::string, std::string>& attributes,
663 std::wstring::const_iterator& it,
664 const std::wstring::const_iterator&
e,
665 bool& selfclosing)
const;
671 float align_line(TextAlignment align,
int last_line_start_record,
float x);
690 void registerTextVariable();
692 typedef std::pair<as_object*, ObjectURI> VariableRef;
698 VariableRef parseTextVariableRef(
const std::string& variableName)
const;
704 void show_cursor(Renderer& renderer,
const SWFMatrix& mat);
709 boost::intrusive_ptr<const SWF::DefineEditTextTag> _tag;
721 std::wstring _htmlText;
724 SWFRect m_text_bounding_box;
726 typedef std::vector<SWF::TextRecord> TextRecords;
727 TextRecords _textRecords;
729 std::vector<size_t> _recordStarts;
731 TextRecords _displayRecords;
735 std::string _restrict;
736 std::set<wchar_t> _restrictedchars;
737 TextFormatDisplay _display;
738 std::vector<int> _tabStops;
739 LineStarts _line_starts;
746 std::string _variable_name;
748 rgba _backgroundColor;
754 TextAlignment _alignment;
756 boost::intrusive_ptr<const Font> _font;
763 size_t _bottomScroll;
764 size_t _linesindisplay;
783 std::pair<size_t, size_t> _selection;
785 std::int16_t _leading;
786 std::uint16_t _indent;
790 std::uint16_t _blockIndent;
792 std::uint16_t _leftMargin;
794 std::uint16_t _rightMargin;
796 std::uint16_t _fontHeight;
804 bool _restrictDefined;
822 bool _text_variable_registered;
824 bool _drawBackground;
@ AUTOSIZE_CENTER
Expand TextField, anchor the horizontal center.
Definition: TextField.h:89
const boost::optional< bool > & bullet() const
Whether the text should have a bullet.
Definition: TextFormat_as.h:65
bool mouseEnabled() const
Returns true for now, TextField is always "Mouse-Enabled".
Definition: TextField.h:125
void mouseEvent(const event_id &id)
This function is called as a user-input handler.
Definition: TextField.cpp:733
TypeValue getType() const
Get type (input, dynamic or invalid)
Definition: TextField.h:348
VGPath path
Definition: testr_gtk.cpp:84
std::string get_htmltext_value() const
Return value of our htmlText.
Definition: TextField.cpp:867
virtual int getDefinitionVersion() const
Return the version of the SWF this MovieClip was parsed from.
Definition: MovieClip.cpp:531
static void displayRecords(Renderer &renderer, const Transform &xform, const TextRecords &records, bool embedded=true)
Render the given glyph records.
Definition: TextRecord.cpp:163
void setWordWrap(bool on)
Set wordWrap parameter.
Definition: TextField.cpp:2282
@ DOWN
Definition: GnashKey.h:207
const std::string & defaultText() const
Definition: DefineEditTextTag.h:74
void setTextValue(const std::wstring &wstr)
Set our text to the given string.
Definition: TextField.cpp:825
void expand_to_point(std::int32_t x, std::int32_t y)
Expand this rectangle to enclose the given point.
Definition: SWFRect.h:171
@ BACKSPACE
Definition: GnashKey.h:53
TextAlignment getAlignment() const
Definition: TextField.h:484
void setSelection(int start, int end)
Set the current selection.
Definition: TextField.cpp:502
@ height
Definition: klash_part.cpp:329
~TextField()
Definition: TextField.cpp:210
void log_swferror(StringType msg, Args... args)
Definition: log.h:325
@ typeInput
Accept user input.
Definition: TextField.h:106
void setRightMargin(std::uint16_t h)
Definition: TextField.cpp:2384
The base class for all ActionScript objects.
Definition: as_object.h:162
void remove_display_object(const SWF::PlaceObject2Tag *tag, DisplayList &dlist)
Proxy of DisplayList::removeDisplayObject()
Definition: MovieClip.cpp:1368
Render a dynamic mask for a specified DisplayObject.
Definition: DisplayObject.h:969
void setType(TypeValue val)
Set type (input or dynamic)
Definition: TextField.h:345
TextFormatDisplay getDisplay() const
Definition: TextField.h:503
std::pair< std::int32_t, std::int32_t > mousePosition() const
Use this to retrieve the last state of the mouse.
Definition: movie_root.cpp:736
void setFont(boost::intrusive_ptr< const Font > f)
Definition: TextRecord.h:113
@ TEXTFORMAT_BLOCK
Definition: TextField.h:75
std::int32_t get_x_max() const
Get the x coordinate of the right-down corner.
Definition: SWFRect.h:122
void setbottomScroll(size_t bottomScroll)
Definition: TextField.h:576
const std::pair< size_t, size_t > & getSelection() const
Get a std::pair of size_t with start/end of selection.
Definition: TextField.h:182
geometry::Range2d< std::int32_t > getRange() const
Construct and return a Range2d object.
Definition: SWFRect.h:222
const boost::optional< std::uint32_t > & blockIndent() const
The block indent.
Definition: TextFormat_as.h:94
@ PROP_BROADCAST_MESSAGE
Definition: namedStrings.h:139
void log_debug(StringType msg, Args... args)
Definition: log.h:301
std::int32_t y
Definition: BitmapData_as.cpp:435
size_t getCaretIndex() const
Definition: TextField.h:174
void setMaxScroll(size_t maxScroll)
Definition: TextField.h:564
@ i
Definition: GnashKey.h:155
void setEmbedFonts(bool use)
Set whether this TextField should use embedded font glyphs, or use device font glyphs.
Definition: TextField.cpp:2272
#define LOG_ONCE(x)
Definition: log.h:49
A basic RGBA type.
Definition: RGBA.h:36
SWFMatrix & invert()
Invert this SWFMatrix and return the result.
Definition: SWFMatrix.cpp:288
std::string typeName(const T &inst)
Definition: utility.h:93
void setBackgroundColor(const rgba &col)
Set color of the background.
Definition: TextField.cpp:2250
@ ALIGN_RIGHT
Definition: TextField.h:67
void setDrawBackground(bool draw)
Specify whether to draw the background.
Definition: TextField.cpp:2235
InteractiveObject * topmostMouseEntity(std::int32_t x, std::int32_t y)
Returns a pointer to the topmost InteractiveObject at (x,y)
Definition: TextField.cpp:773
void removeTextField()
Remove this textfield from the stage.
Definition: TextField.cpp:215
void add_invalidated_bounds(InvalidatedRanges &ranges, bool force)
Add the DisplayObject's invalidated bounds to the given ranges list.
Definition: TextField.cpp:379
std::vector< size_t > LineStarts
Definition: TextField.h:61
std::int32_t pixelsToTwips(double a)
Definition: GnashNumeric.h:144
virtual void drawLine(const std::vector< point > &coords, const rgba &color, const SWFMatrix &mat)=0
Draw a line-strip directly, using a thin, solid line.
#define _(String)
Definition: log.h:44
std::string get_text_value() const
Return value of our text.
Definition: TextField.cpp:851
const std::string & name() const
Get name of this font.
Definition: Font.h:142
Provides information about timeline context.
Definition: as_environment.h:51
std::int32_t maxChars() const
Get the current maxChars setting of the TextField.
Definition: TextField.h:280
A class to identify 'static' SWF events (system events).
Definition: event_id.h:53
DSOEXPORT void expand_to_rect(const SWFRect &r)
Makes union of the given and the current SWFRect.
Definition: SWFRect.cpp:56
bool parsePath(const std::string &var_path_in, std::string &path, std::string &var)
Definition: as_environment.cpp:397
void setMaxHScroll(size_t maxHScroll)
Definition: TextField.h:572
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
@ DELETEKEY
Definition: GnashKey.h:177
const boost::optional< bool > & underlined() const
Return a Boolean value that indicates whether the text is underlined.
Definition: TextFormat_as.h:53
bool is_null() const
returns true if this is a NULL rectangle
Definition: SWFRect.h:75
boost::intrusive_ptr< Font > getFont() const
Definition: DefineEditTextTag.h:183
@ ALIGN_CENTER
Definition: TextField.h:68
EventCode id() const
Return the identifier for this event type.
Definition: event_id.h:141
std::int32_t get_y_max() const
Get the y coordinate of the right-down corner.
Definition: SWFRect.h:136
SWFMatrix getWorldMatrix(const DisplayObject &d, bool includeRoot=true)
Get concatenated SWFMatrix (all ancestor transforms and our SWFMatrix)
Definition: DisplayObject.h:1131
virtual as_environment & get_environment()
Return a reference to the variable scope of this DisplayObject.
Definition: DisplayObject.h:233
void setDisplay(TextFormatDisplay display)
Definition: TextField.cpp:2348
const Font * getFont()
Definition: TextField.h:446
void setBlockIndent(std::uint16_t h)
Definition: TextField.cpp:2375
Base class for render handlers.
Definition: Renderer.h:189
@ m
Definition: GnashKey.h:159
@ ASCII
Definition: GnashKey.h:333
InvalidatedRanges m_old_invalidated_ranges
Bounds of this DisplayObject instance before first invalidation since last call to clear_invalidated(...
Definition: DisplayObject.h:1029
@ s
Definition: GnashKey.h:165
rgba colorFromHexString(const std::string &color)
Create an RGBA value from a hex string (e.g. FF0000)
Definition: RGBA.cpp:41
boost::intrusive_ptr< const Font > setFont(boost::intrusive_ptr< const Font > newfont)
Set our font, return previously set one.
Definition: TextField.cpp:945
void set_to_rect(std::int32_t x1, std::int32_t y1, std::int32_t x2, std::int32_t y2)
Definition: SWFRect.h:161
@ start
Definition: klash_part.cpp:330
void getURL(const std::string &urlstr, const std::string &target, const std::string &data, MovieClip::VariablesMethod method)
Send a request to the hosting application (e.g. browser).
Definition: movie_root.cpp:2177
rgba getBorderColor() const
Return color of the border.
Definition: TextField.cpp:2214
TextFormatDisplay
Text format display values.
Definition: TextField.h:74
const Transform & transform() const
Definition: DisplayObject.h:292
@ AUTOSIZE_RIGHT
Expand TextField, anchor the top-right side.
Definition: TextField.h:92
The TextFormat_as Relay type stores text properties.
Definition: TextFormat_as.h:45
std::string DSOEXPORT getTarget() const
Return full path to this object, in dot notation.
Definition: DisplayObject.cpp:621
bool password() const
Get the current password setting of the TextField.
Definition: TextField.h:306
void setHtml(bool on)
Set html parameter.
Definition: TextField.h:402
A MovieClip is a container for DisplayObjects.
Definition: MovieClip.h:84
void setLeading(std::int16_t h)
Definition: TextField.cpp:2292
VM & getVM(const as_environment &env)
Definition: as_environment.h:222
@ typeDynamic
Definition: TextField.h:103
const boost::optional< rgba > & color() const
Return the color of text using this text format.
Definition: TextFormat_as.h:62
void log_error(StringType msg, Args... args)
Definition: log.h:283
const boost::optional< std::uint16_t > & size() const
Return a float that indicates the point size in twips.
Definition: TextFormat_as.h:111
const std::string & getURL() const
Definition: TextRecord.h:121
size_t getHScroll() const
Definition: TextField.h:538
@ PGUP
Definition: GnashKey.h:213
size_t cursorRecord()
Returns the number of the record that the cursor is in.
Definition: TextField.cpp:274
@ LEFT
Definition: GnashKey.h:209
@ k
Definition: GnashKey.h:157
The base class for interactive objects.
Definition: InteractiveObject.h:45
void set_variable_name(const std::string &newname)
Definition: TextField.cpp:2163
@ RIGHT
Definition: GnashKey.h:208
#define IF_VERBOSE_MALFORMED_SWF(x)
Definition: log.h:404
void setTextFormat(TextFormat_as &tf)
Definition: TextField.cpp:875
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:45
bool getDrawBackground() const
Return true if the 'background' should be drawn.
Definition: TextField.cpp:2229
bool pointInShape(std::int32_t x, std::int32_t y) const
Return true if the given point falls in this DisplayObject's shape.
Definition: TextField.cpp:2190
@ t
Definition: GnashKey.h:166
const VGfloat color[4]
Definition: testr_gtk.cpp:82
as_value callMethod(fn_call::Args &args, as_object *obj, const ObjectURI &uri)
Call a member function of this object in an AS-compatible way.
Definition: Global_as.h:219
void setDrawBorder(bool draw)
Specify whether to draw the border.
Definition: TextField.cpp:2205
size_t getMaxScroll() const
Definition: TextField.h:533
void addGlyph(const GlyphEntry &ge, Glyphs::size_type num=1)
Definition: TextRecord.h:103
static TypeValue parseTypeValue(const std::string &val)
Parse type string value.
Definition: TextField.cpp:2412
const std::string & getTarget() const
Definition: TextRecord.h:129
const boost::optional< std::uint16_t > & rightMargin() const
Indicates the right margin of the paragraph in twips.
Definition: TextFormat_as.h:106
@ ALIGN_LEFT
Definition: TextField.h:66
void setColor(const rgba &color)
Definition: TextRecord.h:180
Font * get_font(const std::string &name, bool bold, bool italic)
Definition: fontlib.cpp:50
std::uint16_t getRightMargin() const
Definition: TextField.h:463
void for_each(C &container, R(T::*pmf)(const A &), const A &arg)
Definition: Renderer_ogl.cpp:690
virtual SWFRect getBounds() const
Get bounding SWFRect of this TextField.
Definition: TextField.h:216
std::int32_t x
The x coordinate.
Definition: Point2d.h:43
int get_depth() const
Definition: DisplayObject.h:268
std::int32_t get_x_min() const
Get the x coordinate of the left-up corner.
Definition: SWFRect.h:115
bool isRestrict() const
Definition: TextField.h:518
TextAlignment
Text alignment values.
Definition: TextField.h:65
const unsigned char codeMap[KEYCOUNT][TYPES]
Definition: GnashKey.h:337
bool isSelectable() const
Return true if the TextField text is selectable.
Definition: TextField.h:407
@ INSERT
Definition: GnashKey.h:210
@ PGDN
Definition: GnashKey.h:214
@ END
Definition: GnashKey.h:212
void multiline(bool b)
Set the current multiline setting of the TextField.
Definition: TextField.h:301
const boost::optional< std::string > & target() const
Definition: TextFormat_as.h:88
#define IF_VERBOSE_ASCODING_ERRORS(x)
Definition: log.h:397
const boost::optional< std::vector< int > > & tabStops() const
Definition: TextFormat_as.h:74
void setLeftMargin(std::uint16_t h)
Definition: TextField.cpp:2393
code
Definition: GnashKey.h:44
void transform(geometry::Point2d &p) const
Transform a given point by our SWFMatrix.
Definition: SWFMatrix.cpp:99
@ ENTER
Definition: GnashKey.h:58
@ h
Definition: GnashKey.h:154
bool doHtml() const
Return true if HTML markup in text should be rendered.
Definition: TextField.h:394
A case-insensitive string equality operator.
Definition: StringPredicates.h:42
void setBorderColor(const rgba &col)
Set color of the border.
Definition: TextField.cpp:2220
void concatenate_translation(int _tx, int _ty)
Concatenate a translation onto the front of our SWFMatrix.
Definition: SWFMatrix.cpp:165
const boost::optional< std::uint16_t > & indent() const
Indentation from left margin to the first character in the paragraph.
Definition: TextFormat_as.h:79
#define PADDING_TWIPS
Definition: TextField.cpp:64
virtual int getDefinitionVersion() const
Return the version of the SWF this was parsed from.
Definition: TextField.cpp:1882
void updateText(const std::string &s)
Set our text to the given string by effect of an update of a.
Definition: TextField.cpp:790
std::int32_t height() const
Return height of this rectangle in TWIPS.
Definition: SWFRect.h:109
TextField(as_object *object, DisplayObject *parent, const SWF::DefineEditTextTag &def)
Constructs a TextField as specified in a DefineEditText tag.
Definition: TextField.cpp:76
@ p
Definition: GnashKey.h:162
rgba getBackgroundColor() const
Return color of the background.
Definition: TextField.cpp:2244
const std::string & getVariableName() const
Definition: TextField.h:144
DisplayObject * target() const
Definition: as_environment.h:61
@ q
Definition: GnashKey.h:163
@ UP
Definition: GnashKey.h:206
void setTarget(std::string target)
Definition: TextField.cpp:2339
geometry::Point2d point
Definition: Point2d.h:143
@ HOME
Definition: GnashKey.h:211
bool getUnderlined() const
Definition: TextField.h:498
@ _1
Definition: GnashKey.h:95
void setFontHeight(std::uint16_t h)
Definition: TextField.cpp:2402
size_t getBottomScroll() const
Definition: TextField.h:548
virtual void draw_poly(const std::vector< point > &corners, const rgba &fill, const rgba &outline, const SWFMatrix &mat, bool masked)=0
Draw a simple, solid filled polygon with a thin (~1 pixel) outline.
virtual void display(Renderer &renderer, const Transform &xform)
Draw the dynamic string.
Definition: TextField.cpp:289
const boost::optional< std::uint16_t > & leftMargin() const
Indicates the left margin of the paragraph, in points.
Definition: TextFormat_as.h:103
void setAlignment(TextAlignment h)
Definition: TextField.cpp:2357
void set_invalidated()
This function marks the DisplayObject as being modified in aspect and keeps track of current invalida...
Definition: DisplayObject.cpp:183
void setSelectable(bool v)
Set 'selectable' parameter.
Definition: TextField.h:416
void setBullet(bool b)
Definition: TextField.cpp:2310
@ typeInvalid
Invalid value.
Definition: TextField.h:99
@ PRESS
Definition: event_id.h:62
Definition: SWFMatrix.h:54
@ METHOD_NONE
Definition: MovieClip.h:420
2D Point class
Definition: Point2d.h:39
@ AUTOSIZE_NONE
Do not automatically resize TextField as text grow/shrink.
Definition: TextField.h:83
const SWFRect & getTextBoundingBox() const
Definition: TextField.h:587
bool getBullet() const
Definition: TextField.h:508
const std::vector< int > & getTabStops() const
Definition: TextField.h:513
bool getDrawBorder() const
Return true if this TextField should have its border visible.
Definition: TextField.cpp:2199
TextAlignment getTextAlignment()
Return text TextAlignment.
Definition: TextField.cpp:2450
void setTabStops(const std::vector< int > &tabStops)
Definition: TextField.cpp:2318
std::uint16_t getBlockIndent() const
Definition: TextField.h:477
TypeValue
Possible type values.
Definition: TextField.h:96
void log_aserror(StringType msg, Args... args)
Definition: log.h:331
void clear_invalidated()
Definition: DisplayObject.h:720
AutoSize
Possible autoSize values.
Definition: TextField.h:80
bool isReadOnly() const
Return true if this TextField is read-only.
Definition: TextField.h:354
DisplayObject * parent() const
Return the parent of this DisplayObject, or NULL if the DisplayObject has no parent.
Definition: DisplayObject.h:252
void setScroll(size_t scroll)
Definition: TextField.h:560
void add(const RangeType &range)
Add a Range to the set, merging when possible and appropriate.
Definition: snappingrange.h:250
const boost::optional< std::uint16_t > & leading() const
Definition: TextFormat_as.h:100
virtual void setHeight(double height)
Override of DisplayObject::setHeight.
Definition: TextField.cpp:2521
bool doWordWrap() const
Return true if text should continue to next available line when hitting end of bounding box.
Definition: TextField.h:379
void setIndent(std::uint16_t h)
Definition: TextField.cpp:2366
std::string url
Definition: gnash.cpp:59
int get_glyph_index(std::uint16_t code, bool embedded) const
Return the glyph index for a given character code.
Definition: Font.cpp:201
void password(bool b)
Set the current password setting of the TextField.
Definition: TextField.h:314
as_object * getObject(const DisplayObject *d)
Return the as_object associated with a DisplayObject if it exists.
Definition: DisplayObject.h:1160
@ f
Definition: GnashKey.h:152
std::string encodeCanonicalString(const std::wstring &wstr, int version)
Converts a std::wstring into canonical std::string.
Definition: utf8.cpp:67
void maxChars(std::int32_t max)
Set the current maxChars setting of the TextField.
Definition: TextField.h:288
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
virtual void setWidth(double width)
Override of DisplayObject::setWidth.
Definition: TextField.cpp:2511
@ AUTOSIZE_LEFT
Expand TextField, anchor the top-left side.
Definition: TextField.h:86
An instance of a DefineEditTextTag.
Definition: TextField.h:57
size_t getMaxHScroll() const
Definition: TextField.h:543
This class represents the 'Stage' and top-level movie.
Definition: movie_root.h:151
A Font resource.
Definition: Font.h:90
#define DSOTEXPORT
Definition: dsodefs.h:63
virtual bool set_member(const ObjectURI &uri, const as_value &val, bool ifFound=false)
Set a member value.
Definition: as_object.cpp:583
int getSWFVersion(const as_environment &env)
Definition: as_environment.cpp:657
void setHScroll(size_t hScroll)
Definition: TextField.h:568
bool point_test(std::int32_t x, std::int32_t y) const
Return true if the given point is inside this SWFRect.
Definition: SWFRect.h:143
@ c
Definition: GnashKey.h:149
size_t getScroll() const
Definition: TextField.h:528
SWF Tag DefineEditText (37).
Definition: DefineEditTextTag.h:57
std::uint16_t getIndent() const
Definition: TextField.h:470
boost::intrusive_ptr< Font > get_default_font()
Return a default device font.
Definition: fontlib.cpp:42
@ ALIGN_JUSTIFY
Definition: TextField.h:69
std::wstring decodeCanonicalString(const std::string &str, int version)
Converts a std::string with multibyte characters into a std::wstring.
Definition: utf8.cpp:39
std::int32_t width() const
Return width of this rectangle in TWIPS.
Definition: SWFRect.h:103
void keyInput(key::code k)
Handle user input from a key press.
Definition: TextField.cpp:527
const boost::optional< TextField::TextAlignment > & align() const
Paragraph alignment.
Definition: TextFormat_as.h:82
ObjectURI getURI(const VM &vm, const std::string &str, bool lowerCaseHint=false)
Definition: VM.h:290
std::int32_t y
The y coordinate.
Definition: Point2d.h:46
bool getEmbedFonts() const
Return true if this TextField should use embedded font glyphs, false if it should use device font gly...
Definition: TextField.h:275
const std::string & getRestrict() const
Definition: TextField.h:523
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:169
void setRestrict(const std::string &restrict)
Definition: TextField.cpp:394
std::uint16_t getLeftMargin() const
Definition: TextField.h:456
float get_advance(int glyph_index, bool embedded) const
Return the advance value for the given glyph index.
Definition: Font.cpp:221
void setTextColor(const rgba &col)
Set color of the text.
Definition: TextField.cpp:2259
virtual Movie * get_root() const
Return the relative root of this DisplayObject.
Definition: DisplayObject.h:531
std::int16_t getLeading() const
Definition: TextField.h:491
void setAutoSize(AutoSize val)
Set autoSize value.
Definition: TextField.cpp:2440
virtual bool isSelectableTextField() const
Return true if the TextField text is selectable.
Definition: TextField.h:423
@ width
Definition: klash_part.cpp:329
const SWFMatrix & getMatrix(const DisplayObject &o)
Get local transform SWFMatrix for this DisplayObject.
Definition: DisplayObject.h:1119
@ SWF
Definition: GnashKey.h:331
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
@ u
Definition: GnashKey.h:167
bool invalidated() const
Return whether this DisplayObject has been invalidated or not.
Definition: DisplayObject.h:657
Store a TextRecord.
Definition: TextRecord.h:48
const rgba & getTextColor() const
Return color of the text.
Definition: TextField.h:261
std::int32_t x
Definition: BitmapData_as.cpp:434
void setUnderlined(bool v)
Definition: TextField.cpp:2301
void replaceSelection(const std::string &replace)
Replace the current selection with the new text.
Definition: TextField.cpp:481
void setURL(std::string url)
Definition: TextField.cpp:2330
as_object * findObject(const as_environment &ctx, const std::string &path, const as_environment::ScopeStack *scope)
Find the object referenced by the given path.
Definition: as_environment.cpp:116
@ b
Definition: GnashKey.h:148
const Font * getFont() const
Definition: TextRecord.h:133
bool getTextDefined() const
Return true if text is defined.
Definition: TextField.h:172
@ e
Definition: GnashKey.h:151
movie_root & stage() const
Get the movie_root to which this DisplayObject belongs.
Definition: DisplayObject.h:981
void setHeight(DisplayObject &o, const as_value &val)
Definition: DisplayObject.cpp:365
static const char * typeValueName(TypeValue val)
Return type value as a string.
Definition: TextField.cpp:2423
TextField::TextFormatDisplay display() const
The display type (block or inline).
Definition: TextFormat_as.h:70
bool readOnly(const Property &prop)
is this a read-only member ?
Definition: Property.h:417
std::int32_t get_y_min() const
Get the y coordinate of the left-up corner.
Definition: SWFRect.h:129
AutoSize getAutoSize() const
Get autoSize value.
Definition: TextField.h:325
std::uint16_t getFontHeight() const
Definition: TextField.h:449
const boost::optional< std::string > & url() const
Definition: TextFormat_as.h:91
bool visible() const
Definition: DisplayObject.h:623
bool multiline() const
Get the current multiline setting of the TextField.
Definition: TextField.h:293