0023510: Integration of test grid "vis" into the new testing system
[occt.git] / src / Prs2d / Prs2d_Arrow.cdl
1 -- Created by: Tanya COOL
2 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
3 --
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
8 --
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 --
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
18
19
20 class Arrow from Prs2d inherits Line from Graphic2d
21   
22   ---Purpose: Constructs the primitive arrow
23
24 uses
25
26     Drawer            from Graphic2d,
27     GraphicObject     from Graphic2d,
28     Length            from Quantity,
29     Array1OfShortReal from TShort,
30     ExtendedString    from TCollection,
31     Ax2d              from gp,
32     TypeOfArrow       from Prs2d,
33     FStream           from Aspect,
34     HArray1OfPnt2d    from TColgp
35
36 is
37         Create( aGraphicObject: GraphicObject from Graphic2d;
38                 Location      : Ax2d from gp;
39                 OpenAngle     : Real from Standard = 5.0;
40                 Length        : Real from Standard = 5.0;
41                 theType       : TypeOfArrow from Prs2d = Prs2d_TOA_CLOSED )
42         
43         returns mutable Arrow from Prs2d;
44         
45         ---Purpose: create an arrow:
46         --          "Location"  gives the location and direction,
47         --          "OpenAngle" gives the opening angle (in radians),
48         --          "Length"    gives the length.
49
50         ----------------------------------
51         ---Category: Draw and Pick
52         ----------------------------------
53
54         Draw( me : mutable; aDrawer: Drawer from Graphic2d )
55         is static protected;
56         ---Level: Internal
57         ---Purpose: Draws the arrow <me>.
58
59         DrawElement( me : mutable; aDrawer: Drawer from Graphic2d;
60                  anIndex: Integer from Standard)
61         is redefined protected;
62         ---Level: Internal
63         ---Purpose: Draws element <anIndex> of the arrow <me>.
64
65         DrawVertex( me : mutable; aDrawer: Drawer from Graphic2d;
66                                   anIndex: Integer from Standard)
67         is redefined protected;
68         ---Level: Internal
69         ---Purpose: Draws vertex <anIndex> of the arrow <me>.
70                 
71         ArrayOfPnt2d( me ; withTrsf: Boolean from Standard = Standard_False) returns HArray1OfPnt2d from TColgp;
72         ---Level: Public
73         ---C++: return const
74         
75         TypeOfArrow( me ) returns TypeOfArrow from Prs2d;
76         ---Level: Public
77         ---Purpose: Returns type of arrow
78         --          Type is:
79         --             TOA_OPENED,
80         --             TOA_CLOSED,
81         --             TOA_FILLED
82
83
84         Pick (me : mutable; X, Y: ShortReal from Standard;
85                         aPrecision: ShortReal from Standard;
86                         aDrawer: Drawer from Graphic2d)
87         returns Boolean from Standard
88         is static protected;
89         ---Level: Internal
90         ---Purpose: Returns Standard_True if the arrow <me> is picked,
91         --          Standard_False if not.
92
93         Save( me; aFStream: in out FStream from Aspect ) is virtual;
94     
95                                                                                                         
96 fields
97  
98         myXVert       : Array1OfShortReal from TShort;
99         myYVert       : Array1OfShortReal from TShort;
100         myTypeOfArrow : TypeOfArrow from Prs2d;
101         
102 end Arrow from Prs2d;