Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TPrimitiveFrameView
Inherited By:
TDocumentWindow
Purpose:
TStandardWindow derives from TPrimitiveFrameView (which derives from TWindow) and is a concrete class implementing the standard window for the Taligent Human Interface.
TStandardWindow is a window with a window title, a close box, a zoom box, a minimizer, resize corners, and a window tab. The window tab is responsible for laying out the various window controls and the window title. Clients specify the window title and the presence or absence of window controls when constructing a TStandardWindow. (The Boolean to indicate whether the window tab is inset from the right side of the window is currently ignored.) TStandardWindow contains a content view that is always resized to match the size of the window's interior. TStandardWindow's content view is not necessarily a TContentView but can be any object inheriting from TView. A TStandardWindow only contains one content view, but the content view can have any number of subviews.
TStandardWindow also inherits mouse event handling from MMouseEventHandler (one of the classes that TWindow derives from).
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
You do not normally derive from TStandardWindow, but rather from TWindow. The only reason to derive from TStandardWindow is to provide additional controls in the tab area of the window.
Classes deriving from TStandardWindow may override MouseDown to implement specialized mouse event handling, SetWindowSize, GetWindowSize, MoveWindowTo, and MoveWindowBy to keep track of window position and size, and to lay out the window contents properly. TDocumentWindow derives from TStandardWindow.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TStandardWindow ()
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: TStandardWindow::WindowToContent
- TGPoint WindowToContent (TGPoint & size) const
- TGRect WindowToContent (TGRect & size) const
Interface Category:
API.
Purpose:
- Computes the size of the content view needed for the specified window size.
- Computes the size of the content view needed for the specified window size.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- TGPoint & size -The size of the window.
- TGRect & size -The size of the window.
Return Value:
- Returns a TGPoint containing the size of the content view needed for the specified window size.
- Returns a TGRect containing the size of the content view needed for the specified window size.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TStandardWindow::ContentToWindow
- TGPoint ContentToWindow (TGPoint & size) const
- TGRect ContentToWindow (TGRect & size) const
Interface Category:
API.
Purpose:
- Computes the size of the window needed for the specified content view size.
- Computes the size of the window needed for the specified content view size.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- TGPoint & size -The size of the content view.
- TGRect & size -The size of the content view.
Return Value:
- Returns a TGPoint containing the size of the window needed for the specified content view size.
- Returns a TGRect containing the size of the window needed for the specified content view size.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TStandardWindow::SetWindowSize
virtual void SetWindowSize (const TGPoint &)
Interface Category:
API.
Purpose:
Overridden function for setting the window size. The TGPoint parameter represents the size of the window in the normal, unminimized state (even if the window is currently minimized). SetWindowSize ensures that the window size remains within the current resize limits.
Calling Context:
Call this function directly. SetWindowSize is also called from ZoomIn and ZoomOut.
Parameters:
- const TGPoint & -The new size for the window; where the x-coordinate indicates the new width, and the y-coordinate indicates the new height.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TWindow function.
Member Function: TStandardWindow::GetWindowSize
virtual TGPoint GetWindowSize () const
Interface Category:
API.
Purpose:
Overridden function for getting the window size. The TGPoint parameter represents the size of the window in the normal, unminimized state (even if the window is currently minimized).
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a TGPoint whose x-coordinate is the window's width, and whose y-coordinate is the window's height.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TWindow function.
Member Function: TStandardWindow::MoveWindowTo
virtual void MoveWindowTo (const TGPoint &)
Interface Category:
API.
Purpose:
Overridden function that moves the window within its parent view to the specified location. The upper-left corner is placed at the specified point. Placement is by the upper left corner of the bounding rect of the unminimized window. Clients should use this function instead of TView::TranslateTo.
Calling Context:
Call this function directly.
Parameters:
- const TGPoint & -The new location for the upper left corner of the window. This point is specified in the parent view's coordinate system.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TWindow function.
Member Function: TStandardWindow::MoveWindowBy
virtual void MoveWindowBy (const TGPoint &)
Interface Category:
API.
Purpose:
Overridden function that moves the window within its parent view, relative to its current location, by the specified delta values. Clients should use this function instead of TView::TranslateBy.
Calling Context:
Call this function directly.
Parameters:
- const TGPoint & -The delta-x and delta-y values by which to move the window. These values are specified in the parent view's coordinate system.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TWindow function.
Member Function: TStandardWindow::OrphanContentView
virtual TView * OrphanContentView ()
Interface Category:
API.
Purpose:
Removes the content view from the window's interior. This function returns the orphaned content view. The caller is responsible for destroying the old content view.
A TStandardWindow can have only one view in its interior area; in other words, it can only have one content view. However, the content view can have any number of subviews. The content view is always resized to match the size of the window's interior.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the window's old content view. The caller is responsible for destroying the old content view.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Minimize ()
Interface Category:
API.
Purpose:
Minimizes (reduces to a tab) a window.
Calling Context:
Call this function directly, although it's typically called automatically when the user clicks on the minimizer control.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Maximize ()
Interface Category:
API.
Purpose:
Maximizes (restores to normal size) a window.
Calling Context:
Call this function directly, although it's typically called automatically when the user clicks on the minimizer control when the window is already in a minimized state.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void ZoomIn ()
Interface Category:
API.
Purpose:
Restores the window to its previous size and location. ZoomIn maximizes the window before zooming.
Calling Context:
Call this function directly, although it's typically called when the user clicks on the zoom box.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void ZoomOut ()
Interface Category:
API.
Purpose:
Resizes the window to the size returned by GetZoomSize. If the window is minimized when this is called, ZoomOut maximizes the window before zooming. The new size is pinned to the current display size (the maximum size for the window). ZoomOut moves the window to reveal its contents, if necessary.
Calling Context:
Call this function directly, although it's typically called when the user clicks on the zoom box.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetTitle (const TText &)
Interface Category:
API.
Purpose:
Sets the window's title and re-lays out the window tab.
Calling Context:
Call this function directly.
Parameters:
- const TText & -The new title for the window.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TText * CopyTitle () const
Interface Category:
API.
Purpose:
Creates and returns a copy of the window's title.
Calling Context:
Creates a copy of the window title.
Parameters:
Return Value:
Returns a copy of the window's title.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The client owns the storage to the returned window title and is responsible for destroying it.
Member Function: TStandardWindow::GetExteriorColor
void GetExteriorColor (TColor & color) const
Interface Category:
API.
Purpose:
Retrieves the exterior color of the window.
Calling Context:
Call this function directly.
Parameters:
- TColor & color -The window's exterior window color as returned by this function.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TStandardWindow::GetInteriorColor
void GetInteriorColor (TColor & color) const
Interface Category:
API.
Purpose:
Retrieves the interior color of the window.
Calling Context:
Call this function directly.
Parameters:
- TColor & color -The window's interior window color as returned by this function.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TStandardWindow & operator =(const TStandardWindow &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function by using the operator in an assignment statement.
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.
virtual TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -The stream to which the object streams itself out.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -The stream from which the object streams itself in.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TCloseBox * GetCloseBox () const
Interface Category:
API.
Purpose:
Gets the close box for the window.
Calling Context:
Call this if you derive from TStandardWindow and need access to the close box.
Parameters:
Return Value:
Returns the window's current close box.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
TZoomBox * GetZoomBox () const
Interface Category:
API.
Purpose:
Gets the zoom box for the window.
Calling Context:
Call this if you derive from TStandardWindow and need access to the zoom box.
Parameters:
Return Value:
Returns the window's current zoom box.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TStandardWindow::GetMinimizer
TMinimizer * GetMinimizer () const
Interface Category:
API.
Purpose:
Gets the minimizer for the window.
Calling Context:
Call this if you derive from TStandardWindow and need access to the minimizer.
Parameters:
Return Value:
Returns the window's current minimizer.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual TGPoint GetZoomSize () const
Interface Category:
API.
Purpose:
Returns the size that the window should be when zoomed out. The default returns the maximum resize limit that can be set using the SetResizeLimits function.
Calling Context:
Derived classes can call this function directly. GetZoomSize is also called from ZoomOut.
Parameters:
Return Value:
Returns a TGPoint whose x-coordinate is the zoomed out width, and whose y-coordinate is the zoomed out height.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TStandardWindow::HandleEnable
virtual void HandleEnable ()
Interface Category:
API.
Purpose:
Overridden function that increases the window size in order to accommodate the shadow. Also shows resize corners, close box, zoom box, and minimizer if present. This function forces a window redraw by calling Invalidate so that window is redrawn in its enabled look.
HandleEnable is part of TWindow's enable and disable protocol. Override the HandleEnable function to implement specific enable behavior.
Calling Context:
Called from the Enable function. Enable is typically called by an activation policy object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TWindow function.
Member Function: TStandardWindow::HandleDisable
virtual void HandleDisable ()
Interface Category:
API.
Purpose:
Overridden function that decreases the window size, thereby removing the shadow. Also hides resize corners, close box, zoom box, and minimizer if present. This function forces a window redraw by calling Invalidate so that window is redrawn in its disabled look.
HandleDisable is part of TWindow's enable and disable protocol. Override the HandleDisable function to implement specific disable behavior.
Calling Context:
Called from the Disable function. Disable is typically called by an activation policy object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TWindow function.
Member Function: TStandardWindow::AddWindowTabControls
virtual void AddWindowTabControls ()
Interface Category:
API.
Purpose:
Adds controls to the window tab. Override to add additional controls or to alter the ordering of existing ones.
Calling Context:
Classes overriding this function should call the parent function to add the default resizers, close box, zoom box and minimizer.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TStandardWindow::HandleChildDeactivate
virtual void HandleChildDeactivate ()
Interface Category:
API.
Purpose:
Deactivates the content view, and calls Hilite to unhighlight the window.
Calling Context:
Called as the result of a request which is posted when the view is being deactivated.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TPrimitiveFrameView function.
Member Function: TStandardWindow::HandleChildActivate
virtual void HandleChildActivate ()
Interface Category:
API.
Purpose:
Activates the content view. Opens, shows (makes visible), and highlights the window.
Calling Context:
Called as the result of a request which is posted when the view is being activated.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TPrimitiveFrameView function.
virtual void Deactivate ()
Interface Category:
API.
Purpose:
Calls the inherited DeactivateChild to deactivate the child.
Calling Context:
Called for programmatic child deactivation.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual bool Activate ()
Interface Category:
API.
Purpose:
Calls the inherited ActivateChild to activate the child.
Calling Context:
Called for programmatic child activation.
Parameters:
Return Value:
Returns true if the child was activated, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TStandardWindow::HandleAfterConnectionToViewRoot
virtual void HandleAfterConnectionToViewRoot ()
Interface Category:
API.
Purpose:
Performs setup actions required after connection to the view root. Delegates to TPrimitiveFrameView, and then initializes the window frame.
Calling Context:
Called by the View system after the window is connected (directly or indirectly) to the view root.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TView function.
Warning: this function should not make any calls that have the effect of calling any of the TViewRoot member functions BringToFront, SendToBack, or MoveBehind. If it does, the window group containing this window will not get proper notification of the ordering change, since the window group can't connect for notification until after the view root adoption is completed. See documentation for the TRequest class, and TView's GetRequestProcessor member function, regarding how to post a request to have the TViewRoot function call done later, after the window group is set up.
Member Function: TStandardWindow::AdoptTabControl
void AdoptTabControl (TView * control, GCoordinate minMargin, bool fixedToMin)
Interface Category:
API.
Purpose:
Adds the specified control to the window tab (title bar).
Calling Context:
Call this function directly.
Parameters:
- TView * control -The control to adopt.
- GCoordinate minMargin -The minimum space to leave between this control and other controls in the tab.
- bool fixedToMin -true if the control is to be placed to the left of the title, false if it is to be placed to the right of the title.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TStandardWindow::HandleHilite
virtual void HandleHilite (bool hilite)
Interface Category:
API.
Purpose:
Overridden function that highlights or unhighlights the window according to the specified input parameter. TStandardWindow's implementation invalidates the window so that it will be redrawn in its new state.
HandleHilite is part of TWindow's highlight protocol. Override the HandleHilite function to implement specific highlight behavior.
Calling Context:
Called from the Hilite function. Hilite is typically called by an activation policy object.
Parameters:
- bool hilite -Indicates whether to highlight or unhighlight the window.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TWindow function.
virtual void HandleOpen ()
Interface Category:
API.
Purpose:
Overridden function that is called when the window state is going from closed to open. TStandardWindow's implementation causes the window to be re-layed out.
HandleOpen is part of TWindow's open protocol. Developers should override the HandleOpen function to implement specific behavior when a window is opened.
Calling Context:
Called from the Open function.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TWindow function.
Member Function: TStandardWindow::NeedsClipping
virtual bool NeedsClipping ()
Interface Category:
API.
Purpose:
Tells whether or not the window needs to be clipped when drawing this view. It needs to be clipped if the window is minimized.
Calling Context:
Called by the view system to determine whether or not to clip when drawing this view.
Parameters:
Return Value:
Returns true if the window needs to be clipped, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TView function.
Member Function: TStandardWindow::SetResizeLimits
- virtual void SetResizeLimits (const TGPoint & minSize, const TGPoint & maxSize)
- virtual void SetResizeLimits (const TGRect &)
Interface Category:
API.
Purpose:
Sets the minimum and maximum resize limits for the window. The bounding box that describes the window's size will not be allowed to become smaller than the minimum resize limit, nor larger than the maximum resize limit. This function ensures that the horizontal resize limits are not set smaller than the minimum size of the window title bar.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- const TGPoint & minSize -The minimum allowable size for the window's bounding box. The x-coordinate of this point represents the smallest width and the y-coordinate of this point represents the smallest height.
- const TGPoint & maxSize -The maximum allowable size for the window's bounding box. The x-coordinate of this point represents the largest width and the y-coordinate of this point represents the largest height.
- const TGRect & -The minimum and maximum allowable sizes for the window's bounding box. The top left point specifies the minimum resize limit and the bottom right point specifies the maximum resize limit.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TWindow functions.
Member Function: TStandardWindow::SetInteriorColor
virtual void SetInteriorColor (const TColor & color)
Interface Category:
API.
Purpose:
Sets the interior color of the window used to draw the background of the content view. The default is set to white.
Calling Context:
Call this function directly.
Parameters:
- const TColor & color -The new color for the window's interior.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TStandardWindow::SetExteriorColor
virtual void SetExteriorColor (const TColor & color)
Interface Category:
API.
Purpose:
Sets the exterior color of the window used to draw the window frame. The default window exterior color is currently set by private interfaces based on the state of the window and window group.
Calling Context:
Call this function directly.
Parameters:
- const TColor & color -The new color for the window's exterior.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool MouseDown (TMouseDownEvent &)
Interface Category:
API.
Purpose:
TStandardWindow overrides MouseDown (from its parent class MMouseEventHandler) to implement window dragging behavior.
Calling Context:
MouseDown is called automatically by the view system event handling architecture.
Parameters:
Return Value:
Returns true if this function did any processing on the event. Returns false if this function ignored the event and passed it through to the next interested party.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited MMouseEventHandler function.
Member Function: TStandardWindow::SetMinimizer
virtual void SetMinimizer (bool)
Interface Category:
API.
Purpose:
Specifies whether or not the window has a minimizer, according to the specified input parameter.
Calling Context:
Clients can call to modify the indication as to whether or not the window has a minimizer, after the window has already been constructed.
Parameters:
- bool -If true, the window has a minimizer. If false, it does not.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetZoomBox (bool)
Interface Category:
API.
Purpose:
Specifies whether or not the window has a zoom box, according to the specified input parameter.
Calling Context:
Clients can call to modify the indication as to whether or not the window has a zoom box, after the window has already been constructed.
Parameters:
- bool -If true, the window has a zoom box. If false, it does not.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetCloseBox (bool)
Interface Category:
API.
Purpose:
Specifies whether or not the window has a close box, according to the specified input parameter.
Calling Context:
Clients can call to modify the indication as to whether or not the window has a close box, after the window has already been constructed.
Parameters:
- bool -If true, the window has a close box. If false, it does not.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TStandardWindow::SetResizable
virtual void SetResizable (bool)
Interface Category:
API.
Purpose:
Specifies whether or not the window is resizable, according to the specified input parameter.
Calling Context:
Clients can call to modify the indication as to whether or not the window is resizable, after the window has already been constructed.
Parameters:
- bool -If true, the window is resizable. If false, it is not.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TStandardWindow::HasMinimizer
virtual bool HasMinimizer () const
Interface Category:
API.
Purpose:
Determines if the window has a minimizer or not.
Calling Context:
Derived classes can call this function directly.
Parameters:
Return Value:
Returns true if the window has a minimizer, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool HasZoomBox () const
Interface Category:
API.
Purpose:
Determines if the window has a zoom box or not.
Calling Context:
Derived classes can call this function directly.
Parameters:
Return Value:
Returns true if the window has a zoom box, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool HasCloseBox () const
Interface Category:
API.
Purpose:
Determines if the window has a close box or not.
Calling Context:
Derived classes can call this function directly.
Parameters:
Return Value:
Returns true if the window has a close box, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
bool IsResizable () const
Interface Category:
API.
Purpose:
Determines if a window is resizable or not (a resizable window has resize corners).
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the window is resizable, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
bool IsZoomed () const
Interface Category:
API.
Purpose:
Determines if a window is zoomed in or not.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the window is zoomed, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
bool IsMinimized () const
Interface Category:
API.
Purpose:
Determines if a window is minimized (reduced to a tab) or not.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the window is minimized, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TStandardWindow::GetInteriorAllocatedArea
virtual TGRect GetInteriorAllocatedArea () const
Interface Category:
API.
Purpose:
Returns the TGRect representing the allocated area of the window interior, in the window's local coordinates.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The TGRect representing the allocated area of the window interior, in the window's local coordinates.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TPrimitiveFrameView function.
Member Function: TStandardWindow::GetInteriorAllocatedAreaInParent
virtual TGRect GetInteriorAllocatedAreaInParent () const
Interface Category:
API.
Purpose:
Returns the TGRect representing the allocated area of the window interior, in the parent's coordinate system.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The TGRect representing the allocated area of the window interior, in the parent's coordinate system.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TPrimitiveFrameView function.
virtual TView * OrphanChild (TView & child)
Interface Category:
API.
Purpose:
Orphans the view from the interior of the window. First checks to see if the TView passed in matches the content view, and returns NIL if it does not.
Calling Context:
Called by clients to remove the view from the window's interior.
Parameters:
- TView & child -The child view to orphan.
Return Value:
A pointer to the orphaned view, or NIL if the TView passed in does not match the content view.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TView function.
Member Function: TStandardWindow::GetContentView
virtual TView * GetContentView ()
Interface Category:
API.
Purpose:
Returns a pointer to the view in the interior of the window.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a pointer to the TView that is currently the content view.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void AdoptChild (TView * child)
Interface Category:
API.
Purpose:
Installs the specified view into the interior of the window.
Calling Context:
Called to add the view to the window's interior.
Parameters:
- TView * child -The view to be installed into the window's interior.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TView function.
Member Function: TStandardWindow::SetAllocatedAreaInParent
virtual void SetAllocatedAreaInParent (const TGArea &)
Interface Category:
API.
Purpose:
Sets the area that is allocated to this window in the parent view to the specified area. The area is in the window's parent's coordinate system.
To use this function, compute the area where you want the window to appear in the parent's coordinate system, and pass that area to this function.
Calling Context:
Called by clients to set the shape (allocated area) of this window. Can be called at any time once the window has been constructed.
Parameters:
- const TGArea & -The allocated area that this window should have (subject to the parent's approval.) The area is interpreted relative to the parent's coordinate system.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TPrimitiveFrameView function.
Member Function: TStandardWindow::SetAllocatedArea
- virtual void SetAllocatedArea (const TGArea &)
- virtual void SetAllocatedArea (const TGRect &)
Interface Category:
API.
Purpose:
- Sets the area that's allocated to this window to the specified area. The area is in window relative coordinates.
- Sets the area that's allocated to this window to the specified rectangle. The rectangle is in window relative coordinates.
Calling Context:
- Called by clients to set the shape (allocated area) of this window . Can be called at any time once the window has been constructed.
- Called by clients to set the shape (allocated area) of this window . Can be called at any time once the window has been constructed.
Parameters:
- const TGArea & -The allocated area that this window should have (subject to parent's approval).
- const TGRect & -The allocated area as a rectangle that this window should have.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TPrimitiveFrameView function.
Member Function: TStandardWindow::SetWindowSizeAndLocation
virtual void SetWindowSizeAndLocation (const TGPoint & desiredSize, const TGPoint & location)
Interface Category:
API.
Purpose:
Moves and resizes a window as one action. This is semantically equivalent to calling SetWindowSize followed by MoveWindowTo, but is more efficient and avoids flicker. The desiredSize parameter is in local coordinates, while the location is in parent coordinates.
Calling Context:
Call this function directly.
Parameters:
- const TGPoint & desired size -The new width and height for the window's bounding box. The x-coordinate of the point is the width, and the y-coordinate of the point is the height.
- const TGPoint & location -The new location for the upper left corner of the window. This point is specified in the parent view's coordinate system.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TWindow function.
- TStandardWindow (const TText & title, bool hasCloseBox =true, bool hasZoomBox =true, bool hasMinimizer =true, bool isResizable =true, bool insetTabOnRight =true)
- TStandardWindow ()
Interface Category:
API.
Purpose:
- The TStandardWindow constructor allows the client to specify the window title, the presence of a close box, a zoom box, a minimizer, and resize corners, and whether the window tab is inset from the right side of the window. By default, a new window contains all window controls and the window tab is not inset.
- Default constructor.
Calling Context:
- Call this function directly.
- Called by the stream-in operators.
Parameters:
- const TText & title -The title for the new window.
- bool hasCloseBox =true -Specifies whether the new window will have a close box.
- bool hasZoomBox =true -Specifies whether the new window will have a zoom box.
- bool hasMinimizer =true -Specifies whether the new window will have a minimizer.
- bool isResizable =true -Specifies whether the new window will have resize corners.
- bool insetTabOnRight =true -Specifies whether the window tab will be inset from the right side of the window. This is currently ignored.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The default constructor is protected and is only used for streaming.
Member Function: TStandardWindow::DrawContents
virtual void DrawContents (TGrafPort & port) const
Interface Category:
API.
Purpose:
This member function overrides the TPrimitiveFrameView::DrawContents function to do no drawing. All drawing for objects of class TStandardWindow is done by child views.
Calling Context:
This function is called as part of view refresh operations.
Parameters:
- TGrafPort & port -The port to which the window is to be drawn.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides the inherited TPrimitiveFrameView function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.