0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / Aspect / Aspect_Grid.cdl
CommitLineData
b311480e 1-- Created on: 1995-03-02
2-- Created by: Jean-Louis Frenkel
3-- Copyright (c) 1995-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
7fd59977 17deferred class Grid from Aspect
18inherits TShared from MMgt
19
20uses
21 PlaneAngle, Length from Quantity,
22 GridDrawMode from Aspect,
23 Color from Quantity
24is
25
26 Initialize(anXOrigin: Length from Quantity = 0.0;
27 anYOrigin: Length from Quantity = 0.0;
28 aRotationAngle: PlaneAngle from Quantity = 0;
29 aColor: Color from Quantity = Quantity_NOC_GRAY50;
30 aTenthColor: Color from Quantity = Quantity_NOC_GRAY70);
31
32 ---Purpose: creates a new grid. By default this grid is not
33 -- active.
34
35 ---Category: grid definition methods
36
37 SetXOrigin(me: mutable; anOrigin: Length from Quantity)
38 is static;
39 ---Level: Public
40 ---Purpose: defines the x Origin of the grid.
41
42 SetYOrigin(me: mutable; anOrigin: Length from Quantity)
43 is static;
44 ---Level: Public
45 ---Purpose: defines the y Origin of the grid.
46
47 SetRotationAngle(me: mutable; anAngle: PlaneAngle from Quantity)
48 is static;
49 ---Level: Public
50 ---Purpose: defines the orientation of the the grid.
51
52 Rotate(me: mutable; anAngle: PlaneAngle from Quantity)
53 is static;
54 ---Level: Public
55 ---Purpose: Rotate the grid from a relative angle.
56
57 Translate(me: mutable; aDx, aDy: Length from Quantity)
58 is static;
59 ---Level: Public
60 ---Purpose: Translate the grid from a relative distance.
61
62 SetColors ( me : mutable;
63 aColor : Color from Quantity;
64 aTenthColor : Color from Quantity )
65 is virtual;
66 ---Level: Public
67 ---Purpose: Change the colors of the grid
68
69---Category: Pick methods
70--
71 Hit(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
72 is static;
73 ---Level: Public
74 ---Purpose: returns the point of the grid the closest to the point X,Y
75 -- if the grid is active. If the grid is not active returns
76 -- X,Y.
77
78 Compute(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
79 is deferred;
80 ---Level: Internal
81 ---Purpose: returns the point of the grid the closest to the point X,Y
82---Category: Managment methods.
83
84 Activate(me: mutable)
85 is static;
86 ---Level: Public
87 ---Purpose: activates the grid. The Hit method will return
88 -- gridx and gridx computed according to the steps
89 -- of the grid.
90
91 Deactivate(me: mutable)
92 is static;
93 ---Level: Public
94 ---Purpose: deactivates the grid. The hit method will return
95 -- gridx and gridx as the enter value X & Y.
96
97---Category: inquire methods
98
99 XOrigin(me) returns Length from Quantity
100 is static;
101 ---Level: Public
102 ---Purpose: returns the x Origin of the grid.
103
104 YOrigin(me) returns Length from Quantity
105 is static;
106 ---Level: Public
107 ---Purpose: returns the x Origin of the grid.
108
109
110 RotationAngle(me) returns PlaneAngle from Quantity
111 is static;
112 ---Level: Public
113 ---Purpose: returns the x Angle of the grid.
114
115
116 IsActive(me) returns Boolean from Standard
117 is static;
118 ---Level: Public
119 ---Purpose: Returns TRUE when the grid is active.
120
121 Colors(me ; aColor,aTenthColor: out Color from Quantity)
122 is static;
123 ---Level: Public
124 ---Purpose: Returns the colors of the grid.
125
126---Category: display methods
127
128 SetDrawMode(me: mutable; aDrawMode: GridDrawMode from Aspect)
129 is static;
130 ---Level: Public
131 ---Purpose: Change the grid aspect.
132
133 DrawMode(me) returns GridDrawMode from Aspect
134 is static;
135 ---Level: Public
136 ---Purpose: Returns the grid aspect.
137
138 Display(me: mutable)
139 is virtual;
140 ---Level: Public
141 ---Purpose: Display the grid at screen.
142
143 Erase(me)
144 is virtual;
145 ---Level: Public
146 ---Purpose: Erase the grid from screen.
147
148 IsDisplayed(me)
149 returns Boolean from Standard
150 is virtual;
151 ---Level: Public
152 ---Purpose: Returns TRUE when the grid is displayed at screen.
153
154 UpdateDisplay(me: mutable)
155 is virtual protected;
156 ---Level: Internal
157 ---Purpose: Updates the grid parameters.
158
159 Init(me: mutable)
160 is deferred;
161 ---Level: Internal
162
163
164fields
165
166 myRotationAngle: PlaneAngle from Quantity is protected;
167 myXOrigin: Length from Quantity is protected;
168 myYOrigin: Length from Quantity is protected;
169 myColor: Color from Quantity is protected;
170 myTenthColor: Color from Quantity is protected;
171 myIsActive :Boolean from Standard;
7fd59977 172 myDrawMode: GridDrawMode from Aspect;
173
174end Grid from Aspect;