ImFusion SDK 4.3
ScopedEnabler Class Reference

#include <ImFusion/GUI/Animations.h>

A scope guard to set the globally available enabled property for animations. More...

+ Inheritance diagram for ScopedEnabler:

Detailed Description

A scope guard to set the globally available enabled property for animations.

// ...
{
view->reset();
}
A scope guard to set the globally available enabled property for animations.
Definition Animations.h:147
High-level wrapper class for 2D/MPR rendering of one or multiple images.
Definition ImageView2D.h:48
void reset() override
Reset the image view.

In the above example ImageView2D::reset() will animate the resetting if animationsEnabled() is currently true. Using the ScopedEnabler scope guard will achieve that the view is reset without any animations, regardless of the current animationsEnabled() state, and that the enabled state is reset to its original value at the end of the scope.

Public Member Functions

 ScopedEnabler (bool enabled)
 

Additional Inherited Members

- Protected Member Functions inherited from NotCopyable
 NotCopyable (NotCopyable &&) noexcept=default
 
NotCopyableoperator= (NotCopyable &&) noexcept=default
 
 NotCopyable (const NotCopyable &)=delete
 
NotCopyableoperator= (const NotCopyable &)=delete
 

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close