Salome HOME
Backward compatibility with OCCT 6.5.3
[modules/geom.git] / src / EntityGUI / EntityGUI_3DSketcherDlg.cxx
index e7e6182d646636fcf7716b93ebcd6f9aedd89957..8be419d3824b6d19ebc3f3722c3852808ecb7224 100755 (executable)
@@ -26,7 +26,8 @@
 
 #include "EntityGUI_3DSketcherDlg.h"
 #include "EntityGUI_Widgets.h"
-#include <SalomeApp_DoubleSpinBox.h>
+
+#include <Basics_OCCTVersion.hxx>
 
 #include <GEOMBase.h>
 #include <GeometryGUI.h>
@@ -42,6 +43,7 @@
 #include <SOCC_Prs.h>
 #include <SOCC_ViewModel.h>
 #include <SalomeApp_Application.h>
+#include <SalomeApp_DoubleSpinBox.h>
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
 #include <Prs3d_AngleAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_LengthAspect.hxx>
+#if OCC_VERSION_LARGE > 0x06050300
 #include <Prs3d_TextAspect.hxx>
 #include <Prs3d_Presentation.hxx>
 #include <Prs3d_Text.hxx>
-
 #include <Graphic3d_VerticalTextAlignment.hxx>
 #include <Graphic3d_HorizontalTextAlignment.hxx>
 #include <Graphic3d_AspectText3d.hxx>
-
 #include <Font_FontAspect.hxx>
+#endif // OCC_VERSION_LARGE > 0x06050300
 
 // This include must be *AFTER* SOCC_ViewModel.h because
 // of the constant ROTATE which is a #define in
@@ -101,6 +103,7 @@ private:
   bool& myLock;
 };
 
+#if OCC_VERSION_LARGE > 0x06050300
 DEFINE_STANDARD_HANDLE(AIS_Text, AIS_InteractiveObject)
 
 class AIS_Text:public AIS_InteractiveObject
@@ -194,6 +197,7 @@ void AIS_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentation
   asp->Aspect()->SetTextFontAspect(aFontAspect);
   Prs3d_Text::Draw(aPresentation, asp, aText, aPosition);
 };
+#endif // OCC_VERSION_LARGE > 0x06050300
 
 bool isSame (double d1, double d2)
 { 
@@ -325,7 +329,9 @@ void EntityGUI_3DSketcherDlg::Init()
   SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
   myAnglePrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
   myLengthPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
+#if OCC_VERSION_LARGE > 0x06050300
   myTextPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
+#endif // OCC_VERSION_LARGE > 0x06050300
 
   localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
 
@@ -1588,6 +1594,7 @@ void EntityGUI_3DSketcherDlg::displayText ( std::string theText,
                                             gp_Pnt P,
                                             bool store )
 {
+#if OCC_VERSION_LARGE > 0x06050300
   SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
     
   Handle(AIS_Text) anIO = new AIS_Text(TCollection_ExtendedString(theText.c_str()), P);
@@ -1611,6 +1618,7 @@ void EntityGUI_3DSketcherDlg::displayText ( std::string theText,
       GEOMBase_Helper::displayPreview(aSPrs, true, true);
     }
   }
+#endif // OCC_VERSION_LARGE > 0x06050300
 }
 
 //================================================================
@@ -1851,4 +1859,4 @@ double EntityGUI_3DSketcherDlg::height (gp_Pnt thePnt) const
   gp_Pnt aPnt = thePnt.Transformed(aTrsf);
   
   return aPnt.Z();
-}
\ No newline at end of file
+}