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

TEditWindow Class Reference

Designed to hold a TFileEditor or the clipboard. More...

#include <editors.h>

Inheritance diagram for TEditWindow::

TWindow TGroup TWindowInit TView TObject TStreamable List of all members.

Public Methods

 TEditWindow (const TRect &bounds, const char *fileName, int aNumber)
virtual void close ()
virtual const char* getTitle (short)
virtual void handleEvent (TEvent &event)
virtual void sizeLimits (TPoint &min, TPoint &max)

Static Public Methods

TStreamablebuild ()

Public Attributes

TFileEditoreditor

Static Public Attributes

const char* const name

Protected Methods

 TEditWindow (StreamableInit)
virtual void write (opstream &)
virtual void* read (ipstream &)

Detailed Description

TEditWindow is a window designed to hold a TFileEditor or the clipboard.

It will change its title to display the file name being edited and will initialize scroll bars and an indicator for the editor.

See also:
TIndicator

Definition at line 1366 of file editors.h.


Constructor & Destructor Documentation

TEditWindow::TEditWindow ( const TRect & bounds,
const char * fileName,
int aNumber )
 

Creates a TEditWindow object that will edit the given file name with window number `aNumber'. Initializes a framed, tileable window with scroll bars and an indicator. If `fileName' is 0, it is assumed to be an untitled file.

Note: if editor data member is equal to TEditor::clipboard static data member, the editor is assumed to be the clipboard.

TEditWindow::TEditWindow ( 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 * TEditWindow::build ( ) [static]
 

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

Reimplemented from TWindow.

void TEditWindow::close ( ) [virtual]
 

Overrides TWindow::close() to hide rather than close the window if the editor is a clipboard.

Reimplemented from TWindow.

const char * TEditWindow::getTitle ( short maxSize ) [virtual]
 

Returns the name of the file being edited, or "Clipboard" if the editor is the clipboard.

Reimplemented from TWindow.

void TEditWindow::handleEvent ( TEvent & event ) [virtual]
 

Handles cmUpdateTitle to redraw the frame of the window. Used in TFileEditor::saveAs() to change the title of the window if the file being edited changes names.

Reimplemented from TWindow.

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

Reads from the input stream `is'.

Reimplemented from TWindow.

void TEditWindow::sizeLimits ( TPoint & min,
TPoint & max ) [virtual]
 

Undocumented.

Reimplemented from TWindow.

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

Writes to the output stream `os'.

Reimplemented from TWindow.


Member Data Documentation

TFileEditor * TEditWindow::editor
 

Pointer to the editor associated with this window.

Definition at line 1402 of file editors.h.

const char *const TEditWindow::name [static]
 

Undocumented.

Reimplemented from TWindow.

Definition at line 1429 of file editors.h.


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