Rhino C++ API  8.14
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
ON_TextBuilder Class Reference

#include <opennurbs_textiterator.h>

Inheritance diagram for ON_TextBuilder:
ON_RtfFirstChar ON_RtfStringBuilder ON_TextRunBuilder

Classes

class  TextProps
 

Public Types

enum  : ON__UINT16 { m_UFT16_waiting_mark = 0xEEEE, m_UFT16_unused_mark = 0xFFFF }
 

Public Member Functions

 ON_TextBuilder ()
 
virtual ~ON_TextBuilder ()
 
virtual bool AppendCodePoint (ON__UINT32 codept)
 
virtual void BeginColorTable ()
 
virtual void BeginFontTable ()
 
virtual void BeginHeader ()
 
virtual void Bold (const wchar_t *value)
 
virtual void Bullet ()
 
virtual void CharSet (const wchar_t *value)
 
unsigned int CharSetFromMap (int nval)
 
virtual void CodePage (const wchar_t *value)
 
unsigned int CodePageFromMap (int nval)
 
virtual void ColorBackground (const wchar_t *value)
 
virtual void ColorBlue (const wchar_t *value)
 
virtual void ColorForeground (const wchar_t *value)
 
virtual void ColorGreen (const wchar_t *value)
 
virtual void ColorRed (const wchar_t *value)
 
virtual void DefaultFont (const wchar_t *value)
 
virtual void EmDash ()
 
virtual void EnDash ()
 
const ON_wString FaceNameFromMap (int nval)
 
virtual void FinishFontDef ()
 
virtual void FlushText (size_t count, ON__UINT32 *cp_array)
 
virtual void FontSize (const wchar_t *value)
 
virtual void FontTag (const wchar_t *value)
 
virtual void FormatChange ()
 
virtual void GroupBegin ()
 
virtual void GroupEnd ()
 
virtual void InitBuilder (const ON_Font *default_font)
 
virtual void Italic (const wchar_t *value)
 
virtual void LDblQuote ()
 
virtual void LQuote ()
 
virtual void Newline ()
 
virtual void NoSuperSub ()
 
virtual void Paragraph ()
 
virtual void ParagraphDefaults ()
 
virtual void RDblQuote ()
 
virtual bool ReadingFontDefinition ()
 
virtual bool ReadingFontTable ()
 
virtual void RQuote ()
 
virtual void RunBegin ()
 
ON__UINT32RunCodePoints (const ON_TextRun &run)
 
virtual void RunEnd ()
 
virtual void Section ()
 
virtual void SetReadingFontDefinition (bool b)
 
virtual void SetStackScale (const wchar_t *value)
 
virtual void StackEnd ()
 
virtual void StackFraction (const wchar_t *value)
 
virtual void Strikethrough (const wchar_t *value)
 
virtual void Subscript ()
 
virtual void Superscript ()
 
virtual void Tab ()
 
virtual void TextField (const wchar_t *name)
 
virtual void UnderlineOff ()
 
virtual void UnderlineOn ()
 
virtual void UniCpCount (const wchar_t *value)
 
virtual void UniDecimal (const wchar_t *value)
 
virtual void UniDest (const wchar_t *value)
 
virtual void UniEmbeddedDest (const wchar_t *value)
 

Public Attributes

ON_SimpleArray< ON__UINT32m_current_codepoints
 
TextProps m_current_props
 
ON__UINT16 m_current_UTF16_buffer [2]
 
ON__INT32 m_current_UTF16_buffer_count = 0
 
ON__INT32 m_default_font_index = 0
 
ON_ClassArray< ON_FaceNameKeym_facename_map
 
ON__INT32 m_font_index = 0
 
ON__INT32 m_font_table_level = 10000
 
ON__INT32 m_in_run
 
ON__INT32 m_level = 0
 
TextProps m_pending_props
 
ON_ClassArray< TextPropsm_prop_stack
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : ON__UINT16

