class text : public object

Html text object

Inheritance:


Public Methods

text(void)
Default constructor.
text(const text& x)
Copy contructor.
text(const std::string& x)
Data constructor
text(double x)
Construct numeric text.
text(const Time& x, const char* fmt="%M %d, %Y %02H:%02N")
Construct time string text.
~text(void)
Text destructor.
object* clone(void) const
Clone a text object.
void write(writer& out) const
Write the text.
void insertText(const std::string& txt)
Set the text.
void addText(const std::string& txt)
Append a text string.
text& operator<<(const std::string& txt)
Append a string to the text.
text& operator<<(double x)
Append a number to the text.
text& setColor(const color& Color)
Set the color.
text& setFont(const font& Font)
Set the font.
text& setSize(const size& Size)
Set the size.

Inherited from object:

Public Methods

virtual dim_t getXSize(void) const
virtual dim_t getYSize(void) const

Documentation

The text class defines an atomic html object containing a text string and a list of text-specific attributes specific to the string. Any occurrence of an open bracket "<" is translated to "&lt;" before it is added to the text string.
text(void)
Construct an empty text object.

text(const text& x)
Construct an exact copy of an existing text object.
Parameters:
x - Existing text object to be copied.

text(const std::string& x)
Construct a text object and set it to contain the specified string data.
Parameters:
x - String containing the initial text.

text(double x)
Construct a text object from a double precision float.

text(const Time& x, const char* fmt="%M %d, %Y %02H:%02N")
Construct a text object from a Time.

~text(void)
Destroy a text object.

object* clone(void) const
Create a text object identical to the existing instance and return a pointer to the result. This method overrides the default action of the html object clone virtual method.
Returns:
pointer to an exact copy of the current text instance.

void write(writer& out) const
Write the object text to the specified html writer stream.
Parameters:
out - Html write to which the text is written.

void insertText(const std::string& txt)
Replace any existing text with the specified string.
Parameters:
txt - String containg new text.

void addText(const std::string& txt)
Append a specified string to any existing text on the object.
Parameters:
txt - String to be added to the text.

text& operator<<(const std::string& txt)
Append a specified string to any existing text in the object.
Returns:
Reference to the updated text object.
Parameters:
txt - String to be added to the text.

text& operator<<(double x)
Append a numeric value to any existing text in the object.
Returns:
Reference to the updated text object.
Parameters:
x - Number to be added to the text.

text& setColor(const color& Color)
Set the color attribute of the text.
Returns:
Reference to the updated text.
Parameters:
Color - A color specifier.

text& setFont(const font& Font)
Set the text font.
Returns:
Reference to the updated text.
Parameters:
Font - A text font specifier.

text& setSize(const size& Size)
Set the size attribute of the text.
Returns:
Reference to the updated text.
Parameters:
Size - A text size specifier.


This class has no child classes.
Author:
J. Zweizig
Version:
1.1; Modified May 4, 2001

alphabetic index hierarchy of classes


generated by doc++