1 // Created on: 2014-09-10
2 // Created by: Kirill Gavrilov
3 // Copyright (c) 2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _ViewerTest_AutoUpdater_HeaderFile
17 #define _ViewerTest_AutoUpdater_HeaderFile
19 #include <AIS_InteractiveContext.hxx>
20 #include <V3d_View.hxx>
22 class TCollection_AsciiString;
24 //! Auxiliary tool to control view updates.
25 class ViewerTest_AutoUpdater
29 //! Enumeration to control auto-update
40 Standard_EXPORT ViewerTest_AutoUpdater (const Handle(AIS_InteractiveContext)& theContext,
41 const Handle(V3d_View)& theView);
43 //! Destructor to automatically update view
44 Standard_EXPORT ~ViewerTest_AutoUpdater();
46 //! Parse redraw mode argument
47 Standard_EXPORT Standard_Boolean parseRedrawMode (const TCollection_AsciiString& theArg);
49 //! Disable autoupdate
50 Standard_EXPORT void Invalidate();
52 //! Finally update view
53 Standard_EXPORT void Update();
57 Handle(AIS_InteractiveContext) myContext;
58 Handle(V3d_View) myView;
59 ViewerTest_AutoUpdater::RedrawMode myToUpdate;
60 Standard_Boolean myWasAutoUpdate;
64 #endif // _ViewerTest_AutoUpdater_HeaderFile