0024412: TKV3d, Dimensions - Possibility to customize text position was lost:
[occt.git] / src / Prs3d / Prs3d_DimensionAspect.cdl
1 -- Copyright (c) 1993-1999 Matra Datavision
2 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
3 --
4 -- This file is part of Open CASCADE Technology software library.
5 --
6 -- This library is free software; you can redistribute it and / or modify it
7 -- under the terms of the GNU Lesser General Public version 2.1 as published
8 -- by the Free Software Foundation, with special exception defined in the file
9 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 -- distribution for complete text of the license and disclaimer of any warranty.
11 --
12 -- Alternatively, this file may be used under the terms of Open CASCADE
13 -- commercial license or contractual agreement.
14
15 class DimensionAspect from Prs3d inherits BasicAspect from Prs3d
16
17     ---Purpose: defines the attributes when drawing a Length Presentation.
18
19 uses
20     DimensionTextHorizontalPosition from Prs3d,
21     DimensionTextVerticalPosition from Prs3d,
22     DimensionArrowOrientation from Prs3d,
23     AspectLine3d from Graphic3d,
24     ArrowAspect from Prs3d,
25     LineAspect from Prs3d,
26     TextAspect from Prs3d,
27     NameOfColor from Quantity,
28     Color from Quantity,
29     TypeOfLine from Aspect,
30     PlaneAngle from Quantity,
31     TypeOfLine from Aspect,
32     AsciiString from TCollection
33 is
34
35     Create returns mutable DimensionAspect from Prs3d;
36       --- Purpose: Constructs an empty framework to define the display of dimensions.  
37
38     LineAspect(me) returns mutable LineAspect from Prs3d;
39       ---Purpose: Returns the settings for the display of lines used in presentation of dimensions.    
40
41     SetLineAspect(me: mutable; theAspect: LineAspect from Prs3d);
42       ---Purpose: Sets the display attributes of lines used in presentation of dimensions.
43
44     TextAspect(me) returns mutable TextAspect from Prs3d is static;
45       --- Purpose: Returns the settings for the display of text used in presentation of dimensions.   
46
47     SetTextAspect(me:mutable; theAspect: TextAspect from Prs3d) is static; 
48       ---Purpose: Sets the display attributes of text used in presentation of dimensions.
49
50     IsText3d(me) returns Boolean from Standard;
51       --- Purpose: Check if text for dimension label is 3d.   
52
53     MakeText3d (me:mutable; isText3d: Boolean from Standard); 
54       ---Purpose: Sets type of text.
55
56     IsTextShaded (me) returns Boolean from Standard;
57     --- Purpose: Check if 3d text for dimension label is shaded.
58
59     MakeTextShaded (me: mutable; isTextShaded: Boolean from Standard);
60     --- Purpose: Turns on/off text shading for 3d text.
61
62     IsArrows3d(me) returns Boolean from Standard;
63       --- Purpose: Gets type of arrows.   
64
65     MakeArrows3d (me : mutable; isArrows3d: Boolean from Standard);
66       ---Purpose: Sets type of arrows.
67
68     IsUnitsDisplayed (me) returns Boolean from Standard;
69     ---Purpose: Shows if Units are to be displayed along with dimension value.
70
71     MakeUnitsDisplayed (me : mutable; theIsDisplayed : Boolean from Standard);
72     ---Purpose: Specifies whether the units string should be displayed 
73     -- along with value label or not.
74
75     SetArrowOrientation(me: mutable; theArrowOrient: DimensionArrowOrientation from Prs3d);
76       --- Purpose: Sets orientation of arrows (external or internal).
77       -- By default orientation is chosen automatically according to situation and text label size.   
78
79     ArrowOrientation (me) returns DimensionArrowOrientation from Prs3d;
80       --- Purpose: Gets orientation of arrows (external or internal).
81
82     SetTextVerticalPosition (me: mutable; thePosition : DimensionTextVerticalPosition from Prs3d);
83       --- Purpose: Sets vertical text alignment for text label.
84
85     TextVerticalPosition (me) returns DimensionTextVerticalPosition from Prs3d;
86       --- Purpose: Gets vertical text alignment for text label.
87
88     SetTextHorizontalPosition (me: mutable; thePosition: DimensionTextHorizontalPosition from Prs3d);
89       --- Purpose: Sets horizontal text alignment for text label.
90
91     TextHorizontalPosition (me) returns DimensionTextHorizontalPosition from Prs3d;
92       --- Purpose: Gets horizontal text alignment for text label.
93
94     ArrowAspect(me) returns mutable ArrowAspect from Prs3d is static;
95      --- Purpose: Returns the settings for displaying arrows.   
96
97     SetArrowAspect(me: mutable; theAspect: ArrowAspect from Prs3d) is static;
98      ---Purpose:   Sets the display attributes of arrows used in presentation of dimensions.
99
100     SetCommonColor(me:mutable; theColor: Color from Quantity) is static; 
101       ---Purpose: Sets the same color for all parts of dimension: lines, arrows and text.
102
103     SetExtensionSize (me : mutable; theSize : Real from Standard);
104     ---Purpose: Sets extension size.
105
106     ExtensionSize (me) returns Real from Standard;
107     ---Purpose: Returns extension size.
108
109     SetArrowTailSize (me : mutable; theSize : Real from Standard);
110     ---Purpose: Set size for arrow tail (extension without text).
111
112     ArrowTailSize (me) returns Real from Standard;
113     ---Purpose: Returns arrow tail size.
114
115     SetValueStringFormat (me : mutable; theFormat : AsciiString from TCollection);
116     ---Purpose: Sets "sprintf"-syntax format for formatting dimension value labels.
117
118     ValueStringFormat (me) returns AsciiString from TCollection;
119     ---Purpose: Returns format.
120
121 fields
122
123     myLineAspect : LineAspect from Prs3d;
124     ---Purpose: Text style. The size for 3d (or 2d) text is also inside here.
125
126     myTextAspect: TextAspect from Prs3d;
127     myArrowAspect : ArrowAspect from Prs3d;
128     myIsText3d : Boolean from Standard;
129     myIsTextShaded : Boolean from Standard;
130     myIsArrows3d: Boolean from Standard;
131
132     myArrowOrientation : DimensionArrowOrientation from Prs3d;
133     ---Purpose: Dimension arrow orientation.
134     -- By default, it is computed automatically. Its value depends on the text
135     -- bouning rectangle size and distance between two flyouts.
136     -- By default, it is "fit" one.
137
138     myTextHPosition : DimensionTextHorizontalPosition from Prs3d;
139     ---Purpose: Defines horizontal position of text value label, by default it is
140     -- "fit" - selected automatically depending on label-to-dimension size relation.
141
142     myTextVPosition : DimensionTextVerticalPosition from Prs3d;
143     ---Purpose: Defines vertical position of text value label, by default it is center.
144
145     myExtensionSize : Real from Standard;
146     ---Purpose: Size of arrow extensions.
147     -- The length of arrow tail with text if arrows are located outside dimension line.
148
149     myArrowTailSize : Real from Standard;
150     ---Purpose: Size of arrow tail (extension without text).
151
152     myValueStringFormat : AsciiString from TCollection;
153     ---Purpose: "sprintf"-syntax format for formatting dimension value labels.
154     -- Default is "%g".
155
156     myToDisplayUnits : Boolean from Standard;
157     ---Purpose: Defines if the units need to be displayed.
158     -- Default is FALSE.
159
160 end DimensionAspect from Prs3d;