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

#include <opennurbs_textiterator.h>

Classes

class  RunInfo
 

Static Public Member Functions

static bool Compose (const ON_TextContent *text, ON_wString &rtf, bool bForceRtf)
 
static const ON_wString ComposeAppleRTF (const ON_TextContent *text)
 
static bool ComposeFromRuns (ON_TextRunArray &runs, const ON_Font &style_font, ON_wString &rtf, bool bForceRtf)
 
static bool ComposeFS ()
 
static bool RecomposeRTF ()
 
static void SetComposeFS (bool b)
 
static void SetRecomposeRTF (bool b)
 
static void SetTextEditorFontSize (unsigned int size)
 
static int TextEditorFontSize ()
 

Member Function Documentation

◆ Compose()

static bool RtfComposer::Compose ( const ON_TextContent text,
ON_wString rtf,
bool  bForceRtf 
)
static

◆ ComposeAppleRTF()

static const ON_wString RtfComposer::ComposeAppleRTF ( const ON_TextContent text)
static

◆ ComposeFromRuns()

static bool RtfComposer::ComposeFromRuns ( ON_TextRunArray runs,
const ON_Font style_font,
ON_wString rtf,
bool  bForceRtf 
)
static

Pure static helper: compose a Rhino RTF string from a run array and an explicit default (style) font. Does NOT consult ON_TextContent state and does NOT consult the RtfComposer::RecomposeRTF() flag – this is the straight "runs in, rtf out" path.

Parameters: runs - [in/out] The run array to compose. The array is not mutated, but the parameter is non-const because the existing internal run access path (GetRunText / ON_TextRunArray::operator[]) uses non-const run pointers. style_font - [in] The annotation's default / style font. Used to decide whether to emit per-run font/bold/italic/underline overrides. rtf - [out] On success, contains the composed RTF (or a plain-text fallback when no formatting differs from the style and bForceRtf is false). bForceRtf - [in] When true, always emit RTF even if no formatting differs from the style. Returns: True on success, false if style_font has no rich-text name or a per-run font fails the same check.

◆ ComposeFS()

static bool RtfComposer::ComposeFS ( )
static

◆ RecomposeRTF()

static bool RtfComposer::RecomposeRTF ( )
static

◆ SetComposeFS()

static void RtfComposer::SetComposeFS ( bool  b)
static

◆ SetRecomposeRTF()

static void RtfComposer::SetRecomposeRTF ( bool  b)
static

◆ SetTextEditorFontSize()

static void RtfComposer::SetTextEditorFontSize ( unsigned int  size)
static

◆ TextEditorFontSize()

static int RtfComposer::TextEditorFontSize ( )
static