3#ifndef FTXUI_COMPONENT_BASE_HPP
4#define FTXUI_COMPONENT_BASE_HPP
96 bool in_render =
false;
virtual bool Focusable() const
コンポーネントがフォーカス可能な要素を含んでいる場合にtrueを返します。 フォーカス不可能なコンポーネントは、キーボードでナビゲートする際にスキップされます。
bool Focused() const
要素がユーザーによってフォーカスされているかどうかを返します。 ComponentBaseがユーザーによってフォーカスされている場合にtrueを返します。要素は、そのすべての子孫が親のActiveChi...
CapturedMouse CaptureMouse(const Event &event)
利用可能であればCapturedMouseを取得します。コンポーネントは1つしかありません。これは他のコンポーネントよりも優先されるコンポーネントを表します。
void Add(Component children)
子を追加します。 @param child 添付する子。
Element Render()
コンポーネントを描画します。 このftxui::ComponentBaseを表すftxui::Screen上に描画されるftxui::Elementを構築します。レンダリングを変更するにはOnRende...
void TakeFocus()
このコンポーネントにフォーカスを与えるように、すべての祖先を設定します。
bool Active() const
要素が現在親のアクティブな子であるかどうかを返します。
virtual Component ActiveChild()
現在アクティブな子を返します。
void DetachAllChildren()
すべての子を削除します。
int Index() const
親におけるコンポーネントのインデックスを返します。親がない場合は-1を返します。
size_t ChildCount() const
子の数を返します。
ComponentBase(ComponentBase &&)=delete
ComponentBase & operator=(ComponentBase &&)=delete
ComponentBase * Parent() const
親のComponentBaseを返します。存在しない場合はnullを返します。
virtual void SetActiveChild(ComponentBase *child)
virtual Element OnRender()
コンポーネントを描画します。 このftxui::ComponentBaseを表すftxui::Screen上に描画されるftxui::Elementを構築します。この関数はオーバーライドされることを意図...
virtual bool OnEvent(Event)
イベントに応じて呼び出されます。
void Detach()
この子を親からデタッチします。
ComponentBase(const ComponentBase &)=delete
ComponentBase & operator=(const ComponentBase &)=delete
Component & ChildAt(size_t i)
インデックスiの子にアクセスします。
ComponentBase(Components children)
virtual void OnAnimation(animation::Params ¶ms)
アニメーションイベントに応じて呼び出されます。
ftxui::Elementとして自身のレンダリングを実装します。ftxui::Eventに応答してキーボードナビゲーションを実装します。
イベントを表します。キープレスイベント、ターミナルのリサイズなど、さまざまなイベントがあります。
FTXUI ftxui::animation::名前空間
std::unique_ptr< CapturedMouseInterface > CapturedMouse
std::shared_ptr< Node > Element
std::vector< Component > Components
std::shared_ptr< ComponentBase > Component