Kaydet (Commit) c2238e16 authored tarafından Noel Grandin's avatar Noel Grandin

convert SdrAnimationMode to scoped enum

Change-Id: I8a88a7ee538dab020e2ee08e4dce4b100f0bfa3b
üst df418a41
...@@ -63,10 +63,10 @@ namespace sdr { namespace contact { ...@@ -63,10 +63,10 @@ namespace sdr { namespace contact {
// Defines for AnimationMode // Defines for AnimationMode
enum SdrAnimationMode enum class SdrAnimationMode
{ {
SDR_ANIMATION_ANIMATE, Animate,
SDR_ANIMATION_DISABLE Disable
}; };
...@@ -470,16 +470,16 @@ public: ...@@ -470,16 +470,16 @@ public:
/// Enable/disable animations for ::Paint /// Enable/disable animations for ::Paint
/// Is used by e.g. SdrGrafObj, if it contains an animation /// Is used by e.g. SdrGrafObj, if it contains an animation
/// Preventing automatic animation is needed for e.g. the presentation view /// Preventing automatic animation is needed for e.g. the presentation view
bool IsAnimationEnabled() const { return ( SDR_ANIMATION_ANIMATE == meAnimationMode ); } bool IsAnimationEnabled() const { return ( SdrAnimationMode::Animate == meAnimationMode ); }
void SetAnimationEnabled( bool bEnable=true ); void SetAnimationEnabled( bool bEnable=true );
/// Set/unset pause state for animations /// Set/unset pause state for animations
void SetAnimationPause( bool bSet ); void SetAnimationPause( bool bSet );
/// Mode when starting an animation in the Paint Handler: /// Mode when starting an animation in the Paint Handler:
/// 1. SDR_ANIMATION_ANIMATE (default): start animation normally /// 1. SdrAnimationMode::Animate (default): start animation normally
/// 2. SDR_ANIMATION_DONT_ANIMATE: only show the replacement picture /// 2. SDR_ANIMATION_DONT_ANIMATE: only show the replacement picture
/// 3. SDR_ANIMATION_DISABLE: don't start and don't show any replacement /// 3. SdrAnimationMode::Disable: don't start and don't show any replacement
void SetAnimationMode( const SdrAnimationMode eMode ); void SetAnimationMode( const SdrAnimationMode eMode );
/// The Browser is destroyed for bShow=false /// The Browser is destroyed for bShow=false
......
...@@ -362,7 +362,7 @@ void DrawViewShell::Shutdown() ...@@ -362,7 +362,7 @@ void DrawViewShell::Shutdown()
if(SlideShow::IsRunning( GetViewShellBase() ) ) if(SlideShow::IsRunning( GetViewShellBase() ) )
{ {
// Turn off effects. // Turn off effects.
GetDrawView()->SetAnimationMode(SDR_ANIMATION_DISABLE); GetDrawView()->SetAnimationMode(SdrAnimationMode::Disable);
} }
} }
......
...@@ -166,7 +166,7 @@ void SdrPaintView::ImpClearVars() ...@@ -166,7 +166,7 @@ void SdrPaintView::ImpClearVars()
mbPrintPreview=false; mbPrintPreview=false;
mbPreviewRenderer=false; mbPreviewRenderer=false;
meAnimationMode = SDR_ANIMATION_ANIMATE; meAnimationMode = SdrAnimationMode::Animate;
mbAnimationPause = false; mbAnimationPause = false;
mnHitTolPix=2; mnHitTolPix=2;
...@@ -1177,7 +1177,7 @@ void SdrPaintView::DoConnect(SdrOle2Obj* /*pOleObj*/) ...@@ -1177,7 +1177,7 @@ void SdrPaintView::DoConnect(SdrOle2Obj* /*pOleObj*/)
void SdrPaintView::SetAnimationEnabled( bool bEnable ) void SdrPaintView::SetAnimationEnabled( bool bEnable )
{ {
SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE ); SetAnimationMode( bEnable ? SdrAnimationMode::Animate : SdrAnimationMode::Disable );
} }
#if defined DBG_UTIL #if defined DBG_UTIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment