Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:22:22

0001 // Copyright (c) 2019 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _ViewerTest_V3dView_HeaderFile
0015 #define _ViewerTest_V3dView_HeaderFile
0016 
0017 #include <V3d_View.hxx>
0018 
0019 //! Setting additional flag to store 2D mode of the View to avoid scene rotation by mouse/key events
0020 class ViewerTest_V3dView : public V3d_View
0021 {
0022   DEFINE_STANDARD_RTTIEXT(ViewerTest_V3dView, V3d_View)
0023 public:
0024   //! Initializes the view.
0025   Standard_EXPORT ViewerTest_V3dView(const occ::handle<V3d_Viewer>& theViewer,
0026                                      const V3d_TypeOfView           theType     = V3d_ORTHOGRAPHIC,
0027                                      bool                           theIs2dMode = false);
0028 
0029   //! Initializes the view by copying.
0030   Standard_EXPORT ViewerTest_V3dView(const occ::handle<V3d_Viewer>& theViewer,
0031                                      const occ::handle<V3d_View>&   theView);
0032 
0033   //! Returns true if 2D mode is set for the view
0034   bool IsViewIn2DMode() const { return myIs2dMode; }
0035 
0036   //! Sets 2D mode for the view
0037   void SetView2DMode(bool the2dMode) { myIs2dMode = the2dMode; }
0038 
0039 public:
0040   //! Returns true if active view in 2D mode.
0041   Standard_EXPORT static bool IsCurrentViewIn2DMode();
0042 
0043   //! Set if active view in 2D mode.
0044   Standard_EXPORT static void SetCurrentView2DMode(bool theIs2d);
0045 
0046 private:
0047   bool myIs2dMode; //!< 2D mode flag
0048 };
0049 
0050 #endif // _ViewerTest_V3dView_HeaderFile