TextFrame

This class captures the abstraction of a window which displays a text stream. The class provides a stream output operator ("<<") for each of the C++ built-in types. The methods for placing and sizing of a TextFrame object are the same as for a Frame object.The constant "endl" is defined for a TextFrame so that it has the same meaning as for standard streams such as cout, namely, that it terminates the end of the current line of output.

[ Index | Source | Summary | Member Functions ]

Quick Index


Class Summary

class TextFrame
{

public:
TextFrame(char *name, int x, int y, int w, int h);
TextFrame(char* name, int x, int y);
TextFrame(char* name);
TextFrame();
~TextFrame();
void MoveTo( int newx, int newy);
void Resize( int newWidth, int newHeight);
void Resize( float factor);
int IsNamed(char* name);
TextFrame& operator<<(char *s);
TextFrame& operator<<(int i);
TextFrame& operator<<(long l);
TextFrame& operator<<(float f);
TextFrame& operator<<(double d);
TextFrame& operator<<(char c);
}; // TextFrame

Back to the top of TextFrame


TextFrame(char *name, int x, int y, int w, int h);

Construct a TextFrame object specifying the TextFrame's name, its location - the x and y coordinates, and its shape - its width and height.

   TextFrame(char *name, int x, int y, int w, int h);

Back to the top of TextFrame


TextFrame(char* name, int x, int y);

Construct a TextFrame object specifying the TextFrame's name, and its location - the x and y coordinates. Default values are used for the Frame's height and width.

   TextFrame(char* name, int x, int y);

Back to the top of TextFrame


TextFrame(char* name);

Construct a TextFrame object specifying the TextFrame's name. The TextFrame's location (x and y coordinates) and its shape (width and height) are given default values.

   TextFrame(char* name);

Back to the top of TextFrame


TextFrame();

Construct a TextFrame object with default values used for its name, location, and shape.

   TextFrame();

Back to the top of TextFrame


~TextFrame();

Dispose of all resource associated with this object and its window.

  ~TextFrame();

Back to the top of TextFrame


void MoveTo( int newx, int newy);

Change the location of a window on the user's display. The (x,y) coordinates of the upper left-hand corner of the TextFrame's new position relative to the upper left-hand corner of the user's display are given.

   void     MoveTo( int newx, int newy);        // change position

Back to the top of TextFrame


void Resize( int newWidth, int newHeight);

//////// Change the shape of a window. Both the new width and the new height of the window must be given.

   void     Resize( int newWidth, int newHeight);              // change shape

Back to the top of TextFrame


void Resize( float factor);

Change the dimensions of the TextFrame's visible window by multiplying each dimension by a given amount.

   void     Resize( float factor);              //

Back to the top of TextFrame


int IsNamed(char* name);

Indicate if the Frame has a name equal to that of the string given as the parameter.

   int      IsNamed(char* name);                   // is this your name?

Back to the top of TextFrame


TextFrame& operator<<(char *s);

Add to the output stream a string of characters. The operation returns a reference to the modified TextFrame so that stream output operations can be performed in sequence.

   TextFrame& operator<<(char  *s);

Back to the top of TextFrame


TextFrame& operator<<(int i);

Add to the output stream a string of characters that represents the value of an integer. The operation returns a reference to the modified TextFrame so that stream output operations can be performed in sequence.

   TextFrame& operator<<(int    i);

Back to the top of TextFrame


TextFrame& operator<<(long l);

Add to the output stream a string of characters that represents the value of a long integer. The operation returns a reference to the modified TextFrame so that stream output operations can be performed in sequence.

   TextFrame& operator<<(long   l);

Back to the top of TextFrame


TextFrame& operator<<(float f);

Add to the output stream a string of characters that represents the value of a floating point number. The operation returns a reference to the modified TextFrame so that stream output operations can be performed in sequence.

   TextFrame& operator<<(float  f);

Back to the top of TextFrame


TextFrame& operator<<(double d);

Add to the output stream a string of characters that represents the value of a double precision floating point number. The operation returns a reference to the modified TextFrame so that stream output operations can be performed in sequence.

   TextFrame& operator<<(double d);

Back to the top of TextFrame


TextFrame& operator<<(char c);

Add to the output stream a singe character. The operation returns a reference to the modified TextFrame so that stream output operations can be performed in sequence.

   TextFrame& operator<<(char   c);

Back to the top of TextFrame


Member Functions

public:
void MoveTo( int newx, int newy);
void Resize( int newWidth, int newHeight);
void Resize( float factor);
int IsNamed(char* name);
TextFrame& operator<<(char *s);
TextFrame& operator<<(int i);
TextFrame& operator<<(long l);
TextFrame& operator<<(float f);
TextFrame& operator<<(double d);
TextFrame& operator<<(char c);

Back to the top of TextFrame


Generated from source by the Cocoon utilities on Thu Apr 02 12:39:17 1998 .

Report problems to jkotula@unimax.com