0024624: Lost word in license statement in source files
[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 17-- Updated: GG IMP230300 Add grid color parameters in constructor
18-- and add new methods SetColors() & Colors()
7fd59977 19
20deferred class Grid from Aspect
21inherits TShared from MMgt
22
23uses
24 PlaneAngle, Length from Quantity,
25 GridDrawMode from Aspect,
26 Color from Quantity
27is
28
29 Initialize(anXOrigin: Length from Quantity = 0.0;
30 anYOrigin: Length from Quantity = 0.0;
31 aRotationAngle: PlaneAngle from Quantity = 0;
32 aColor: Color from Quantity = Quantity_NOC_GRAY50;
33 aTenthColor: Color from Quantity = Quantity_NOC_GRAY70);
34
35 ---Purpose: creates a new grid. By default this grid is not
36 -- active.
37
38 ---Category: grid definition methods
39
40 SetXOrigin(me: mutable; anOrigin: Length from Quantity)
41 is static;
42 ---Level: Public
43 ---Purpose: defines the x Origin of the grid.
44
45 SetYOrigin(me: mutable; anOrigin: Length from Quantity)
46 is static;
47 ---Level: Public
48 ---Purpose: defines the y Origin of the grid.
49
50 SetRotationAngle(me: mutable; anAngle: PlaneAngle from Quantity)
51 is static;
52 ---Level: Public
53 ---Purpose: defines the orientation of the the grid.
54
55 Rotate(me: mutable; anAngle: PlaneAngle from Quantity)
56 is static;
57 ---Level: Public
58 ---Purpose: Rotate the grid from a relative angle.
59
60 Translate(me: mutable; aDx, aDy: Length from Quantity)
61 is static;
62 ---Level: Public
63 ---Purpose: Translate the grid from a relative distance.
64
65 SetColors ( me : mutable;
66 aColor : Color from Quantity;
67 aTenthColor : Color from Quantity )
68 is virtual;
69 ---Level: Public
70 ---Purpose: Change the colors of the grid
71
72---Category: Pick methods
73--
74 Hit(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
75 is static;
76 ---Level: Public
77 ---Purpose: returns the point of the grid the closest to the point X,Y
78 -- if the grid is active. If the grid is not active returns
79 -- X,Y.
80
81 Compute(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
82 is deferred;
83 ---Level: Internal
84 ---Purpose: returns the point of the grid the closest to the point X,Y
85---Category: Managment methods.
86
87 Activate(me: mutable)
88 is static;
89 ---Level: Public
90 ---Purpose: activates the grid. The Hit method will return
91 -- gridx and gridx computed according to the steps
92 -- of the grid.
93
94 Deactivate(me: mutable)
95 is static;
96 ---Level: Public
97 ---Purpose: deactivates the grid. The hit method will return
98 -- gridx and gridx as the enter value X & Y.
99
100---Category: inquire methods
101
102 XOrigin(me) returns Length from Quantity
103 is static;
104 ---Level: Public
105 ---Purpose: returns the x Origin of the grid.
106
107 YOrigin(me) returns Length from Quantity
108 is static;
109 ---Level: Public
110 ---Purpose: returns the x Origin of the grid.
111
112
113 RotationAngle(me) returns PlaneAngle from Quantity
114 is static;
115 ---Level: Public
116 ---Purpose: returns the x Angle of the grid.
117
118
119 IsActive(me) returns Boolean from Standard
120 is static;
121 ---Level: Public
122 ---Purpose: Returns TRUE when the grid is active.
123
124 Colors(me ; aColor,aTenthColor: out Color from Quantity)
125 is static;
126 ---Level: Public
127 ---Purpose: Returns the colors of the grid.
128
129---Category: display methods
130
131 SetDrawMode(me: mutable; aDrawMode: GridDrawMode from Aspect)
132 is static;
133 ---Level: Public
134 ---Purpose: Change the grid aspect.
135
136 DrawMode(me) returns GridDrawMode from Aspect
137 is static;
138 ---Level: Public
139 ---Purpose: Returns the grid aspect.
140
141 Display(me: mutable)
142 is virtual;
143 ---Level: Public
144 ---Purpose: Display the grid at screen.
145
146 Erase(me)
147 is virtual;
148 ---Level: Public
149 ---Purpose: Erase the grid from screen.
150
151 IsDisplayed(me)
152 returns Boolean from Standard
153 is virtual;
154 ---Level: Public
155 ---Purpose: Returns TRUE when the grid is displayed at screen.
156
157 UpdateDisplay(me: mutable)
158 is virtual protected;
159 ---Level: Internal
160 ---Purpose: Updates the grid parameters.
161
162 Init(me: mutable)
163 is deferred;
164 ---Level: Internal
165
166
167fields
168
169 myRotationAngle: PlaneAngle from Quantity is protected;
170 myXOrigin: Length from Quantity is protected;
171 myYOrigin: Length from Quantity is protected;
172 myColor: Color from Quantity is protected;
173 myTenthColor: Color from Quantity is protected;
174 myIsActive :Boolean from Standard;
7fd59977 175 myDrawMode: GridDrawMode from Aspect;
176
177end Grid from Aspect;