wxTextWindow: wxWindow

A text window is a subwindow of a frame, offering some basic ability to display scrolling text. At present, editing is only possible using the XView and Motif implementations.

wxTextWindow::wxTextWindow

voidwxTextWindowwxFrame *parent, int x = -1, int y = -1,
int width = -1, int height = -1, int style = 0

Constructor. Set style to wxBORDER to draw a thin border in Windows 3.

wxTextWindow::wxTextWindow

voidwxTextWindow

Destructor. Deletes any stored text before deleting the physical window.

wxTextWindow::Clear

voidClear

Clears the window and deletes the stored text.

wxTextWindow::DiscardEdits

voidDiscardEdits

Clears the window and deletes the stored text (same as Clear).

wxTextWindow::LoadFile

BoolLoadFilechar * file

Loads and displays the named file, if it exists. Success is indicated by a return value of TRUE.

wxTextWindow::Modified

BoolModified

Returns TRUE if the text has been modified. Under Windows 3, this always returns FALSE.

wxTextWindow::SaveFile

BoolSaveFilechar * file

Saves the text in the named file. Success is indicated by a return value of TRUE.

wxTextWindow::WriteText

voidWriteTextchar * text

Writes the text into the text window. Presently there is no means of writing text to other than the end of the existing text. Newlines in the text string are the only control characters allowed, and they will cause appropriate line breaks. See the operators for more convenient ways of writing to the window.

wxTextWindow::

wxTextWindow&char *s

wxTextWindow&int i

wxTextWindow&long i

wxTextWindow&float f

wxTextWindow&double d

wxTextWindow&char c

Operator definitions for writing to a text window, for example:

  wxTextWindow wnd(my_frame);

  wnd << "Welcome to text window number " << 1 << ".\n";