FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
component.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  ftxui
 FTXUI ftxui::名前空間
 
namespace  ftxui::Container
 

Typedefs

using ComponentDecorator = std::function<Component(Component)>
 
using ElementDecorator = std::function<Element(Element)>
 

Functions

template<class T , class... Args>
std::shared_ptr< T > Make (Args &&... args)
 
Component operator| (Component component, ComponentDecorator decorator)
 
Component operator| (Component component, ElementDecorator decorator)
 
Component & operator|= (Component &component, ComponentDecorator decorator)
 
Component & operator|= (Component &component, ElementDecorator decorator)
 
 FTXUI_EXPORT (COMPONENT) Component Vertical(Components children)
 
Component Horizontal (Components children, int *selector)
 水平方向に左右矢印キーまたは 'h'/'l' キーで操作される、1つずつ 水平に描画されるコンポーネントのリスト。
 
class FTXUI_EXPORT (COMPONENT) ComponentBase = {})
 ftxui::Elementとして自身のレンダリングを実装します。ftxui::Eventに応答してキーボードナビゲーションを実装します。
 
Component Button (ConstStringRef label, std::function< void()> on_click, ButtonOption option)
 クリックすると関数を実行するボタンを描画します。
 
Component Checkbox (ConstStringRef label, bool *checked, CheckboxOption option)
 チェック可能な要素を描画します。
 
Component Input (StringRef content, InputOption option)
 テキストを編集するための入力ボックス。
 
Component Input (StringRef content, StringRef placeholder, InputOption option)
 テキストを編集するための入力ボックス。
 
Component Menu (ConstStringListRef entries, int *selected, MenuOption option)
 テキストのリスト。フォーカスされた要素が選択されます。
 
Component MenuEntry (ConstStringRef label, MenuEntryOption option)
 特定のメニューエントリ。Container::Verticalに入れることで メニューを形成できます。
 
Component Radiobox (ConstStringListRef entries, int *selected, RadioboxOption option)
 一つだけ選択できる要素のリスト。
 
Component Dropdown (ConstStringListRef entries, int *selected)
 ドロップダウンメニュー。
 
Component Toggle (ConstStringListRef entries, int *selected)
 要素の水平リスト。ユーザーはこれらを操作できます。
 
template<typename T >
Component Slider (SliderOption< T > options)
 任意の方向のスライダー。
 
Component Slider (ConstStringRef label, Ref< int > value, ConstRef< int > min, ConstRef< int > max, ConstRef< int > increment)
 水平方向のスライダー。
 
Component Slider (ConstStringRef label, Ref< float > value, ConstRef< float > min=0.f, ConstRef< float > max=100.f, ConstRef< float > increment=5.f)
 
Component Slider (ConstStringRef label, Ref< long > value, ConstRef< long > min=0L, ConstRef< long > max=100L, ConstRef< long > increment=5L)
 
Component ResizableSplit (ResizableSplitOption options)
 2つのコンポーネント間の分割。
 
Component ResizableSplitLeft (Component main, Component back, int *main_size)
 マウスで設定可能な、2つのコンポーネント間の水平分割。
 
Component ResizableSplitRight (Component main, Component back, int *main_size)
 マウスで設定可能な、2つのコンポーネント間の水平分割。
 
Component ResizableSplitTop (Component main, Component back, int *main_size)
 マウスで設定可能な、2つのコンポーネント間の垂直分割。
 
Component ResizableSplitBottom (Component main, Component back, int *main_size)
 マウスで設定可能な、2つのコンポーネント間の垂直分割。
 
Component Renderer (Component child, std::function< Element()> render)
 |child| に似た、|render| をComponent::Render()イベントとして 使用する新しいComponentを返します。
 
FTXUI_EXPORT(COMPONENT) Component Renderer(std Component Renderer (std::function< Element(bool)> render)
 |render| を使ってインターフェースを描画するフォーカス可能な コンポーネントを返します。
 
Component CatchEvent (Component child, std::function< bool(Event)>)
 
ComponentDecorator CatchEvent (std::function< bool(Event)> on_event)
 |on_event| を使ってイベントをキャッチするコンポーネントを装飾します。この 関数は、イベントが処理された場合はtrueを、そうでない場合はfalseを返す 必要があります。
 
FTXUI_EXPORT(COMPONENT) ComponentDecorator Maybe(std Component Modal (Component main, Component modal, const bool *show_modal)
 
ComponentDecorator Modal (Component modal, const bool *show_modal)
 
Component Collapsible (ConstStringRef label, Component child, Ref< bool > show)
 折りたたみ可能なコンポーネント。矢印付きのチェックボックスを表示します。アクティブ化されると、子が 表示されます。
 
Component Hoverable (Component component, bool *hover)
 コンポーネントをラップします。マウスでホバーされているかどうかを知る機能を提供します。
 
Component Hoverable (Component component, std::function< void()> on_enter, std::function< void()> on_leave)
 コンポーネントをラップします。コールバックを使用します。
 
Component Hoverable (Component component, std::function< void(bool)> on_change)
 コンポーネントをラップします。マウスでホバーされているかどうかを知る機能を提供します。
 
ComponentDecorator Hoverable (std::function< void()> on_enter, std::function< void()> on_leave)
 コンポーネントをラップします。マウスでホバーされているかどうかを知る機能を提供します。
 
ComponentDecorator Hoverable (std::function< void(bool)> on_change)
 コンポーネントをラップします。マウスでホバーされているかどうかを知る機能を提供します。
 

Variables

int * selector
 
const bool * show