opennurbs_internal_defines.h
1 /*
2 // Copyright (c) 1993-2017 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 
15 #if !defined(OPENNURBS_INTERNAL_DEFINES_INC_)
16 #define OPENNURBS_INTERNAL_DEFINES_INC_
17 
18 #if defined(ON_COMPILING_OPENNURBS)
19 
20 class ON_INTERNAL_OBSOLETE
21 {
22 public:
23 
24  //// OBSOLETE V5 Dimension Types ///////////////////////////////////////////////////////////
25  enum class V5_eAnnotationType : unsigned char
26  {
27  dtNothing,
28  dtDimLinear,
29  dtDimAligned,
30  dtDimAngular,
31  dtDimDiameter,
32  dtDimRadius,
33  dtLeader,
34  dtTextBlock,
35  dtDimOrdinate,
36  };
37 
38  // convert integer to eAnnotationType enum
39  static ON_INTERNAL_OBSOLETE::V5_eAnnotationType V5AnnotationTypeFromUnsigned(
40  unsigned int v5_annotation_type_as_unsigned
41  );
42 
43  //// dim text locations ///////////////////////////////////////////////////////////
44  enum class V5_TextDisplayMode : unsigned char
45  {
46  kNormal = 0, // antique name - triggers use of current default
47  kHorizontalToScreen = 1, // Horizontal to the screen
48  kAboveLine = 2,
49  kInLine = 3,
50  kHorizontalInCplane = 4 // horizontal in the dimension's plane
51  };
52 
53  static ON_INTERNAL_OBSOLETE::V5_TextDisplayMode V5TextDisplayModeFromUnsigned(
54  unsigned int text_display_mode_as_unsigned
55  );
56 
57  static ON_INTERNAL_OBSOLETE::V5_TextDisplayMode V5TextDisplayModeFromV6DimStyle(
58  const ON_DimStyle& V6_dim_style
59  );
60 
61  /// <summary>
62  /// Attachment of content
63  /// </summary>
64  enum class V5_vertical_alignment : unsigned char
65  {
66  /// <summary>
67  /// Text centered on dimension line (does not apply to leaders or text)
68  /// </summary>
69  Centered = 0,
70  /// <summary>
71  /// Text above dimension line (does not apply to leaders or text)
72  /// </summary>
73  Above = 1,
74  /// <summary>
75  /// Text below dimension line (does not apply to leaders or text)
76  /// </summary>
77  Below = 2,
78  /// <summary>
79  /// Leader tail at top of text (does not apply to text or dimensions)
80  /// </summary>
81  Top = 3, // = TextVerticalAlignment::Top
82  /// <summary>
83  /// Leader tail at middle of first text line (does not apply to text or dimensions)
84  /// </summary>
85  FirstLine = 4, // = MiddleOfTop
86  /// <summary>
87  /// Leader tail at middle of text or content (does not apply to text or dimensions)
88  /// </summary>
89  Middle = 5, // = Middle
90  /// <summary>
91  /// Leader tail at middle of last text line (does not apply to text or dimensions)
92  /// </summary>
93  LastLine = 6, // = MiddleOfBottom
94  /// <summary>
95  /// Leader tail at bottom of text (does not apply to text or dimensions)
96  /// </summary>
97  Bottom = 7, // = Bottom
98  /// <summary>
99  /// Leader tail at bottom of text, text underlined (does not apply to text or dimensions)
100  /// </summary>
101  Underlined = 8 // Underlined
102 
103  // nothing matched BottomOfTop
104  };
105 
106  static ON_INTERNAL_OBSOLETE::V5_vertical_alignment V5VerticalAlignmentFromUnsigned(
107  unsigned int vertical_alignment_as_unsigned
108  );
109 
110  static ON_INTERNAL_OBSOLETE::V5_vertical_alignment V5VerticalAlignmentFromV5Justification(
111  unsigned int v5_justification_bits
112  );
113 
114  static ON_INTERNAL_OBSOLETE::V5_vertical_alignment V5VerticalAlignmentFromV6VerticalAlignment(
115  const ON::TextVerticalAlignment text_vertical_alignment
116  );
117 
118  static ON::TextVerticalAlignment V6VerticalAlignmentFromV5VerticalAlignment(
119  ON_INTERNAL_OBSOLETE::V5_vertical_alignment V5_vertical_alignment
120  );
121 
122 
123  enum class V5_horizontal_alignment : unsigned char
124  {
125  /// <summary>
126  /// Left aligned
127  /// </summary>
128  Left = 0, // Left
129  /// <summary>
130  /// Centered
131  /// </summary>
132  Center = 1,
133  /// <summary>
134  /// Right aligned
135  /// </summary>
136  Right = 2,
137  /// <summary>
138  /// Determined by orientation
139  /// Primarily for leaders to make
140  /// text right align when tail is to the left
141  /// and left align when tail is to the right
142  /// </summary>
143  Auto = 3,
144  };
145 
146  static ON_INTERNAL_OBSOLETE::V5_horizontal_alignment V5HorizontalAlignmentFromUnsigned(
147  unsigned int horizontal_alignment_as_unsigned
148  );
149 
150  static ON_INTERNAL_OBSOLETE::V5_horizontal_alignment V5HorizontalAlignmentFromV5Justification(
151  unsigned int v5_justification_bits
152  );
153 
154  static ON_INTERNAL_OBSOLETE::V5_horizontal_alignment V5HorizontalAlignmentFromV6HorizontalAlignment(
155  const ON::TextHorizontalAlignment text_horizontal_alignment
156  );
157 
158  static ON::TextHorizontalAlignment V6HorizontalAlignmentFromV5HorizontalAlignment(
159  ON_INTERNAL_OBSOLETE::V5_horizontal_alignment V5_vertical_alignment
160  );
161 };
162 
163 #endif
164 
165 #endif
Definition: opennurbs_dimensionstyle.h:218