sswf::TagEditText Class Reference

#include <libsswf.h>

Inheritance diagram for sswf::TagEditText:

sswf::TagBaseID sswf::TagBase sswf::MemoryManager List of all members.

Public Types

 EDIT_TEXT_ALIGNMENT_CENTER = 2
 EDIT_TEXT_ALIGNMENT_JUSTIFY = 3
 EDIT_TEXT_ALIGNMENT_LEFT = 0
 EDIT_TEXT_ALIGNMENT_RIGHT = 1
enum  edit_text_alignment_t { EDIT_TEXT_ALIGNMENT_LEFT = 0, EDIT_TEXT_ALIGNMENT_RIGHT = 1, EDIT_TEXT_ALIGNMENT_CENTER = 2, EDIT_TEXT_ALIGNMENT_JUSTIFY = 3 }

Public Member Functions

void AddUsedString (const char *string)
virtual ErrorManager::error_code_t Save (Data &data)
 Pre-save all the children tags of this tag.
void SetAlign (edit_text_alignment_t align)
void SetAutoSize (bool status=true)
void SetBorder (bool status=true)
void SetBounds (const SRectangle &bounds)
void SetColor (Color &color)
void SetFont (const TagFont *font, long height)
void SetHTML (bool status=true)
void SetIndent (long indent)
void SetLeading (long leading)
void SetMargins (long left, long right)
void SetMaxLength (long length)
void SetMultiline (bool status=true)
void SetNoSelect (bool status=true)
void SetOutline (bool status=true)
void SetPassword (bool status=true)
void SetReadOnly (bool status=true)
void SetText (const char *text)
void SetUsedGlyphs (const char *lists)
void SetVariableName (const char *name)
void SetWordWrap (bool status=true)
 TagEditText (TagBase *parent)
virtual swf_type_t TypeFlags (void) const
 Retrieve a set of flags desribing the type of the tag.

Private Member Functions

virtual ErrorManager::error_code_t PreSave (void)
 Pre-save all the children tags of this tag.

Private Attributes

edit_text_alignment_t f_align
bool f_autosize
bool f_border
SRectangle f_bounds
Color f_color
const TagFontf_font
unsigned short f_font_height
bool f_has_color
bool f_html
long f_indent
long f_leading
long f_left_margin
long f_max_length
bool f_multiline
bool f_no_select
bool f_outline
bool f_password
bool f_readonly
long f_right_margin
char * f_text
sswf_ucs4_tf_used_glyphs
sswf_ucs4_tf_used_strings
char * f_var_name
bool f_word_wrap

Member Enumeration Documentation

enum sswf::TagEditText::edit_text_alignment_t

Enumerator:
EDIT_TEXT_ALIGNMENT_LEFT 
EDIT_TEXT_ALIGNMENT_RIGHT 
EDIT_TEXT_ALIGNMENT_CENTER 
EDIT_TEXT_ALIGNMENT_JUSTIFY 


Constructor & Destructor Documentation

TagEditText::TagEditText ( TagBase parent  ) 


Member Function Documentation

void TagEditText::AddUsedString ( const char *  string  ) 

ErrorManager::error_code_t TagEditText::PreSave ( void   )  [private, virtual]

This function calls the PreSave() function of all the children unless one returns a non-zero value in which case that value will be returned and the process stopped.

This function is aumatically called by the TagHeader and TagSprite in order to pre-save their children.

The PreSave() functions are expected to be used to test whether a tag can be saved. Especially, most tags will call the MinimumVersion() function with the version required to save these tags. This ensures that you can save the entire movie in a valid SWF. Please, see the reference of each tag for more information about what their PreSave() function does.

You should not have to call this function directly.

Returns:
Zero if the PreSave() succeeds; non-zero otherwise

Reimplemented from sswf::TagBase.

ErrorManager::error_code_t TagEditText::Save ( Data data  )  [virtual]

The Save() function is the one you want to call to save an SWF movie.

You may use the Save() on any tag, however, if you do so you need to properly initialize the system. For that purpose, you may want to look at the code in the TagHeader::Save(Data& data) function.

Otherwise, you simply have to call the Save() function of the TagHeader. That will save the entire movie with the smallest possible version (or fail if something cannot be saved with the present parameters.)

The TagHeader::Save() function first calls the PreSave() functions, the PreSave2ndPass() and then the Save() functions of all the children.

