TEXT_ENT
List of: Classes
Subjects: SAT Save and Restore, Text
Contents: Kernel

Purpose: Stores simple text display information.

Derivation: TEXT_ENT : ENTITY : ACIS_OBJECT : -

SAT Identifier: "text_ent"

Filename: kern/kernel/geomhusk/text.hxx

Description: The TEXT_ENT class stores simple text display information.

References: BASE SPAposition

Constructor: public: TEXT_ENT::TEXT_ENT ();


C++ allocation constructor requests memory for this object but does not populate it. The allocation constructor is used primarily by restore. Applications should call this constructor only with the overloaded new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.






public: TEXT_ENT::TEXT_ENT (


const SPAposition& loc, // location of text


const char* string, // string of text to be




// displayed


const char* font // size of font



= NULL,


int size // size in points of font



= -1


);


C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. Applications should call this constructor only with the overloaded new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.




Destructor: public: virtual void TEXT_ENT::lose ();


Posts a delete bulletin to the bulletin board indicating the instance is no longer used in the active model. The lose methods for attached attributes are also called.






protected: virtual TEXT_ENT::~TEXT_ENT ();


This C++ destructor should never be called directly. Instead, applications should use the overloaded lose method inherited from the ENTITY class, because this supports history management. (For example, x=new TEXT_ENT(...) then later x->lose.)



Methods: public: virtual void TEXT_ENT::debug_ent (


FILE* // file pointer


) const;


Prints the type and address of this object, roll back pointer, attributes, and any unknown subtype information to the specified file. Refer to the ENTITY class for more details.






public: const char* TEXT_ENT::font_name () const;


Gets the name of the text font.






public: int TEXT_ENT::font_size () const;


Gets the size of the font.






public: virtual int TEXT_ENT::identity (


int
// level



= 0


) const;


If level is unspecified or 0, returns the type identifier TEXT_ENT_TYPE. If level is specified, returns EXT_ENT_TYPE for that level of derivation from ENTITY. The level of this class is defined as TEXT_ENT_LEVEL.






public: void TEXT_ENT::internal_set_font_name (


const char* // text font


);


Sets the name of the text font.






public: void TEXT_ENT::internal_set_string (


const char* // text string


);


Sets the string for a TEXT_ENT entity without backing up.






public: virtual logical TEXT_ENT::is_deepcopyable (


) const;


Returns TRUE if this can be deep copied.






public: SPAposition TEXT_ENT::location () const;


Gets the location of the text.






public: void TEXT_ENT::operator*= (


const SPAtransf& // transformation


);


Changes the location of text by applying a transformation.






public: void TEXT_ENT::restore_common ();


The RESTORE_DEF macro expands to the restore_common method, which is used in reading information from a SAT file. This method is never called directly. It is called by a higher hierarchical function if an item in the SAT file is determined to be of this class type. An instance of this class will already have been created through the allocation constructor. This method then populates the class instance with the appropriate data from the SAT file.


read_position Location of baseline at start of first character.

read_string String to be displayed.

read_string Font style used to display string. (NULL means to use the current font).

read_integer


Size in points of font used to display string.






public: void TEXT_ENT::set_font_name (


const char* // text font


);


Sets the text font.






public: void TEXT_ENT::set_font_size (


int size // size of font in points


);


Sets the size of the font.






public: void TEXT_ENT::set_location (


const SPAposition& loc // location


);


Changes the location of the text.






public: void TEXT_ENT::set_string (


const char* // text string


);


Changes the text string.






public: const char* TEXT_ENT::string () const;


Gets the text string.






public: virtual const char*


TEXT_ENT::type_name () const;


Returns the string "text_ent".

Internal Use: full_size




Related Fncs: is_TEXT_ENT
PDF/KERN/38CLT.PDF
HTM/DATA/KERN/KERN/38CLT/0006.HTM