Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TextFont Class Reference

#include <textFont.h>

Inheritance diagram for TextFont:

TypedReferenceCount Namable TypedObject ReferenceCount StaticTextFont List of all members.

Public Member Functions

 TextFont ()
INLINE bool is_valid () const
INLINE float get_line_height () const
INLINE void set_line_height (float line_height)
INLINE float get_space_advance () const
INLINE void set_space_advance (float space_advance)
float calc_width (int character)
float calc_width (const string &line)
string wordwrap_to (const string &text, float wordwrap_width, bool preserve_trailing_whitespace)
virtual void write (ostream &out, int indent_level) const
float calc_width (const wstring &line)
wstring wordwrap_to (const wstring &text, float wordwrap_width, bool preserve_trailing_whitespace)
virtual bool get_glyph (int character, const TextGlyph *&glyph)=0
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad0__: virtual ~TextFont()

Protected Attributes

bool _is_valid
float _line_height
float _space_advance

Static Private Attributes

TypeHandle _type_handle

Constructor & Destructor Documentation

TextFont::TextFont  ) 
 

Definition at line 52 of file textFont.cxx.

References _is_valid, _line_height, and _space_advance.


Member Function Documentation

float TextFont::calc_width const wstring &  line  ) 
 

Definition at line 250 of file textFont.cxx.

References calc_width(), and width.

float TextFont::calc_width const string &  line  ) 
 

Definition at line 98 of file textFont.cxx.

References calc_width(), and width.

float TextFont::calc_width int  character  ) 
 

Definition at line 74 of file textFont.cxx.

References _space_advance, TextGlyph::get_advance(), get_glyph(), and NULL.

Referenced by calc_width(), and wordwrap_to().

virtual TypeHandle TextFont::force_init_type void   )  [inline, virtual]
 

Reimplemented from TypedReferenceCount.

Reimplemented in StaticTextFont.

Definition at line 87 of file textFont.h.

References Namable::get_class_type(), and Namable::init_type().

TypeHandle TextFont::get_class_type void   )  [inline, static]
 

Reimplemented from Namable.

Reimplemented in StaticTextFont.

Definition at line 76 of file textFont.h.

Referenced by StaticTextFont::force_init_type(), StaticTextFont::get_type(), and StaticTextFont::init_type().

virtual bool TextFont::get_glyph int  character,
const TextGlyph *&  glyph
[pure virtual]
 

Implemented in StaticTextFont.

Referenced by calc_width(), TextNode::get_character_glyphs(), and TextNode::tack_on_accent().

INLINE float TextFont::get_line_height  )  const
 

Referenced by TextNode::measure_text().

INLINE float TextFont::get_space_advance  )  const
 

Referenced by TextNode::assemble_row().

virtual TypeHandle TextFont::get_type void   )  const [inline, virtual]
 

Reimplemented from TypedReferenceCount.

Reimplemented in StaticTextFont.

Definition at line 84 of file textFont.h.

References Namable::get_class_type().

void TextFont::init_type void   )  [inline, static]
 

Reimplemented from Namable.

Reimplemented in StaticTextFont.

Definition at line 79 of file textFont.h.

References TypedObject::get_class_type(), TypedReferenceCount::init_type(), and register_type().

Referenced by StaticTextFont::force_init_type(), init_libtext(), and StaticTextFont::init_type().

INLINE bool TextFont::is_valid  )  const
 

INLINE void TextFont::set_line_height float  line_height  ) 
 

INLINE void TextFont::set_space_advance float  space_advance  ) 
 

wstring TextFont::wordwrap_to const wstring &  text,
float  wordwrap_width,
bool  preserve_trailing_whitespace
 

Definition at line 271 of file textFont.cxx.

References calc_width(), isblank(), isspacew(), p, q, and width.

string TextFont::wordwrap_to const string &  text,
float  wordwrap_width,
bool  preserve_trailing_whitespace
 

Definition at line 119 of file textFont.cxx.

References calc_width(), isblank(), p, q, and width.

Referenced by TextNode::do_measure(), and PT().

void TextFont::write ostream &  out,
int  indent_level
const [virtual]
 

Reimplemented in StaticTextFont.

Definition at line 237 of file textFont.cxx.

References Namable::get_name(), and indent().


Member Data Documentation

PUBLISHED TextFont::__pad0__
 

Reimplemented from Namable.

Reimplemented in StaticTextFont.

Definition at line 47 of file textFont.h.

bool TextFont::_is_valid [protected]
 

Definition at line 71 of file textFont.h.

Referenced by TextFont().

float TextFont::_line_height [protected]
 

Definition at line 72 of file textFont.h.

Referenced by StaticTextFont::find_characters(), and TextFont().

float TextFont::_space_advance [protected]
 

Definition at line 73 of file textFont.h.

Referenced by calc_width(), StaticTextFont::find_characters(), and TextFont().

TypeHandle TextFont::_type_handle [static, private]
 

Reimplemented from Namable.

Reimplemented in StaticTextFont.

Definition at line 23 of file textFont.cxx.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:13:39 2003 for Panda by doxygen1.3