0031313: Foundation Classes - Dump improvement for classes
[occt.git] / src / Prs3d / Prs3d_Text.hxx
index 4118618..ea2f98c 100644 (file)
 #ifndef _Prs3d_Text_HeaderFile
 #define _Prs3d_Text_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
 #include <Prs3d_Root.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_TextAspect.hxx>
 
 #include <gp_Ax2.hxx>
 
-class Prs3d_Presentation;
 class TCollection_ExtendedString;
 class gp_Pnt;
 
 //! A framework to define the display of texts.
-class Prs3d_Text  : public Prs3d_Root
+class Prs3d_Text : public Prs3d_Root
 {
 public:
 
   DEFINE_STANDARD_ALLOC
 
-  
-  //! Defines the display of the text aText at the point AttachmentPoint.
-  //! The drawer aDrawer specifies the display attributes which texts will have.
-  //! The presentation object aPresentation stores the
-  //! information defined in this framework.
-  //! static void Draw (const Handle(Prs3d_Presentation)&
-  //! aPresentation, const Handle(Prs3d_TextAspect)&
-  //! anAspect, const TCollection_ExtendedString& aText,
-  //! const gp_Pnt& AttachmentPoint);
-  Standard_EXPORT static void Draw (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const TCollection_ExtendedString& aText, const gp_Pnt& AttachmentPoint);
-
-  //! Draws theText label with the location and the orientation
-  //! specified in the model 3D space through theOrientation argument.
-  Standard_EXPORT static void Draw (const Handle(Prs3d_Presentation)& thePresentation,
+  //! Defines the display of the text.
+  //! @param theGroup  group to add primitives
+  //! @param theAspect presentation attributes
+  //! @param theText   text to draw
+  //! @param theAttachmentPoint attachment point
+  Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup,
+                                    const Handle(Prs3d_TextAspect)& theAspect,
+                                    const TCollection_ExtendedString& theText,
+                                    const gp_Pnt& theAttachmentPoint);
+
+  //! Draws the text label.
+  //! @param theGroup       group to add primitives
+  //! @param theAspect      presentation attributes
+  //! @param theText        text to draw
+  //! @param theOrientation location and orientation specified in the model 3D space
+  //! @param theHasOwnAnchor 
+  Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)&    theGroup,
                                     const Handle(Prs3d_TextAspect)&   theAspect,
                                     const TCollection_ExtendedString& theText,
                                     const gp_Ax2&                     theOrientation,
                                     const Standard_Boolean            theHasOwnAnchor = Standard_True);
-  
-  //! Defines the display of the text aText at the point
-  //! AttachmentPoint.
-  //! The text aspect object anAspect specifies the display
-  //! attributes which texts will have.
-  //! The presentation object aPresentation stores the
-  //! information defined in this framework.
-  //! This syntax could be used if you had not already
-  //! defined text display attributes in a drawer or if you
-  //! wanted to exceptionally overide the definition
-  //! provided in your drawer.
-  Standard_EXPORT static void Draw (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_TextAspect)& anAspect, const TCollection_ExtendedString& aText, const gp_Pnt& AttachmentPoint);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
 
+public:
 
+  //! Alias to another method Draw() for backward compatibility.
+  Standard_DEPRECATED("Prs3d_Text::Draw() taking Graphic3d_Group should be used instead")
+  static void Draw (const Handle(Prs3d_Presentation)& thePrs,
+                    const Handle(Prs3d_Drawer)& theDrawer,
+                    const TCollection_ExtendedString& theText,
+                    const gp_Pnt& theAttachmentPoint)
+  {
+    Draw (Prs3d_Root::CurrentGroup (thePrs), theDrawer->TextAspect(), theText, theAttachmentPoint);
+  }
+
+  //! Alias to another method Draw() for backward compatibility.
+  Standard_DEPRECATED("Prs3d_Text::Draw() taking Graphic3d_Group should be used instead")
+  static void Draw (const Handle(Prs3d_Presentation)& thePrs,
+                    const Handle(Prs3d_TextAspect)&   theAspect,
+                    const TCollection_ExtendedString& theText,
+                    const gp_Ax2&                     theOrientation,
+                    const Standard_Boolean            theHasOwnAnchor = Standard_True)
+  {
+    Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theOrientation, theHasOwnAnchor);
+  }
+
+  //! Alias to another method Draw() for backward compatibility.
+  Standard_DEPRECATED("Prs3d_Text::Draw() taking Graphic3d_Group should be used instead")
+  static void Draw (const Handle(Prs3d_Presentation)& thePrs,
+                    const Handle(Prs3d_TextAspect)& theAspect,
+                    const TCollection_ExtendedString& theText,
+                    const gp_Pnt& theAttachmentPoint)
+  {
+    Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theAttachmentPoint);
+  }
 
 };
 
-
-
-
-
-
-
 #endif // _Prs3d_Text_HeaderFile