0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[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
9e3ca93a 9class Sample2D_Text;
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,
5c1f974e 18 const Quantity_PlaneAngle theAngle = 0.0 ,
19 const Quantity_Color theColor = Quantity_NOC_YELLOW,
20 const Font_FontAspect theFontAspect = Font_FA_Regular,
21 const Standard_CString theFont = "Courier",
22 const Standard_Real theHeight = 1,
23 const Graphic3d_HorizontalTextAlignment theHAlign = Graphic3d_HTA_LEFT,
24 const Graphic3d_VerticalTextAlignment theVAlign = Graphic3d_VTA_BOTTOM,
25 const Standard_Boolean theIsZoomable = Standard_True);
7fd59977 26
27inline TCollection_AsciiString GetText() const { return myText ; }
5c1f974e 28inline void SetText(const TCollection_AsciiString& theText) { myText = theText; }
29inline void GetCoord(gp_Pnt& thePosition) const { thePosition=gp_Pnt(myPosition); }
30inline void SetCoord(const gp_Pnt& thePosition) { myPosition = thePosition; }
7fd59977 31inline Standard_Real GetAngle() const { return myAngle; }
5c1f974e 32inline void SetAngle(const Standard_Real theAngle) { myAngle = theAngle; }
33inline Quantity_Color GetColor() const { return myColor; }
34inline void SetColor(const Quantity_Color theColor) { myColor = theColor; }
7fd59977 35inline Quantity_Factor GetScale() const { return myScale; }
5c1f974e 36inline void SetScale (const Quantity_Factor theScale) { myScale = theScale; }
7fd59977 37inline Standard_Boolean GetIsZoomable() const { return myIsZoomable; }
5c1f974e 38inline void SetIsZoomable(const Standard_Boolean theIsZoomable) { myIsZoomable = theIsZoomable;}
7fd59977 39
40
92efcf78 41DEFINE_STANDARD_RTTIEXT(Sample2D_Text,AIS_InteractiveObject)
7fd59977 42
5c1f974e 43private:
44
45 void Compute ( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
46 const Handle(Prs3d_Presentation)& aPresentation,
47 const Standard_Integer aMode);
7fd59977 48
5c573e69 49 void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/,
50 const Standard_Integer /*aMode*/)
5c1f974e 51 {
7fd59977 52
5c1f974e 53 }
7fd59977 54
7fd59977 55
7fd59977 56TCollection_AsciiString myText ;
5c1f974e 57gp_Pnt myPosition ;
7fd59977 58Standard_Real myAngle ;
5c1f974e 59Quantity_Color myColor ;
60Standard_CString myFont ;
7fd59977 61Quantity_Factor myScale ;
7fd59977 62Standard_Real myHeight ;
5c1f974e 63Font_FontAspect myFontAspect ;
7fd59977 64Standard_Boolean myIsZoomable ;
5c1f974e 65Graphic3d_HorizontalTextAlignment myHAlign ;
66Graphic3d_VerticalTextAlignment myVAlign ;
7fd59977 67
5c1f974e 68};
7fd59977 69
70#endif