Back to index

salome-gui  6.5.0
SPlot2d_ViewWindow.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 "SPlot2d_ViewWindow.h"
00024 
00025 #include "Plot2d_ViewFrame.h"
00026 
00027 #include "SUIT_Accel.h"
00028 
00032 SPlot2d_ViewWindow
00033 ::SPlot2d_ViewWindow( SUIT_Desktop* theDesktop, 
00034                       Plot2d_Viewer* theModel)
00035   : Plot2d_ViewWindow( theDesktop, theModel )
00036 {
00037 }
00038 
00042 SPlot2d_ViewWindow
00043 ::~SPlot2d_ViewWindow()
00044 {
00045 }
00046 
00051 bool 
00052 SPlot2d_ViewWindow
00053 ::action( const int theAction  )
00054 {
00055   switch ( theAction ) {
00056   case SUIT_Accel::PanLeft: 
00057     getViewFrame()->onPanLeft();
00058     break;
00059   case SUIT_Accel::PanRight: 
00060     getViewFrame()->onPanRight();
00061     break;
00062   case SUIT_Accel::PanUp: 
00063     getViewFrame()->onPanUp();
00064     break;
00065   case SUIT_Accel::PanDown: 
00066     getViewFrame()->onPanDown();
00067     break;
00068   case SUIT_Accel::ZoomIn: 
00069     getViewFrame()->onZoomIn();
00070     break;
00071   case SUIT_Accel::ZoomOut: 
00072     getViewFrame()->onZoomOut();
00073     break;
00074   case SUIT_Accel::ZoomFit:
00075     getViewFrame()->fitAll();
00076     break;
00077   }
00078   return true;
00079 }