opennurbs_textcontext.h
1 //
2 // Copyright (c) 1993-2015 Robert McNeel & Associates. All rights reserved.
3 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
4 // McNeel & Associates.
5 //
6 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
7 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
8 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
9 //
10 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
11 //
12 ////////////////////////////////////////////////////////////////
13 
14 #ifndef OPENNURBS_TEXTCONTEXT_H_INCLUDED
15 #define OPENNURBS_TEXTCONTEXT_H_INCLUDED
16 
17 
18 //----------------------------------------------------------
19 class ON_CLASS ON_TextContext
20 {
22 public:
23  // Use ON_FontGlyph::GetGlyphList to measure strings.
24  static int ConvertCodepointsToString(int cplen, const ON__UINT32* cp, ON_wString& str);
25  static int ConvertStringToCodepoints(const wchar_t* str, ON__UINT32*& cp);
26 
27 
28  static const ON_wString FormatRtfString(const wchar_t* rtfstr,
29  const ON_DimStyle* dimstyle,
30  bool clear_bold, bool set_bold,
31  bool clear_italic, bool set_italic,
32  bool clear_underline, bool set_underline,
33  bool clear_facename, bool set_facename, const wchar_t* override_facename);
34 
35  static bool RtfFirstCharProperties(const wchar_t* rtfstr,
36  bool& bold, bool& italic, bool& underline, ON_wString& facename);
37 };
38 
39 
40 
41 
42 #endif
43 
44 
Definition: opennurbs_string.h:2020
Definition: opennurbs_dimensionstyle.h:218
Definition: opennurbs_textcontext.h:19