ftxui::ComponentBase
CatchEventBase
ContainerBase
MenuBase
component_base.hpp
Components Components children_ children_ ftxui::ComponentBase::children_
ComponentBase * ComponentBase* parent_ parent_ ftxui::ComponentBase::parent_ = nullptr
bool bool in_render in_render ftxui::ComponentBase::in_render = false
ComponentBase
(Components children)
ComponentBase
ftxui::ComponentBase::ComponentBase
Components children
~ComponentBase
()
~ComponentBase
ftxui::ComponentBase::~ComponentBase
ComponentBase
()=default
ComponentBase
ftxui::ComponentBase::ComponentBase
ComponentBase
(const ComponentBase &)=delete
ComponentBase
ftxui::ComponentBase::ComponentBase
const ComponentBase &
ComponentBase
(ComponentBase &&)=delete
ComponentBase
ftxui::ComponentBase::ComponentBase
ComponentBase &&
ComponentBase & ComponentBase & operator= (const ComponentBase &)=delete operator= ftxui::ComponentBase::operator= const ComponentBase &
ComponentBase & ComponentBase & operator= (ComponentBase &&)=delete operator= ftxui::ComponentBase::operator= ComponentBase &&
ComponentBase * ComponentBase * Parent () const Parent ftxui::ComponentBase::Parent

Return the parent ComponentBase, or nul if any.

Detach

Parent

Component & Component & ChildAt (size_t i) ChildAt ftxui::ComponentBase::ChildAt size_t i

Access the child at index `i`.

size_t size_t ChildCount () const ChildCount ftxui::ComponentBase::ChildCount

Returns the number of children.

int int Index () const Index ftxui::ComponentBase::Index

Return index of the component in its parent. -1 if no parent.

void void Add (Component children) Add ftxui::ComponentBase::Add Component children

Add a child. @param child The child to be attached.

void void Detach () Detach ftxui::ComponentBase::Detach

Detach this child from its parent.

Detach

Parent

void void DetachAllChildren () DetachAllChildren ftxui::ComponentBase::DetachAllChildren

Remove all children.

Element Element Render () Render ftxui::ComponentBase::Render

Draw the component. Build a ftxui::Element to be drawn on the ftxui::Screen representing this ftxui::ComponentBase. Please override OnRender() to modify the rendering.

Element Element OnRender () OnRender ftxui::ComponentBase::OnRender

Draw the component. Build a ftxui::Element to be drawn on the ftxi::Screen representing this ftxui::ComponentBase. This function is means to be overridden.

bool bool OnEvent (Event) OnEvent ftxui::ComponentBase::OnEvent Event event

Called in response to an event.

event

The event.

True when the event has been handled. The default implementation called OnEvent on every child until one return true. If none returns true, return false.

void void OnAnimation (animation::Params &params) OnAnimation ftxui::ComponentBase::OnAnimation animation::Params & params

Called in response to an animation event.

params

the parameters of the animation The default implementation dispatch the event to every child.

Component Component ActiveChild () ActiveChild ftxui::ComponentBase::ActiveChild

Return the currently Active child.

the currently Active child.

bool bool Focusable () const Focusable ftxui::ComponentBase::Focusable

Return true when the component contains focusable elements. The non focusable Components will be skipped when navigating using the keyboard.

bool bool Active () const Active ftxui::ComponentBase::Active

Returns if the element if the currently active child of its parent.

bool bool Focused () const Focused ftxui::ComponentBase::Focused

Returns if the elements if focused by the user. True when the ComponentBase is focused by the user. An element is Focused when it is with all its ancestors the ActiveChild() of their parents, and it Focusable().

void void SetActiveChild (ComponentBase *child) SetActiveChild ftxui::ComponentBase::SetActiveChild ComponentBase * child

Make the |child| to be the "active" one.

child

the child to become active.

void void SetActiveChild (Component child) SetActiveChild ftxui::ComponentBase::SetActiveChild Component child

Make the |child| to be the "active" one.

child

the child to become active.

void void TakeFocus () TakeFocus ftxui::ComponentBase::TakeFocus

Configure all the ancestors to give focus to this component.

CapturedMouse CapturedMouse CaptureMouse (const Event &event) CaptureMouse ftxui::ComponentBase::CaptureMouse const Event & event

Take the CapturedMouse if available. There is only one component of them. It represents a component taking priority over others.

event

The event

It implement rendering itself as ftxui::Element. It implement keyboard navigation by responding to ftxui::Event.

- ftxui::ComponentBase
  Active
- ftxui::ComponentBase
  ActiveChild
- ftxui::ComponentBase
  Add
- ftxui::ComponentBase
  CaptureMouse
- ftxui::ComponentBase
  ChildAt
- ftxui::ComponentBase
  ChildCount
- ftxui::ComponentBase
  children_
- ftxui::ComponentBase
  ComponentBase
- ftxui::ComponentBase
  ComponentBase
- ftxui::ComponentBase
  ComponentBase
- ftxui::ComponentBase
  ComponentBase
- ftxui::ComponentBase
  Detach
- ftxui::ComponentBase
  DetachAllChildren
- ftxui::ComponentBase
  Focusable
- ftxui::ComponentBase
  Focused
- ftxui::ComponentBase
  in_render
- ftxui::ComponentBase
  Index
- ftxui::ComponentBase
  OnAnimation
- ftxui::ComponentBase
  OnEvent
- ftxui::ComponentBase
  OnRender
- ftxui::ComponentBase
  operator=
- ftxui::ComponentBase
  operator=
- ftxui::ComponentBase
  Parent
- ftxui::ComponentBase
  parent_
- ftxui::ComponentBase
  Render
- ftxui::ComponentBase
  SetActiveChild
- ftxui::ComponentBase
  SetActiveChild
- ftxui::ComponentBase
  TakeFocus
- ftxui::ComponentBase
  ~ComponentBase