Message

This class captures the abstraction of a text string that can be drawn and erased from a given Location in a Frame with which the Message is associated.

[ Index | Source | Summary | Member Functions ]

Quick Index


Class Summary

class Message
{

public:
Message(char *textString, Location whereAt);
Message(Location whereAt);
void DisplayIn(Canvas& whichCanvas);
void MoveTo(Location newLocation);
void SetText(char *newText);
char *GetText();
void Draw();
void Clear();
~Message();
}; // Message

Back to the top of Message


Message(char *textString, Location whereAt);

Construct a Message object with a given text string and an associated position where it will be displayed in a Canvas's visible region.

   Message(char *textString, Location whereAt);

Back to the top of Message


Message(Location whereAt);

Construct a Message object with a default text string (the empty string) and an associated position where it will be displayed in a Canvas's visible region.

   Message(Location whereAt);

Back to the top of Message


void DisplayIn(Canvas& whichCanvas);

Define in which Canvas object the text string will be drawn.

   void DisplayIn(Canvas& whichCanvas);

Back to the top of Message


void MoveTo(Location newLocation);

Change the location of where the text string is drawn. If the text is currently visible, it will be erased from its current location and redrawn at its new location.

   void MoveTo(Location newLocation);

Back to the top of Message


void SetText(char *newText);

Change the text that is displayed.

   void SetText(char *newText);

Back to the top of Message


char *GetText();

Return the current text string of the Message.

   char *GetText();

Back to the top of Message


void Draw();

Draw the current text string in the Canvas with which the Message is currently associated at the Message's current Location. This method has no effect if the Message is not associated with a Canvas.

   void Draw();

Back to the top of Message


void Clear();

Erase the current text string from the Canvas with which the Message is currently associated.

   void Clear();

Back to the top of Message


~Message();

Release the resources associated with the Message object.

   ~Message();

Back to the top of Message


Member Functions

public:
void DisplayIn(Canvas& whichCanvas);
void MoveTo(Location newLocation);
void SetText(char *newText);
char *GetText();
void Draw();
void Clear();

Back to the top of Message


Generated from source by the Cocoon utilities on Thu Apr 02 12:40:06 1998 .

Report problems to jkotula@unimax.com