Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TDecoration
Inherited By:
TBackground
TFramedBorder
Purpose:
TBorder is a decoration that draws a border of a given width around the inside of the decoration bounds. TBorder derives from TDecoration.
When paints are being used explicitly instead of implicitly via the MGUIAttributeUser mixing, TBorder and its derived classes maintain a current fill paint that is used to fill the border. You can use AdoptPaint or SetPaint to establish a new fill paint. Setting the fill paint to NIL, or orphaning the fill paint, resets the fill paint back to its default.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Derive from TBorder to add further to the border decoration.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TBorder ()
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: TBorder::operator=
TBorder & operator =(const TBorder &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function by using the operator in an assignment statement.
Parameters:
- const TBorder & -The source object for the assignment.
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: TBorder::operator>>=
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream the object streams itself out to.
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: TBorder::operator<<=
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream the object streams itself in from.
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: TBorder::TransformBy
virtual void TransformBy (const TGrafMatrix & mat)
Interface Category:
API.
Purpose:
Transforms the border, by the specified matrix, using matrix concatenation.
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 MGraphic's function of the same name.
Member Function: TBorder::SetThickness
virtual void SetThickness (const GCoordinate width)
Interface Category:
API.
Purpose:
Sets the width of this border to the specified value. An input value less than 0 is ignored and leaves the border width unchanged. A width of 0 fills the entire decoration bounds with the fill paint. The default border width is 1.
Calling Context:
Call this function directly.
Parameters:
- const GCoordinate width -The new width for this border.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBorder::SetFillType
virtual void SetFillType (EBorderFillType type)
Interface Category:
API.
Purpose:
Sets which paint type to use when filling the interior of this border. With this function you can fill the border with its normal fill paint, its shadow paint, its light shadow paint, or you can turn off fill altogether. This function requires an input parameter of type EBorderFill, defined by this class.
Calling Context:
Call this function directly.
Parameters:
- EBorderFillType type -The paint type to use when filling this border.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBorder::GetFillType
EBorderFillType GetFillType () const
Interface Category:
API.
Purpose:
Returns the current paint type used when filling this border. This function returns a value of type EBorderFillType, defined by this class.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the current paint type used when filling this border.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBorder::AdoptPaint
virtual void AdoptPaint (TPaint *)
Interface Category:
API.
Purpose:
Adopts the specified fill paint for drawing this border. 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:
Called from SetPaint and from AdoptPaint in TBorder's derived classes. You can also call this function directly.
Parameters:
- TPaint * -The new fill paint for drawing this border.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
You can also use SetPaint to set the fill 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: TBorder::CopyPaint
TPaint * CopyPaint () const
Interface Category:
API.
Purpose:
Creates a copy of the fill paint currently used by this border.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the newly created copy of the fill paint object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBorder::GetPaint
TPaint * GetPaint () const
Interface Category:
API.
Purpose:
Returns a pointer to the fill paint currently used by this border. You can set the current fill paint with AdoptPaint or SetPaint.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the current fill paint. This function returns NIL if no paint has been set.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBorder::SetPaint
virtual void SetPaint (const TPaint &)
Interface Category:
API.
Purpose:
Sets the fill paint used for drawing this border. SetPaint creates a copy of the input parameter, and then calls AdoptPaint to adopt the copy as its new fill paint.
Calling Context:
Call this function directly.
Parameters:
- const TPaint & -The new fill paint for drawing this border.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
You can also use AdoptPaint to set the fill 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: TBorder::OrphanPaint
virtual TPaint * OrphanPaint ()
Interface Category:
API.
Purpose:
Orphans the current fill paint object and resets the current fill paint to its default value. This function does not delete the orphaned fill paint object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the orphaned fill paint object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBorder::Draw
virtual void Draw (TGrafPort &) const
Interface Category:
API.
Purpose:
Draws this border by calling DrawBorder.
Calling Context:
Call this function directly.
Parameters:
- TGrafPort & -The graf port into which to draw.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function overrides MGraphic's function of the same name.
Member Function: TBorder::DrawBorder
virtual void DrawBorder (TGrafPort &) const
Interface Category:
API.
Purpose:
Draws the border using the current fill paint, fill type, and border thickness.
Calling Context:
Called by Draw. Friend classes or classes deriving from TBorder can call this function directly.
Parameters:
- TGrafPort & -The graf port into which to draw.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TBorder::ClipTopLeft
virtual TGArea ClipTopLeft (const GCoordinate thickness) const
Interface Category:
API.
Purpose:
Calculates the L-shaped area required to clip out the top and left edges of the border. The clip area has diagonal bevels on the top-right and bottom-left corners. This function creates and returns a TGArea object. The caller is responsible for destroying the newly created area object.
Calling Context:
Called directly by friend classes or classes deriving from TBorder.
Parameters:
- const GCoordinate thickness -The border width.
Return Value:
Returns the clip area.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TBorder::ClipTopRight
virtual TGArea ClipTopRight (const GCoordinate thickness) const
Interface Category:
API.
Purpose:
Calculates the L-shaped area required to clip out the top and right edges of the border. The clip area has diagonal bevels on the top-left and bottom-right corners. This function creates and returns a TGArea object. The caller is responsible for destroying the newly created area object.
Calling Context:
Called directly by friend classes or classes deriving from TBorder.
Parameters:
- const GCoordinate thickness -The border width.
Return Value:
Returns the clip area.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TBorder::ClipBottomRight
virtual TGArea ClipBottomRight (const GCoordinate thickness) const
Interface Category:
API.
Purpose:
Calculates the L-shaped area required to clip out the bottom and right edges of the border. The clip area has diagonal bevels on the top-right and bottom-left corners. This function creates and returns a TGArea object. The caller is responsible for destroying the newly created area object.
Calling Context:
Called directly by friend classes or classes deriving from TBorder.
Parameters:
- const GCoordinate thickness -The border width.
Return Value:
Returns the clip area.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TBorder::ClipBottomLeft
virtual TGArea ClipBottomLeft (const GCoordinate thickness) const
Interface Category:
API.
Purpose:
Calculates the L-shaped area required to clip out the bottom and left edges of the border. The clip area has diagonal bevels on the top-left and bottom-right corners. This function creates and returns a TGArea object. The caller is responsible for destroying the newly created area object.
Calling Context:
Called directly by friend classes or classes deriving from TBorder.
Parameters:
- const GCoordinate thickness -The border width.
Return Value:
Returns the clip area.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
Member Function: TBorder::IsInteriorBorder
virtual bool IsInteriorBorder (void) const
Interface Category:
API.
Purpose:
Determines whether to draw an interior edge on this border.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if this is an interior border, false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBorder::SetInteriorBorder
virtual void SetInteriorBorder (const bool on)
Interface Category:
API.
Purpose:
Sets this to be an interior border or not, depending on the value of the specified Boolean flag. For the TRaisedBorder and TRecessedBorder derived classes, a border that has an interior edge results in the interior space looking like it is at the same level as the exterior of the border. A border that has no interior edge results in what looks like a raised platform.
Calling Context:
Call this function directly.
Parameters:
- const bool on -true specifies an interior border, false specifies an exterior border.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBorder::GetThickness
virtual GCoordinate GetThickness () const
Interface Category:
API.
Purpose:
Returns the current width of this border. The default border width is 1.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the current border width.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TBorder ()
- TBorder (const TGRect & bounds, GCoordinate thickness =kDefaultThickness, bool interior =kDefaultInteriorState)
- TBorder (const TGRect & bounds, const TPaint & fill, GCoordinate thickness =kDefaultThickness, bool interior =kDefaultInteriorState)
- TBorder (const MGraphic & bounds, GCoordinate thickness =kDefaultThickness, bool interior =kDefaultInteriorState)
- TBorder (const MGraphic & bounds, const TPaint & fill, GCoordinate thickness =kDefaultThickness, bool interior =kDefaultInteriorState)
- TBorder (const TView & bounds, GCoordinate thickness =kDefaultThickness, bool interior =kDefaultInteriorState)
- TBorder (const TView & bounds, const TPaint & fill, GCoordinate thickness =kDefaultThickness, bool interior =kDefaultInteriorState)
- TBorder (const TBorder &)
Interface Category:
API.
Purpose:
- Default constructor.
2-7. Creates a new border using the specified bounds, paint, and border thickness.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
2-7. Call these functions directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TGRect & bounds -The outer bounds of the new border.
- GCoordinate thickness =kDefaultThickness -The thickness of the new border.
- bool interior =kDefaultInteriorState -Specifies whether the border has an interior.
- const TGRect & bounds -The outer bounds of the new border.
- const TPaint & fill -The fill paint of the new border.
- GCoordinate thickness =kDefaultThickness -The thickness of the new border.
- bool interior =kDefaultInteriorState -Specifies whether the border has an interior.
- const MGraphic & bounds -The MGraphic object from which to derive the bounds of the new border.
- GCoordinate thickness =kDefaultThickness -The thickness of the new border.
- bool interior =kDefaultInteriorState -Specifies whether the border has an interior.
- const MGraphic & bounds -The MGraphic object from which to derive the bounds of the new border.
- const TPaint & fill -The fill paint of the new border.
- GCoordinate thickness =kDefaultThickness -The thickness of the new border.
- bool interior =kDefaultInteriorState -Specifies whether the border has an interior.
- const TView & bounds -The TView object from which to derive the bounds of the new border.
- GCoordinate thickness =kDefaultThickness -The thickness of the new border.
- bool interior =kDefaultInteriorState -Specifies whether the border has an interior.
- const TView & bounds -The TView object from which to derive the bounds of the new border.
- const TPaint & fill -The fill paint of the new border.
- GCoordinate thickness =kDefaultThickness -The thickness of the new border.
- bool interior =kDefaultInteriorState -Specifies whether the border has an interior.
- const TBorder & -The border object to copy.
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.