Skip to main content

Transition

touchgfx/transitions/Transition.hpp

The Transition class is the base class for Transitions. Implementations of Transition defines what happens when transitioning between Screens, which typically involves visual effects. An example of a transition implementation can be seen in example custom_transition_example. The most basic transition is the NoTransition class that does a transition without any visual effects.

See: NoTransition, SlideTransition

Inherited by: BlockTransition, CoverTransition< templateDirection >, NoTransition, SlideTransition< templateDirection >, WipeTransition< templateDirection >

Protected Classes

classFullSolidRect
A Widget that reports solid and but does not draw anything.

Public Functions

virtual voidhandleTickEvent()
Called for every tick when transitioning.
virtual voidinit()
Initializes the transition.
virtual voidinvalidate()
Invalidates the screen when starting the Transition.
boolisDone() const
Query if the transition is done transitioning.
virtual voidsetScreenContainer(Container & cont)
Sets the ScreenContainer.
virtual voidtearDown()
Tears down the Animation.
Transition()
Initializes a new instance of the Transition class.
virtual ~Transition()
Finalizes an instance of the Transition class.

Protected Attributes

booldone
Flag that indicates when the transition is done. This should be set by implementing classes.
Container *screenContainer
The screen Container of the Screen transitioning to.

Public Functions Documentation

handleTickEvent

init

virtual void init()

Initializes the transition.

Called after the constructor is called, when the application changes the transition.

Reimplemented by: touchgfx::BlockTransition::init, touchgfx::CoverTransition::init, touchgfx::SlideTransition::init, touchgfx::WipeTransition::init

invalidate

virtual void invalidate()

Invalidates the screen when starting the Transition.

Default is to invalidate the whole screen. Subclasses can do partial invalidation.

Reimplemented by: touchgfx::BlockTransition::invalidate, touchgfx::WipeTransition::invalidate

isDone

bool isDone()const

Query if the transition is done transitioning.

It is the responsibility of the inheriting class to set the underlying done flag once the transition has been completed.

Returns:

True if the transition is done, false otherwise.

setScreenContainer

virtual void setScreenContainer(Container &cont)

Sets the ScreenContainer.

Is used by Screen to enable the transition to access the Container.

Parameters:
contThe Container the transition should have access to.

tearDown

virtual void tearDown()

Tears down the Animation.

Called before the destructor is called, when the application changes the transition.

Reimplemented by: touchgfx::BlockTransition::tearDown, touchgfx::CoverTransition::tearDown, touchgfx::SlideTransition::tearDown, touchgfx::WipeTransition::tearDown

Transition

Initializes a new instance of the Transition class.

~Transition

virtual ~Transition()

Finalizes an instance of the Transition class.

Protected Attributes Documentation

done

bool done

Flag that indicates when the transition is done. This should be set by implementing classes.

screenContainer

Container * screenContainer

The screen Container of the Screen transitioning to.