1 /* libsswf_tag_edittext.c++ -- written by Alexis WILKE for Made to Order Software Corp. (c) 2002-2008 */
2 
3 /*
4 
5 Copyright (c) 2002-2008 Made to Order Software Corp.
6 
7 Permission is hereby granted, free of charge, to any
8 person obtaining a copy of this software and
9 associated documentation files (the "Software"), to
10 deal in the Software without restriction, including
11 without limitation the rights to use, copy, modify,
12 merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom
14 the Software is furnished to do so, subject to the
15 following conditions:
16 
17 The above copyright notice and this permission notice
18 shall be included in all copies or substantial
19 portions of the Software.
20 
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
22 ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
23 LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
24 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
25 EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
27 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 SOFTWARE.
31 
32 */
33 
34 /** \file
35  *
36  * \brief The implementation of the sswf::TagEditText class
37  *
38  * This file declares the body of the functions which are not
39  * inline. It is part of the SSWF library.
40  */
41 
42 #include	"sswf/libsswf.h"
43 
44 using namespace sswf;
45 
46 
47 
48 
49 
50 /////////////////////////////////////////// TagEditText
51 
52 
53 /** \class sswf::TagEditText
54  *
55  * \brief Defines a dynamic edit text box.
56  *
57  * This tag is used to create a text box. People can write
58  * text in that box unless it is marked as read-only. Using
59  * an action scripts it is also possible to modify the text
60  * defined in an edit text box.
61  *
62  * One important feature is the use of embedded fonts. In
63  * that case, you probably want to mark the edit text with
64  * a set of glyphs which need to be included (or "*" for
65  * all the glyphs of the font.)
66  *
67  * \sa sswf::TagFont
68  * \sa sswf::TagText
69  * \sa <a href="../SWFalexref.html#tag_defineedittext">SWF Alexis' Reference&mdash;DefineEditText</a>
70  * \sa <a href="../SWFalexref.html#swf_tag">SWF Alexis' Reference&mdash;swf_tag</a>
71  */
72 
73 
74 
75 /** \enum sswf::TagEditText::edit_text_alignment_t
76  *
77  * \brief Defines the different possible alignment.
78  *
79  * This enumaration defines the list of possible alignment
80  * in an edit text box.
81  */
82 
83 /** \var sswf::TagEditText::EDIT_TEXT_ALIGNMENT_LEFT
84  *
85  * \brief Defines the left alignment
86  *
87  * This value is used to have the text rendered on the left
88  * edge.
89  *
90  * This is the default value.
91  */
92 
93 /** \var sswf::TagEditText::EDIT_TEXT_ALIGNMENT_RIGHT
94  *
95  * \brief Defines the right alignment
96  *
97  * This value is used to have the text rendered on the
98  * right edge.
99  */
100 
101 /** \var sswf::TagEditText::EDIT_TEXT_ALIGNMENT_CENTER
102  *
103  * \brief Defines the centered alignment
104  *
105  * This value is used to have the text horizontally rendered
106  * in the center of the edit text box.
107  */
108 
109 /** \var sswf::TagEditText::EDIT_TEXT_ALIGNMENT_JUSTIFY
110  *
111  * \brief Defines the justified alignment
112  *
113  * This value is supposed to have to text aligned on the
114  * left and right edges adding some space where spaces are
115  * rendered so it looks like it fits exactly.
116  *
117  * This may work in the current version, but it has not
118  * been working in older versions (v4, v5).
119  */
120 
121 
122 
123 /** \brief Initializes the object.
124  *
125  * The constructor ensures that all the variables are set to
126  * their default.
127  *
128  * \param[in] parent The parent must be a TagHeader
129  */
TagEditText(TagBase * parent)130 TagEditText::TagEditText(TagBase *parent)
131 	: TagBaseID("edit", parent)
132 {
133 	//f_bounds = ...
134 	f_align = EDIT_TEXT_ALIGNMENT_LEFT;
135 	f_left_margin = 0;
136 	f_right_margin = 0;
137 	f_indent = 0;
138 	f_leading = 0;
139 	f_font = 0;
140 	f_font_height = 0;
141 	f_max_length = 0;
142 	f_text = 0;
143 	f_var_name = 0;
144 	f_used_glyphs = 0;
145 	f_used_strings = 0;
146 	//f_color = ...
147 	f_has_color = false;
148 	f_word_wrap = true;		// by default most people probably want word wrap (that's all editors default! right?)
149 	f_multiline = false;
150 	f_password  = false;
151 	f_readonly  = false;
152 	f_no_select = false;
153 	f_border    = true;		// that's the usual purpose of such an object!
154 	f_outline   = false;
155 }
156 
157 
158 /** \brief Returns the type of an edit text box.
159  *
160  * This function returns the type of an edit text box.
161  *
162  * An edit text box is a definition and a reference.
163  *
164  * \return SWF_TYPE_DEFINE and SWF_TYPE_REFERENCE
165  */
TypeFlags(void) const166 TagBase::swf_type_t TagEditText::TypeFlags(void) const
167 {
168 	return SWF_TYPE_DEFINE | SWF_TYPE_REFERENCE;
169 }
170 
171 
172 /** \brief Check that the edit text box can be saved and in which version.
173  *
174  * The function checks whether a font was defined for the
175  * edit text. If so, it marks all the glyphs in use according
176  * to those specified via the TagEditText::SetUsedGlyphs() and
177  * TagEditText::AddUsedString() function calls.
178  *
179  * Errors are generated if a required glyph does not exist in
180  * the corresponding font.
181  *
182  * \sa sswf::TagEditText::Save(Data& data)
183  * \sa sswf::TagEditText::SetUsedGlyphs(const char *used_glyphs)
184  * \sa sswf::TagEditText::AddUsedString(const char *string)
185  */
PreSave(void)186 ErrorManager::error_code_t TagEditText::PreSave(void)
187 {
188 	const sswf_ucs4_t		*s;
189 	char				wname[16];
190 	TagFont::font_info_t		info;
191 	TagFont				*font;
192 	size_t				l, sz;
193 	sswf_ucs4_t			*d, *str;
194 	ErrorManager::error_code_t	err_code;
195 
196 	PreSaveCSMTextSettings();
197 
198 	MinimumVersion(f_autosize ? 6 : 4);
199 
200 	if(f_font == 0 || !f_outline) {
201 		return ErrorManager::ERROR_CODE_NONE;
202 	}
203 
204 	font = const_cast<TagFont *>(f_font);
205 	font->SetUsedByEditText();
206 
207 	// if there are no glyphs, forget the following code
208 	if(!font->HasGlyph()) {
209 		return ErrorManager::ERROR_CODE_NONE;
210 	}
211 
212 	err_code = ErrorManager::ERROR_CODE_NONE;
213 
214 	// We can't be sure whether the "used strings" below also includes the
215 	// initialization text so we simply make sure all of the initialization
216 	// text glyphs are included too.
217 	if(f_text != 0) {
218 		// here we need the string in wide chars
219 		l = strlen(f_text);
220 		str = (sswf_ucs4_t *) MemAlloc(sizeof(sswf_ucs4_t) * (l + 1), "TagEditText::PreSave() -- temporary buffer to convert the text in wide characters");
221 
222 		sz = l * sizeof(sswf_ucs4_t);
223 		d = str;
224 		mbtowc(f_text, l, d, sz);
225 		*d = (sswf_ucs4_t) '\0';	// mbtowc() doesn't terminate the strings
226 
227 		d = str;
228 		while(*d != '\0') {
229 			info.f_glyph = *d;
230 			if(!font->FindGlyph(info, true)) {
231 				err_code = OnError(ErrorManager::ERROR_CODE_NO_SUCH_GLYPH, "TagEditText: the character %s does not exist in the font named \"%s\". (2)\n", wcname(info.f_glyph, wname), font->FontName());
232 			}
233 			d++;
234 		}
235 		MemFree(str);
236 	}
237 
238 	if(f_used_strings != 0) {
239 		s = f_used_strings;
240 		while(*s != '\0') {
241 			info.f_glyph = *s;
242 			if(font->FindGlyph(info, true)) {
243 				err_code = OnError(ErrorManager::ERROR_CODE_NO_SUCH_GLYPH, "TagEditText: the character %s does not exist in the font named \"%s\". (3)\n", wcname(info.f_glyph, wname), font->FontName());
244 			}
245 			s++;
246 		}
247 		// if there is a used string we don't want to call
248 		// the SetUsedGlyphs() with an empty 'used glyphs'
249 		// string (which would defaults to "*")
250 		if(f_used_glyphs == 0) {
251 			return err_code;
252 		}
253 		if(*f_used_glyphs == '\0') {
254 			return err_code;
255 		}
256 	}
257 
258 	return font->SetUsedGlyphs(f_used_glyphs, true);
259 }
260 
261 
262 
263 
264 
265 /** \brief Save an edit text box in a Data buffer.
266  *
267  * This function saves an edit text box in the specified
268  * Data buffer.
269  *
270  * \param[in] data The Data buffer where the edit text box is saved
271  *
272  * \return An error or ErrorManager::ERROR_CODE_NONE
273  */
Save(Data & data)274 ErrorManager::error_code_t TagEditText::Save(Data& data)
275 {
276 	Data				sub_data;
277 	bool				has_layout;
278 	ErrorManager::error_code_t	ec;
279 
280 // save this object ID
281 	SaveID(sub_data);
282 
283 // save rectangle where text appears
284 	f_bounds.Save(sub_data);
285 
286 // save all the flags
287 	sub_data.Align();
288 	sub_data.WriteBits(f_text != 0, 1);
289 	sub_data.WriteBits(f_word_wrap, 1);
290 	sub_data.WriteBits(f_multiline, 1);
291 	sub_data.WriteBits(f_password, 1);
292 	sub_data.WriteBits(f_readonly, 1);
293 	sub_data.WriteBits(f_has_color, 1);
294 	sub_data.WriteBits(f_max_length > 0, 1);
295 	sub_data.WriteBits(f_font != 0, 1);
296 	sub_data.WriteBits(0, 1);		// reserved
297 	sub_data.WriteBits(f_autosize, 1);	// auto-size
298 	has_layout =	   f_align != 0
299 			|| f_left_margin != 0
300 			|| f_right_margin != 0
301 			|| f_indent != 0
302 			|| f_leading != 0;
303 	sub_data.WriteBits(has_layout, 1);
304 	sub_data.WriteBits(f_no_select, 1);
305 	sub_data.WriteBits(f_border, 1);
306 	sub_data.WriteBits(0, 1);		// reserved
307 	sub_data.WriteBits(f_html, 1);
308 
309 	sub_data.WriteBits(f_outline, 1);
310 	//sub_data.WriteBits(0, 1);		// considered as reserved - setting to 1 makes the plugins crash!
311 
312 	if(f_font != 0) {
313 		f_font->SaveID(sub_data);
314 		sub_data.PutShort(f_font_height);
315 	}
316 
317 	if(f_has_color) {
318 		f_color.Save(sub_data, true);
319 	}
320 
321 	if(f_max_length > 0) {
322 		sub_data.PutShort((short) f_max_length);
323 	}
324 
325 	if(has_layout) {
326 		sub_data.PutByte((char) f_align);
327 		sub_data.PutShort((short) f_left_margin);
328 		sub_data.PutShort((short) f_right_margin);
329 		sub_data.PutShort((short) f_indent);
330 		sub_data.PutShort((short) f_leading);
331 	}
332 
333 	ec = SaveString(sub_data, f_var_name);
334 
335 	if(f_text != 0) {
336 		ec = ErrorManager::KeepFirst(ec, SaveString(sub_data, f_text));
337 	}
338 
339 // put the tag and size in front of all of that
340 	SaveTag(data, SWF_TAG_TEXT_FIELD, sub_data.ByteSize());
341 	data.Append(sub_data);
342 
343 // if defined, also save the TagCSMTextSettings
344 	ec = ErrorManager::KeepFirst(ec, SaveCSMTextSettings(data));
345 
346 	return ec;
347 }
348 
349 
350 /** \brief Set the text to be rendered on screen.
351  *
352  * This function sets the text that will be rendered on the screen.
353  *
354  * The glyphs of the default text are automatically marked as
355  * required for this animation.
356  *
357  * \sa sswf::TagEditText::AddUsedString(const char *string)
358  */
SetText(const char * text)359 void TagEditText::SetText(const char *text)
360 {
361 	MemFree(f_text);
362 	f_text = StrDup(text);
363 }
364 
365 
366 /** \brief Set the name of the variable.
367  *
368  * This function is used to mark this edit text box with a
369  * name. This name can later be used in action scripts to
370  * read and set the text of the edit text box.
371  *
372  * \param[in] name The name of the variable
373  */
SetVariableName(const char * name)374 void TagEditText::SetVariableName(const char *name)
375 {
376 	MemFree(f_var_name);
377 	f_var_name = StrDup(name);
378 }
379 
380 
381 /** \brief Mark a set of glyphs as in use.
382  *
383  * This function can be used to mark a set of glyphs as in use.
384  *
385  * The special string "*" or a NULL pointer will request the
386  * function to mark all the glyphs as being in use.
387  *
388  * The special character - (dash/minus) is used to define a range
389  * unless it is found at the very beginning or the very end of
390  * the string. For instance, to include all the upper case latin 1
391  * letters, one can use "A-Z".
392  *
393  * The use of this function is not cumulative. Calling it again
394  * overwrites the previous glyphs in use.
395  *
396  * \bug
397  * This glyphs marked in used must be marked as such after the
398  * PreSave() function of the corresponding TagFont is called.
399  * For this reason, we must saved this information here.
400  *
401  * \sa sswf::TagEditText::AddUsedString(const char *string)
402  */
SetUsedGlyphs(const char * used_glyphs)403 void TagEditText::SetUsedGlyphs(const char *used_glyphs)
404 {
405 	sswf_ucs4_t	*d;
406 	size_t		l, sz;
407 
408 	// replace whatever was defined so far
409 	MemFree(f_used_glyphs);
410 
411 	// NOTE: we allocate strlen() chars in the wide char string
412 	// because that's much faster than computing the number of
413 	// chars in a C string than in a UTF-8 string and we won't
414 	// lose that much RAM anyway
415 
416 	l = strlen(used_glyphs);
417 
418 	f_used_glyphs = (sswf_ucs4_t *) MemAlloc(sizeof(sswf_ucs4_t) * (l + 1), "TagEditText::SetUsedGlyphs() -- used glyphs entry string buffer");
419 
420 	sz = l * sizeof(sswf_ucs4_t);
421 	d = f_used_glyphs;
422 	mbtowc(used_glyphs, l, d, sz);
423 	*d = (sswf_ucs4_t) '\0';	// mbtowc() doesn't terminate the strings
424 }
425 
426 
427 /** \brief Add a string that will be used with that edit text box.
428  *
429  * This function is used to tell the edit text box that it will
430  * need to be able to display the specified string.
431  *
432  * This can be used to obtimize the number of glyphs included in
433  * your movie. If your edit text box cannot be edited by an end
434  * user, then it is sufficient to only save the glyphs that will
435  * at some point be used and forget about the others (especially
436  * to save some space in your file.)
437  *
438  * For instance, if you have a set of action scripts testing
439  * different values and setting the edit text to pre-defined
440  * strings such as "Running", "Stopped", "Waiting" and "Paused"
441  * then you do not need to save the 'z' letter for instance.
442  *
443  * Calling this function multiple times cumulates the strings.
444  *
445  * \param[in] string A string to add to the list of strings in use
446  */
AddUsedString(const char * string)447 void TagEditText::AddUsedString(const char *string)
448 {
449 	sswf_ucs4_t	*old, *d;
450 	size_t		l1, l2, sz;
451 
452 	old = f_used_strings;
453 
454 	// NOTE: we allocate strlen() chars in the wide char string
455 	// because that's much faster than computing the number of
456 	// chars in a C string than in a UTF-8 string and we won't
457 	// lose that much RAM anyway
458 
459 	l1 = wcslen(f_used_strings);
460 	l2 = strlen(string);
461 
462 	f_used_strings = (sswf_ucs4_t *) MemAlloc(sizeof(sswf_ucs4_t) * (l1 + l2 + 1), "TagEditText::AddUsedString() -- used string entry string buffer");
463 
464 	memcpy(f_used_strings, old, sizeof(sswf_ucs4_t) * l1);
465 	// now delete the old string
466 	MemFree(old);
467 
468 	// concatenate the new string
469 	sz = l2 * sizeof(sswf_ucs4_t);
470 	d = f_used_strings + l1;
471 	mbtowc(string, l2, d, sz);
472 	*d = (sswf_ucs4_t) '\0';	// mbtowc() doesn't terminate the strings
473 }
474 
475 
476 /** \brief Set the font to use to render the glyphs.
477  *
478  * This function defines the font to use with the edit text box
479  * and the height we want the font to be rendered at.
480  *
481  * \bug
482  * Note that if the font is a system font then the height has to
483  * be in system font metrics (such as 14 for a 14 points font.)
484  * When the font is an embedded font, then the height is taken
485  * in Twips.
486  *
487  * \param[in] font The font tag used to render this edit text box.
488  * \param[in] height The height to use to draw the characters.
489  */
SetFont(const TagFont * font,long height)490 void TagEditText::SetFont(const TagFont *font, long height)
491 {
492 	f_font = font;
493 	f_font_height = (unsigned short) height;
494 }
495 
496 
497 /** \brief Defines the side margin
498  *
499  * This function defines the left and right margin for the text
500  * to be rendered in the box.
501  *
502  * The margins are useful if you request a border and/or edge
503  * to be rendered.
504  *
505  * \param[in] left The width of the margin on the left side
506  * \param[in] right The width of the margin on the right side
507  */
SetMargins(long left,long right)508 void TagEditText::SetMargins(long left, long right)
509 {
510 	f_left_margin = left;
511 	f_right_margin = right;
512 }
513 
514 
515 /** \brief Set the bounds of the edit text.
516  *
517  * This function takes a rectangle representing the bounds
518  * of the edit text in the output.
519  *
520  * \param[in] bounds The bounds of the edit text box.
521  */
SetBounds(const SRectangle & bounds)522 void TagEditText::SetBounds(const SRectangle& bounds)
523 {
524 	f_bounds = bounds;
525 }
526 
527 
528 /** \brief Set the alignment for the text.
529  *
530  * This function sets the alignment for the text drawn
531  * in the edit text box.
532  *
533  * The alignment can be set to one of these:
534  *
535  * \li TagEditText::EDIT_TEXT_ALIGNMENT_LEFT (default)
536  * \li TagEditText::EDIT_TEXT_ALIGNMENT_RIGHT
537  * \li TagEditText::EDIT_TEXT_ALIGNMENT_CENTER
538  * \li TagEditText::EDIT_TEXT_ALIGNMENT_JUSTIFY
539  *
540  * \param[in] align The alignment to use
541  */
SetAlign(edit_text_alignment_t align)542 void TagEditText::SetAlign(edit_text_alignment_t align)
543 {
544 	f_align = align;
545 }
546 
547 
548 /** \brief Set the identation of the first line of text.
549  *
550  * This alue represents the identation of the first line
551  * of text in a paragraph.
552  *
553  * \param[in] indent The identation of the text
554  */
SetIndent(long indent)555 void TagEditText::SetIndent(long indent)
556 {
557 	f_indent = indent;
558 }
559 
560 
561 /** \brief Set the identation of the first line of text.
562  *
563  * This alue represents the number of pixels (in TWIPS) to skip
564  * vertically between lines of text.
565  *
566  * \param[in] leading The space between lines.
567  */
SetLeading(long leading)568 void TagEditText::SetLeading(long leading)
569 {
570 	f_leading = leading;
571 }
572 
573 
574 /** \brief The color used to render the font.
575  *
576  * This function is used to set the color to use to render the
577  * font.
578  *
579  * Note that you can later use the font as a mask over
580  * pretty much any other drawings giving an effect that
581  * looks like colorful fonts.
582  *
583  * \param[in] color The color to use to draw the font
584  */
SetColor(Color & color)585 void TagEditText::SetColor(Color& color)
586 {
587 	f_color = color;
588 	f_has_color = true;
589 }
590 
591 
592 /** \brief Set the maximum length of the text in number of characters.
593  *
594  * If the text is editable, to avoid letting people type as much as they
595  * want, use this function and set the limit you want. It is wise to
596  * always do so.
597  *
598  * \note
599  * This is supposed to be counted in characters. Encodings like UTF-8
600  * or some asian languages may not be able to handling this properly/
601  *
602  * \param[in] length The maximum length a user can type
603  */
SetMaxLength(long length)604 void TagEditText::SetMaxLength(long length)
605 {
606 	f_max_length = length;
607 }
608 
609 
610 /** \brief Set whether words should wrap.
611  *
612  * This function is used to change the word wrap status.
613  *
614  * By default an edit text box is set to have its text wrap.
615  *
616  * \param[in] status Set to true to get words to wrap, false otherwise
617  */
SetWordWrap(bool status)618 void TagEditText::SetWordWrap(bool status)
619 {
620 	f_word_wrap = status;
621 }
622 
623 
624 /** \brief Set the multiline flag to the specified status.
625  *
626  * This function changes the behavior of the edit text box
627  * whenever strings longer than what can be rendered are
628  * used in an edit text.
629  */
SetMultiline(bool status)630 void TagEditText::SetMultiline(bool status)
631 {
632 	f_multiline = status;
633 }
634 
635 
636 /** \brief Set the password flag.
637  *
638  * By default, an edit text box is expected to be used for
639  * other purposes than passwords. But it can be useful, once
640  * in a while, to let people login. For that purpose, you
641  * can use this function.
642  *
643  * The result of setting this flag to true is that the edit text
644  * box only renders asterisks,
645  *
646  * \param[in] status If true, the edit text box only displays
647  * asterisks.
648  */
SetPassword(bool status)649 void TagEditText::SetPassword(bool status)
650 {
651 	f_password = status;
652 }
653 
654 
655 /** \brief Mark the edit text box as read-only.
656  *
657  * This function marks the edit text box as read-only. This
658  * means it can be used to display a string and the user has
659  * to right to change its content.
660  *
661  * \param[in] status The new status for the read-only flag.
662  */
SetReadOnly(bool status)663 void TagEditText::SetReadOnly(bool status)
664 {
665 	f_readonly = status;
666 }
667 
668 
669 /** \brief Set whether the user can select the text.
670  *
671  * This function is used to mark the text in the edit text box as
672  * selectable or not. In general, an edit text box used for a
673  * label should be marked unselectable and read-only.
674  *
675  * \param[in] status The new status for the no-select flag.
676  */
SetNoSelect(bool status)677 void TagEditText::SetNoSelect(bool status)
678 {
679 	f_no_select = status;
680 }
681 
682 
683 /** \brief Mark whether a border should be rendered.
684  *
685  * This function requests that a border be drawn around the
686  * edit text box.
687  *
688  * Note that the border color is usually black, and the
689  * background is always white.
690  *
691  * \bug
692  * If your text is white, it will not show up.
693  *
694  * \param[in] status If true, draw a background and edge
695  */
SetBorder(bool status)696 void TagEditText::SetBorder(bool status)
697 {
698 	f_border = status;
699 }
700 
701 
702 /** \brief Set whether an outline should be rendered.
703  *
704  * This flag defines whether an embedded font should be used.
705  *
706  * \param[in] status Set to true to use a system default font
707  */
SetOutline(bool status)708 void TagEditText::SetOutline(bool status)
709 {
710 	f_outline = status;
711 }
712 
713 
714 /** \brief Defines the box as using HTML or plain text.
715  *
716  * The text in the edit text box can be set to Plain Text (the
717  * default) or HTML.
718  *
719  * When set to HTML, a few tags are understood:
720  *
721  * \li &lt;a>...&lt;/a>
722  * \li &lt;b>...&lt;/b>
723  * \li &lt;br>
724  * \li &lt;font>...&lt;/font>
725  * \li &lt;i>...&lt;/i>
726  * \li &lt;li>...&lt;/li>
727  * \li &lt;p>...&lt;/p>
728  * \li &lt;tab>
729  * \li &lt;textformat>...&lt;/textformat>
730  * \li &lt;u>...&lt;/u>
731  *
732  * For more information about the supported HTML, please, see SWF Alexis' Reference.
733  *
734  * \param[in] status If set to true, the text in the box is expected to be HTML.
735  *
736  * \sa <a href="../SWFalexref.html#tag_defineedittext">SWF Alexis' Reference&mdash;DefineEditText</a>
737  */
SetHTML(bool status)738 void TagEditText::SetHTML(bool status)
739 {
740 	f_html = status;
741 }
742 
743 
744 /** \brief Automatically resizing the edit text box.
745  *
746  * This function defines whether the box should be automatically
747  * resized or the size is defined statically.
748  *
749  * \param[in] status If true, the box will resize itself around the defined text
750  */
SetAutoSize(bool status)751 void TagEditText::SetAutoSize(bool status)
752 {
753 	f_autosize = status;
754 }
755 
756 
757 
758 
759 
760 
761 
762 /* The following options fold the documentation; use 'zi' to turn on and off
763  *
764  * vim: foldexpr=getline(v\:lnum)!~'^/\\*\\*'&&getline(v\:lnum)!~'^\ \\*'?0\:1 foldcolumn=2 foldmethod=expr
765  */
766