Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TParamText Class Reference

Shows dynamic, parameterized text in a window. More...

#include <dialogs.h>

Inheritance diagram for TParamText::

TStaticText TView TObject TStreamable List of all members.

Public Methods

 TParamText (const TRect &bounds)
 ~TParamText ()
virtual void getText (char *s)
virtual void setText (char *fmt,...)
virtual int getTextLen ()

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* const name

Protected Methods

 TParamText (StreamableInit)
virtual void write (opstream &os)
virtual void* read (ipstream &is)

Protected Attributes

char* str

Detailed Description

Used to show dynamic, parameterized text in a window.

TParamText is derived from TStaticText. It handles parameterized text strings for formatted output. Check TStaticText if you want to show only fixed text (non run-time selectable).

Definition at line 1924 of file dialogs.h.


Constructor & Destructor Documentation

TParamText::TParamText ( const TRect & bounds )
 

Constructor.

`bounds' is the bounding rectangle of the view. Creates and initializes a static text object by calling TStaticText::TStaticText(bounds, 0). The string is initially empty. Use setText() to assign the text.

See also:
TStaticText::TStaticText

TParamText::~TParamText ( )
 

Undocumented.

TParamText::TParamText ( StreamableInit ) [protected]
 

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.


Member Function Documentation

TStreamable * TParamText::build ( ) [static]
 

Creates a new TParamText.

Called to create an object in certain stream-reading situations.

Reimplemented from TStaticText.

void TParamText::getText ( char * s ) [virtual]
 

Writes a formatted text string at address `s'. If the text string is empty, *s is set to EOS.

Reimplemented from TStaticText.

int TParamText::getTextLen ( ) [virtual]
 

Returns the length of the string, expressed in characters.

void * TParamText::read ( ipstream & is ) [protected, virtual]
 

Reads from the input stream `is'.

Reimplemented from TStaticText.

void TParamText::setText ( char * fmt,
... ) [virtual]
 

Sets a new value for the string.

Since this method calls vsprintf(), you can use a printf-like style for its arguments.

void TParamText::write ( opstream & os ) [protected, virtual]
 

Writes to the output stream `os'.

Reimplemented from TStaticText.


Member Data Documentation

const char *const TParamText::name [static]
 

Undocumented.

Reimplemented from TStaticText.

Definition at line 1986 of file dialogs.h.

char * TParamText::str [protected]
 

Stores the pointer to the string.

Definition at line 1960 of file dialogs.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:31 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001