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

TDeskTop Class Reference

The desktop of the application. More...

#include <app.h>

Inheritance diagram for TDeskTop::

TGroup TDeskInit TView TObject TStreamable List of all members.

Public Methods

 TDeskTop (const TRect &bounds)
void cascade (const TRect &)
virtual void handleEvent (TEvent &)
void tile (const TRect &)
virtual void tileError ()
virtual void shutDown ()

Static Public Methods

TBackgroundinitBackground (TRect)
TStreamablebuild ()

Static Public Attributes

char defaultBkgrnd
const char* const name

Protected Methods

 TDeskTop (StreamableInit)

Protected Attributes

TBackgroundbackground
Boolean tileColumnsFirst

Detailed Description

The desktop of the application.
See also:
TApplication

TDeskTop inherits multiply from TGroup and the virtual base class TDeskInit. TDeskInit provides a constructor and a create background member function used in creating and inserting a background object. TDeskTop is a simple group that owns the TBackground view upon which the application's windows and other views appear.

TDeskTop represents the desk top area of the screen between the top menu bar and bottom status line (but only when the bar and line exist). By default, TDeskTop has a TBackground object inside which paints its background.

TDeskTop objects can be written to and read from streams using the overloaded >> and << operators.

Definition at line 179 of file app.h.


Constructor & Destructor Documentation

TDeskTop::TDeskTop ( const TRect & bounds )
 

Constructor.

Creates a TDeskTop group with size `bounds' by calling its base constructors TGroup::TGroup and TDeskInit::TDeskInit(&initBackground). The resulting TBackground object created by initBackground is then inserted into the desk top.

See also:
TDeskInit:TDeskInit , TGroup::TGroup

growMode is set to gfGrowHiX | gfGrowHiY.

TDeskTop::TDeskTop ( StreamableInit ) [protected]
 

Constructor 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 virtual table pointers. This is achieved by calling this constructor with an argument of type StreamableInit.


Member Function Documentation

TStreamable * TDeskTop::build ( ) [static]
 

Creates a new TDeskTop.

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

Reimplemented from TGroup.

void TDeskTop::cascade ( const TRect & )
 

Moves all the windows in a cascade-like fashion.

Redisplays all tileable windows owned by the desk top in cascaded format. The first tileable window in Z-order (the window "in back") is zoomed to fill the desk top, and each succeeding window fills a region beginning one line lower and one space further to the right than the one before. The active window appears "on top" as the smallest window.

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

Standard TDeskTop event handler.

Calls TGroup::handleEvent() and takes care of the commands cmNext (usually the hot key F6) and cmPrev by cycling through the windows owned by the desk top, starting with the currently selected view.

Reimplemented from TGroup.

TBackground * TDeskTop::initBackground ( TRect ) [static]
 

Creates a new background.

Returns a pointer to a newly-allocated TBackground object. The address of this member function is passed as an argument to the TDeskInit constructor. The latter invokes initBackground() to create a new TBackground object with the same bounds as the calling TDeskTop object. The background data member is set to point at the new TBackground object.

Redefine this method if you want a custom background.

void TDeskTop::shutDown ( ) [virtual]
 

Releases TDeskTop resources.

This function is derived from TObject. 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.

This method releases all the resources allocated by the TDeskTop. It sets pointer background to 0 and then calls TGroup::shutDown().

Reimplemented from TGroup.

void TDeskTop::tile ( const TRect & )
 

Moves all the windows in a tile-like fashion.

void TDeskTop::tileError ( ) [virtual]
 

Called on tiling error.

This method is called whenever cascade() or tile() run into troubles in moving the windows. You can redefine it if you want to give an error message to the user. By default, it does nothing.


Member Data Documentation

TBackground * TDeskTop::background [protected]
 

This variable stores a pointer to the background object associated with this desk top.

Definition at line 261 of file app.h.

char TDeskTop::defaultBkgrnd [static]
 

The default pattern which will be used for painting the background.

Definition at line 255 of file app.h.

const char *const TDeskTop::name [static]
 

Undocumented.

Reimplemented from TGroup.

Definition at line 285 of file app.h.

Boolean TDeskTop::tileColumnsFirst [protected]
 

True if method tile() should favour columns first. Set to False in TDeskTop constructor.

See also:
TDeskTop::TDeskTop

Definition at line 267 of file app.h.


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