Class: TStandardWindow

Declaration: StandardWindow.h

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.

Member Function: TStandardWindow::~TStandardWindow

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

  1. TGPoint WindowToContent (TGPoint & size) const
  2. TGRect WindowToContent (TGRect & size) const

Interface Category:

API.

Purpose:

  1. Computes the size of the content view needed for the specified window size.
  2. Computes the size of the content view needed for the specified window size.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

  1. Returns a TGPoint containing the size of the content view needed for the specified window size.
  2. 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

  1. TGPoint ContentToWindow (TGPoint & size) const
  2. TGRect ContentToWindow (TGRect & size) const

Interface Category:

API.

Purpose:

  1. Computes the size of the window needed for the specified content view size.
  2. Computes the size of the window needed for the specified content view size.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

  1. Returns a TGPoint containing the size of the window needed for the specified content view size.
  2. 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:

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:

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:

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.

Member Function: TStandardWindow::Minimize

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.

Member Function: TStandardWindow::Maximize

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.

Member Function: TStandardWindow::ZoomIn

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.

Member Function: TStandardWindow::ZoomOut

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.

Member Function: TStandardWindow::SetTitle

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardWindow::CopyTitle

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:

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardWindow::operator=

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.

Member Function: TStandardWindow::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

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.

Member Function: TStandardWindow::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

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.

Member Function: TStandardWindow::GetCloseBox

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.

Member Function: TStandardWindow::GetZoomBox

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.

Member Function: TStandardWindow::GetZoomSize

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.

Member Function: TStandardWindow::Deactivate

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.

Member Function: TStandardWindow::Activate

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:

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:

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::HandleOpen

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

  1. virtual void SetResizeLimits (const TGPoint & minSize, const TGPoint & maxSize)
  2. 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:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

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:

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardWindow::MouseDown

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardWindow::SetZoomBox

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardWindow::SetCloseBox

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:

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:

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.

Member Function: TStandardWindow::HasZoomBox

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.

Member Function: TStandardWindow::HasCloseBox

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.

Member Function: TStandardWindow::IsResizable

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.

Member Function: TStandardWindow::IsZoomed

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.

Member Function: TStandardWindow::IsMinimized

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.

Member Function: TStandardWindow::OrphanChild

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:

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.

Member Function: TStandardWindow::AdoptChild

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:

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:

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

  1. virtual void SetAllocatedArea (const TGArea &)
  2. virtual void SetAllocatedArea (const TGRect &)

Interface Category:

API.

Purpose:

  1. Sets the area that's allocated to this window to the specified area. The area is in window relative coordinates.
  2. Sets the area that's allocated to this window to the specified rectangle. The rectangle is in window relative coordinates.

Calling Context:

  1. Called by clients to set the shape (allocated area) of this window . Can be called at any time once the window has been constructed.
  2. 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:

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TWindow function.

Member Function: TStandardWindow::TStandardWindow

  1. TStandardWindow (const TText & title, bool hasCloseBox =true, bool hasZoomBox =true, bool hasMinimizer =true, bool isResizable =true, bool insetTabOnRight =true)
  2. TStandardWindow ()

Interface Category:

API.

Purpose:

  1. 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.
  2. Default constructor.

Calling Context:

  1. Call this function directly.
  2. Called by the stream-in operators.

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:

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.