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

TFrame Class Reference

The frame around the windows. More...

#include <views.h>

Inheritance diagram for TFrame::

TView TObject TStreamable List of all members.

Public Methods

 TFrame (const TRect &bounds)
virtual void draw ()
virtual TPalettegetPalette () const
virtual void handleEvent (TEvent &event)
virtual void setState (ushort aState, Boolean enable)

Static Public Methods

TStreamablebuild ()

Static Public Attributes

char frameChars [33]
const char* closeIcon
const char* dragIcon
const char* const name

Protected Methods

 TFrame (StreamableInit)

Detailed Description

TFrame provides the distinctive frames around windows and dialog boxes. Users will probably never need to deal with frame objects directly, as they are added to window objects by default.

Definition at line 1951 of file views.h.


Constructor & Destructor Documentation

TFrame::TFrame ( const TRect & bounds )
 

Calls TView constructor TView(bounds), then sets growMode to gfGrowHiX | gfGrowHiY and sets eventMask to @reg eventMask | evBroadcast, so TFrame objects default to handling broadcast events. `bounds' is the bounding rectangle of the frame.

TFrame::TFrame ( StreamableInit ) [protected]
 

Used to recover the view from a stream. Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized vtable pointers. This is achieved by calling this constructor with an argument of type StreamableInit.


Member Function Documentation

TStreamable * TFrame::build ( ) [static]
 

Used to recover the view from a stream. Called to create an object in certain stream-reading situations.

Reimplemented from TView.

void TFrame::draw ( ) [virtual]
 

Draws the frame with color attributes and icons appropriate to the current state flags: active, inactive, being dragged. Adds zoom, close and resize icons depending on the owner window's flags. Adds the title, if any, from the owning window's title data member.

Active windows are drawn with a double-lined frame and any icons; inactive windows are drawn with a single-lined frame and no icons.

See also:
TView::draw

Reimplemented from TView.

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

Returns a reference to the default frame palette string.

See also:
TView::getPalette

Reimplemented from TView.

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

Calls TView::handleEvent(), then handles mouse events.

If the mouse is clicked on the close icon, TFrame::handleEvent() generates a cmClose event. Clicking on the zoom icon or double-clicking on the top line of the frame generates a cmZoom event.

Dragging the top line of the frame moves the window, and dragging the resize icon moves the lower right corner of the view and therefore changes its size.

Reimplemented from TView.

void TFrame::setState ( ushort aState,
Boolean enable ) [virtual]
 

Changes the state of the frame. Calls TView::setState(aState, enable). If the new state is sfActive or sfDragging, calls TView::drawView() to redraw the view.

See also:
TView::setState , TView::state

Reimplemented from TView.


Friends And Related Function Documentation

class TDisplay [friend]
 

Undocumented.

Definition at line 2023 of file views.h.


Member Data Documentation

const char * TFrame::closeIcon [static]
 

The character showed in the close box.

Definition at line 2006 of file views.h.

const char * TFrame::dragIcon [static]
 

The character showed in the lower right corner of the screen.

Definition at line 2010 of file views.h.

char TFrame::frameChars [static]
 

Undocumented.

Definition at line 2002 of file views.h.

const char *const TFrame::name [static]
 

Undocumented.

Reimplemented from TView.

Definition at line 2054 of file views.h.


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