Skip to content

ftxui::UnderlineOption ​

cpp
#include <ftxui/component/component_options.hpp>

Option for the underline effect.

Summary ​

SymbolDescription
enabled
color_active
color_inactive
leader_function
follower_function
leader_duration
leader_delay
follower_duration
follower_delay
SetAnimationSet how the underline should animate.
SetAnimationDurationSet how the underline should animate.
SetAnimationFunctionSet how the underline should animate.

Public Attributes ​

enabled ​

cpp
bool enabled = false;

color_active ​

cpp
Color color_active = Color::White;

color_inactive ​

cpp
Color color_inactive = Color::GrayDark;

leader_function ​

cpp
animation::easing::Function leader_function =
      animation::easing::QuadraticInOut;

follower_function ​

cpp
animation::easing::Function follower_function =
      animation::easing::QuadraticInOut;

leader_duration ​

cpp
animation::Duration leader_duration = std::chrono::milliseconds(250);

leader_delay ​

cpp
animation::Duration leader_delay = std::chrono::milliseconds(0);

follower_duration ​

cpp
animation::Duration follower_duration = std::chrono::milliseconds(250);

follower_delay ​

cpp
animation::Duration follower_delay = std::chrono::milliseconds(0);

Public Member Functions ​

SetAnimation ​

cpp
void SetAnimation(animation::Duration d, animation::easing::Function f);

Set how the underline should animate.

Parameters:

  • d: The duration of the animation.
  • f: The easing function of the animation.

SetAnimationDuration ​

cpp
void SetAnimationDuration(animation::Duration d);

Set how the underline should animate.

Parameters:

  • d: The duration of the animation.

SetAnimationFunction ​

cpp
void SetAnimationFunction(animation::easing::Function f);

Set how the underline should animate.

Parameters:

  • f: The easing function of the animation.

SetAnimationFunction ​

cpp
void SetAnimationFunction(animation::easing::Function f_leader, animation::easing::Function f_follower);

Set how the underline should animate. This is useful to desynchronize the animation of the leader and the follower.

Parameters:

  • f_leader: The duration of the animation for the leader.
  • f_follower: The duration of the animation for the follower.