Rhino C++ API  9.0
Public Member Functions | Static Public Member Functions | List of all members
ON_RtfParser Class Reference

#include <opennurbs_textiterator.h>

Public Member Functions

 ON_RtfParser (ON_TextIterator &iter, ON_TextBuilder &builder)
 
bool Parse ()
 

Static Public Member Functions

static ON_CLASS bool ParseToRuns (const wchar_t *rtf_string, const ON_DimStyle *dimstyle, ON_TextRunArray &out_runs, ON_SHA1_Hash &out_text_position_hash, const ON_Font *&out_default_font)
 

Constructor & Destructor Documentation

◆ ON_RtfParser()

ON_RtfParser::ON_RtfParser ( ON_TextIterator iter,
ON_TextBuilder builder 
)

Member Function Documentation

◆ Parse()

bool ON_RtfParser::Parse ( )

◆ ParseToRuns()

static ON_CLASS bool ON_RtfParser::ParseToRuns ( const wchar_t *  rtf_string,
const ON_DimStyle dimstyle,
ON_TextRunArray out_runs,
ON_SHA1_Hash out_text_position_hash,
const ON_Font *&  out_default_font 
)
static

Pure static helper: parse a Rhino RTF string into a run array. Does NOT touch any ON_TextContent instance state, does NOT call MeasureTextContent, does NOT re-compose the RTF, and does NOT consult or modify the RtfComposer::RecomposeRTF() flag.

Parameters: rtf_string - [in] A Rhino RTF string. Empty input returns false. dimstyle - [in] Used to resolve the default font and the text position properties hash. nullptr is treated as ON_DimStyle::Default. out_runs - [out] Cleared and refilled with the parsed runs on success. out_text_position_hash - [out] Set to the text-position-properties hash derived from dimstyle. out_default_font - [out] Set to the parent-dim-style font derived from dimstyle on success. Returns: True on successful parse, false otherwise. ON_CLASS on this individual static is required because the enclosing ON_RtfParser class is deliberately not dll-exported; without it the symbol is not visible from rhcommon_c or other consumers outside the OpenNURBS DLL. Marking just this static does not change class layout or vtable, so it is ABI-safe.