0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / samples / mfc / standard / 01_Geometry / src / ISession2D / ISession_Text.cpp
1 // ISession_Text.cpp: implementation of the ISession_Text class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #include "stdafx.h"
6 #include "..\\GeometryApp.h"
7 #include "ISession_Text.h"
8
9 #ifdef _DEBUG
10 #undef THIS_FILE
11 static char THIS_FILE[]=__FILE__;
12 //#define new DEBUG_NEW
13 #endif
14
15 IMPLEMENT_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
16
17 //////////////////////////////////////////////////////////////////////
18 // Construction/Destruction
19 //////////////////////////////////////////////////////////////////////
20
21 ISession_Text::ISession_Text()
22 {
23
24 }
25
26 ISession_Text::ISession_Text
27                  (const TCollection_AsciiString& aText, 
28                   const Standard_Real            anX ,        // = 0
29                   const Standard_Real            anY ,        // = 0
30                   const Standard_Real            aZ  ,        // = 0
31                               const Quantity_PlaneAngle      anAngle,     // = 0.0
32                               const Standard_Real            aslant,      // = 0.0
33                               const Standard_Integer         aColorIndex, // = 0
34                               const Standard_Integer         aFontIndex,  // = 1
35                               const Quantity_Factor          aScale)      // = 1
36                   :AIS_InteractiveObject(),MyText(aText),MyX(anX),MyY(anY),MyZ(aZ),
37                   MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
38                   MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
39 {
40
41 }
42
43 ISession_Text::ISession_Text
44                  (const TCollection_AsciiString& aText, 
45                   gp_Pnt&                        aPoint,
46                               const Quantity_PlaneAngle      anAngle,     // = 0.0
47                               const Standard_Real            aslant,      // = 0.0
48                               const Standard_Integer         aColorIndex, // = 0
49                               const Standard_Integer         aFontIndex,  // = 1
50                               const Quantity_Factor          aScale)      // = 1
51                   :AIS_InteractiveObject(),MyText(aText),MyX(aPoint.X()),MyY(aPoint.Y()),MyZ(aPoint.Z()),
52                   MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
53                   MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
54 {
55
56 }
57
58 ISession_Text::~ISession_Text()
59 {
60
61 }
62
63 void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
64                             const Handle(Prs3d_Presentation)& aPresentation,
65                             const Standard_Integer /*aMode*/)
66 {
67     Prs3d_Text::Draw(aPresentation,myDrawer,MyText,gp_Pnt(  MyX ,MyY,MyZ ));
68 }
69
70 void ISession_Text::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
71                             const Handle(Prs3d_Presentation)& /*aPresentation*/) 
72  {
73  }
74
75 void ISession_Text::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, 
76                                      const Standard_Integer /*unMode*/)
77 {
78 }
79