MGD::TEXTBLOCK Struct Reference

Text block. More...

#include <mi32/mgd2.h>

List of all members.

Public Member Functions

 TEXTBLOCK (const TEXTBLOCK &)
 TEXTBLOCK ()
 ~TEXTBLOCK ()
ERRVALUE ComputeExtents (MGD::CONTEXT *gc, DRECT2D &rect)
int Draw (MGD::CONTEXT *gc)
double GetBaseAngle () const
TEXTBASEORIGIN GetBaseOrigin () const
const DPOINT2DGetBasePoint () const
ERRVALUE GetFirstString (MGD::CONTEXT *gc, MISTRING &string)
ERRVALUE GetFirstString (MISTRING &string)
HTML::HTMLDOCGetHTMLDOC ()
const TEXTSTYLEGetStyle () const
const MISTRINGGetText () const
bool IsAntialiased () const
void SetAntialiasing (bool value)
void SetBaseAngle (double angle=0)
void SetBasePoint (const DPOINT2D &pt, TEXTBASEORIGIN baseorigin=TEXTBASEORIGIN_FirstLine)
void SetDoFormatting (bool bDoFormatting)
void SetImages (const SIMPLE_ARRAY< MGD::DEVICE * > &Images)
void SetSourcePath (const FILEPATH &filepath)
void SetStyle (const TEXTSTYLE &Style)
void SetText (const MISTRING &text)
bool UsesTransparency () const

Detailed Description

Text block.


Constructor & Destructor Documentation

MGD::TEXTBLOCK::TEXTBLOCK (  ) 
MGD::TEXTBLOCK::TEXTBLOCK ( const TEXTBLOCK  ) 
MGD::TEXTBLOCK::~TEXTBLOCK (  ) 

Member Function Documentation

ERRVALUE MGD::TEXTBLOCK::ComputeExtents ( MGD::CONTEXT gc,
DRECT2D rect 
)
int MGD::TEXTBLOCK::Draw ( MGD::CONTEXT gc  ) 
double MGD::TEXTBLOCK::GetBaseAngle (  )  const [inline]
TEXTBASEORIGIN MGD::TEXTBLOCK::GetBaseOrigin (  )  const [inline]
const DPOINT2D& MGD::TEXTBLOCK::GetBasePoint (  )  const [inline]
ERRVALUE MGD::TEXTBLOCK::GetFirstString ( MGD::CONTEXT gc,
MISTRING string 
)
Parameters:
string String returned
ERRVALUE MGD::TEXTBLOCK::GetFirstString ( MISTRING string  ) 

Get the first line of the text block.

Parameters:
string String returned
HTML::HTMLDOC* MGD::TEXTBLOCK::GetHTMLDOC (  ) 

Returns the HTMLDOC of the text block.

If the block wasn't HTML, this returns NULL Do not free the returned pointer, but you can modify it if you like.

const TEXTSTYLE& MGD::TEXTBLOCK::GetStyle (  )  const [inline]
const MISTRING& MGD::TEXTBLOCK::GetText (  )  const [inline]
bool MGD::TEXTBLOCK::IsAntialiased (  )  const [inline]
void MGD::TEXTBLOCK::SetAntialiasing ( bool  value  )  [inline]
void MGD::TEXTBLOCK::SetBaseAngle ( double  angle = 0  ) 
Parameters:
angle Base angle in radians
void MGD::TEXTBLOCK::SetBasePoint ( const DPOINT2D pt,
TEXTBASEORIGIN  baseorigin = TEXTBASEORIGIN_FirstLine 
)

Set the base point, angle of rotation and base origin.

Parameters:
baseorigin Origin of basepoint within block
void MGD::TEXTBLOCK::SetDoFormatting ( bool  bDoFormatting  ) 

Parse formatting codes out of text By default, textblock will look for ,
in text and convert them to tab, newline characters This method will turn this off.

void MGD::TEXTBLOCK::SetImages ( const SIMPLE_ARRAY< MGD::DEVICE * > &  Images  ) 

Set the list of images referenced by the text block.

Text with, for example, "{~IMG 0}" in it will use the device in Images[0] as the source of the image. IMPORTANT: The text block does not copy the devices and assumes they will stay valid for the life of the block

void MGD::TEXTBLOCK::SetSourcePath ( const FILEPATH filepath  ) 

Set the source file path.

If the text is HTML and refers to images with relative paths, the source path is used to know what those relative paths are relative to.

void MGD::TEXTBLOCK::SetStyle ( const TEXTSTYLE Style  ) 
void MGD::TEXTBLOCK::SetText ( const MISTRING text  ) 

Set the text for the text block.

bool MGD::TEXTBLOCK::UsesTransparency (  )  const [inline]

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

Generated on Sun Oct 7 21:35:22 2012 for TNTsdk 2012 by  doxygen 1.6.1