Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:23

0001 // Created on: 1998-09-23
0002 // Created by: Denis PASCAL
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _DDataStd_DrawPresentation_HeaderFile
0018 #define _DDataStd_DrawPresentation_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TDF_Attribute.hxx>
0024 class Draw_Drawable3D;
0025 class TDF_Label;
0026 class Standard_GUID;
0027 class TDF_RelocationTable;
0028 class TDF_AttributeDelta;
0029 
0030 
0031 class DDataStd_DrawPresentation;
0032 DEFINE_STANDARD_HANDLE(DDataStd_DrawPresentation, TDF_Attribute)
0033 
0034 //! draw presentation of a label of a document
0035 class DDataStd_DrawPresentation : public TDF_Attribute
0036 {
0037 
0038 public:
0039 
0040   
0041   //! api methods on draw presentation
0042   //! ================================
0043   Standard_EXPORT static Standard_Boolean HasPresentation (const TDF_Label& L);
0044   
0045   Standard_EXPORT static Standard_Boolean IsDisplayed (const TDF_Label& L);
0046   
0047   Standard_EXPORT static void Display (const TDF_Label& L);
0048   
0049   Standard_EXPORT static void Erase (const TDF_Label& L);
0050   
0051   //! attribute implementation
0052   //! ========================
0053   Standard_EXPORT static void Update (const TDF_Label& L);
0054   
0055   Standard_EXPORT static const Standard_GUID& GetID();
0056   
0057   Standard_EXPORT DDataStd_DrawPresentation();
0058   
0059   Standard_EXPORT void SetDisplayed (const Standard_Boolean status);
0060   
0061   Standard_EXPORT Standard_Boolean IsDisplayed() const;
0062   
0063   Standard_EXPORT void SetDrawable (const Handle(Draw_Drawable3D)& D);
0064   
0065   Standard_EXPORT Handle(Draw_Drawable3D) GetDrawable() const;
0066   
0067   Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0068   
0069   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0070   
0071   Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
0072   
0073   //! call backs for viewer updating
0074   //! ==============================
0075   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
0076   
0077   Standard_EXPORT virtual void AfterAddition() Standard_OVERRIDE;
0078   
0079   Standard_EXPORT virtual void BeforeRemoval() Standard_OVERRIDE;
0080   
0081   Standard_EXPORT virtual void BeforeForget() Standard_OVERRIDE;
0082   
0083   Standard_EXPORT virtual void AfterResume() Standard_OVERRIDE;
0084   
0085   Standard_EXPORT virtual Standard_Boolean BeforeUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
0086   
0087   //! update draw viewer according to delta
0088   //! private methods
0089   //! ===============
0090   Standard_EXPORT virtual Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
0091 
0092 
0093 
0094 
0095   DEFINE_STANDARD_RTTIEXT(DDataStd_DrawPresentation,TDF_Attribute)
0096 
0097 protected:
0098 
0099 
0100 
0101 
0102 private:
0103 
0104   
0105   Standard_EXPORT void DrawBuild();
0106   
0107   Standard_EXPORT static void DrawDisplay (const TDF_Label& L, const Handle(DDataStd_DrawPresentation)& P);
0108   
0109   Standard_EXPORT static void DrawErase (const TDF_Label& L, const Handle(DDataStd_DrawPresentation)& P);
0110 
0111   Standard_Boolean isDisplayed;
0112   Handle(Draw_Drawable3D) myDrawable;
0113 
0114 
0115 };
0116 
0117 
0118 
0119 
0120 
0121 
0122 
0123 #endif // _DDataStd_DrawPresentation_HeaderFile