b311480e |
1 | -- Created on: 1998-09-23 |
2 | -- Created by: Denis PASCAL |
3 | -- Copyright (c) 1998-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. |
7fd59977 |
16 | |
17 | class DrawPresentation from DDataStd inherits Attribute from TDF |
18 | |
19 | ---Purpose: draw presentaion of a label of a document |
20 | |
21 | |
22 | uses GUID from Standard, |
23 | AttributeIndexedMap from TDF, |
24 | DataSet from TDF, |
25 | AttributeDelta from TDF, |
26 | Label from TDF, |
27 | RelocationTable from TDF, |
28 | Drawable3D from Draw |
29 | |
30 | is |
31 | |
32 | |
33 | ---Purpose: api methods on draw presentation |
34 | -- ================================ |
35 | |
36 | HasPresentation (myclass; L : Label from TDF) |
37 | returns Boolean from Standard; |
38 | |
39 | IsDisplayed (myclass; L : Label from TDF) |
40 | returns Boolean from Standard; |
41 | |
42 | Display (myclass; L : Label from TDF); |
43 | -- display <L> presentation in draw viewer. |
44 | |
45 | Erase (myclass; L : Label from TDF); |
46 | -- erase <L> in draw viewer |
47 | |
48 | Update (myclass; L : Label from TDF); |
49 | -- recompute and display L in draw viewer |
50 | |
51 | ---Purpose: attribute implementation |
52 | -- ======================== |
53 | |
54 | GetID(myclass) returns GUID from Standard; |
55 | ---C++: return const & |
56 | |
6e33d3ce |
57 | Create returns DrawPresentation from DDataStd; |
7fd59977 |
58 | |
59 | SetDisplayed (me : mutable; status : Boolean from Standard); |
60 | |
61 | IsDisplayed (me) |
62 | returns Boolean from Standard; |
63 | |
64 | SetDrawable (me : mutable; D : Drawable3D from Draw); |
65 | |
66 | GetDrawable (me) |
67 | returns Drawable3D from Draw; |
68 | |
69 | |
70 | ID(me)returns GUID from Standard; |
71 | ---C++: return const & |
72 | |
73 | NewEmpty(me) |
6e33d3ce |
74 | returns Attribute from TDF; |
7fd59977 |
75 | |
76 | Restore(me: mutable; with : Attribute from TDF); |
77 | |
6e33d3ce |
78 | Paste (me; into : Attribute from TDF; |
79 | RT : RelocationTable from TDF); |
7fd59977 |
80 | |
81 | |
82 | ---Purpose: call backs for viewer updating |
83 | -- ============================== |
84 | |
85 | AfterAddition (me: mutable) |
86 | is redefined; |
87 | |
88 | BeforeRemoval (me: mutable) |
89 | is redefined; |
90 | |
91 | BeforeForget(me: mutable) |
92 | is redefined; |
93 | |
94 | AfterResume(me: mutable) |
95 | is redefined; |
96 | |
97 | BeforeUndo (me: mutable; anAttDelta : AttributeDelta from TDF; |
98 | forceIt : Boolean from Standard = Standard_False) |
99 | returns Boolean from Standard |
100 | is redefined; |
101 | |
102 | AfterUndo (me: mutable; anAttDelta : AttributeDelta from TDF; |
103 | forceIt : Boolean from Standard = Standard_False) |
104 | ---Purpose: update draw viewer according to delta |
105 | returns Boolean from Standard |
106 | is redefined; |
107 | |
108 | |
109 | ---Purpose: private methods |
110 | -- =============== |
111 | |
112 | DrawBuild (me : mutable) |
113 | is private; |
114 | |
115 | DrawDisplay (myclass; L : Label from TDF; P : DrawPresentation from DDataStd) |
116 | is private; |
117 | |
118 | DrawErase (myclass; L : Label from TDF; P : DrawPresentation from DDataStd) |
119 | is private; |
120 | |
121 | fields |
122 | |
123 | isDisplayed : Boolean from Standard; |
124 | myDrawable : Drawable3D from Draw; |
125 | |
126 | end DrawPresentation; |