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

THistory Class Reference

Implements a pick list of previous entries, actions, or choices from which the user can select a "rerun". More...

#include <dialogs.h>

Inheritance diagram for THistory::

TView TObject TStreamable List of all members.

Public Methods

 THistory (const TRect &bounds, TInputLine *aLink, ushort aHistoryId)
virtual void draw ()
virtual TPalettegetPalette () const
virtual void handleEvent (TEvent &event)
virtual THistoryWindowinitHistoryWindow (const TRect &bounds)
virtual void recordHistory (const char *s)
virtual void shutDown ()

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* icon
const char* const name

Protected Methods

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

Protected Attributes

TInputLinelink
ushort historyId

Detailed Description

A THistory object implements a pick list of previous entries, actions, or choices from which the user can select a "rerun". THistory objects are linked to a TInputLine object and to a history list.
See also:
THistoryWindow

History list information is stored in a block of memory on the heap. When the block fills up, the oldest history items are deleted as new ones are added.

Different input lines can share the same history list by using the same ID number.

Definition at line 2404 of file dialogs.h.


Constructor & Destructor Documentation

THistory::THistory ( const TRect & bounds,
TInputLine * aLink,
ushort aHistoryId )
 

Creates a THistory object of the given size by calling TView::TView(bounds), then setting the link and historyId data members with the given argument values `aLink' and `aHistoryId'.

See also:
TView::TView

The options member is set to ofPostProcess. The evBroadcast bit is set in eventMask in addition to the evMouseDown, evKeyDown, and evCommand bits set by TView(bounds).

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

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

Reimplemented from TView.

void THistory::draw ( ) [virtual]
 

Draws the THistory icon in the default palette.

Reimplemented from TView.

TPalette & THistory::getPalette ( ) const [virtual]
 

Returns a reference to the default palette.

Reimplemented from TView.

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

Calls TView::handleEvent(event), then handles relevant mouse and key events to select the linked input line and create a history window.

See also:
TView::handleEvent

Reimplemented from TView.

THistoryWindow * THistory::initHistoryWindow ( const TRect & bounds ) [virtual]
 

Creates a THistoryWindow object and returns a pointer to it. The new object has the given bounds and the same historyId as the calling THistory object.

See also:
THistoryWindow

The new object gets its helpCtx from the calling object's linked TInputLine.
See also:
THistory::link

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

Reads from the input stream `is'.

Reimplemented from TView.

void THistory::recordHistory ( const char * s ) [virtual]
 

Undocumented.

void THistory::shutDown ( ) [virtual]
 

Used internally by TObject::destroy() to ensure correct destruction of derived and related objects.

shutDown() is overridden in many classes to ensure the proper setting of related data members when destroy() is called.

Reimplemented from TView.

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

Writes to the output stream `os'.

Reimplemented from TView.


Member Data Documentation

ushort THistory::historyId [protected]
 

Each history list has a unique ID number, assigned by the programmer.

Different history objects in different windows may share a history list by using the same history ID.

Definition at line 2471 of file dialogs.h.

const char * THistory::icon [static]
 

Undocumented.

Definition at line 2459 of file dialogs.h.

TInputLine * THistory::link [protected]
 

A pointer to the linked TInputLine object.

Definition at line 2464 of file dialogs.h.

const char *const THistory::name [static]
 

Undocumented.

Reimplemented from TView.

Definition at line 2495 of file dialogs.h.


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