#include <dialogs.h>
Inheritance diagram for TStaticText::
Public Methods | |
TStaticText (const TRect &bounds, const char *aText) | |
~TStaticText () | |
virtual void | draw () |
virtual TPalette& | getPalette () const |
virtual void | getText (char *s) |
Static Public Methods | |
TStreamable* | build () |
Static Public Attributes | |
const char* const | name |
Protected Methods | |
TStaticText (StreamableInit) | |
virtual void | write (opstream &os) |
virtual void* | read (ipstream &is) |
Protected Attributes | |
const char* | text |
TStaticText objects represent the simplest possible views: they contain fixed text and they ignore all events passed to them. They are generally used as messages or passive labels.
Descendants of TStaticText, such as TLabel or TParamText objects, usually perform more active roles. Use TParamText if you want to show dynamic text also, where dynamic means user-selectable at run-time.
Definition at line 1808 of file dialogs.h.
|
Constructor. Creates a TStaticText object of the given size by calling TView::TView(bounds), then sets text data member to newStr(aText). `bounds' is the bounding rectangle of the view. `aText' is a pointer to the string to show.
|
|
Disposes of the text string, then calls TView::~TView() to destroy the object.
|
|
Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized virtual table pointers. This is achieved by calling this constructor with an argument of type StreamableInit. |
|
Creates a new TStaticText. Called to create an object in certain stream-reading situations. Reimplemented from TView. Reimplemented in TParamText, and TLabel. |
|
Draws the text string inside the view, word wrapped if necessary. A '\n' in the text indicates the beginning of a new line. A line of text is centered in the view if the string begins with 0x03 (Ctrl-C). Reimplemented from TView. Reimplemented in TLabel. |
|
Returns a reference to the default palette. Reimplemented from TView. Reimplemented in TLabel. |
|
Writes the string at address `s'. Reimplemented in TParamText. |
|
Reads from the input stream `is'. Reimplemented from TView. Reimplemented in TParamText, and TLabel. |
|
Writes to the output stream `os'. Reimplemented from TView. Reimplemented in TParamText, and TLabel. |
|
Undocumented. Reimplemented from TView. Reimplemented in TParamText, and TLabel. |
|
A pointer to the (constant) text string to be displayed in the view. |