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

THistoryViewer Class Reference

Part of the history list system. More...

#include <dialogs.h>

Inheritance diagram for THistoryViewer::

TListViewer TView TObject TStreamable List of all members.

Public Methods

 THistoryViewer (const TRect &bounds, TScrollBar *aHScrollBar, TScrollBar *aVScrollBar, ushort aHistoryId)
virtual TPalettegetPalette () const
virtual void getText (char *dest, short item, short maxLen)
virtual void handleEvent (TEvent &event)
int historyWidth ()

Protected Attributes

ushort historyId

Detailed Description

THistoryViewer is a rather straightforward descendant of TListViewer. It is used by the history list system, and appears inside the history window set up by clicking on the history icon.

Definition at line 2207 of file dialogs.h.


Constructor & Destructor Documentation

THistoryViewer::THistoryViewer ( const TRect & bounds,
TScrollBar * aHScrollBar,
TScrollBar * aVScrollBar,
ushort aHistoryId )
 

Initializes the viewer list by first calling the TListViewer constructor to set up the boundaries, a single column, and the two scroll bar pointers passed in `aHScrollBar' and `aVScrollBar'.

The view is then linked to a history list, with the historyId data member set to the value passed in `aHistory'. That list is then checked for length, so the range of the list is set to the number of items in the list.

The first item in the history list is given the focus, and the horizontal scrolling range is set to accommodate the widest item in the list.


Member Function Documentation

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

Returns the default palette string.

Reimplemented from TListViewer.

void THistoryViewer::getText ( char * dest,
short item,
short maxLen ) [virtual]
 

Set `dest' to the item'th string in the associated history list. getText() is called by the TListViewer::draw() member function for each visible item in the list.

Reimplemented from TListViewer.

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

The history viewer handles two kinds of events itself; all others are passed to TListViewer::handleEvent().

  1. Double clicking or pressing the Enter key terminates the modal state of the history window with a cmOK command.
  2. Pressing the Esc key, or any cmCancel command event, cancels the history list selection.

Reimplemented from TListViewer.

int THistoryViewer::historyWidth ( )
 

Returns the length of the longest string in the history list associated with historyId.


Member Data Documentation

ushort THistoryViewer::historyId [protected]
 

historyId is the ID number of the history list to be displayed in the view.

Definition at line 2259 of file dialogs.h.


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