Class: TSystemWindow

Declaration: SystemWindow.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TSystemLayerable

Inherited By:

None.

Purpose:

TSystemWindow provides the protocol for a real window. Creating a TSystemWindow object creates the window, while deleting the object deletes the window. TSystemWindow cannot be copied or streamed. Keep in mind how some of the TSystemWindow functions effect damage for those windows created by instantiating a TSystemWindow object. When you call the SetExtent or MoveExtent functions, they do not generate damage for the window on which the member function is invoked. (However, MoveExtent may generate damage in some circumstances.) In these cases, the calling client has a good idea of what damage there will be from the call itself. Damage is not generated by the server. By not having damage generated by the server, the client can better optimize its damage repair. MoveExtent actually moves the bits on the screen, so no damage is needed except for the newly uncovered area, for which damage will be generated. SetExtent has an optional parameter that, when set to true, will generate damage anyway. Damage is always generated for other windows affected by the call.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

You would not normally derive from this class. Instead derive from TSystemLayerable.

Concurrency:

Multithread safe.

Resource Use:

Occupies screen space.

Member Function: TSystemWindow::TSystemWindow

  1. TSystemWindow (const TGArea & itsExtent, const TAbstractLayerableReference & relativeToWindow, bool isVisible =true, bool eraseDamage =true, EWindowPosition itsPosition =kBehind)
  2. TSystemWindow (const TGArea & itsExtent, const TSystemLayerable & relativeToWindow, bool isVisible =true, bool eraseDamage =true, EWindowPosition itsPosition =kBehind)
  3. TSystemWindow (const TGArea & itsExtent, EWindowPosition itsPosition, bool isVisible =true, bool eraseDamage =true)
  4. TSystemWindow (const TSystemLayerSurrogate & inLayer, const TGArea & itsExtent, EWindowPosition itsPosition, bool isVisible =true, bool eraseDamage =true)

Interface Category:

API.

Purpose:

  1. Creates a window behind another window.
  2. Creates a window behind another window.
  3. Creates a window in the root layer.
  4. Creates a window in a layer.

Calling Context:

  1. Called to create a window behind another, in its layer.
  2. Called to create a window behind another, in its layer.
  3. Called to create a window in the root layer.
  4. Called to create a window in a layer.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Cannot be copied or streamed.

Member Function: TSystemWindow::~TSystemWindow

~ TSystemWindow ()

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:

Multithread safe.

Other Considerations:

Removes from screen if visible.

Member Function: TSystemWindow::GetVisArea

void GetVisArea (TGArea & area) const

Interface Category:

API.

Purpose:

Gets the visible area of the window.

Calling Context:

Called when a client wants access to the visible area of the window.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TSystemWindow::GetVisAreaTimeStamp

TPseudoTimeStamp GetVisAreaTimeStamp () const

Interface Category:

API.

Purpose:

Gets the time stamp of the visible area.

Calling Context:

Called to determine the time stamp of the visible area. The time stamp is used to determine if the visible area has changed.

Parameters:

Return Value:

A time stamp representing the version of the visible area.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TSystemWindow::GetWindowPort

TGrafPort * GetWindowPort () const

Interface Category:

API.

Purpose:

Gets a TGrafPort object for the window.

Calling Context:

Called when a client needs to draw to the window.

Parameters:

Return Value:

A pointer to a TGrafPort derivative.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

This port will clip to the window's visible area automatically. It also synchronizes with the WindowServer.

Member Function: TSystemWindow::SetExtent

void SetExtent (const TGArea &, bool addToUpdate)

Interface Category:

API.

Purpose:

Sets the extent of the window.

Calling Context:

Called to change the position, shape, and/or size of a window.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

When this function is called on a TSystemWindow, no damage is generated for the window by the server. When the optional parameter addToUpdate is set to true (true), damage is generated anyway.

Member Function: TSystemWindow::GetWindowContaining

static bool GetWindowContaining (const TGPoint & location, TLayerableReference & theWindow)

Interface Category:

API.

Purpose:

Gets the window that is under a specified point on the screen.

Calling Context:

Called by the PositionalEventServer to get the topmost window that is under a point.

Parameters:

Return Value:

Returns true if a window is found under a specified point.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TSystemWindow::GetSurrogate

  1. virtual const TLayerableSurrogate & GetSurrogate () const
  2. virtual TLayerableSurrogate & GetSurrogate ()

Interface Category:

API.

Purpose:

  1. Gets a const TLayerableSurrogate.
  2. Gets a reference to TLayerableSurrogate.

Calling Context:

  1. Called to return the const object.
  2. Called to return a reference to the object.

Parameters:

Return Value:

Returns either the left-side const TLayerableSurrogate or a reference to TLayerableSurrogate.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TSystemWindow::SetRootBackground

  1. static void SetRootBackground (const TAttributeState & backFill, const MDrawable & newBackground, TSystemWindowSurrogate :: EBGStyle newStyle =TSystemWindowSurrogate :: kCentered)
  2. static void SetRootBackground (const TAttributeState & backFill)

Interface Category:

API.

Purpose:

  1. Sets the system window root background and all of its parameters.
  2. Sets the system window root background.

Calling Context:

  1. Called to set the background parameters for the system window root.
  2. Called to set the back fill parameter for the system window root background.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TSystemWindow::SetBackground

  1. void SetBackground (const TAttributeState & backFill, const MDrawable & newBackground, TSystemWindowSurrogate :: EBGStyle newStyle =TSystemWindowSurrogate :: kCentered)
  2. void SetBackground (const TAttributeState & backFill)

Interface Category:

API.

Purpose:

  1. Sets the background parameters for the system window.
  2. Sets the system window background.

Calling Context:

  1. Called to set the background parameters for the system window
  2. Called to set the back fill parameter for the system window.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TSystemWindow::MoveExtent

void MoveExtent (const TGPoint &)

Interface Category:

API.

Purpose:

Repositions the window.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

When MoveExtent is called on a TSystemWindow, no damage is generated by the server in most circumstances. MoveExtent actually moves the bits on the screen, so no damage is needed except for the newly uncovered area. Damage is generated for the newly uncovered area.

Member Function: TSystemWindow::GetExtent

void GetExtent (TGArea & area) const

Interface Category:

API.

Purpose:

Returns the current extent of the window.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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.