BTextFeature Class Reference

#include <BTextFeature.h>

Inheritance diagram for BTextFeature:

Inheritance graph
[legend]

List of all members.


Detailed Description

A feature containing a single line of text.

The geometry of a BTextFeature must be a BPointGeo that gives the insertion point for the text.

Public Member Functions

 BTextFeature (const BTextFeature &feat)
 Copy constructor.
 BTextFeature (EFeatureType type)
 Constructs a BTextFeature of the specified type.
 BTextFeature ()
 Default constructor.
virtual BFeatureClone (void) const
 Creates a deep-copy of this object.
virtual size_t ComputeSize (void) const
 Computes the size of the BByteArray required to store this object.
virtual void FromByteArray (const BByteArray &bytes, size_t &startPos)
 Initializes an instance of this object from a BByteArray.
BFont GetFont (void) const
 Gets the BFont that gives the display characteristics for the text.
virtual double GetHeight (void) const
 Gets the height of the box that contains the text.
virtual const BRectGetMBR (void) const
 Gets the minimum bounding rectangle for this BTextFeature.
virtual BString GetText (void) const
 Gets the text.
virtual double GetWidth (void) const
 Gets the width of the box that contains the text.
void SetFont (const BFont &font)
 Sets the BFont that gives the display characteristics for the text.
virtual void SetGeometry (const BGeometryPtr &geo)
 Sets the geometry for this BTextFeature.
void SetHeight (double height)
 Sets the height of the box that contains the text.
void SetText (const BString &text)
 Sets the text.
void SetWidth (double width)
 Sets the width of the box that contains the text.
virtual BByteArray ToByteArray (void) const
 Stores this object in a BByteArray.
virtual void Transform (const BTransform &cst)
 Transform this BTextFeature's geometry to a different coordinate system.
virtual void TransformReverse (const BTransform &cst)
 Transform this BTextFeature's geometry to a different coordinate system using the "reverse" of the BTransform.
virtual ~BTextFeature ()
 Destructor.

Protected Attributes

BFont m_font
 The BFont that gives the display characteristics for the text.
double m_height
 The height of this BTextFeature.
BRect m_mbr
 the "cached" mbr
BString m_text
 The text.
double m_width
 The width of this BTextFeature.


Constructor & Destructor Documentation

BTextFeature (  )  [inline]

Default constructor.

BTextFeature ( EFeatureType  type  )  [inline]

Constructs a BTextFeature of the specified type.

This constructor is generally used by derrived classes that wish to create a specific type of BTextFeature, such as a BSymbolFeature or a BMultilineTextFeature.

Parameters:
type The type of BTextFeature to create.

BTextFeature ( const BTextFeature feat  )  [inline]

Copy constructor.

Parameters:
feat The BTextFeature object to copy.

virtual ~BTextFeature (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual BFeature* Clone ( void   )  const [inline, virtual]

Creates a deep-copy of this object.

Returns:
A deep-copy of this object.

Reimplemented from BFeature.

Reimplemented in BMultilineTextFeature, and BSymbolFeature.

virtual size_t ComputeSize ( void   )  const [inline, virtual]

Computes the size of the BByteArray required to store this object.

Returns:
The size of the BByteArray.

Reimplemented from BFeature.

Reimplemented in BMultilineTextFeature, and BSymbolFeature.

virtual void FromByteArray ( const BByteArray bytes,
size_t &  startPos 
) [virtual]

Initializes an instance of this object from a BByteArray.

Parameters:
bytes The BByteArray containing the byte representation of the object.
startPos The position in the BByteArray where the byte representation begins. This value will be updated to point to the byte past the end of this object in the byte array.

Reimplemented from BFeature.

Reimplemented in BMultilineTextFeature, and BSymbolFeature.

BFont GetFont ( void   )  const [inline]

Gets the BFont that gives the display characteristics for the text.

Returns:
The BFont that gives the display characteristics for the text.

virtual double GetHeight ( void   )  const [virtual]

Gets the height of the box that contains the text.

Returns:
The height of the box that contains the text.

Reimplemented in BMultilineTextFeature.

virtual const BRect& GetMBR ( void   )  const [virtual]

Gets the minimum bounding rectangle for this BTextFeature.

Returns:
The minimum bounding rectangle.

Reimplemented from BFeature.

Reimplemented in BSymbolFeature.

virtual BString GetText ( void   )  const [inline, virtual]

Gets the text.

Returns:
The text.

Reimplemented in BMultilineTextFeature.

virtual double GetWidth ( void   )  const [virtual]

Gets the width of the box that contains the text.

Returns:
The width of the box that contains the text.

Reimplemented in BMultilineTextFeature.

void SetFont ( const BFont font  )  [inline]

Sets the BFont that gives the display characteristics for the text.

Parameters:
font The BFont that gives the display characteristics for the text.

virtual void SetGeometry ( const BGeometryPtr geo  )  [virtual]

Sets the geometry for this BTextFeature.

The geometry for a BTextFeature must always be a BPointGeo.

Parameters:
geo A BPointGeo that gives the insertion point for this BTextFeature.

Reimplemented from BFeature.

Reimplemented in BSymbolFeature.

void SetHeight ( double  height  )  [inline]

Sets the height of the box that contains the text.

Parameters:
height The height of the box that contains the text.

void SetText ( const BString text  )  [inline]

Sets the text.

Parameters:
text The text.

void SetWidth ( double  width  )  [inline]

Sets the width of the box that contains the text.

Parameters:
width The width of the box that contains the text.

virtual BByteArray ToByteArray ( void   )  const [virtual]

Stores this object in a BByteArray.

Returns:
A BByteArray that stores the contents of this object.

Reimplemented from BFeature.

Reimplemented in BMultilineTextFeature, and BSymbolFeature.

virtual void Transform ( const BTransform cst  )  [virtual]

Transform this BTextFeature's geometry to a different coordinate system.

Parameters:
cst The BTransform that defines the transformation.

Reimplemented from BFeature.

Reimplemented in BMultilineTextFeature, and BSymbolFeature.

virtual void TransformReverse ( const BTransform cst  )  [virtual]

Transform this BTextFeature's geometry to a different coordinate system using the "reverse" of the BTransform.

Parameters:
cst The BTransform that defines the transformation.

Reimplemented from BFeature.

Reimplemented in BMultilineTextFeature, and BSymbolFeature.


Member Data Documentation

BFont m_font [protected]

The BFont that gives the display characteristics for the text.

double m_height [protected]

The height of this BTextFeature.

BRect m_mbr [mutable, protected]

the "cached" mbr

BString m_text [protected]

The text.

double m_width [protected]

The width of this BTextFeature.


The documentation for this class was generated from the following file:

GeoTranslate 5.0 From Blue Marble Geographics