Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2014-09-10
0002 // Created by: Kirill Gavrilov
0003 // Copyright (c) 2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _ViewerTest_AutoUpdater_HeaderFile
0017 #define _ViewerTest_AutoUpdater_HeaderFile
0018 
0019 #include <AIS_InteractiveContext.hxx>
0020 #include <V3d_View.hxx>
0021 
0022 class TCollection_AsciiString;
0023 
0024 //! Auxiliary tool to control view updates.
0025 class ViewerTest_AutoUpdater
0026 {
0027 public:
0028   //! Enumeration to control auto-update
0029   enum RedrawMode
0030   {
0031     RedrawMode_Auto = -1,
0032     RedrawMode_Forced,
0033     RedrawMode_Suppressed
0034   };
0035 
0036 public:
0037   //! Constructor
0038   Standard_EXPORT ViewerTest_AutoUpdater(const occ::handle<AIS_InteractiveContext>& theContext,
0039                                          const occ::handle<V3d_View>&               theView);
0040 
0041   //! Destructor to automatically update view
0042   Standard_EXPORT ~ViewerTest_AutoUpdater();
0043 
0044   //! Parse redraw mode argument
0045   Standard_EXPORT bool parseRedrawMode(const TCollection_AsciiString& theArg);
0046 
0047   //! Disable autoupdate
0048   Standard_EXPORT void Invalidate();
0049 
0050   //! Finally update view
0051   Standard_EXPORT void Update();
0052 
0053 private:
0054   occ::handle<AIS_InteractiveContext> myContext;
0055   occ::handle<V3d_View>               myView;
0056   ViewerTest_AutoUpdater::RedrawMode  myToUpdate;
0057   bool                                myWasAutoUpdate;
0058 };
0059 
0060 #endif // _ViewerTest_AutoUpdater_HeaderFile