Back to index

salome-gui  6.5.0
SOCC_ViewModel.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #include "SOCC_ViewModel.h"
00024 
00025 #include "SOCC_Prs.h"
00026 #include "SOCC_ViewWindow.h"
00027 
00028 #include "OCCViewer_Trihedron.h"
00029 
00030 #include "SUIT_Session.h"
00031 #include "SUIT_ResourceMgr.h"
00032 //#include "SUIT_Application.h"
00033 
00034 //#include "ToolsGUI.h"
00035 
00036 // Temporarily commented to avoid awful dependecy on SALOMEDS
00037 // TODO: better mechanism of storing display/erse status in a study
00038 // should be provided...
00039 //#include <SALOMEconfig.h>
00040 //#include CORBA_CLIENT_HEADER(SALOMEDS)
00041 
00042 #include <AIS_ListIteratorOfListOfInteractive.hxx>
00043 #include <Visual3d_View.hxx>
00044 
00045 #include <SALOME_AISShape.hxx>
00046 #include <SALOME_AISObject.hxx>
00047 #include <SALOME_InteractiveObject.hxx>
00048 #include <SALOME_ListIO.hxx>
00049 
00050 // Temporarily commented to avoid awful dependecy on SALOMEDS
00051 // TODO: better mechanism of storing display/erse status in a study
00052 // should be provided...
00053 //#include <Utils_ORB_INIT.hxx>
00054 //#include <Utils_SINGLETON.hxx>
00055 //#include <SALOME_ModuleCatalog_impl.hxx>
00056 //#include <SALOME_NamingService.hxx>
00057 
00058 //#include "SALOMEDSClient.hxx"
00059 //#include "SALOMEDS_StudyManager.hxx"
00060 #include <Basics_OCCTVersion.hxx>
00061 
00062 #include <AIS_TypeOfIso.hxx>
00063 #include <Precision.hxx>
00064 
00065 // in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study.
00066 // SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from 
00067 // SALOMEDS::StudyManager - no linkage with SalomeApp. 
00068 
00069 // Temporarily commented to avoid awful dependecy on SALOMEDS
00070 // TODO: better mechanism of storing display/erse status in a study
00071 // should be provided...
00072 //static _PTR(Study) getStudyDS() 
00073 //{
00074 //  SALOMEDSClient_Study* aStudy = NULL;
00075 //  _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() );
00076 
00077   // get id of SUIT_Study, if it's a SalomeApp_Study, it will return
00078   //    id of its underlying SALOMEDS::Study
00079 //  SUIT_Application* app = SUIT_Session::session()->activeApplication();
00080 //  if ( !app )  return _PTR(Study)(aStudy);
00081 //  SUIT_Study* stud = app->activeStudy();
00082 //  if ( !stud ) return _PTR(Study)(aStudy);  
00083 //  const int id = stud->id(); // virtual method, must return SALOMEDS_Study id
00084   // get SALOMEDS_Study with this id from StudyMgr
00085 //  return aMgr->GetStudyByID( id );
00086 //}
00087 
00092 SOCC_Viewer::SOCC_Viewer( bool DisplayTrihedron )
00093 : OCCViewer_Viewer( DisplayTrihedron )
00094 {
00095 }
00096 
00100 SOCC_Viewer::~SOCC_Viewer()
00101 {
00102 }
00103 
00110 bool SOCC_Viewer::highlight( const Handle(SALOME_InteractiveObject)& obj,
00111                              bool hilight, bool upd )
00112 {
00113   bool isInLocal = getAISContext()->HasOpenedContext();
00114   //SUIT_Study* ActiveStudy = SUIT_Application::getDesktop()->getActiveStudy();
00115   //SALOME_Selection* Sel = SALOME_Selection::Selection( ActiveStudy->getSelection() );
00116 
00117   AIS_ListOfInteractive List;
00118   getAISContext()->DisplayedObjects(List);
00119   
00120   AIS_ListIteratorOfListOfInteractive ite(List);
00121   for ( ; ite.More(); ite.Next() )
00122   {
00123     Handle(SALOME_InteractiveObject) anObj =
00124       Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
00125 
00126     if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( obj ) )
00127     {
00128       if ( !isInLocal )
00129           OCCViewer_Viewer::highlight( ite.Value(), hilight, false );
00130       // highlight sub-shapes only when local selection is active
00131       else
00132       {
00133         /*if ( ite.Value()->IsKind( STANDARD_TYPE( SALOME_AISShape ) ) )
00134         {
00135           Handle(SALOME_AISShape) aSh = Handle(SALOME_AISShape)::DownCast( ite.Value() );
00136           TColStd_IndexedMapOfInteger MapIndex;
00137           Sel->GetIndex( IObject, MapIndex );
00138           aSh->highlightSubShapes( MapIndex, highlight );
00139         }*/
00140       }
00141       break;
00142     }
00143   }
00144     
00145   if( upd )
00146     update();
00147     
00148   return false;
00149 }
00150 
00156 bool SOCC_Viewer::isInViewer( const Handle(SALOME_InteractiveObject)& obj,
00157                               bool onlyInViewer )
00158 {
00159   AIS_ListOfInteractive List;
00160   getAISContext()->DisplayedObjects(List);
00161 
00162   if( !onlyInViewer ) {
00163     AIS_ListOfInteractive List1;
00164     getAISContext()->ObjectsInCollector(List1);
00165     List.Append(List1);
00166   }
00167 
00168   AIS_ListIteratorOfListOfInteractive ite(List);
00169   for ( ; ite.More(); ite.Next() )
00170   {
00171     Handle(SALOME_InteractiveObject) anObj =
00172         Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
00173 
00174     if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( obj ) )
00175       return true;
00176   }
00177   return false;
00178 }
00179 
00184 bool SOCC_Viewer::isVisible( const Handle(SALOME_InteractiveObject)& obj )
00185 {
00186 
00187   std::map< std::string , std::vector<Handle(AIS_InteractiveObject)> >::iterator it=entry2aisobjects.find(obj->getEntry());
00188   if(it != entry2aisobjects.end())
00189     {
00190       // get context
00191       Handle (AIS_InteractiveContext) ic = getAISContext();
00192       std::vector<Handle(AIS_InteractiveObject)>& List = it->second;
00193       for( unsigned int ind = 0; ind < List.size(); ind++ )
00194         {
00195           Handle(AIS_InteractiveObject) anAIS=List[ind];
00196           if(ic->IsDisplayed(anAIS))
00197             return true;
00198         }
00199   }
00200   
00201   return false;
00202 }
00203 
00210 void SOCC_Viewer::setColor( const Handle(SALOME_InteractiveObject)& obj,
00211                             const QColor& color, bool update )
00212 {
00213   if(obj.IsNull() || !obj->hasEntry() )
00214     return;
00215 
00216   if(entry2aisobjects.count(obj->getEntry())>0)
00217     {
00218       // get context
00219       Handle (AIS_InteractiveContext) ic = getAISContext();
00220       std::vector<Handle(AIS_InteractiveObject)>& List = entry2aisobjects[obj->getEntry()];
00221       for( unsigned int ind = 0; ind < List.size(); ind++ )
00222         {
00223           Handle(AIS_InteractiveObject) anAIS=List[ind];
00224           if( !anAIS.IsNull() && ic->IsDisplayed(anAIS))
00225             OCCViewer_Viewer::setColor( anAIS, color, update );
00226         }
00227     }
00228 }
00229 
00236 void SOCC_Viewer::switchRepresentation( const Handle(SALOME_InteractiveObject)& obj,
00237                                         int mode, bool update )
00238 {
00239   if(obj.IsNull() || !obj->hasEntry() )
00240     return;
00241 
00242   if(entry2aisobjects.count(obj->getEntry())>0)
00243     {
00244       // get context
00245       Handle (AIS_InteractiveContext) ic = getAISContext();
00246       std::vector<Handle(AIS_InteractiveObject)>& List = entry2aisobjects[obj->getEntry()];
00247       for( unsigned int ind = 0; ind < List.size(); ind++ )
00248         {
00249           Handle(AIS_InteractiveObject) anAIS=List[ind];
00250           if( !anAIS.IsNull() && ic->IsDisplayed(anAIS))
00251             OCCViewer_Viewer::switchRepresentation( anAIS, mode, update );
00252         }
00253     }
00254 }
00255 
00262 void SOCC_Viewer::setTransparency( const Handle(SALOME_InteractiveObject)& obj,
00263                                    float trans, bool update )
00264 {
00265   if(obj.IsNull() || !obj->hasEntry() )
00266     return;
00267 
00268   if(entry2aisobjects.count(obj->getEntry())>0)
00269     {
00270       // get context
00271       Handle (AIS_InteractiveContext) ic = getAISContext();
00272       std::vector<Handle(AIS_InteractiveObject)>& List = entry2aisobjects[obj->getEntry()];
00273       for( unsigned int ind = 0; ind < List.size(); ind++ )
00274         {
00275           Handle(AIS_InteractiveObject) anAIS=List[ind];
00276           if( !anAIS.IsNull() && ic->IsDisplayed(anAIS))
00277             OCCViewer_Viewer::setTransparency( anAIS, trans, update );
00278         }
00279     }
00280 }
00281 
00287 void SOCC_Viewer::rename( const Handle(SALOME_InteractiveObject)& obj,
00288                           const QString& name )
00289 {
00290   AIS_ListOfInteractive List;
00291   getAISContext()->DisplayedObjects(List);
00292   
00293   AIS_ListIteratorOfListOfInteractive ite(List);
00294   while (ite.More())
00295   {
00296     if (ite.Value()->IsKind(STANDARD_TYPE(SALOME_AISShape)))
00297     {
00298       Handle(SALOME_AISShape) aSh = Handle(SALOME_AISShape)::DownCast(ite.Value());
00299       
00300       if ( aSh->hasIO() )
00301       {
00302         Handle(SALOME_InteractiveObject) IO = aSh->getIO();
00303         if ( IO->isSame( obj ) )
00304         {
00305           aSh->setName( name.toLatin1().data() );
00306           break;
00307         }
00308       }
00309     }
00310     else if ( ite.Value()->IsKind( STANDARD_TYPE( SALOME_AISObject ) ) )
00311     {
00312       Handle(SALOME_AISObject) aSh = Handle(SALOME_AISObject)::DownCast( ite.Value() );
00313 
00314       // Add code here, if someone create a MODULE_AISObject.
00315     }
00316     ite.Next();
00317   }
00318 }
00319 
00320 
00325 void SOCC_Viewer::Display( const SALOME_OCCPrs* prs )
00326 {
00327   // try do downcast object
00328   const SOCC_Prs* anOCCPrs = dynamic_cast<const SOCC_Prs*>( prs );
00329   if ( !anOCCPrs || anOCCPrs->IsNull() )
00330     return;
00331 
00332   // get SALOMEDS Study
00333   // Temporarily commented to avoid awful dependecy on SALOMEDS
00334   // TODO: better mechanism of storing display/erse status in a study
00335   // should be provided...
00336   //  _PTR(Study) study(getStudyDS());
00337 
00338   // get context
00339   Handle (AIS_InteractiveContext) ic = getAISContext();
00340 
00341   // get objects to be displayed
00342   AIS_ListOfInteractive anAISObjects;
00343   anOCCPrs->GetObjects( anAISObjects );
00344 
00345   AIS_ListIteratorOfListOfInteractive aIter( anAISObjects );
00346   for ( ; aIter.More(); aIter.Next() )
00347   {
00348     Handle(AIS_InteractiveObject) anAIS = aIter.Value();
00349     if ( !anAIS.IsNull() )
00350     {
00351       // try to find presentation in the viewer
00352 
00353       // if the object is already displayed - nothing to do more
00354       if(ic->IsDisplayed(anAIS))
00355         {
00356           // Deactivate object if necessary
00357           if ( !anOCCPrs->ToActivate() )
00358             ic->Deactivate( anAIS );
00359           continue;
00360         }
00361 
00362       // then try to find presentation in the collector
00363       if(ic->IsInCollector(anAIS))
00364         {
00365           ic->DisplayFromCollector( anAIS, false );
00366           // Deactivate object if necessary
00367           if ( !anOCCPrs->ToActivate() )
00368             ic->Deactivate( anAIS );
00369 
00370           // Set visibility flag
00371           // Temporarily commented to avoid awful dependecy on SALOMEDS
00372           // TODO: better mechanism of storing display/erse status in a study
00373           // should be provided...
00374           //Handle(SALOME_InteractiveObject) anObj =
00375           //  Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
00376           //if ( !anObj.IsNull() && anObj->hasEntry() )
00377           //{
00378           //  if ( study )
00379           //    ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
00380           //}
00381           continue;
00382         }
00383 
00384       // if object is not displayed and not found in the collector - display it
00385       if ( anAIS->IsKind( STANDARD_TYPE(AIS_Trihedron) ) )
00386       {
00387         Handle(AIS_Trihedron) aTrh = Handle(AIS_Trihedron)::DownCast( anAIS );
00388         double aNewSize = 100, aSize = 100;
00389         computeTrihedronSize( aNewSize, aSize );
00390         aTrh->SetSize( aTrh == getTrihedron() ? aNewSize : 0.5 * aNewSize );
00391       }
00392 
00393       ic->Display( anAIS, false );
00394       
00395 #if OCC_VERSION_LARGE > 0x06050200 
00396       Handle(SALOME_AISShape) aSh = Handle(SALOME_AISShape)::DownCast(anAIS);
00397       if ( !aSh.IsNull() ) {
00398        ic->SetZLayer( aSh, aSh->isTopLevel() ? getTopLayerId() : 0 );
00399       }
00400 #endif
00401       //Register anAIS (if it has an entry) in entry2aisobjects map
00402       Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
00403       if ( !anObj.IsNull() && anObj->hasEntry())
00404         {
00405           std::vector<Handle(AIS_InteractiveObject)>& List = entry2aisobjects[anObj->getEntry()];
00406           int found=0;
00407           for ( unsigned int ind = 0; ind < List.size(); ind++ )
00408           {
00409             if(List[ind] == anAIS)
00410               {
00411                 found=1;
00412                 break;
00413               }
00414           }
00415           if(!found)
00416             {
00417               List.push_back(anAIS);
00418             }
00419         }
00420 
00421       // Set visibility flag
00422       // Temporarily commented to avoid awful dependecy on SALOMEDS
00423       // TODO: better mechanism of storing display/erse status in a study
00424       // should be provided...
00425       //Handle(SALOME_InteractiveObject) anObj =
00426       //  Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
00427       //if ( !anObj.IsNull() && anObj->hasEntry() )
00428       //{
00429       //  if ( study  )
00430       //    ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
00431       //}
00432 
00433       // Deactivate object if necessary
00434       if ( !anOCCPrs->ToActivate() )
00435         ic->Deactivate( anAIS );
00436     }
00437   }
00438   updateTrihedron();
00439 }
00440 
00441 
00447 void SOCC_Viewer::Erase( const SALOME_OCCPrs* prs, const bool forced )
00448 {
00449   // try do downcast object
00450   const SOCC_Prs* anOCCPrs = dynamic_cast<const SOCC_Prs*>( prs );
00451   if ( !anOCCPrs || anOCCPrs->IsNull() )
00452     return;
00453 
00454   // get SALOMEDS Study
00455   // Temporarily commented to avoid awful dependecy on SALOMEDS
00456   // TODO: better mechanism of storing display/erse status in a study
00457   // should be provided...
00458   //  _PTR(Study) study(getStudyDS());
00459 
00460   // get context
00461   Handle(AIS_InteractiveContext) ic = getAISContext();
00462 
00463   // get objects to be erased
00464   AIS_ListOfInteractive anAISObjects;
00465   anOCCPrs->GetObjects( anAISObjects );
00466 
00467   AIS_ListIteratorOfListOfInteractive aIter( anAISObjects );
00468   for ( ; aIter.More(); aIter.Next() ) {
00469     Handle(AIS_InteractiveObject) anAIS = aIter.Value();
00470     if ( !anAIS.IsNull() ) {
00471       // erase the object from context : move it to collector
00472       ic->Erase( anAIS, false, forced ? false : true );
00473 
00474       // Set visibility flag if necessary
00475       // Temporarily commented to avoid awful dependecy on SALOMEDS
00476       // TODO: better mechanism of storing display/erse status in a study
00477       // should be provided...
00478       //if ( !forced )
00479       //{
00480       //  Handle(SALOME_InteractiveObject) anObj =
00481       //    Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
00482       //  if ( !anObj.IsNull() && anObj->hasEntry() )
00483       //  {
00484       //  if ( study )
00485       //    ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
00486       //  }
00487       //}
00488     }
00489   }
00490   updateTrihedron();
00491 }
00492 
00493 
00498 void SOCC_Viewer::EraseAll( const bool forced )
00499 {
00500   // get SALOMEDS Study
00501   // Temporarily commented to avoid awful dependecy on SALOMEDS
00502   // TODO: better mechanism of storing display/erse status in a study
00503   // should be provided...
00504   //  _PTR(Study) study(getStudyDS());
00505 
00506   // get context
00507   Handle(AIS_InteractiveContext) ic = getAISContext();
00508 
00509   // check if trihedron is displayed
00510   Standard_Boolean isTrihedronDisplayed = ic->IsDisplayed( getTrihedron() );
00511 
00512   // get objects to be erased (all currently displayed objects)
00513   AIS_ListOfInteractive aList;
00514   ic->DisplayedObjects( aList );
00515   AIS_ListIteratorOfListOfInteractive anIter( aList );
00516   for ( ; anIter.More(); anIter.Next() ) {
00517     if ( (isTrihedronDisplayed && anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron )) ||
00518          anIter.Value()->DynamicType() == STANDARD_TYPE( OCCViewer_Trihedron ))
00519       continue;
00520 
00521     // erase an object
00522     Handle(AIS_InteractiveObject) anIO = anIter.Value();
00523     ic->Erase( anIO, false, forced ? false : true );
00524     
00525     // Set visibility flag if necessary
00526     // Temporarily commented to avoid awful dependecy on SALOMEDS
00527     // TODO: better mechanism of storing display/erse status in a study
00528     // should be provided...
00529     //if ( !forced ) {
00530     //  Handle(SALOME_InteractiveObject) anObj =
00531     //  Handle(SALOME_InteractiveObject)::DownCast( anIO->GetOwner() );
00532 
00533     //  if ( !anObj.IsNull() && anObj->hasEntry() ) {
00534     //  if ( study )
00535     //    ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
00536     //  }
00537     //}
00538   }
00539 
00540   Repaint();
00541   updateTrihedron();
00542 }
00543 
00548 SALOME_Prs* SOCC_Viewer::CreatePrs( const char* entry )
00549 {
00550   SOCC_Prs* prs = new SOCC_Prs();
00551   if ( entry )
00552   {
00553     if(entry2aisobjects.count(entry)>0)
00554       {
00555         //ais object exists
00556         std::vector<Handle(AIS_InteractiveObject)> List = entry2aisobjects[entry];
00557         // get context
00558         Handle(AIS_InteractiveContext) ic = getAISContext();
00559         //add all ais
00560         for ( unsigned int ind = 0; ind < List.size(); ind++ )
00561           {
00562             Handle(AIS_InteractiveObject) anAIS=List[ind];
00563             if(ic->IsDisplayed(anAIS)||ic->IsInCollector(anAIS))
00564               {
00565                 prs->AddObject( anAIS );
00566               }
00567           }
00568       }
00569   }
00570   return prs;
00571 }
00572 
00576 void SOCC_Viewer::LocalSelection( const SALOME_OCCPrs* thePrs, const int theMode )
00577 {
00578   Handle(AIS_InteractiveContext) ic = getAISContext();
00579   
00580   const SOCC_Prs* anOCCPrs = dynamic_cast<const SOCC_Prs*>( thePrs );
00581   if ( ic.IsNull() )
00582     return;
00583   
00584   // Open local context if there is no one
00585   bool allObjects = thePrs == 0 || thePrs->IsNull();
00586   if ( !ic->HasOpenedContext() ) {
00587     ic->ClearCurrents( false );
00588     ic->OpenLocalContext( allObjects, true, true );
00589   }
00590 
00591   AIS_ListOfInteractive anObjs;
00592   // Get objects to be activated
00593   if ( allObjects ) 
00594     ic->DisplayedObjects( anObjs );
00595   else
00596     anOCCPrs->GetObjects( anObjs );
00597 
00598   // Activate selection of objects from prs
00599   AIS_ListIteratorOfListOfInteractive aIter( anObjs );
00600   for ( ; aIter.More(); aIter.Next() ) {
00601     Handle(AIS_InteractiveObject) anAIS = aIter.Value();
00602     if ( !anAIS.IsNull() )
00603     {
00604       if ( anAIS->IsKind( STANDARD_TYPE( AIS_Shape ) ) )
00605       {
00606         ic->Load( anAIS, -1, false );
00607         ic->Activate( anAIS, AIS_Shape::SelectionMode( (TopAbs_ShapeEnum)theMode ) );
00608       }
00609       else if ( anAIS->DynamicType() != STANDARD_TYPE(AIS_Trihedron) )
00610       {
00611         ic->Load( anAIS, -1, false );
00612         ic->Activate( anAIS, theMode );
00613       }
00614     }
00615   }
00616 }
00617 
00621 void SOCC_Viewer::GlobalSelection( const bool update ) const
00622 {
00623   Handle(AIS_InteractiveContext) ic = getAISContext();
00624   if ( !ic.IsNull() )
00625   {
00626     ic->CloseAllContexts( false );
00627     if ( update )
00628       ic->CurrentViewer()->Redraw();
00629   }
00630 }
00631 
00632 
00637 void SOCC_Viewer::GetVisible( SALOME_ListIO& theList )
00638 {
00639   AIS_ListOfInteractive List;
00640   getAISContext()->DisplayedObjects(List);
00641   
00642   AIS_ListIteratorOfListOfInteractive ite(List);
00643   for ( ; ite.More(); ite.Next() )
00644   {
00645     Handle(SALOME_InteractiveObject) anObj =
00646         Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
00647 
00648     if ( !anObj.IsNull() && anObj->hasEntry() )
00649       theList.Append( anObj );
00650   }
00651 }
00652 
00656 void SOCC_Viewer::Repaint()
00657 {
00658 //  onAdjustTrihedron();
00659   getViewer3d()->Update();
00660 }
00661 
00662 
00666 /*SUIT_ViewWindow* SOCC_Viewer::createView( SUIT_Desktop* theDesktop )
00667 {
00668   SOCC_ViewWindow* view = new SOCC_ViewWindow(theDesktop, this);
00669   //initView( view );
00670   initView( view->getView(OCCViewer_ViewFrame::MAIN_VIEW) );
00671   return view;
00672   }*/
00673 
00674 /* 
00675  * Returns a new OCCViewer_ViewWindow instance which will be placed as a sub window in ViewFrame
00676  */
00677 OCCViewer_ViewWindow* SOCC_Viewer::createSubWindow()
00678 {
00679   return new SOCC_ViewWindow( 0,  this);
00680 }