Rtf uses UTF-16 encoding and surrogate pairs need to be properly handled. For example, the single UNICODE code point ON_UnicodeCodePoint::Wastebasket U+1F5D1 (decimal 128465) is in the RTF string as ...{\ltrch \u-10179?\u-8751?}... The UNICODE code point U+1F5D1 is encoded as a UTF-16 surrogate pair is (0xD83D, 0xDDD1). \u-10179? -> unsigned short 0xD83D \u-8751? -> unsigned short 0xDDD1

Enumerator
m_UFT16_waiting_mark 

value must be > 0xE000 and uncommon unicode code point

m_UFT16_unused_mark 

value must be > m_UFT16_waiting, <= 0xFFFF, and uncommon unicode code point

Constructor & Destructor Documentation

◆ ON_TextBuilder()

ON_TextBuilder::ON_TextBuilder ( )

◆ ~ON_TextBuilder()

virtual ON_TextBuilder::~ON_TextBuilder ( )
virtual

Member Function Documentation

◆ AppendCodePoint()

virtual bool ON_TextBuilder::AppendCodePoint ( ON__UINT32  codept)
virtual

◆ BeginColorTable()

virtual void ON_TextBuilder::BeginColorTable ( )
virtual

◆ BeginFontTable()

virtual void ON_TextBuilder::BeginFontTable ( )
virtual

◆ BeginHeader()

virtual void ON_TextBuilder::BeginHeader ( )
virtual

◆ Bold()

virtual void ON_TextBuilder::Bold ( const wchar_t *  value)
virtual

◆ Bullet()

virtual void ON_TextBuilder::Bullet ( )
virtual

◆ CharSet()

virtual void ON_TextBuilder::CharSet ( const wchar_t *  value)
virtual

◆ CharSetFromMap()

unsigned int ON_TextBuilder::CharSetFromMap ( int  nval)

◆ CodePage()

virtual void ON_TextBuilder::CodePage ( const wchar_t *  value)
virtual

◆ CodePageFromMap()

unsigned int ON_TextBuilder::CodePageFromMap ( int  nval)

◆ ColorBackground()

virtual void ON_TextBuilder::ColorBackground ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ ColorBlue()

virtual void ON_TextBuilder::ColorBlue ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ ColorForeground()

virtual void ON_TextBuilder::ColorForeground ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ ColorGreen()

virtual void ON_TextBuilder::ColorGreen ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ ColorRed()

virtual void ON_TextBuilder::ColorRed ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ DefaultFont()

virtual void ON_TextBuilder::DefaultFont ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ EmDash()

virtual void ON_TextBuilder::EmDash ( )
virtual

◆ EnDash()

virtual void ON_TextBuilder::EnDash ( )
virtual

◆ FaceNameFromMap()

const ON_wString ON_TextBuilder::FaceNameFromMap ( int  nval)

◆ FinishFontDef()

virtual void ON_TextBuilder::FinishFontDef ( )
virtual

Reimplemented in ON_TextRunBuilder.

◆ FlushText()

virtual void ON_TextBuilder::FlushText ( size_t  count,
ON__UINT32 cp_array 
)
virtual

Reimplemented in ON_TextRunBuilder.

◆ FontSize()

virtual void ON_TextBuilder::FontSize ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ FontTag()

virtual void ON_TextBuilder::FontTag ( const wchar_t *  value)
virtual

◆ FormatChange()

virtual void ON_TextBuilder::FormatChange ( )
virtual

Reimplemented in ON_TextRunBuilder.

◆ GroupBegin()

virtual void ON_TextBuilder::GroupBegin ( )
virtual

◆ GroupEnd()

virtual void ON_TextBuilder::GroupEnd ( )
virtual

◆ InitBuilder()

virtual void ON_TextBuilder::InitBuilder ( const ON_Font default_font)
virtual

Reimplemented in ON_TextRunBuilder.

◆ Italic()

virtual void ON_TextBuilder::Italic ( const wchar_t *  value)
virtual

◆ LDblQuote()

virtual void ON_TextBuilder::LDblQuote ( )
virtual

◆ LQuote()

virtual void ON_TextBuilder::LQuote ( )
virtual

◆ Newline()

virtual void ON_TextBuilder::Newline ( )
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ NoSuperSub()

