0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / samples / mfc / standard / Common / Primitive / Sample2D_Text.h
1 #ifndef _Sample2D_Text_HeaderFile
2 #define _Sample2D_Text_HeaderFile
3 #include <Standard_Macro.hxx>
4 #include <Standard_DefineHandle.hxx>
5 #include <Graphic3d_HorizontalTextAlignment.hxx>
6 #include <Graphic3d_VerticalTextAlignment.hxx>
7 #include <TCollection_AsciiString.hxx>
8
9 class Sample2D_Text;
10 DEFINE_STANDARD_HANDLE(Sample2D_Text,AIS_InteractiveObject)
11 class Sample2D_Text : public AIS_InteractiveObject 
12 {
13
14 public:
15
16 Standard_EXPORT 
17   Sample2D_Text  (const TCollection_AsciiString& theText,const gp_Pnt&  thePosition,
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);
26
27 inline   TCollection_AsciiString GetText() const {  return myText ; }
28 inline   void                    SetText(const TCollection_AsciiString& theText) {  myText = theText; }
29 inline   void                    GetCoord(gp_Pnt& thePosition) const {  thePosition=gp_Pnt(myPosition); }
30 inline   void                    SetCoord(const gp_Pnt& thePosition) {  myPosition = thePosition; }
31 inline   Standard_Real           GetAngle() const {  return myAngle; }
32 inline   void                    SetAngle(const Standard_Real theAngle) {  myAngle = theAngle; }
33 inline   Quantity_Color          GetColor() const {  return myColor; }
34 inline   void                    SetColor(const Quantity_Color theColor) {  myColor = theColor; }
35 inline   Quantity_Factor         GetScale() const {  return myScale; }
36 inline   void                    SetScale  (const Quantity_Factor theScale) {  myScale  = theScale; }
37 inline   Standard_Boolean        GetIsZoomable() const { return myIsZoomable; }
38 inline   void                    SetIsZoomable(const Standard_Boolean theIsZoomable) { myIsZoomable = theIsZoomable;}
39
40
41 DEFINE_STANDARD_RTTIEXT(Sample2D_Text,AIS_InteractiveObject)
42
43 private: 
44  
45  void Compute (  const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
46                   const Handle(Prs3d_Presentation)& aPresentation,
47                   const Standard_Integer aMode);
48
49  void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/,
50                         const Standard_Integer /*aMode*/)
51  {
52
53  }
54
55
56 TCollection_AsciiString   myText            ; 
57 gp_Pnt                    myPosition        ;
58 Standard_Real             myAngle           ;
59 Quantity_Color            myColor           ;
60 Standard_CString          myFont            ;
61 Quantity_Factor           myScale           ;
62 Standard_Real             myHeight          ;
63 Font_FontAspect           myFontAspect      ; 
64 Standard_Boolean          myIsZoomable      ;
65 Graphic3d_HorizontalTextAlignment   myHAlign ;
66 Graphic3d_VerticalTextAlignment     myVAlign ;
67
68 };
69
70 #endif