0023776: Redesign of MFC samples after V2d viewer removing
[occt.git] / samples / mfc / standard / Common / Primitive / Sample2D_Text.h
CommitLineData
7fd59977 1#ifndef _Sample2D_Text_HeaderFile
2#define _Sample2D_Text_HeaderFile
3#include <Standard_Macro.hxx>
4#include <Standard_DefineHandle.hxx>
5c1f974e 5#include <Graphic3d_HorizontalTextAlignment.hxx>
6#include <Graphic3d_VerticalTextAlignment.hxx>
7#include <TCollection_AsciiString.hxx>
7fd59977 8
9
5c1f974e 10DEFINE_STANDARD_HANDLE(Sample2D_Text,AIS_InteractiveObject)
11class Sample2D_Text : public AIS_InteractiveObject
12{
7fd59977 13
14public:
15
5c1f974e 16Standard_EXPORT
17 Sample2D_Text (const TCollection_AsciiString& theText,const gp_Pnt& thePosition,
18 const Aspect_TypeOfText theType = Aspect_TOT_SOLID,
19 const Quantity_PlaneAngle theAngle = 0.0 ,
20 const Quantity_Color theColor = Quantity_NOC_YELLOW,
21 const Font_FontAspect theFontAspect = Font_FA_Regular,
22 const Standard_CString theFont = "Courier",
23 const Standard_Real theHeight = 1,
24 const Graphic3d_HorizontalTextAlignment theHAlign = Graphic3d_HTA_LEFT,
25 const Graphic3d_VerticalTextAlignment theVAlign = Graphic3d_VTA_BOTTOM,
26 const Standard_Boolean theIsZoomable = Standard_True);
7fd59977 27
28inline TCollection_AsciiString GetText() const { return myText ; }
5c1f974e 29inline void SetText(const TCollection_AsciiString& theText) { myText = theText; }
30inline void GetCoord(gp_Pnt& thePosition) const { thePosition=gp_Pnt(myPosition); }
31inline void SetCoord(const gp_Pnt& thePosition) { myPosition = thePosition; }
32inline Standard_Integer GetTypeOfText() const { return myTypeOfText; }
33inline void SetTypeOfText(const Aspect_TypeOfText theTypeOfText) { myTypeOfText = theTypeOfText; }
7fd59977 34inline Standard_Real GetAngle() const { return myAngle; }
5c1f974e 35inline void SetAngle(const Standard_Real theAngle) { myAngle = theAngle; }
36inline Quantity_Color GetColor() const { return myColor; }
37inline void SetColor(const Quantity_Color theColor) { myColor = theColor; }
7fd59977 38inline Quantity_Factor GetScale() const { return myScale; }
5c1f974e 39inline void SetScale (const Quantity_Factor theScale) { myScale = theScale; }
7fd59977 40inline Standard_Boolean GetIsZoomable() const { return myIsZoomable; }
5c1f974e 41inline void SetIsZoomable(const Standard_Boolean theIsZoomable) { myIsZoomable = theIsZoomable;}
7fd59977 42
43
44DEFINE_STANDARD_RTTI(Sample2D_Text)
45
5c1f974e 46private:
47
48 void Compute ( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
49 const Handle(Prs3d_Presentation)& aPresentation,
50 const Standard_Integer aMode);
7fd59977 51
5c1f974e 52 void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection,
53 const Standard_Integer aMode)
54 {
7fd59977 55
5c1f974e 56 }
7fd59977 57
7fd59977 58
7fd59977 59TCollection_AsciiString myText ;
5c1f974e 60gp_Pnt myPosition ;
7fd59977 61Aspect_TypeOfText myTypeOfText ;
62Standard_Real myAngle ;
5c1f974e 63Quantity_Color myColor ;
64Standard_CString myFont ;
7fd59977 65Quantity_Factor myScale ;
7fd59977 66Standard_Real myHeight ;
5c1f974e 67Font_FontAspect myFontAspect ;
7fd59977 68Standard_Boolean myIsZoomable ;
5c1f974e 69Graphic3d_HorizontalTextAlignment myHAlign ;
70Graphic3d_VerticalTextAlignment myVAlign ;
7fd59977 71
5c1f974e 72};
7fd59977 73
74#endif