Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:31

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 
0029   //! Enumeration to control auto-update
0030   enum RedrawMode
0031   {
0032     RedrawMode_Auto = -1,
0033     RedrawMode_Forced,
0034     RedrawMode_Suppressed
0035   };
0036 
0037 public:
0038 
0039   //! Constructor
0040   Standard_EXPORT ViewerTest_AutoUpdater (const Handle(AIS_InteractiveContext)& theContext,
0041                                           const Handle(V3d_View)&               theView);
0042 
0043   //! Destructor to automatically update view
0044   Standard_EXPORT ~ViewerTest_AutoUpdater();
0045 
0046   //! Parse redraw mode argument
0047   Standard_EXPORT Standard_Boolean parseRedrawMode (const TCollection_AsciiString& theArg);
0048 
0049   //! Disable autoupdate
0050   Standard_EXPORT void Invalidate();
0051 
0052   //! Finally update view
0053   Standard_EXPORT void Update();
0054 
0055 private:
0056 
0057   Handle(AIS_InteractiveContext)     myContext;
0058   Handle(V3d_View)                   myView;
0059   ViewerTest_AutoUpdater::RedrawMode myToUpdate;
0060   Standard_Boolean                   myWasAutoUpdate;
0061 
0062 };
0063 
0064 #endif // _ViewerTest_AutoUpdater_HeaderFile