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);
   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);
   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);
   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,
   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,
   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;
   709     boost::intrusive_ptr<const SWF::DefineEditTextTag> _tag;
   721         std::wstring _htmlText;
   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;
   738         std::vector<int> _tabStops;
   739         LineStarts _line_starts;
   746         std::string _variable_name;
   748         rgba _backgroundColor;
   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;
 
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
The TextFormat_as Relay type stores text properties. 
Definition: TextFormat_as.h:44
size_t getMaxHScroll() const
Definition: TextField.h:543
TypeValue getType() const
Get type (input, dynamic or invalid) 
Definition: TextField.h:348
const std::string & getRestrict() const
Definition: TextField.h:523
DisplayObject is the base class for all DisplayList objects. 
Definition: DisplayObject.h:168
A Font resource. 
Definition: Font.h:89
Definition: klash_part.cpp:330
Invalid value. 
Definition: TextField.h:99
void setMaxHScroll(size_t maxHScroll)
Definition: TextField.h:572
size_t getMaxScroll() const
Definition: TextField.h:533
void multiline(bool b)
Set the current multiline setting of the TextField. 
Definition: TextField.h:301
Definition: SWFMatrix.h:53
bool isSelectable() const
Return true if the TextField text is selectable. 
Definition: TextField.h:407
Definition: TextField.h:67
std::vector< size_t > LineStarts
Definition: TextField.h:61
Definition: GnashKey.h:157
Anonymous namespace for callbacks, local functions, event handlers etc. 
Definition: dbus_ext.cpp:40
const std::string & getVariableName() const
Definition: TextField.h:144
std::int32_t maxChars() const
Get the current maxChars setting of the TextField. 
Definition: TextField.h:280
Definition: TextField.h:103
Definition: klash_part.cpp:329
The base class for all ActionScript objects. 
Definition: as_object.h:161
TextFormatDisplay getDisplay() const
Definition: TextField.h:503
const std::vector< int > & getTabStops() const
Definition: TextField.h:513
Base class for render handlers. 
Definition: Renderer.h:188
void setHtml(bool on)
Set html parameter. 
Definition: TextField.h:402
void setType(TypeValue val)
Set type (input or dynamic) 
Definition: TextField.h:345
size_t getCaretIndex() const
Definition: TextField.h:174
void maxChars(std::int32_t max)
Set the current maxChars setting of the TextField. 
Definition: TextField.h:288
code
Definition: GnashKey.h:43
Expand TextField, anchor the horizontal center. 
Definition: TextField.h:89
size_t getScroll() const
Definition: TextField.h:528
virtual SWFRect getBounds() const
Get bounding SWFRect of this TextField. 
Definition: TextField.h:216
Definition: klash_part.cpp:329
Definition: TextField.h:68
TextAlignment
Text alignment values. 
Definition: TextField.h:64
bool isRestrict() const
Definition: TextField.h:518
Store a TextRecord. 
Definition: TextRecord.h:47
bool doHtml() const
Return true if HTML markup in text should be rendered. 
Definition: TextField.h:394
void setScroll(size_t scroll)
Definition: TextField.h:560
TextFormatDisplay
Text format display values. 
Definition: TextField.h:73
const rgba & getTextColor() const
Return color of the text. 
Definition: TextField.h:261
std::int32_t x
Definition: BitmapData_as.cpp:434
bool password() const
Get the current password setting of the TextField. 
Definition: TextField.h:306
TypeValue
Possible type values. 
Definition: TextField.h:96
bool getUnderlined() const
Definition: TextField.h:498
bool getTextDefined() const
Return true if text is defined. 
Definition: TextField.h:172
virtual bool isSelectableTextField() const
Return true if the TextField text is selectable. 
Definition: TextField.h:423
size_t getBottomScroll() const
Definition: TextField.h:548
Definition: GnashKey.h:148
std::uint16_t getFontHeight() const
Definition: TextField.h:449
size_t getHScroll() const
Definition: TextField.h:538
bool doWordWrap() const
Return true if text should continue to next available line when hitting end of bounding box...
Definition: TextField.h:379
const SWFRect & getTextBoundingBox() const
Definition: TextField.h:587
void setSelectable(bool v)
Set 'selectable' parameter. 
Definition: TextField.h:416
void setHScroll(size_t hScroll)
Definition: TextField.h:568
The base class for interactive objects. 
Definition: InteractiveObject.h:44
std::uint16_t getIndent() const
Definition: TextField.h:470
SWF Tag DefineEditText (37). 
Definition: DefineEditTextTag.h:56
bool getBullet() const
Definition: TextField.h:508
std::uint16_t getRightMargin() const
Definition: TextField.h:463
std::int32_t y
Definition: BitmapData_as.cpp:435
Definition: GnashKey.h:154
Expand TextField, anchor the top-left side. 
Definition: TextField.h:86
Rectangle class, see swf defined rectangle record. 
Definition: SWFRect.h:44
std::string url
Definition: gnash.cpp:59
Definition: GnashKey.h:151
Do not automatically resize TextField as text grow/shrink. 
Definition: TextField.h:83
bool isReadOnly() const
Return true if this TextField is read-only. 
Definition: TextField.h:354
#define DSOTEXPORT
Definition: dsodefs.h:63
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
void setbottomScroll(size_t bottomScroll)
Definition: TextField.h:576
std::int16_t getLeading() const
Definition: TextField.h:491
A class to identify 'static' SWF events (system events). 
Definition: event_id.h:52
void setMaxScroll(size_t maxScroll)
Definition: TextField.h:564
Definition: GnashKey.h:165
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
bool multiline() const
Get the current multiline setting of the TextField. 
Definition: TextField.h:293
std::uint16_t getLeftMargin() const
Definition: TextField.h:456
AutoSize getAutoSize() const
Get autoSize value. 
Definition: TextField.h:325
void setHeight(DisplayObject &o, const as_value &val)
Definition: DisplayObject.cpp:365
Definition: GnashKey.h:331
TextAlignment getAlignment() const
Definition: TextField.h:484
bool mouseEnabled() const
Returns true for now, TextField is always "Mouse-Enabled". 
Definition: TextField.h:125
An instance of a DefineEditTextTag. 
Definition: TextField.h:56
std::uint16_t getBlockIndent() const
Definition: TextField.h:477
void password(bool b)
Set the current password setting of the TextField. 
Definition: TextField.h:314
const Font * getFont()
Definition: TextField.h:446
AutoSize
Possible autoSize values. 
Definition: TextField.h:80
A basic RGBA type. 
Definition: RGBA.h:35