Skip to main content

SlideTransition

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 Functions

virtual voidinitMoveDrawable(Drawable & d)
Moves the Drawable to its initial position, just outside the actual display.
virtual voidtickMoveDrawable(Drawable & d)
Moves the Drawable.

Protected Attributes

SnapshotWidgetsnapshot
The SnapshotWidget that is moved when transitioning.
SnapshotWidget *snapshotPtr
Pointer pointing to the snapshot used in this transition.The snapshot pointer.

Additional inherited members

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 Functions Documentation

initMoveDrawable

virtual void initMoveDrawable(Drawable &d)

Moves the Drawable to its initial position, just outside the actual display.

Parameters:
dThe Drawable to move.

tickMoveDrawable

virtual void tickMoveDrawable(Drawable &d)

Moves the Drawable.

Parameters:
dThe Drawable to move.

Protected Attributes Documentation

snapshot

SnapshotWidget snapshot

The SnapshotWidget that is moved when transitioning.

snapshotPtr

SnapshotWidget * snapshotPtr

Pointer pointing to the snapshot used in this transition.The snapshot pointer.