1 // Created by: DAUTRY Philippe
2 // Copyright (c) 1997-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _DDataStd_TreeBrowser_HeaderFile
17 #define _DDataStd_TreeBrowser_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
22 #include <TDF_Label.hxx>
23 #include <Draw_Drawable3D.hxx>
24 #include <Standard_OStream.hxx>
25 #include <Draw_Interpretor.hxx>
28 class Draw_Drawable3D;
29 class TCollection_AsciiString;
30 class TDataStd_TreeNode;
33 class DDataStd_TreeBrowser;
34 DEFINE_STANDARD_HANDLE(DDataStd_TreeBrowser, Draw_Drawable3D)
36 //! Browses a TreeNode from TDataStd.
37 //! =================================
38 class DDataStd_TreeBrowser : public Draw_Drawable3D
44 Standard_EXPORT DDataStd_TreeBrowser(const TDF_Label& root);
46 Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
48 Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
50 Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
54 Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
56 Standard_EXPORT void Label (const TDF_Label& root);
58 Standard_EXPORT TDF_Label Label() const;
60 //! Returns a string composed with the TreeNode of
62 Standard_EXPORT TCollection_AsciiString OpenRoot() const;
64 //! Returns a string composed with the sub-TreeNodes of
66 Standard_EXPORT TCollection_AsciiString OpenNode (const TDF_Label& L) const;
71 DEFINE_STANDARD_RTTIEXT(DDataStd_TreeBrowser,Draw_Drawable3D)
81 //! Returns a string composed with the sub-TreeNodes
82 //! of <aTreeNode>. Used to implement other methods.
83 Standard_EXPORT void OpenNode (const Handle(TDataStd_TreeNode)& aTreeNode, TCollection_AsciiString& aList) const;
96 #endif // _DDataStd_TreeBrowser_HeaderFile