CartoType API
Classes | Public Types | Public Member Functions
CartoType::CLabelInfo Class Reference

#include <cartotype_map.h>

List of all members.

Classes

class  CLine

Public Types

enum  TSearchPattern { EFromMiddle, EFromLeft, EFromRight }

Public Member Functions

const TLabelStyleStyle () const
const TLineStyleLineStyle () const
bool IsEmpty () const
const MStringRawText () const
TFontFont ()
TFixed Width () const
bool Shortened () const
bool Wrapped () const
int32 Lines () const
CT_IMPORT TResult DrawText (CGraphicsContext &aGc, const TPoint &aOrigin, TRect *aBounds)
CT_IMPORT void SetLabelStyle (CMap &aMap, const TLabelStyle *aLabelStyle)
CT_IMPORT TResult Set (CMap &aMap, const TLabelStyle *aLabelStyle, const TLineStyle &aLineStyle, const CMapObject &aObject, bool aResetFonts)
CT_IMPORT TResult Reformat (const CEngine &aEngine, bool aShorten, bool aWrap)
CT_IMPORT void Condense (CEngine &aEngine)
void SetSearchPattern (TSearchPattern aSearchPattern)
TSearchPattern SearchPattern () const
void ForbidCopyFit ()
void SetPath (const CFlatPath &aPath)
void SetPathStartAndDirection (TFixed aPathStart, bool aDrawBackwards)
const TTextParamTextParam () const
void SetAllowOtherLabels (bool aSet)
bool AllowOtherLabels () const

Detailed Description

Information about a label that is being drawn by CMapPainter.


Member Enumeration Documentation

Search patterns to use when finding a label position along a path.


Member Function Documentation

bool CartoType::CLabelInfo::AllowOtherLabels ( ) const [inline]

True if other labels can be drawn over this label.

TFont* CartoType::CLabelInfo::Font ( ) [inline]

Return the main font.

void CartoType::CLabelInfo::ForbidCopyFit ( ) [inline]

Forbid copy-fitting; used when drawing labels in the middle of very long paths.

bool CartoType::CLabelInfo::IsEmpty ( ) const [inline]

Return true if there is no label text.

int32 CartoType::CLabelInfo::Lines ( ) const [inline]

Return the number of lines the label has been broken into.

const TLineStyle* CartoType::CLabelInfo::LineStyle ( ) const [inline]

Return the line style.

const MString& CartoType::CLabelInfo::RawText ( ) const [inline]

Return the text before setting case, abbreviation, and shaping.

CT_EXPORT TResult CLabelInfo::Reformat ( const CEngine aEngine,
bool  aShorten,
bool  aWrap 
)

Reformat a label by optionally abbreviating it and wrapping on to more than one line, then applying contextual shaping and bidirectional reordering.

TSearchPattern CartoType::CLabelInfo::SearchPattern ( ) const [inline]

Return the search pattern to use when finding a label position along a path.

CT_EXPORT TResult CLabelInfo::Set ( CMap aMap,
const TLabelStyle aLabelStyle,
const TLineStyle aLineStyle,
const CMapObject aObject,
bool  aResetFonts 
)

Set the label information to the label of the map object aObject, using the style aLabelStyle. If aLabelStyle is at a different address to the currently stored label style pointer, or if aResetFonts is true, reset the fonts by creating them from the main font spec and any commands in the label format.

void CartoType::CLabelInfo::SetAllowOtherLabels ( bool  aSet) [inline]

Decide whether other labels can be drawn over this label's object.

CT_EXPORT void CLabelInfo::SetLabelStyle ( CMap aMap,
const TLabelStyle aLabelStyle 
)

Set the label style without changing anything else. Used to provide a style when drawing an icon that doesn't have any label text.

void CartoType::CLabelInfo::SetPath ( const CFlatPath aPath) [inline]

Specify the path along which to draw the label.

void CartoType::CLabelInfo::SetPathStartAndDirection ( TFixed  aPathStart,
bool  aDrawBackwards 
) [inline]

Specify the start point on the path, and the drawing direction.

void CartoType::CLabelInfo::SetSearchPattern ( TSearchPattern  aSearchPattern) [inline]

Set the search pattern to use when finding a label position along a path.

bool CartoType::CLabelInfo::Shortened ( ) const [inline]

Return true if the label has been shortened.

const TLabelStyle* CartoType::CLabelInfo::Style ( ) const [inline]

Return the label style.

const TTextParam& CartoType::CLabelInfo::TextParam ( ) const [inline]

Return the text drawing parameters.

TFixed CartoType::CLabelInfo::Width ( ) const [inline]

Return the width of the text in pixels.

bool CartoType::CLabelInfo::Wrapped ( ) const [inline]

Return true if the label has been wrapped.


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