跳转到主要内容

SlideTransition

touchgfx/transitions/SlideTransition.hpp

A Transition that slides from one screen to the next. It does so by moving a SnapShotWidget with a snapshot of the Screen transitioning away from, and by moving the contents of Screen transitioning to.

See: Transition

Inherits from: Transition

Public Functions

virtual voidhandleTickEvent()
Handles the tick event when transitioning.
virtual voidinit()
Initializes the transition.
SlideTransition(const uint8_t transitionSteps =20)
Initializes a new instance of the SlideTransition class.
virtual voidtearDown()
Tears down the Animation.

Protected Attributes

SnapshotWidgetsnapshot
The SnapshotWidget that is moved when transitioning.

Additional inherited members

Protected Classes inherited from Transition

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

Public Functions inherited from 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.
Transition()
Initializes a new instance of the Transition class.
virtual ~Transition()
Finalizes an instance of the Transition class.

Protected Attributes inherited from Transition

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

virtual void handleTickEvent()

Handles the tick event when transitioning.

It moves the contents of the Screen's container and a SnapshotWidget with a snapshot of the previous Screen. The direction of the transition determines the direction the contents of the container and the SnapshotWidget moves.

Reimplements: touchgfx::Transition::handleTickEvent

init

virtual void init()

Initializes the transition.

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

Reimplements: touchgfx::Transition::init

SlideTransition

SlideTransition(const uint8_ttransitionSteps =20)

Initializes a new instance of the SlideTransition class.

Parameters:
transitionSteps(Optional) Number of steps (ticks) in the transition animation, default is 20.

tearDown

virtual void tearDown()

Tears down the Animation.

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

Reimplements: touchgfx::Transition::tearDown

Protected Attributes Documentation

snapshot

SnapshotWidget snapshot

The SnapshotWidget that is moved when transitioning.