19 #ifndef GNASH_TEXTFIELD_H
20 #define GNASH_TEXTFIELD_H
22 #include <boost/intrusive_ptr.hpp>
36 class DefineEditTextTag;
136 return _variable_name;
433 boost::intrusive_ptr<const Font>
setFont(
434 boost::intrusive_ptr<const Font> newfont);
510 return _restrictDefined;
540 return _bottomScroll;
544 void setTabStops(
const std::vector<int>& tabStops);
555 _maxScroll = maxScroll;
563 _maxHScroll = maxHScroll;
567 _bottomScroll = bottomScroll;
578 return m_text_bounding_box;
599 void updateHtmlText(
const std::wstring&
s);
607 virtual bool handleFocus();
610 virtual void killFocus();
616 void reset_bounding_box(boost::int32_t
x, boost::int32_t
y)
630 void newLine(boost::int32_t& x, boost::int32_t& y,
631 SWF::TextRecord& rec,
int& last_space_glyph,
632 LineStarts::value_type& last_line_start_record,
float div);
635 void handleChar(std::wstring::const_iterator& it,
636 const std::wstring::const_iterator&
e, boost::int32_t& x,
637 boost::int32_t& y, SWF::TextRecord& rec,
int& last_code,
638 int& last_space_glyph,
639 LineStarts::value_type& last_line_start_record);
651 bool parseHTML(std::wstring& tag,
652 std::map<std::string, std::string>& attributes,
653 std::wstring::const_iterator& it,
654 const std::wstring::const_iterator&
e,
655 bool& selfclosing)
const;
661 float align_line(
TextAlignment align,
int last_line_start_record,
float x);
680 void registerTextVariable();
682 typedef std::pair<as_object*, ObjectURI> VariableRef;
688 VariableRef parseTextVariableRef(
const std::string& variableName)
const;
694 void show_cursor(Renderer& renderer,
const SWFMatrix& mat);
699 boost::intrusive_ptr<const SWF::DefineEditTextTag> _tag;
711 std::wstring _htmlText;
714 SWFRect m_text_bounding_box;
716 typedef std::vector<SWF::TextRecord> TextRecords;
717 TextRecords _textRecords;
719 std::vector<size_t> _recordStarts;
721 TextRecords _displayRecords;
725 std::string _restrict;
726 std::set<wchar_t> _restrictedchars;
728 std::vector<int> _tabStops;
736 std::string _variable_name;
738 rgba _backgroundColor;
746 boost::intrusive_ptr<const Font> _font;
753 size_t _bottomScroll;
754 size_t _linesindisplay;
773 std::pair<size_t, size_t> _selection;
775 boost::int16_t _leading;
776 boost::uint16_t _indent;
780 boost::uint16_t _blockIndent;
782 boost::uint16_t _leftMargin;
784 boost::uint16_t _rightMargin;
786 boost::uint16_t _fontHeight;
794 bool _restrictDefined;
812 bool _text_variable_registered;
814 bool _drawBackground;