virtual void ON_TextBuilder::NoSuperSub ( )
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ Paragraph()

virtual void ON_TextBuilder::Paragraph ( )
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ ParagraphDefaults()

virtual void ON_TextBuilder::ParagraphDefaults ( )
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ RDblQuote()

virtual void ON_TextBuilder::RDblQuote ( )
virtual

◆ ReadingFontDefinition()

virtual bool ON_TextBuilder::ReadingFontDefinition ( )
virtual

◆ ReadingFontTable()

virtual bool ON_TextBuilder::ReadingFontTable ( )
virtual

◆ RQuote()

virtual void ON_TextBuilder::RQuote ( )
virtual

◆ RunBegin()

virtual void ON_TextBuilder::RunBegin ( )
virtual

◆ RunCodePoints()

ON__UINT32* ON_TextBuilder::RunCodePoints ( const ON_TextRun run)

◆ RunEnd()

virtual void ON_TextBuilder::RunEnd ( )
virtual

◆ Section()

virtual void ON_TextBuilder::Section ( )
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ SetReadingFontDefinition()

virtual void ON_TextBuilder::SetReadingFontDefinition ( bool  b)
virtual

◆ SetStackScale()

virtual void ON_TextBuilder::SetStackScale ( const wchar_t *  value)
virtual

Reimplemented in ON_TextRunBuilder.

◆ StackEnd()

virtual void ON_TextBuilder::StackEnd ( )
virtual

Reimplemented in ON_TextRunBuilder.

◆ StackFraction()

virtual void ON_TextBuilder::StackFraction ( const wchar_t *  value)
virtual

Reimplemented in ON_TextRunBuilder.

◆ Strikethrough()

virtual void ON_TextBuilder::Strikethrough ( const wchar_t *  value)
virtual

◆ Subscript()

virtual void ON_TextBuilder::Subscript ( )
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ Superscript()

virtual void ON_TextBuilder::Superscript ( )
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ Tab()

virtual void ON_TextBuilder::Tab ( )
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ TextField()

virtual void ON_TextBuilder::TextField ( const wchar_t *  name)
virtual

◆ UnderlineOff()

virtual void ON_TextBuilder::UnderlineOff ( )
virtual

◆ UnderlineOn()

virtual void ON_TextBuilder::UnderlineOn ( )
virtual

◆ UniCpCount()

virtual void ON_TextBuilder::UniCpCount ( const wchar_t *  value)
virtual

◆ UniDecimal()

virtual void ON_TextBuilder::UniDecimal ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder.

◆ UniDest()

virtual void ON_TextBuilder::UniDest ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

◆ UniEmbeddedDest()

virtual void ON_TextBuilder::UniEmbeddedDest ( const wchar_t *  value)
virtual

Reimplemented in ON_RtfStringBuilder, and ON_TextRunBuilder.

Member Data Documentation

◆ m_current_codepoints

ON_SimpleArray< ON__UINT32 > ON_TextBuilder::m_current_codepoints

◆ m_current_props

TextProps ON_TextBuilder::m_current_props

◆ m_current_UTF16_buffer

ON__UINT16 ON_TextBuilder::m_current_UTF16_buffer[2]

◆ m_current_UTF16_buffer_count

ON__INT32 ON_TextBuilder::m_current_UTF16_buffer_count = 0

◆ m_default_font_index

ON__INT32 ON_TextBuilder::m_default_font_index = 0

◆ m_facename_map

ON_ClassArray< ON_FaceNameKey > ON_TextBuilder::m_facename_map

◆ m_font_index

ON__INT32 ON_TextBuilder::m_font_index = 0

◆ m_font_table_level

ON__INT32 ON_TextBuilder::m_font_table_level = 10000

◆ m_in_run

ON__INT32 ON_TextBuilder::m_in_run

◆ m_level

ON__INT32 ON_TextBuilder::m_level = 0

◆ m_pending_props

TextProps ON_TextBuilder::m_pending_props

◆ m_prop_stack

ON_ClassArray< TextProps > ON_TextBuilder::m_prop_stack