![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
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.
- TSystemWindow (const TGArea & itsExtent, const TAbstractLayerableReference & relativeToWindow, bool isVisible =true, bool eraseDamage =true, EWindowPosition itsPosition =kBehind)
- TSystemWindow (const TGArea & itsExtent, const TSystemLayerable & relativeToWindow, bool isVisible =true, bool eraseDamage =true, EWindowPosition itsPosition =kBehind)
- TSystemWindow (const TGArea & itsExtent, EWindowPosition itsPosition, bool isVisible =true, bool eraseDamage =true)
- TSystemWindow (const TSystemLayerSurrogate & inLayer, const TGArea & itsExtent, EWindowPosition itsPosition, bool isVisible =true, bool eraseDamage =true)
Interface Category:
API.
Purpose:
- Creates a window behind another window.
- Creates a window behind another window.
- Creates a window in the root layer.
- Creates a window in a layer.
Calling Context:
- Called to create a window behind another, in its layer.
- Called to create a window behind another, in its layer.
- Called to create a window in the root layer.
- Called to create a window in a layer.
Parameters:
- const TGArea & itsExtent -Extent of new window.
- const TAbstractLayerableReference & relativeToWindow- Window to put new window behind.
- bool isVisible =true -Window will be initially visible.
- bool eraseDamage =true -Have WindowServer erase damage.
- EWindowPosition itsPosition =kBehind -Specifies that the new window is placed behind the relativeToWindow window
- const TGArea & itsExtent -Extent of new window.
- const TSystemLayerable & relativeToWindow- Window to put new window behind.
- bool isVisible =true -Window will be initially visible.
- bool eraseDamage =true -Have WindowServer erase damage.
- EWindowPosition itsPosition =kBehind -Specifies that the new window is placed behind the relativeToWindow window
- const TGArea & itsExtent -Extent of new window.
- EWindowPosition itsPosition -Put new window on top or behind others.
- bool isVisible =true -Window will be initially visible.
- bool eraseDamage =true -Have WindowServer erase damage.
- const TSystemLayerSurrogate & inLayer -Layer to put new window in.
- const TGArea & itsExtent -Extent of new window.
- EWindowPosition itsPosition -Put new window on top or behind others.
- bool isVisible =true -Window will be initially visible.
- bool eraseDamage =true -Have WindowServer erase damage.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
Cannot be copied or streamed.
~ 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:
- TGArea & area -The visible area of the window, which is filled in by the function.
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:
- const TGArea & -New area of the window.
- bool addToUpdate -This optional parameter, when set to true (true) will generate update notifications and will generate damage.
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
- virtual const TLayerableSurrogate & GetSurrogate () const
- virtual TLayerableSurrogate & GetSurrogate ()
Interface Category:
API.
Purpose:
- Gets a const TLayerableSurrogate.
- Gets a reference to TLayerableSurrogate.
Calling Context:
- Called to return the const object.
- Called to return a reference to the object.
Parameters:
- Takes no parameters.
- Takes no 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
- static void SetRootBackground (const TAttributeState & backFill, const MDrawable & newBackground, TSystemWindowSurrogate :: EBGStyle newStyle =TSystemWindowSurrogate :: kCentered)
- static void SetRootBackground (const TAttributeState & backFill)
Interface Category:
API.
Purpose:
- Sets the system window root background and all of its parameters.
- Sets the system window root background.
Calling Context:
- Called to set the background parameters for the system window root.
- 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
- void SetBackground (const TAttributeState & backFill, const MDrawable & newBackground, TSystemWindowSurrogate :: EBGStyle newStyle =TSystemWindowSurrogate :: kCentered)
- void SetBackground (const TAttributeState & backFill)
Interface Category:
API.
Purpose:
- Sets the background parameters for the system window.
- Sets the system window background.
Calling Context:
- Called to set the background parameters for the system window
- 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:
- const TGPoint & -The difference between the windowÕs old location and the new location of the window.
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:
- TGArea & area -A reference to the area of the window, which is set by the function.
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.