JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::AnimatedPositionBehaviours::SnapToPageBoundaries Struct Reference

A behaviour that gravitates an AnimatedPosition object towards the nearest integer position when released. More...

#include "juce_AnimatedPositionBehaviours.h"

Public Member Functions

void releasedWithVelocity (double position, double releaseVelocity) noexcept
 Called by the AnimatedPosition class.
 
double getNextPosition (double oldPos, double elapsedSeconds) const noexcept
 Called by the AnimatedPosition class to get the new position, after the given time has elapsed.
 
bool isStopped (double position) const noexcept
 Called by the AnimatedPosition class to check whether the object is now stationary.
 

Detailed Description

A behaviour that gravitates an AnimatedPosition object towards the nearest integer position when released.

This class is intended to be used as a template parameter to the AnimatedPosition class. It's handy when using an AnimatedPosition to show a series of pages, because it allows the pages can be scrolled smoothly, but when released, snaps back to show a whole page.

See also
AnimatedPosition

@tags{GUI}

Definition at line 110 of file juce_AnimatedPositionBehaviours.h.

Member Function Documentation

◆ getNextPosition()

double juce::AnimatedPositionBehaviours::SnapToPageBoundaries::getNextPosition ( double  oldPos,
double  elapsedSeconds 
) const
noexcept

Called by the AnimatedPosition class to get the new position, after the given time has elapsed.

Definition at line 129 of file juce_AnimatedPositionBehaviours.h.

◆ isStopped()

bool juce::AnimatedPositionBehaviours::SnapToPageBoundaries::isStopped ( double  position) const
noexcept

Called by the AnimatedPosition class to check whether the object is now stationary.

Definition at line 144 of file juce_AnimatedPositionBehaviours.h.

◆ releasedWithVelocity()

void juce::AnimatedPositionBehaviours::SnapToPageBoundaries::releasedWithVelocity ( double  position,
double  releaseVelocity 
)
noexcept

Called by the AnimatedPosition class.

This tells us the position and velocity at which the user is about to release the object. The velocity is measured in units/second.

Definition at line 118 of file juce_AnimatedPositionBehaviours.h.


The documentation for this struct was generated from the following file: