0023776: Redesign of MFC samples after V2d viewer removing
[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 IMPLEMENT_STANDARD_HANDLE(ISession_Text,AIS_InteractiveObject)
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 Aspect_TypeOfText        aType,       // = SOLID,
32                               const Quantity_PlaneAngle      anAngle,     // = 0.0
33                               const Standard_Real            aslant,      // = 0.0
34                               const Standard_Integer         aColorIndex, // = 0
35                               const Standard_Integer         aFontIndex,  // = 1
36                               const Quantity_Factor          aScale)      // = 1
37                   :AIS_InteractiveObject(),MyText(aText),MyX(anX),MyY(anY),MyZ(aZ),
38                   MyTypeOfText(aType),MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
39                   MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
40 {
41
42 }
43
44 ISession_Text::ISession_Text
45                  (const TCollection_AsciiString& aText, 
46                   gp_Pnt&                        aPoint,
47                               const Aspect_TypeOfText        aType,       // = SOLID,
48                               const Quantity_PlaneAngle      anAngle,     // = 0.0
49                               const Standard_Real            aslant,      // = 0.0
50                               const Standard_Integer         aColorIndex, // = 0
51                               const Standard_Integer         aFontIndex,  // = 1
52                               const Quantity_Factor          aScale)      // = 1
53                   :AIS_InteractiveObject(),MyText(aText),MyX(aPoint.X()),MyY(aPoint.Y()),MyZ(aPoint.Z()),
54                   MyTypeOfText(aType),MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
55                   MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
56 {
57
58 }
59
60 ISession_Text::~ISession_Text()
61 {
62
63 }
64
65 void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
66                              const Handle(Prs3d_Presentation)& aPresentation,
67                              const Standard_Integer aMode)
68 {
69     Prs3d_Text::Draw(aPresentation,myDrawer,MyText,gp_Pnt(  MyX ,MyY,MyZ ));
70 }
71
72 void ISession_Text::Compute(const Handle(Prs3d_Projector)& aProjector,
73                              const Handle(Prs3d_Presentation)& aPresentation) 
74  {
75  }
76
77 void ISession_Text::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, 
78                                       const Standard_Integer unMode)
79 {
80 }
81