Class: MScreen

Declaration: Screen.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

MScreen is a mixin class intended for use only when combined with a concrete TGrafDevice derived class. MScreen provides an abstraction for handling interactive display devices. MScreen extends the functionality of TGrafDevice in ways appropriate for a display device (and inappropriate for devices like printers, milling machines, and so on). For example, MScreen provides support for cursors and sprites. A screen device is an object that renders geometries in a complex environment that includes shared access among multiple tasks, device synchronization, hardware acceleration, and real-time compositing (including cursors and sprites). While the client might see nothing more than the familiar TGrafDevice interface, a screen device overrides functions to properly interact with its more complex environment. A screen device provides additional functions that are used to manage interactive display hardware. These additional functions are not useful on non-interactive hardware such as a printer or offscreen buffer, so they aren't included in the base TGrafDevice class. MScreen supports device graphic sprites--graphics that float above other graphics and restore graphics rendered underneath them when they move. This device-dependent object is used to implement the device-independent TGraphicSprite object. Classes deriving from MScreen can implement classes that derive from TDeviceGraphicSprite to provide optimal performance on that particular screen.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: MScreen::MScreen

  1. MScreen ()
  2. MScreen (const MScreen &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MScreen::~MScreen

virtual ~ MScreen ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MScreen::CreateScreenIterator

virtual TScreenIterator * CreateScreenIterator () const

Interface Category:

API.

Purpose:

Creates a screen iterator capable of returning the subdevices of a compound screen device.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a new screen iterator or NIL if the device is a simple device with no subdevices.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

It is important that you destruct the iterator as soon as you can. As long as the screen iterator object is instantiated, you are prevented from making configuration changes on the screen device object that created the iterator. Subdevice pointers returned by the iterator are valid only as long as the iterator is instantiated.

Member Function: MScreen::GetGrafDevice

virtual TGrafDevice * GetGrafDevice ()

Interface Category:

API.

Purpose:

Returns a pointer to the TGrafDevice interface of a screen object. (MScreen must always be mixed in with a TGrafDevice derived class.)

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to a TGrafDevice.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MScreen::CreateDeviceGraphicSprite

virtual TDeviceGraphicSprite * CreateDeviceGraphicSprite (const TCompositingLayerOrder *)

Interface Category:

API.

Purpose:

Creates a device-dependent graphic sprite object. This graphic sprite object is normally used by the device-independent TGraphicSprite class to create a device-dependent sprite representation on each screen device.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a new device-dependent graphic sprite object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MScreen::CreateDeviceCursor

virtual TDeviceCursor * CreateDeviceCursor (const TCompositingLayerOrder *)

Interface Category:

API.

Purpose:

Creates a device-dependent cursor object. This cursor object is normally used by the device-independent TCursor class to create a device-dependent cursor representation on each screen device.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a new device-dependent cursor object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MScreen::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream that the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MScreen::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream that the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MScreen::operator=

MScreen & operator =(const MScreen &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.