animation.hpp
chrono
functional
include/ftxui/component/component_options.hpp
include/ftxui/component/screen_interactive.hpp
src/ftxui/component/animation.cpp
src/ftxui/component/button.cpp
src/ftxui/component/component_options.cpp
src/ftxui/component/menu.cpp
src/ftxui/component/screen_interactive.cpp
include/ftxui/component/animation.hpp
chrono
functional
include/ftxui/component/animation.hpp
include/ftxui/component/component.hpp
include/ftxui/component/component_options.hpp
include/ftxui/component/screen_interactive.hpp
src/ftxui/component/animation.cpp
src/ftxui/component/button.cpp
src/ftxui/component/catch_event.cpp
src/ftxui/component/checkbox.cpp
src/ftxui/component/collapsible.cpp
src/ftxui/component/component.cpp
src/ftxui/component/component_fuzzer.cpp
src/ftxui/component/component_options.cpp
src/ftxui/component/container.cpp
src/ftxui/component/dropdown.cpp
src/ftxui/component/hoverable.cpp
src/ftxui/component/input.cpp
src/ftxui/component/loop.cpp
src/ftxui/component/maybe.cpp
src/ftxui/component/menu.cpp
src/ftxui/component/modal.cpp
src/ftxui/component/radiobox.cpp
src/ftxui/component/renderer.cpp
src/ftxui/component/resizable_split.cpp
src/ftxui/component/screen_interactive.cpp
src/ftxui/component/slider.cpp
src/ftxui/component/util.cpp
src/ftxui/component/window.cpp
ftxui::animation::Params
ftxui::animation::Animator
ftxui
ftxui::animation
ftxui::animation::easing

    //Copyright2022ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #ifndefFTXUI_ANIMATION_HPP
    #defineFTXUI_ANIMATION_HPP

    #include<chrono>//formilliseconds,duration,steady_clock,time_point
    #include<functional>//forfunction

    namespaceftxui::animation{
    //Componentswhohaven'tcompletedtheiranimationcancallthisfunctionto
    //requestanewframetobedrawnlater.
    //
    //Whenthereisnoneweventsandnoanimationstocomplete,nonewframeis
    //drawn.
    voidRequestAnimationFrame();

    usingClock=std::chrono::steady_clock;
    usingTimePoint=std::chrono::time_point<Clock>;
    usingDuration=std::chrono::duration<float>;

    //ParameterofComponent::OnAnimation(param).
    classParams{
    public:
    explicitParams(Durationduration):duration_(duration){}

    ///Thedurationthisanimationsteprepresents.
    Durationduration()const{returnduration_;}

    private:
    Durationduration_;
    };

    namespaceeasing{
    usingFunction=std::function<float(float)>;
    //Linearinterpolation(noeasing)
    floatLinear(floatp);

    //Quadraticeasing;p^2
    floatQuadraticIn(floatp);
    floatQuadraticOut(floatp);
    floatQuadraticInOut(floatp);

    //Cubiceasing;p^3
    floatCubicIn(floatp);
    floatCubicOut(floatp);
    floatCubicInOut(floatp);

    //Quarticeasing;p^4
    floatQuarticIn(floatp);
    floatQuarticOut(floatp);
    floatQuarticInOut(floatp);

    //Quinticeasing;p^5
    floatQuinticIn(floatp);
    floatQuinticOut(floatp);
    floatQuinticInOut(floatp);

    //Sinewaveeasing;sin(p*PI/2)
    floatSineIn(floatp);
    floatSineOut(floatp);
    floatSineInOut(floatp);

    //Circulareasing;sqrt(1-p^2)
    floatCircularIn(floatp);
    floatCircularOut(floatp);
    floatCircularInOut(floatp);

    //Exponentialeasing,base2
    floatExponentialIn(floatp);
    floatExponentialOut(floatp);
    floatExponentialInOut(floatp);

    //Exponentially-dampedsinewaveeasing
    floatElasticIn(floatp);
    floatElasticOut(floatp);
    floatElasticInOut(floatp);

    //Overshootingcubiceasing;
    floatBackIn(floatp);
    floatBackOut(floatp);
    floatBackInOut(floatp);

    //Exponentially-decayingbounceeasing
    floatBounceIn(floatp);
    floatBounceOut(floatp);
    floatBounceInOut(floatp);
    }//namespaceeasing

    classAnimator{
    public:
    explicitAnimator(float*from,
    floatto=0.f,
    Durationduration=std::chrono::milliseconds(250),
    easing::Functioneasing_function=easing::Linear,
    Durationdelay=std::chrono::milliseconds(0));

    voidOnAnimation(Params&);

    floatto()const{returnto_;}

    private:
    float*value_;
    floatfrom_;
    floatto_;
    Durationduration_;
    easing::Functioneasing_function_;
    Durationcurrent_;
    };

    }//namespaceftxui::animation

    #endif/*endofincludeguard:FTXUI_ANIMATION_HPP*/