The other tag Save() function simply save the tag within the specified Data buffer. Note however that the TagSprite will also call the Save() function of all of its children. Yet it does not call the PreSave() functions.

The Save() function saves the movie in a Data buffer. Later you need to save that buffer on disk or some other medium.

Returns:
Zero when the Save() succeeds, non-zero if it fails
See also:
TagBase::PreSave()

TagBase::PreSave2ndPass()

Implements sswf::TagBase.

void TagEditText::SetAlign ( edit_text_alignment_t  align  ) 

void TagEditText::SetAutoSize ( bool  status = true  ) 

void TagEditText::SetBorder ( bool  status = true  ) 

void TagEditText::SetBounds ( const SRectangle bounds  ) 

void TagEditText::SetColor ( Color color  ) 

void TagEditText::SetFont ( const TagFont font,
long  height 
)

void TagEditText::SetHTML ( bool  status = true  ) 

void TagEditText::SetIndent ( long  indent  ) 

void TagEditText::SetLeading ( long  leading  ) 

void TagEditText::SetMargins ( long  left,
long  right 
)

void TagEditText::SetMaxLength ( long  length  ) 

void TagEditText::SetMultiline ( bool  status = true  ) 

void TagEditText::SetNoSelect ( bool  status = true  ) 

void TagEditText::SetOutline ( bool  status = true  ) 

void TagEditText::SetPassword ( bool  status = true  ) 

void TagEditText::SetReadOnly ( bool  status = true  ) 

void TagEditText::SetText ( const char *  text  ) 

void TagEditText::SetUsedGlyphs ( const char *  lists  ) 

void TagEditText::SetVariableName ( const char *  name  ) 

void TagEditText::SetWordWrap ( bool  status = true  ) 

TagBase::swf_type_t TagEditText::TypeFlags ( void   )  const [virtual]

This function returns some flags that can be used to know where to place a tag in a movie, whether a tag is unique, etc.

If a tag has specifics which are not described here, it often can be checked using its name and special handling.

The existing flags are:

SWF_TYPE_DEFINE This is a definition tag (Sprite, Shape...)

SWF_TYPE_CONTROL This is a control tag (ShowFrame, PlaceObject...)

SWF_TYPE_UNIQUE This can be used once throughout the whole movie

SWF_TYPE_START This tag should be at the start of the movie

SWF_TYPE_ONE At most one per frame

SWF_TYPE_REFERENCE This tag references another

SWF_TYPE_HAS_ID This tag has an identifier

SWF_TYPE_SCRIPT This object can accept action scripts

SWF_TYPE_SPRITE This is a sprite (can include other tags)

SWF_TYPE_HEADER The header object

Note:
These flags are constant (actually hard coded!) and will not change between calls. They even rarely change between versions.
Returns:
The set of flags for the given tag
See also:
sswf::TagBase::Name(void) const

Implements sswf::TagBase.


Member Data Documentation

edit_text_alignment_t sswf::TagEditText::f_align [private]

bool sswf::TagEditText::f_autosize [private]

bool sswf::TagEditText::f_border [private]

SRectangle sswf::TagEditText::f_bounds [private]

Color sswf::TagEditText::f_color [private]

const TagFont* sswf::TagEditText::f_font [private]

unsigned short sswf::TagEditText::f_font_height [private]

bool sswf::TagEditText::f_has_color [private]

bool sswf::TagEditText::f_html [private]

long sswf::TagEditText::f_indent [private]

long sswf::TagEditText::f_leading [private]

long sswf::TagEditText::f_left_margin [private]

long sswf::TagEditText::f_max_length [private]

bool sswf::TagEditText::f_multiline [private]

bool sswf::TagEditText::f_no_select [private]

bool sswf::TagEditText::f_outline [private]

bool sswf::TagEditText::f_password [private]

bool sswf::TagEditText::f_readonly [private]

long sswf::TagEditText::f_right_margin [private]

char* sswf::TagEditText::f_text [private]

sswf_ucs4_t* sswf::TagEditText::f_used_glyphs [private]

sswf_ucs4_t* sswf::TagEditText::f_used_strings [private]

char* sswf::TagEditText::f_var_name [private]

bool sswf::TagEditText::f_word_wrap [private]


The documentation for this class was generated from the following files:
Generated on Sun May 13 23:29:40 2007 for libsswf by  doxygen 1.4.7