+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+ aViewer->setBackground( OCCViewer_ViewFrame::TOP_LEFT,
+ aResMgr->backgroundValue( "OCCViewer", "xz_background", aViewer->background(OCCViewer_ViewFrame::TOP_LEFT) ) );
+ aViewer->setBackground( OCCViewer_ViewFrame::TOP_RIGHT,
+ aResMgr->backgroundValue( "OCCViewer", "yz_background", aViewer->background(OCCViewer_ViewFrame::TOP_RIGHT) ) );
+ aViewer->setBackground( OCCViewer_ViewFrame::BOTTOM_LEFT,
+ aResMgr->backgroundValue( "OCCViewer", "xy_background", aViewer->background(OCCViewer_ViewFrame::BOTTOM_LEFT) ) );
+ aViewer->setBackground( OCCViewer_ViewFrame::BOTTOM_RIGHT,
+ aResMgr->backgroundValue( "OCCViewer", "background", aViewer->background(OCCViewer_ViewFrame::MAIN_VIEW) ) );
+
+ aViewer->setTrihedronSize( aResMgr->doubleValue( "3DViewer", "trihedron_size", aViewer->trihedronSize() ),
+ aResMgr->booleanValue( "3DViewer", "relative_size", aViewer->trihedronRelative() ));
+ aViewer->setInteractionStyle( aResMgr->integerValue( "3DViewer", "navigation_mode", aViewer->interactionStyle() ) );
+ aViewer->setZoomingStyle( aResMgr->integerValue( "3DViewer", "zooming_mode", aViewer->zoomingStyle() ) );
+ aViewer->enablePreselection( aResMgr->booleanValue( "OCCViewer", "enable_preselection", aViewer->isPreselectionEnabled() ) );
+ aViewer->enableSelection( aResMgr->booleanValue( "OCCViewer", "enable_selection", aViewer->isSelectionEnabled() ) );
+
+ myViewManager->setViewModel( aViewer );// custom view model, which extends SALOME_View interface
+ SUIT_ViewWindow* aViewWin = myViewManager->createViewWindow();
+ aViewer->setStaticTrihedronDisplayed( false );
+ Handle(AIS_Trihedron) aTrihedron = HYDROGUI_AISTrihedron::createTrihedron(
+ aResMgr->doubleValue( "3DViewer", "trihedron_size",
+ aViewer->trihedronSize() ));
+ Handle(AIS_InteractiveContext) anAISContext = aViewer->getAISContext();
+ if ( !anAISContext.IsNull() ) {
+ anAISContext->Display( aTrihedron );
+ anAISContext->Deactivate( aTrihedron );
+ }
+
+ addWidget( aViewWin, 4 );
+ myEditorWidget->setOCCViewer( aViewer );