0028417: Using PRECOMPILED HEADER to speed up compilation time
[occt.git] / src / DDataStd / DDataStd_DrawPresentation.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _DDataStd_DrawPresentation_HeaderFile
18#define _DDataStd_DrawPresentation_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Boolean.hxx>
24#include <TDF_Attribute.hxx>
25class Draw_Drawable3D;
26class TDF_Label;
27class Standard_GUID;
28class TDF_Attribute;
29class TDF_RelocationTable;
30class TDF_AttributeDelta;
31
32
33class DDataStd_DrawPresentation;
34DEFINE_STANDARD_HANDLE(DDataStd_DrawPresentation, TDF_Attribute)
35
36//! draw presentaion of a label of a document
37class DDataStd_DrawPresentation : public TDF_Attribute
38{
39
40public:
41
42
43 //! api methods on draw presentation
44 //! ================================
45 Standard_EXPORT static Standard_Boolean HasPresentation (const TDF_Label& L);
46
47 Standard_EXPORT static Standard_Boolean IsDisplayed (const TDF_Label& L);
48
49 Standard_EXPORT static void Display (const TDF_Label& L);
50
51 Standard_EXPORT static void Erase (const TDF_Label& L);
52
53 //! attribute implementation
54 //! ========================
55 Standard_EXPORT static void Update (const TDF_Label& L);
56
57 Standard_EXPORT static const Standard_GUID& GetID();
58
59 Standard_EXPORT DDataStd_DrawPresentation();
60
61 Standard_EXPORT void SetDisplayed (const Standard_Boolean status);
62
63 Standard_EXPORT Standard_Boolean IsDisplayed() const;
64
65 Standard_EXPORT void SetDrawable (const Handle(Draw_Drawable3D)& D);
66
67 Standard_EXPORT Handle(Draw_Drawable3D) GetDrawable() const;
68
79104795 69 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
42cf5bc1 70
79104795 71 Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
42cf5bc1 72
79104795 73 Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
42cf5bc1 74
75 //! call backs for viewer updating
76 //! ==============================
79104795 77 Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
42cf5bc1 78
79 Standard_EXPORT virtual void AfterAddition() Standard_OVERRIDE;
80
81 Standard_EXPORT virtual void BeforeRemoval() Standard_OVERRIDE;
82
83 Standard_EXPORT virtual void BeforeForget() Standard_OVERRIDE;
84
85 Standard_EXPORT virtual void AfterResume() Standard_OVERRIDE;
86
87 Standard_EXPORT virtual Standard_Boolean BeforeUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
88
89 //! update draw viewer according to delta
90 //! private methods
91 //! ===============
92 Standard_EXPORT virtual Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
93
94
95
96
92efcf78 97 DEFINE_STANDARD_RTTIEXT(DDataStd_DrawPresentation,TDF_Attribute)
42cf5bc1 98
99protected:
100
101
102
103
104private:
105
106
107 Standard_EXPORT void DrawBuild();
108
109 Standard_EXPORT static void DrawDisplay (const TDF_Label& L, const Handle(DDataStd_DrawPresentation)& P);
110
111 Standard_EXPORT static void DrawErase (const TDF_Label& L, const Handle(DDataStd_DrawPresentation)& P);
112
113 Standard_Boolean isDisplayed;
114 Handle(Draw_Drawable3D) myDrawable;
115
116
117};
118
119
120
121
122
123
124
125#endif // _DDataStd_DrawPresentation_HeaderFile