Salome HOME
Allow drag and drop berween items; change z layers assigning algo.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_OCCDisplayer.h
index 410ee7766d4dde7c09eb13e7baf4e0dde2247896..f1cb02563903cfd89ed376830a751543b6ef5221 100644 (file)
@@ -27,6 +27,8 @@
 
 class HYDROGUI_Shape;
 class Handle(AIS_InteractiveContext);
+class OCCViewer_ViewManager;
+class OCCViewer_Viewer;
 
 /**
  * \class HYDROGUI_OCCDisplayer
@@ -55,6 +57,25 @@ public:
   void                            SetToUpdate( const HYDROData_SequenceOfObjects& theObjs,
                                                const int theViewerId );
 
+  /**
+   * \brief Get the applicable viewer type.
+   */
+  virtual QString  GetType() const;
+
+  /**
+   * \brief Add the top z layer and returns its index.
+   * \param theMgr OCC view manager
+   */
+  int                             AddTopZLayer( OCCViewer_ViewManager* theMgr );
+
+  /**
+   * \brief Removes the z layer.
+   * \param theMgr OCC view manager
+   * \param theLayer a layer index
+   */
+  void                            RemoveZLayer( OCCViewer_ViewManager* theMgr,
+                                                const int theLayer );
+
 protected:
   /**
    * \brief Erase all viewer objects.
@@ -75,11 +96,14 @@ protected:
    * \param theObjs sequence of objects to display
    * \param theViewerId viewer identifier
    * \param theIsForced flag used to update all objects, including the unchanged ones
+   * \param theDoFitAll flag used to fit the view to all visible objects; do not fit by default
    */
   void                            Display( const HYDROData_SequenceOfObjects& theObjs,
                                            const int theViewerId,
-                                           const bool theIsForced );
+                                           const bool theIsForced,
+                                           const bool theDoFitAll );
 
+protected:
   /**
    * \brief Purge all invalid objects in the viewer.
    * \param theViewerId viewer identifier
@@ -97,6 +121,21 @@ private:
   HYDROGUI_Shape*                 createShape( const int                             theViewerId,
                                                const Handle(AIS_InteractiveContext)& theContext,
                                                const Handle(HYDROData_Entity)&       theObject );
+
+   /**
+   * \brief Display the specified object.
+   * \param theObject the object to display
+   * \param theViewer the viewer for displaying
+   * \param theIsForced the flag used to update the object shape
+   * \param theZLayerIndex the Z layer index
+   * \param theIsOrdered the flag indicating if the Z layer ordering available for the object
+   * \return true in case of success
+   */
+  bool                            Display( const Handle(HYDROData_Entity)& theObject,
+                                           const OCCViewer_Viewer* theViewer,
+                                           const bool theIsForced,
+                                           const int theZLayerIndex,
+                                           const bool theIsOrdered );
 };
 
 #endif