src/DisplayGUI/DisplayGUI.h

Go to the documentation of this file.
00001 //  GEOM GEOMGUI : GUI for Geometry component
00002 //
00003 //  Copyright (C) 2003  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 //
00024 //  File   : DisplayGUI.h
00025 //  Author : Damien COQUERET
00026 //  Module : GEOM
00027 
00028 #ifndef DISPLAYGUI_H
00029 #define DISPLAYGUI_H
00030 
00031 #include "GEOMGUI.h"
00032 #include "GEOMBase.h"
00033 
00034 #if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
00035 #define DISPLAYGUI_WNT_EXPORT __declspec( dllexport )
00036 #else
00037 #define DISPLAYGUI_WNT_EXPORT
00038 #endif
00039 
00040 //=================================================================================
00041 // class    : GEOMBase_Display
00042 // purpose  :
00043 //=================================================================================
00044 //class QAD_ViewFrame;
00045 class SUIT_ViewWindow;
00046 class DisplayGUI : public GEOMGUI
00047 {
00048 public:
00049   DisplayGUI( GeometryGUI* parent );
00050   ~DisplayGUI();
00051 
00052   // Dispatch menu command
00053   bool OnGUIEvent(int theCommandID, SUIT_Desktop* parent);
00054 
00055   // Display all GEOM objects
00056   void DisplayAll();
00057   // Erase all GEOM objects
00058   void EraseAll();
00059   // Display selected GEOM objects
00060   void Display();
00061   // Display selected GEOM objects and erase other
00062   void DisplayOnly();
00063   // Erase selected GEOM objects
00064   void Erase();
00065 
00066   // DISPLAY MODE methods : 0 - wireframe, 1 - shading
00067   // Set display mode for the viewer (current viewer if <viewWindow> - 0 )
00068   void SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow = 0 );
00069   // Get display mode of the viewer (current viewer if <viewWindow> - 0 )
00070   int  GetDisplayMode( SUIT_ViewWindow* viewWindow = 0 );
00071   // Invert display mode ( shadin <-> wireframe ) for the viewer 
00072   // (current viewer if <viewWindow> = 0 )
00073   void InvertDisplayMode( SUIT_ViewWindow* viewWindow = 0 );
00074 
00075   // Set display mode for selected objects in the viewer given
00076   // (current viewer if <viewWindow> = 0 )
00077   void ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindo = 0 );
00078 };
00079 
00080 #endif