1 -- Created on: 1998-09-23
2 -- Created by: Denis PASCAL
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class DrawPresentation from DDataStd inherits Attribute from TDF
19 ---Purpose: draw presentaion of a label of a document
22 uses GUID from Standard,
23 AttributeIndexedMap from TDF,
25 AttributeDelta from TDF,
27 RelocationTable from TDF,
33 ---Purpose: api methods on draw presentation
34 -- ================================
36 HasPresentation (myclass; L : Label from TDF)
37 returns Boolean from Standard;
39 IsDisplayed (myclass; L : Label from TDF)
40 returns Boolean from Standard;
42 Display (myclass; L : Label from TDF);
43 -- display <L> presentation in draw viewer.
45 Erase (myclass; L : Label from TDF);
46 -- erase <L> in draw viewer
48 Update (myclass; L : Label from TDF);
49 -- recompute and display L in draw viewer
51 ---Purpose: attribute implementation
52 -- ========================
54 GetID(myclass) returns GUID from Standard;
55 ---C++: return const &
57 Create returns DrawPresentation from DDataStd;
59 SetDisplayed (me : mutable; status : Boolean from Standard);
62 returns Boolean from Standard;
64 SetDrawable (me : mutable; D : Drawable3D from Draw);
67 returns Drawable3D from Draw;
70 ID(me)returns GUID from Standard;
71 ---C++: return const &
74 returns Attribute from TDF;
76 Restore(me: mutable; with : Attribute from TDF);
78 Paste (me; into : Attribute from TDF;
79 RT : RelocationTable from TDF);
82 ---Purpose: call backs for viewer updating
83 -- ==============================
85 AfterAddition (me: mutable)
88 BeforeRemoval (me: mutable)
91 BeforeForget(me: mutable)
94 AfterResume(me: mutable)
97 BeforeUndo (me: mutable; anAttDelta : AttributeDelta from TDF;
98 forceIt : Boolean from Standard = Standard_False)
99 returns Boolean from Standard
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
109 ---Purpose: private methods
112 DrawBuild (me : mutable)
115 DrawDisplay (myclass; L : Label from TDF; P : DrawPresentation from DDataStd)
118 DrawErase (myclass; L : Label from TDF; P : DrawPresentation from DDataStd)
123 isDisplayed : Boolean from Standard;
124 myDrawable : Drawable3D from Draw;
126 end DrawPresentation;