WheelSelector is only used within TouchGFX.
 
Symbols
loading...
Files
loading...

WheelSelector class

@class WheelSelector WheelSelector.hpp gui/custom_controls_screen/WheelSelector.hpp A wheel selector. Displays a text in a scrollable wheel. A wheel selector. Displays a text in a scrollable wheel. Option to display the text in a different color near the selected element. Snaps to the nearest element after movement. @see Container

Syntax

class WheelSelector : public Container { public:     WheelSelector();     virtual ~WheelSelector();     virtual void handleDragEvent(const DragEvent& evt);     virtual void setup(int width, int height, int textXPosition, int textYPosition, TEXTS wheelText);     void setTextColor(colortype normalColor, colortype selectedColor, colortype selectedBackgroundColor, int selectedYOffset = 0, int selectedHeight = 0);     virtual void handleClickEvent(const ClickEvent& evt);     virtual void handleGestureEvent(const GestureEvent& evt);     int getSelectedIndex();     void setSelectedIndex(int index, int duration, EasingEquation equation = EasingEquations::backEaseInOut);     void reset();     void setElementSelectedCallback(touchgfx::GenericCallback<const WheelSelector&, const int&>& callback)     {         elementSelectedAction = &callback;     } protected:     enum AnimationState     {         ANIMATING_GESTURE,          ANIMATING_SNAP,             ANIMATING_DRAG,             NO_ANIMATION            };     AnimationState currentAnimationState;     Container textContainer;      MoveAnimator<TextArea> text;      Container textSelectedContainer;      MoveAnimator<TextArea> textSelected;      Box textSelectedBackground;     int selectedAreaYOffset;     int selectedTextYPosition;     int spaceBetweenTextRows;     int topCutOff;     int bottomCutOff;     GenericCallback<const WheelSelector&, const int&>* elementSelectedAction;     Callback<WheelSelector, const MoveAnimator<TextArea>& > textMoveEndedCallback;     void textMoveEndedHandler(const MoveAnimator<TextArea>& textArea);     virtual void moveText(int newYPosition);     virtual void animateMoveText(int newYPosition, int duration, EasingEquation equation);     void snap();     void adjustForBoundries(int& newYValue); };

Fields

currentAnimationState

No summary provided. Read more...

textContainer

No summary provided. Read more...

text

No summary provided. Read more...

textSelectedContainer

No summary provided. Read more...

textSelected

No summary provided. Read more...

textSelectedBackground

No summary provided. Read more...

selectedAreaYOffset

No summary provided. Read more...

selectedTextYPosition

No summary provided. Read more...

spaceBetweenTextRows

No summary provided. Read more...

topCutOff

No summary provided. Read more...

bottomCutOff

No summary provided. Read more...

elementSelectedAction

No summary provided. Read more...

textMoveEndedCallback

No summary provided. Read more...

Methods

adjustForBoundries()

No summary provided. Read more...

handleDragEvent()

No summary provided. Read more...

setup()

@fn virtual void WheelSelector::setup(int width, int height, int textXPosition, int textYPosition, int spaceBetweenTextRows, int selectedYOffset, TEXTS wheelText); Setup method. Read more...

setTextColor()

@fn void WheelSelector::setTextColor(colortype normalColor, colortype selectedColor, colortype selectedBackgroundColor, int selectedYOffset = 0, int selectedHeight = 0); Sets text color of normal/selected text. Sets text color of normal/selected text. If the colors are the same, the overlays for showing selected text is hidden, otherwise it is setup with the given y coordinate offset. Read more...

handleClickEvent()

No summary provided. Read more...

handleGestureEvent()

No summary provided. Read more...

getSelectedIndex()

@fn int WheelSelector::getSelectedIndex(); Gets selected index. Gets selected index calculated from what is on screen. Read more...

setSelectedIndex()

@fn void WheelSelector::setSelectedIndex(int index, int duration, EasingEquation equation = EasingEquations::backEaseInOut); Sets selected index. Sets selected index by moving the wheel selector using the given easing equation. Read more...

reset()

@fn void WheelSelector::reset(); Resets this object to show first element. Resets this object to show first element. Read more...

setElementSelectedCallback()

No summary provided. Read more...

textMoveEndedHandler()

No summary provided. Read more...

moveText()

No summary provided. Read more...

animateMoveText()

No summary provided. Read more...

snap()

No summary provided. Read more...

References

LocationReferrerScopeText
WheelSelector.hpp:47
class WheelSelector : public Container
DatePicker.cpp:95DatePicker::selectedElementChangedHandler()
void DatePicker::selectedElementChangedHandler(const WheelSelector& wheel, const int& index)
DatePicker.hpp:61DatePicker::monthsDatePicker
WheelSelector months;
DatePicker.hpp:62DatePicker::yearsDatePicker
WheelSelector years;
DatePicker.hpp:65DatePicker::selectedElementChangedHandler()::wheelDatePicker::selectedElementChangedHandler()
void selectedElementChangedHandler(const WheelSelector& wheel, const int& index);
WheelSelector.cpp:23WheelSelector::WheelSelector()
WheelSelector::WheelSelector() :
WheelSelector.cpp:30WheelSelector::~WheelSelector()
WheelSelector::~WheelSelector()
WheelSelector.cpp:34WheelSelector::setup()
void WheelSelector::setup(int width, int height, int textXPosition, int textYPosition, TEXTS wheelText)
WheelSelector.cpp:74WheelSelector::setTextColor()
WheelSelector.cpp:95WheelSelector::handleDragEvent()
void WheelSelector::handleDragEvent(const DragEvent& evt)
WheelSelector.cpp:103WheelSelector::handleClickEvent()
void WheelSelector::handleClickEvent(const ClickEvent& evt)
WheelSelector.cpp:120WheelSelector::handleGestureEvent()
void WheelSelector::handleGestureEvent(const GestureEvent& evt)
WheelSelector.cpp:139WheelSelector::snap()
void WheelSelector::snap()
WheelSelector.cpp:159WheelSelector::getSelectedIndex()
int WheelSelector::getSelectedIndex()
WheelSelector.cpp:164WheelSelector::setSelectedIndex()
void WheelSelector::setSelectedIndex(int index, int duration, EasingEquation equation)
WheelSelector.cpp:181WheelSelector::textMoveEndedHandler()
void WheelSelector::textMoveEndedHandler(const MoveAnimator<TextArea>& textArea)
WheelSelector.cpp:204WheelSelector::adjustForBoundries()
void WheelSelector::adjustForBoundries(int& newYValue)
WheelSelector.cpp:216WheelSelector::moveText()
void WheelSelector::moveText(int newYPosition)
WheelSelector.cpp:227WheelSelector::animateMoveText()
WheelSelector.cpp:236WheelSelector::reset()
void WheelSelector::reset()
WheelSelectorExtra.cpp:24WheelSelectorExtra::WheelSelectorExtra()
WheelSelector()
WheelSelectorExtra.cpp:34WheelSelectorExtra::setupDatePickerWheelDay()
WheelSelectorExtra.cpp:62WheelSelectorExtra::setTextColor()
WheelSelectorExtra.hpp:41WheelSelectorExtra
class WheelSelectorExtra : public WheelSelector

Class Tree

Parent classes
Child classes
all items filtered out
WheelSelector
all items filtered out
Variables of WheelSelector type
DatePicker::months
DatePicker::years
all items filtered out
WheelSelector