Class: TPictureFrameBorder

Declaration: Decoration.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TRecessedBorder

Inherited By:

TPictureFrameBackground

Purpose:

TPictureFrameBorder derives from TRecessedBorder. A picture frame border is like a raised border, except it attempts to provide a smooth rounded picture frame appearance. Each corner is triangulated and the pen width is adjusted to make a smooth transition of shades across the border. This border has a minimum width of 4 + frameWidth + 1. TPictureFrameBorder is considerably more expensive than the other borders. It always uses a shadow paint, light shadow, normal, and highlight paint for the shading.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive from TPictureFrameBorder to add further to the border decoration.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TPictureFrameBorder::~TPictureFrameBorder

virtual ~ TPictureFrameBorder ()

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: TPictureFrameBorder::operator=

TPictureFrameBorder & operator =(const TPictureFrameBorder &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a 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: TPictureFrameBorder::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

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

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPictureFrameBorder::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

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

Exceptions:

Throws TInvalidVersionError if the object has detected an unsupportable version during the stream-in process.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPictureFrameBorder::Draw

virtual void Draw (TGrafPort &) const

Interface Category:

API.

Purpose:

Draws the picture frame border.

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 overrides TRecessedBorder's function of the same name.

Member Function: TPictureFrameBorder::AdoptLightShadowPaint

virtual void AdoptLightShadowPaint (TPaint *)

Interface Category:

API.

Purpose:

Adopts the specified paint object as this border's light shadow paint. To reset the light shadow paint back to its default value, specify NIL as the input parameter to this function. This function calls TDecoration::CreateLightShadowFromFill to create the default light shadow paint from the fill paint. AdoptLightShadowPaint deletes the previous light shadow paint object. Normally the light shadow paint is calculated from the fill paint in the function AdoptPaint. This function provides an override for that default.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

You can also use SetLightShadowPaint to set the light shadow paint. This member function is not used by the standard UI elements. The internal MGUIAttributeUser mixin is used instead to provide the various paints.

Member Function: TPictureFrameBorder::CopyLightShadowPaint

TPaint * CopyLightShadowPaint () const

Interface Category:

API.

Purpose:

Creates a copy of the current light shadow paint.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the newly created copy of the light shadow paint, which can be NIL if none was set.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPictureFrameBorder::GetLightShadowPaint

TPaint * GetLightShadowPaint () const

Interface Category:

API.

Purpose:

Returns a pointer to the current light shadow paint object. The current light shadow paint object can be set with AdoptLightShadowPaint or SetLightShadowPaint.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the current light shadow paint object, which can be NIL if none was set.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPictureFrameBorder::SetLightShadowPaint

virtual void SetLightShadowPaint (const TPaint &)

Interface Category:

API.

Purpose:

Sets the light shadow paint used for drawing the picture frame around this border. SetLightShadowPaint creates a copy of the input parameter, and then calls AdoptLightShadowPaint to adopt the copy as its new light shadow paint. Normally the light shadow paint is calculated from the fill paint in the function AdoptPaint. This function provides an override for that default.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

You can also use AdoptLightShadowPaint to set the light shadow paint. This member function is not used by the standard UI elements. The internal MGUIAttributeUser mixin is used instead to provide the various paints.

Member Function: TPictureFrameBorder::OrphanLightShadowPaint

virtual TPaint * OrphanLightShadowPaint ()

Interface Category:

API.

Purpose:

Orphans the current light shadow paint object and resets the light shadow paint back to the default, which is derived from the current fill paint. This function does not delete the orphaned light shadow paint object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the orphaned paint object, which can be NIL if none was set.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPictureFrameBorder::AdoptPaint

virtual void AdoptPaint (TPaint *)

Purpose:

Sets the fill paint to the specified paint object and then recalculates the frame, highlight, shadow, and light shadow paints from it. To reset the fill paint back to its default value, specify NIL as the input parameter to this function. AdoptPaint deletes the previous fill paint object.

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 overrides TRecessedBorder's function of the same name. This member function is not used by the standard UI elements. The internal MGUIAttributeUser mixin is used instead to provide the various paints.

Member Function: TPictureFrameBorder::OrphanPaint

virtual TPaint * OrphanPaint ()

Interface Category:

API.

Purpose:

Orphans this border's fill paint. This function resets the fill paint to the default and then recalculates the frame, highlight, shadow, and light shadow paints from it. This function does not delete the orphaned fill paint object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the orphaned fill paint, which can be NIL if none was set.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function overrides TRecessedBorder's function of the same name.

Member Function: TPictureFrameBorder::DrawFrame

virtual void DrawFrame (TGrafPort & port) const

Interface Category:

API.

Purpose:

Draws the frame for this border. This function changes the way TFramedBorder draws the frame.

Calling Context:

Called from Draw. Friend classes or classes deriving from TPictureFrameBorder can 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 and overrides TFramedBorder's function of the same name.

Member Function: TPictureFrameBorder::GetThickness

virtual GCoordinate GetThickness () const

Interface Category:

API.

Purpose:

Returns the current width of this picture frame border. This is not always the same as TBorder::GetThickness. The picture frame border has a minimum width of 4 + frameWidth + 1.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the current picture frame border width.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function overrides TBorder's function of the same name.

Member Function: TPictureFrameBorder::TPictureFrameBorder

  1. TPictureFrameBorder ()
  2. TPictureFrameBorder (const TGRect & bounds, GCoordinate thickness =kDefaultPictureFrameThickness, bool interior =kDefaultInteriorState)
  3. TPictureFrameBorder (const TGRect & bounds, const TPaint & fill, GCoordinate thickness =kDefaultPictureFrameThickness, bool interior =kDefaultInteriorState)
  4. TPictureFrameBorder (const MGraphic & bounds, GCoordinate thickness =kDefaultPictureFrameThickness, bool interior =kDefaultInteriorState)
  5. TPictureFrameBorder (const MGraphic & bounds, const TPaint & fill, GCoordinate thickness =kDefaultPictureFrameThickness, bool interior =kDefaultInteriorState)
  6. TPictureFrameBorder (const TView & bounds, GCoordinate thickness =kDefaultPictureFrameThickness, bool interior =kDefaultInteriorState)
  7. TPictureFrameBorder (const TView & bounds, const TPaint & fill, GCoordinate thickness =kDefaultPictureFrameThickness, bool interior =kDefaultInteriorState)
  8. TPictureFrameBorder (const TPictureFrameBorder &)
  9. TPictureFrameBorder (TGRect * boundsToAlias, GCoordinate thickness =kDefaultPictureFrameThickness, bool interior =kDefaultInteriorState)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. 2-7. Creates a new border using the specified bounds, paint, and border thickness.
  3. Copy constructor.
  4. Constructor that takes a bounds, which it will alias. The caller guarantees not to change the bounds until the decoration is destructed. This saves a lot of heap space.

Calling Context:

  1. Called by the stream-in operators.
  2. 2-7. Call these functions directly.
  3. Called to copy an object.
  4. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

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