geom/src/DisplayGUI/DisplayGUI.h

93 lines
3.0 KiB
C
Raw Normal View History

2003-07-09 20:33:44 +06:00
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
2003-07-09 20:33:44 +06:00
//
//
//
2004-01-07 20:46:21 +05:00
// File : DisplayGUI.h
// Author : Damien COQUERET
2003-07-09 20:33:44 +06:00
// Module : GEOM
2004-12-01 15:39:14 +05:00
// $Header$
2003-05-12 21:24:23 +06:00
2004-01-07 20:46:21 +05:00
#ifndef DISPLAYGUI_H
#define DISPLAYGUI_H
2003-05-12 21:24:23 +06:00
2004-12-01 15:39:14 +05:00
#include "GEOMGUI.h"
2004-01-07 20:46:21 +05:00
#include "GEOMBase.h"
2005-08-19 17:51:38 +06:00
//#ifdef WNT
//#include <SALOME_WNT.hxx>
//#else
//#define SALOME_WNT_EXPORT
//#endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define DISPLAYGUI_WNT_EXPORT __declspec( dllexport )
2005-08-15 13:27:57 +06:00
#else
2005-08-19 17:51:38 +06:00
#define DISPLAYGUI_WNT_EXPORT
2005-08-15 13:27:57 +06:00
#endif
2003-05-12 21:24:23 +06:00
//=================================================================================
2004-01-07 20:46:21 +05:00
// class : GEOMBase_Display
2003-05-12 21:24:23 +06:00
// purpose :
//=================================================================================
//class QAD_ViewFrame;
class SUIT_ViewWindow;
2004-12-01 15:39:14 +05:00
class DisplayGUI : public GEOMGUI
2004-01-07 20:46:21 +05:00
{
2004-12-01 15:39:14 +05:00
protected:
DisplayGUI( GeometryGUI* parent ); // hide constructor to avoid direct creation
2004-01-07 20:46:21 +05:00
public :
~DisplayGUI();
2004-12-01 15:39:14 +05:00
// Get the only DisplayGUI object
static DisplayGUI* GetDisplayGUI( GeometryGUI* parent );
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
// Dispatch menu command
bool OnGUIEvent(int theCommandID, SUIT_Desktop* parent);
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
// Display all GEOM objects
void DisplayAll();
// Erase all GEOM objects
void EraseAll();
// Display selected GEOM objects
void Display();
// Display selected GEOM objects and erase other
void DisplayOnly();
// Erase selected GEOM objects
void Erase();
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
// DISPLAY MODE methods : 0 - wireframe, 1 - shading
// Set display mode for the viewer (current viewer if <viewWindow> - 0 )
void SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow = 0 );
// Get display mode of the viewer (current viewer if <viewWindow> - 0 )
int GetDisplayMode( SUIT_ViewWindow* viewWindow = 0 );
2004-12-01 15:39:14 +05:00
// Invert display mode ( shadin <-> wireframe ) for the viewer
// (current viewer if <viewWindow> = 0 )
void InvertDisplayMode( SUIT_ViewWindow* viewWindow = 0 );
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
// Set display mode for selected objects in the viewer given
// (current viewer if <viewWindow> = 0 )
void ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindo = 0 );
2004-12-01 15:39:14 +05:00
private:
static DisplayGUI* myGUIObject; // the only DisplayGUI object
2003-05-12 21:24:23 +06:00
};
2004-01-07 20:46:21 +05:00
#endif