FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
ftxui Namespace Reference

FTXUI ftxui::名前空間 More...

Namespaces

namespace  animation
 
namespace  box_helper
 
namespace  Container
 
namespace  Dimension
 スクリーンがどのように見えるべきかを定義します。
 
namespace  flexbox_helper
 
namespace  literals
 
namespace  task
 
namespace  Terminal
 
namespace  util
 

Classes

class  AnimationTask
 
class  AutoReset
 変数に値を割り当て、スコープを抜けるときに古い値にリセットします。 More...
 
class  ConstRef
 アダプター。不変オブジェクトを所有または参照します。 More...
 
class  MultiReceiverBuffer
 
class  ReceiverImpl
 
class  Ref
 アダプター。可変オブジェクトを所有または参照します。 More...
 
class  SenderImpl
 
struct  SliderOption
 
class  TerminalInputParser
 

Typedefs

using Component = std::shared_ptr<ComponentBase>
 
using CapturedMouse = std::unique_ptr<CapturedMouseInterface>
 
using ComponentDecorator = std::function<Component(Component)>
 
using ElementDecorator = std::function<Element(Element)>
 
using Components = std::vector<Component>
 
template<class T >
using Sender = std::unique_ptr<SenderImpl<T>>
 
template<class T >
using Receiver = std::unique_ptr<ReceiverImpl<T>>
 
using ScreenInteractive = App
 
using Closure = std::function<void()>
 
using Task = std::variant<Event, Closure, AnimationTask>
 
using Element = std::shared_ptr<Node>
 
using Elements = std::vector<Element>
 
using Decorator = std::function<Element(Element)>
 
using GraphFunction = std::function<std::vector<int>(int, int)>
 
using Image = Surface
 
using Pixel = Cell
 

Enumerations

enum class  Direction : uint8_t {
  Up = 0 ,
  Down = 1 ,
  Left = 2 ,
  Right = 3
}
 Directionは、東西南北の4つの基本方向を表す列挙型です。 More...
 
enum  BorderStyle : uint8_t {
  LIGHT ,
  DASHED ,
  HEAVY ,
  DOUBLE ,
  ROUNDED ,
  EMPTY
}
 BorderStyleは、ターミナルUIの要素に適用できる様々なボーダースタイルを表す列挙型です。 More...
 
enum  WidthOrHeight : uint8_t {
  WIDTH ,
  HEIGHT
}
 
enum  Constraint : uint8_t {
  LESS_THAN ,
  EQUAL ,
  GREATER_THAN
}
 
enum class  AppDimension {
  FitComponent ,
  Fixed ,
  Fullscreen ,
  TerminalOutput
}
 
enum class  WordBreakProperty : int8_t {
  ALetter ,
  CR ,
  Double_Quote ,
  Extend ,
  ExtendNumLet ,
  Format ,
  Hebrew_Letter ,
  Katakana ,
  LF ,
  MidLetter ,
  MidNum ,
  MidNumLet ,
  Newline ,
  Numeric ,
  Regional_Indicator ,
  Single_Quote ,
  WSegSpace ,
  ZWJ
}
 

Functions

class FTXUI_EXPORT (COMPONENT) ComponentBase = {})
 ftxui::Elementとして自身のレンダリングを実装します。ftxui::Eventに応答してキーボードナビゲーションを実装します。
 
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)
 
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)
 コンポーネントをラップします。マウスでホバーされているかどうかを知る機能を提供します。
 
template<class T >
Receiver< T > MakeReceiver ()
 
struct FTXUI_EXPORT (DOM) Canvas
 Canvasは、描画操作に関連付けられた描画可能なバッファです。
 
 FTXUI_EXPORT (DOM) Element &operator|
 
FTXUI_EXPORT(DOM) Element separatorCharacter(std Element separatorHSelector (float left, float right, Color unselected_color, Color selected_color)
 
Element separatorVSelector (float up, float down, Color unselected_color, Color selected_color)
 
Element gaugeCharset (float progress, std::vector< std::string > charset, Direction direction)
 カスタム文字セットを使って高精細なプログレスバーを描画する。
 
Element window (Element title, Element content, BorderStyle border)
 要素の周囲にタイトルとボーダーを持つウィンドウを描画します。
 
Element canvas (int width, int height, std::function< void(Canvas &)> fn)
 要求されたサイズのキャンバスを描画する要素を生成します。
 
Element flexbox (Elements children, FlexboxConfig config)
 行/列に要素を表示し、一杯になると次の列/行に折り返すことができるコンテナ。
 
FTXUI_EXPORT(DOM) Element gridbox(std Element hflow (Elements children)
 要素を左から右へ行で表示するコンテナ。一杯になると、下の新しい行から開始します。
 
Element vflow (Elements children)
 要素を上から下へ行で表示するコンテナ。一杯になると、右側の新しい列から開始します。
 
Element xflex (Element child)
 必要に応じてX軸上で拡大・縮小します。
 
Element xflex_grow (Element child)
 可能であればX軸上で拡大します。
 
Element xflex_shrink (Element child)
 必要であればX軸上で最小化します。
 
Element yflex (Element child)
 必要に応じてY軸上で拡大・縮小します。
 
Element yflex_grow (Element child)
 可能であればY軸上で拡大します。
 
Element yflex_shrink (Element child)
 必要であればY軸上で最小化します。
 
void Render (Screen &screen, Node *node, Selection &selection)
 
std::string GetNodeSelectedContent (Screen &screen, Node *node, Selection &selection)
 
struct FTXUI_EXPORT (SCREEN) Box
 Boxは、2D空間における矩形領域を表す構造体です。
 
 FTXUI_EXPORT (SCREEN) Color operator""_rgb(unsigned long long int combined)
 結合された16進数RGB表現から色を作成します。 例: 0x808000_rgb
 
template<typename T >
FTXUI_EXPORT(SCREEN) std FTXUI_EXPORT(SCREEN) std std::wstring to_wstring (T s)
 
std::wstring to_wstring (const std::string &s)
 
template<>
std::wstring to_wstring (const char *s)
 
FTXUI_EXPORT(SCREEN) int string_width(std std::vector< std::string > Utf8ToGlyphs (std::string_view input)
 
std::vector< int > CellToGlyphIndex (std::string_view input)
 
Component Button (ButtonOption option)
 クリックすると関数を実行するボタンを描画します。
 
Component CatchEvent (Component child, std::function< bool(Event event)> on_event)
 |on_event| を使ってイベントをキャッチするコンポーネントを返します。この 関数は、イベントが処理された場合はtrueを、そうでない場合はfalseを返す 必要があります。
 
Component Checkbox (CheckboxOption option)
 チェック可能な要素を描画します。
 
Component Dropdown (DropdownOption option)
 ドロップダウンメニュー。
 
ComponentDecorator Hoverable (bool *hover)
 コンポーネントをラップします。マウスでホバーされているかどうかを知る機能を提供します。
 
Component Input (InputOption option)
 テキストを編集するための入力ボックス。
 
Component Maybe (Component child, std::function< bool()> show)
 コンポーネント|child|を装飾します。|show|がtrueを返す場合にのみ表示されます。
 
ComponentDecorator Maybe (std::function< bool()> show)
 コンポーネントを装飾します。|show|関数がtrueを返す場合にのみ表示されます。
 
Component Maybe (Component child, const bool *show)
 コンポーネント|child|を装飾します。|show|がtrueの場合にのみ表示されます。
 
ComponentDecorator Maybe (const bool *show)
 コンポーネントを装飾します。|show|がtrueの場合にのみ表示されます。
 
Component Menu (MenuOption option)
 テキストのリスト。フォーカスされた要素が選択されます。
 
Component MenuEntry (MenuEntryOption option)
 特定のメニューエントリ。Container::Verticalに入れることで メニューを形成できます。
 
Component Radiobox (RadioboxOption option)
 一つだけ選択できる要素のリスト。
 
Component Renderer (std::function< Element()> render)
 |render| を使ってインターフェースを描画するコンポーネントを返します。
 
ComponentDecorator Renderer (ElementDecorator decorator)
 コンポーネントが描画するものを装飾することで、コンポーネントを 装飾します。
 
Component Window (WindowOptions option)
 ドラッグ可能/サイズ変更可能なウィンドウ。複数のウィンドウを使用するには、それらを Container::Stacked({...})コンポーネントを使用してスタックする必要があります。
 
Element automerge (Element child)
 文字が近くの他の文字と自動的にマージされるようにします。
 
Element blink (Element child)
 描画されたテキストは、可視と非可視の間で交互に切り替わります。
 
Element bold (Element child)
 より強調したい要素に、太字フォントを使用します。
 
Element border (Element child)
 要素の周囲にボーダーを描画します。
 
Decorator borderWith (const Cell &pixel)
 borderと同じだが、周囲に一定のCellを使用する。
 
Decorator borderStyled (BorderStyle style)
 borderと同じですが、異なるスタイルを使用します。
 
Decorator borderStyled (Color foreground_color)
 borderと同じですが、前景色を使用します。
 
Decorator borderStyled (BorderStyle style, Color foreground_color)
 borderと同じですが、前景色と異なるスタイルを使用します
 
Element borderDashed (Element child)
 要素の周囲に破線のボーダーを描画します。
 
Element borderLight (Element child)
 要素の周囲に細いボーダーを描画します。
 
Element borderHeavy (Element child)
 要素の周囲に太いボーダーを描画します。
 
Element borderDouble (Element child)
 要素の周囲に二重線のボーダーを描画します。
 
Element borderRounded (Element child)
 要素の周囲に角の丸いボーダーを描画します。
 
Element borderEmpty (Element child)
 要素の周囲に空のボーダーを描画します。
 
Element canvas (ConstRef< Canvas > canvas)
 CanvasまたはCanvasへの参照から要素を生成します。
 
Element canvas (std::function< void(Canvas &)> fn)
 キャンバスを描画する要素を生成します。
 
Element clear_under (Element element)
 |child|を描画する前に、その下のセルをクリアする。これは dboxとの組み合わせで有用。
 
Element color (Color color, Element child)
 要素の前景色を設定します。
 
Element bgcolor (Color color, Element child)
 要素の背景色を設定します。
 
Decorator color (Color c)
 前景色を使用して装飾します。
 
Decorator bgcolor (Color color)
 背景色を使用して装飾します。
 
Element hcenter (Element child)
 要素を水平方向に中央揃えします。
 
Element vcenter (Element child)
 要素を垂直方向に中央揃えします。
 
Element center (Element child)
 要素を水平方向および垂直方向に中央揃えします。
 
Element align_right (Element child)
 要素を右側に揃えます。
 
Element dbox (Elements children_)
 複数の要素を互いに重ねて表示する。
 
Element dim (Element child)
 強調を抑えたい要素に、明るいフォントを使用します。
 
Element filler ()
 コンテナ内の残りのスペースに比例して拡大する要素。
 
Element flex (Element child)
 子要素をコンテナに残されたスペースに比例して拡大させます。
 
Element flex_grow (Element child)
 可能であれば拡大します。
 
Element flex_shrink (Element child)
 必要であれば最小化します。
 
Element notflex (Element child)
 要素を柔軟にしないようにします。
 
Decorator flex_factor (int grow, int shrink)
 
Decorator flex_grow_factor (int grow)
 
Decorator flex_shrink_factor (int shrink)
 
Decorator xflex_factor (int grow, int shrink)
 
Decorator xflex_grow_factor (int grow)
 
Decorator xflex_shrink_factor (int shrink)
 
Decorator yflex_factor (int grow, int shrink)
 
Decorator yflex_grow_factor (int grow)
 
Decorator yflex_shrink_factor (int shrink)
 
Decorator focusPositionRelative (float x, float y)
 frame内で使用され、ビューを特定の位置にスクロールさせます。位置は要求されたサイズの割合で表されます。
 
Decorator focusPosition (int x, int y)
 frame内で使用され、ビューを特定の位置にスクロールさせます。位置はセル数で表されます。
 
Element focus (Element child)
 子要素を兄弟要素の中でフォーカスされたものとして設定します。
 
Element select (Element e)
 childをその兄弟の中でフォーカスされた要素に設定する。
 
Element frame (Element child)
 要素を「仮想」領域内に表示できるようにします。そのサイズはコンテナよりも大きくすることができます。 この場合、より小さい部分のみが表示されます。フォーカスされた要素を表示するためにビューはスクロール可能です。
 
Element xframe (Element child)
 frame と同じですが、x軸のみに適用されます。
 
Element yframe (Element child)
 frame と同じですが、y軸のみに適用されます。
 
Element focusCursorBlock (Element child)
 focus と同じですが、カーソル形状を静止ブロックに設定します。
 
Element focusCursorBlockBlinking (Element child)
 focus と同じですが、カーソル形状を点滅ブロックに設定します。
 
Element focusCursorBar (Element child)
 focus と同じですが、カーソル形状を静止ブロックに設定します。
 
Element focusCursorBarBlinking (Element child)
 focus と同じですが、カーソル形状を点滅バーに設定します。
 
Element focusCursorUnderline (Element child)
 focus と同じですが、カーソル形状を静止下線に設定します。
 
Element focusCursorUnderlineBlinking (Element child)
 focus と同じですが、カーソル形状を点滅下線に設定します。
 
Element gaugeDirection (float progress, Direction direction)
 指定された方向に進行する高精細プログレスバーを描画します。
 
Element gaugeRight (float progress)
 左から右へ進行する高精細プログレスバーを描画します。
 
Element gaugeLeft (float progress)
 右から左へ進行する高精細プログレスバーを描画します。
 
Element gaugeUp (float progress)
 下から上へ進行する高精細プログレスバーを描画します。
 
Element gaugeDown (float progress)
 上から下へ進行する高精細プログレスバーを描画します。
 
Element gauge (float progress)
 高精細プログレスバーを描画します。
 
Element graph (GraphFunction graph_function)
 GraphFunctionを使用してグラフを描画します。
 
Element gridbox (std::vector< Elements > lines)
 A container displaying a grid of elements.
 
Element hbox (Elements children)
 要素を水平方向に1つずつ表示するコンテナ。
 
Element hyperlink (std::string_view link, Element child)
 ウェブブラウザを使用してレンダリングされた領域をクリック可能にします。 ユーザーがクリックするとリンクが開きます。 これは、限られたターミナルエミュレータでのみサポートされています。 リスト: https://github.com/Alhadis/OSC8-Adoption/
 
Decorator hyperlink (std::string_view link)
 ハイパーリンクを使用して装飾します。 ユーザーがクリックするとリンクが開きます。 これは、限られたターミナルエミュレータでのみサポートされています。 リスト: https://github.com/Alhadis/OSC8-Adoption/
 
Element inverted (Element child)
 前景色と背景色を反転させるフィルターを追加します。
 
Element italic (Element child)
 テキストに二重下線を適用します。
 
Element color (const LinearGradient &gradient, Element child)
 線形グラデーション効果を持つ要素のフォアグラウンドカラーを設定します。
 
Element bgcolor (const LinearGradient &gradient, Element child)
 線形グラデーション効果を持つ要素の背景色を設定します。
 
Decorator color (const LinearGradient &gradient)
 フォアグラウンドカラーに線形グラデーション効果を使用して装飾します。
 
Decorator bgcolor (const LinearGradient &gradient)
 背景色に線形グラデーション効果を使用して装飾します。
 
void Render (Screen &screen, const Element &element)
 要素をftxui::Screenに表示します。
 
void Render (Screen &screen, Node *node)
 要素をftxui::Screenに表示します。
 
Element paragraph (std::string_view the_text)
 段落を複数行で描画する要素を返します。
 
Element paragraphAlignLeft (std::string_view the_text)
 段落を複数行にわたって左揃えで描画する要素を返します。
 
Element paragraphAlignRight (std::string_view the_text)
 段落を複数行にわたって右揃えで描画する要素を返します。
 
Element paragraphAlignCenter (std::string_view the_text)
 段落を複数行にわたって中央揃えで描画する要素を返します。
 
Element paragraphAlignJustify (std::string_view the_text)
 段落を複数行にわたって両端揃えで描画する要素を返します。 中央に。
 
Decorator reflect (Box &box)
 
Element vscroll_indicator (Element child)
 右側に垂直スクロールバーを表示します。 色はコンテンツに従います。
 
Element hscroll_indicator (Element child)
 下部に水平スクロールバーを表示します。 色はコンテンツに従います。
 
Element selectionStyleReset (Element child)
 要素の選択スタイルをリセットします。
 
Decorator selectionBackgroundColor (Color foreground)
 要素が選択されたときの背景色を設定します。 スタイルは既存のスタイルに重ねて適用されることに注意してください。
 
Decorator selectionForegroundColor (Color foreground)
 要素が選択されたときの描画色を設定します。 スタイルは既存のスタイルに重ねて適用されることに注意してください。
 
Decorator selectionColor (Color foreground)
 要素が選択されたときの色を設定します。
 
Decorator selectionStyle (std::function< void(Cell &)> style)
 要素が選択されたときのスタイルを設定します。
 
Element separatorStyled (BorderStyle style)
 他の2つの要素の間に垂直または水平の区切り線を描画します。
 
Element separatorDashed ()
 他の2つの要素の間にLIGHTスタイルで垂直または水平の区切り線を描画します。
 
Element separatorDouble ()
 他の2つの要素の間にHEAVYスタイルで垂直または水平の区切り線を描画します。
 
Element separatorEmpty ()
 他の2つの要素の間にEMPTYスタイルで垂直または水平の区切り線を描画します。
 
Decorator size (WidthOrHeight direction, Constraint constraint, int value)
 要素のサイズに制約を適用する。
 
Element spinner (int charset_index, size_t image_index)
 時間やイベントの効果を表現するのに便利です。これはアスキーアートの「ビデオ」を表示します。
 
Element strikethrough (Element child)
 テキストに打ち消し線を適用します。
 
Element text (std::string_view text)
 UTF8エンコードされたユニコードテキストを表示します。
 
Element text (std::wstring_view text)
 ユニコードテキストを表示します。
 
Element vtext (std::string_view text)
 ユニコードテキストを垂直に表示します。
 
Element vtext (std::wstring_view text)
 ユニコードテキストを垂直に表示します。
 
Element underlined (Element child)
 指定された要素に下線を追加します。
 
Element underlinedDouble (Element child)
 テキストに二重下線を適用します。
 
Element nothing (Element element)
 何も行わないデコレーションです。
 
Decorator operator| (Decorator a, Decorator b)
 2つのデコレーターを1つに合成します。
 
Elements operator| (Elements elements, Decorator decorator)
 要素のセットから、すべての要素にデコレーターを適用します。
 
Element operator| (Element element, Decorator decorator)
 要素にデコレーターを適用します。
 
Element & operator|= (Element &e, Decorator d)
 要素にデコレーターを適用します。
 
Element emptyElement ()
 
Element vbox (Elements children)
 要素を縦に一つずつ表示するコンテナ。
 
Color operator""_rgb (unsigned long long int combined)
 
ColorInfo GetColorInfo (Color::Palette256 index)
 
ColorInfo GetColorInfo (Color::Palette16 index)
 
std::vector< std::vector< ColorInfo > > ColorInfoSorted2D ()
 
bool EatCodePoint (std::string_view input, size_t start, size_t *end, uint32_t *ucs)
 
bool EatCodePoint (std::wstring_view input, size_t start, size_t *end, uint32_t *ucs)
 
bool IsCombining (uint32_t ucs)
 
bool IsFullWidth (uint32_t ucs)
 
bool IsControl (uint32_t ucs)
 
WordBreakProperty CodepointToWordBreakProperty (uint32_t codepoint)
 
int wchar_width (wchar_t ucs)
 
int wstring_width (const std::wstring &text)
 
int string_width (std::string_view input)
 
size_t GlyphPrevious (std::string_view input, size_t start)
 
size_t GlyphNext (std::string_view input, size_t start)
 
size_t GlyphIterate (std::string_view input, int glyph_offset, size_t start)
 
int GlyphCount (std::string_view input)
 
std::vector< WordBreakProperty > Utf8ToWordBreakProperty (std::string_view input)
 
std::string to_string (std::wstring_view s)
 std::wstringをUTF8 std::stringに変換します。
 
std::wstring to_wstring (std::string_view s)
 UTF8 std::stringをstd::wstringに変換します。
 
bool IsWordBreakingCharacter (std::string_view input, size_t glyph_index)
 

Variables

const bool * show
 
Direction direction
 
 Color
 透明な色を構築します。
 
size_t image_index
 
int y
 
int shrink
 
 Constraint
 
int value
 
const Element & element
 
Node * node
 
const std::map< std::string, std::string > g_uniformize
 
const std::array< ColorInfo, 256 > palette256
 

Detailed Description

FTXUI ftxui::名前空間

Typedef Documentation

◆ Component

typedef std::shared_ptr< ComponentBase > Component = std::shared_ptr<ComponentBase>

Definition at line 23 of file app.hpp.

◆ CapturedMouse

using CapturedMouse = std::unique_ptr<CapturedMouseInterface>

Definition at line 22 of file captured_mouse.hpp.

◆ ComponentDecorator

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

Definition at line 33 of file component.hpp.

◆ ElementDecorator

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

Definition at line 34 of file component.hpp.

◆ Components

using Components = std::vector<Component>

Definition at line 26 of file component_base.hpp.

◆ Sender

template<class T >
using Sender = std::unique_ptr<SenderImpl<T>>

Definition at line 52 of file receiver.hpp.

◆ Receiver

template<class T >
using Receiver = std::unique_ptr<ReceiverImpl<T>>

Definition at line 54 of file receiver.hpp.

◆ ScreenInteractive

using ScreenInteractive = App

Definition at line 10 of file screen_interactive.hpp.

◆ Closure

using Closure = std::function<void()>

Definition at line 13 of file task.hpp.

◆ Task

using Task = std::variant<Event, Closure, AnimationTask>

Definition at line 14 of file task.hpp.

◆ Element

typedef std::shared_ptr< Node > Element = std::shared_ptr<Node>

Definition at line 25 of file elements.hpp.

◆ Elements

typedef std::vector< Element > Elements = std::vector<Element>

Definition at line 26 of file elements.hpp.

◆ Decorator

Decorator = std::function<Element(Element)>

Definition at line 27 of file elements.hpp.

◆ GraphFunction

using GraphFunction = std::function<std::vector<int>(int, int)>

Definition at line 28 of file elements.hpp.

◆ Image

using Image = Surface

Definition at line 11 of file image.hpp.

◆ Pixel

using Pixel = Cell

Definition at line 10 of file pixel.hpp.

Enumeration Type Documentation

◆ WidthOrHeight

enum WidthOrHeight : uint8_t
Enumerator
WIDTH 
HEIGHT 

Definition at line 190 of file elements.hpp.

◆ Constraint

enum Constraint : uint8_t
Enumerator
LESS_THAN 
EQUAL 
GREATER_THAN 

Definition at line 191 of file elements.hpp.

◆ AppDimension

enum class AppDimension
strong
Enumerator
FitComponent 
Fixed 
Fullscreen 
TerminalOutput 

Definition at line 66 of file app.cpp.

◆ WordBreakProperty

enum class WordBreakProperty : int8_t
strong
Enumerator
ALetter 
CR 
Double_Quote 
Extend 
ExtendNumLet 
Format 
Hebrew_Letter 
Katakana 
LF 
MidLetter 
MidNum 
MidNumLet 
Newline 
Numeric 
Regional_Indicator 
Single_Quote 
WSegSpace 
ZWJ 

Definition at line 43 of file string_internal.hpp.

Function Documentation

◆ Make()

template<class T , class... Args>
std::shared_ptr< T > Make ( Args &&... args)

Definition at line 28 of file component.hpp.

◆ operator|() [1/2]

Component operator| ( Component component,
ComponentDecorator decorator )

Definition at line 12 of file component/util.cpp.

◆ operator|() [2/2]

Component operator| ( Component component,
ElementDecorator decorator )

Definition at line 17 of file component/util.cpp.

◆ operator|=() [1/2]

Component & operator|= ( Component & component,
ComponentDecorator decorator )

Definition at line 22 of file component/util.cpp.

◆ operator|=() [2/2]

Component & operator|= ( Component & component,
ElementDecorator decorator )

Definition at line 28 of file component/util.cpp.

◆ Slider() [1/3]

template<typename T >
Component Slider ( SliderOption< T > options)

任意の方向のスライダー。

Parameters
optionsオプション

Example

auto screen = App::TerminalOutput();
int value = 50;
auto slider = Slider({
.value = &value,
.min = 0,
.max = 100,
.increment= 20,
});
screen.Loop(slider);
Component Slider(SliderOption< T > options)
任意の方向のスライダー。
int value
Definition elements.hpp:192

Definition at line 315 of file src/ftxui/component/slider.cpp.

◆ Slider() [2/3]

Component Slider ( ConstStringRef label,
Ref< float > value,
ConstRef< float > min = 0.f,
ConstRef< float > max = 100.f,
ConstRef< float > increment = 5.f )

Definition at line 272 of file src/ftxui/component/slider.cpp.

◆ Slider() [3/3]

Component Slider ( ConstStringRef label,
Ref< long > value,
ConstRef< long > min = 0L,
ConstRef< long > max = 100L,
ConstRef< long > increment = 5L )

Definition at line 285 of file src/ftxui/component/slider.cpp.

◆ ResizableSplit()

Component ResizableSplit ( ResizableSplitOption options)

2つのコンポーネント間の分割。

Parameters
optionsすべてのパラメータ。

例

auto left = Renderer([] { return text("Left") | center;});
auto right = Renderer([] { return text("right") | center;});
int left_size = 10;
auto component = ResizableSplit({
.main = left,
.back = right,
.direction = Direction::Left,
.main_size = &left_size,
.separator_func = [] { return separatorDouble(); },
});
Component Renderer(Component child, std::function< Element()>)
|child| に似た、|render| をComponent::Render()イベントとして 使用する新しいComponentを返します。
Element text(std::string_view text)
UTF8エンコードされたユニコードテキストを表示します。
Element center(Element child)
要素を水平方向および垂直方向に中央揃えします。
Element separatorDouble()
他の2つの要素の間にHEAVYスタイルで垂直または水平の区切り線を描画します。
Component ResizableSplit(ResizableSplitOption options)
2つのコンポーネント間の分割。
std::uint8_t left
Definition screen.cpp:147
std::uint8_t right
Definition screen.cpp:149

出力

║
left ║ right
║

Definition at line 170 of file src/ftxui/component/resizable_split.cpp.

◆ CatchEvent()

Component CatchEvent ( Component child,
std::function< bool(Event)>  )

◆ Collapsible()

Component Collapsible ( ConstStringRef label,
Component child,
Ref< bool > show )

折りたたみ可能なコンポーネント。矢印付きのチェックボックスを表示します。アクティブ化されると、子が 表示されます。

Parameters
labelチェックボックスのラベル。
child表示する子。
show子が表示されているかどうかを示す状態を保持します。

例

auto component = Collapsible("Show details", details);
Component Collapsible(ConstStringRef label, Component child, Ref< bool > show=false)
折りたたみ可能なコンポーネント。矢印付きのチェックボックスを表示します。アクティブ化されると、子が 表示されます。

出力

▼ Show details
<details component>

Definition at line 33 of file src/ftxui/component/collapsible.cpp.

◆ MakeReceiver()

template<class T >
Receiver< T > MakeReceiver ( )

Definition at line 149 of file receiver.hpp.

◆ FTXUI_EXPORT() [1/2]

FTXUI_EXPORT ( DOM ) &

◆ separatorHSelector()

FTXUI_EXPORT(DOM) Element separatorCharacter(std Element separatorHSelector ( float left,
float right,
Color unselected_color,
Color selected_color )

◆ separatorVSelector()

Element separatorVSelector ( float up,
float down,
Color unselected_color,
Color selected_color )

◆ canvas() [1/3]

Element canvas ( int width,
int height,
std::function< void(Canvas &)> fn )

要求されたサイズのキャンバスを描画する要素を生成します。

Parameters
widthキャンバスの幅。
heightキャンバスの高さ。
fnキャンバスを描画する関数。

Definition at line 922 of file src/ftxui/dom/canvas.cpp.

◆ flexbox()

Element flexbox ( Elements children,
FlexboxConfig config )

行/列に要素を表示し、一杯になると次の列/行に折り返すことができるコンテナ。

Parameters
childrenコンテナ内の要素
configオプション
Returns
コンテナ。

例

text("element 1"),
text("element 2"),
text("element 3"),
}, FlexboxConfig()
.Set(FlexboxConfig::Direction::Column)
.Set(FlexboxConfig::Wrap::WrapInversed)
.SetGapMainAxis(1)
.SetGapCrossAxis(1)
)
Element flexbox(Elements, FlexboxConfig config=FlexboxConfig())
行/列に要素を表示し、一杯になると次の列/行に折り返すことができるコンテナ。
Definition flexbox.cpp:249

Definition at line 249 of file flexbox.cpp.

◆ hflow()

Element hflow ( Elements children)

要素を左から右へ行で表示するコンテナ。一杯になると、下の新しい行から開始します。

Parameters
childrenコンテナ内の要素
Returns
コンテナ。

例

text("element 1"),
text("element 2"),
text("element 3"),
});
FTXUI_EXPORT(DOM) Element gridbox(std Element hflow(Elements)
要素を左から右へ行で表示するコンテナ。一杯になると、下の新しい行から開始します。
Definition flexbox.cpp:266

Definition at line 266 of file flexbox.cpp.

◆ vflow()

Element vflow ( Elements children)

要素を上から下へ行で表示するコンテナ。一杯になると、右側の新しい列から開始します。

Parameters
childrenコンテナ内の要素
Returns
コンテナ。

例

text("element 1"),
text("element 2"),
text("element 3"),
});
Element vflow(Elements)
要素を上から下へ行で表示するコンテナ。一杯になると、右側の新しい列から開始します。
Definition flexbox.cpp:283

Definition at line 283 of file flexbox.cpp.

◆ Render()

void Render ( Screen & screen,
Node * node,
Selection & selection )

Definition at line 105 of file node.cpp.

◆ GetNodeSelectedContent()

std::string GetNodeSelectedContent ( Screen & screen,
Node * node,
Selection & selection )

Definition at line 179 of file node.cpp.

◆ to_wstring() [1/4]

template<typename T >
FTXUI_EXPORT(SCREEN) std FTXUI_EXPORT(SCREEN) std std::wstring to_wstring ( T s)

Definition at line 18 of file string.hpp.

◆ to_wstring() [2/4]

std::wstring to_wstring ( const std::string & s)
inline

Definition at line 21 of file string.hpp.

◆ to_wstring() [3/4]

template<>
std::wstring to_wstring ( const char * s)
inline

Definition at line 25 of file string.hpp.

◆ Utf8ToGlyphs()

std::vector< std::string > Utf8ToGlyphs ( std::string_view input)

Definition at line 342 of file string.cpp.

◆ CellToGlyphIndex()

std::vector< int > CellToGlyphIndex ( std::string_view input)

Definition at line 448 of file string.cpp.

◆ canvas() [2/3]

Element canvas ( ConstRef< Canvas > canvas)

CanvasまたはCanvasへの参照から要素を生成します。

Definition at line 898 of file src/ftxui/dom/canvas.cpp.

◆ canvas() [3/3]

Element canvas ( std::function< void(Canvas &)> fn)

キャンバスを描画する要素を生成します。

Parameters
fnキャンバスを描画する関数。

Definition at line 952 of file src/ftxui/dom/canvas.cpp.

◆ flex_factor()

Decorator flex_factor ( int grow,
int shrink )

Definition at line 151 of file flex.cpp.

◆ flex_grow_factor()

Decorator flex_grow_factor ( int grow)

Definition at line 157 of file flex.cpp.

◆ flex_shrink_factor()

Decorator flex_shrink_factor ( int shrink)

Definition at line 163 of file flex.cpp.

◆ xflex_factor()

Decorator xflex_factor ( int grow,
int shrink )

Definition at line 169 of file flex.cpp.

◆ xflex_grow_factor()

Decorator xflex_grow_factor ( int grow)

Definition at line 175 of file flex.cpp.

◆ xflex_shrink_factor()

Decorator xflex_shrink_factor ( int shrink)

Definition at line 181 of file flex.cpp.

◆ yflex_factor()

Decorator yflex_factor ( int grow,
int shrink )

Definition at line 187 of file flex.cpp.

◆ yflex_grow_factor()

Decorator yflex_grow_factor ( int grow)

Definition at line 193 of file flex.cpp.

◆ yflex_shrink_factor()

Decorator yflex_shrink_factor ( int shrink)

Definition at line 199 of file flex.cpp.

◆ select()

Element select ( Element e)

childをその兄弟の中でフォーカスされた要素に設定する。

これは非推奨です。代わりにfocusを使用してください。

Parameters
eフォーカスされる要素。

Definition at line 108 of file frame.cpp.

◆ frame()

Element frame ( Element child)

要素を「仮想」領域内に表示できるようにします。そのサイズはコンテナよりも大きくすることができます。 この場合、より小さい部分のみが表示されます。フォーカスされた要素を表示するためにビューはスクロール可能です。

See also
frame
xframe
yframe

Definition at line 117 of file frame.cpp.

◆ xframe()

Element xframe ( Element child)

frame と同じですが、x軸のみに適用されます。

See also
frame
xframe
yframe

Definition at line 125 of file frame.cpp.

◆ yframe()

Element yframe ( Element child)

frame と同じですが、y軸のみに適用されます。

See also
frame
xframe
yframe

Definition at line 133 of file frame.cpp.

◆ graph()

Element graph ( GraphFunction graph_function)

GraphFunctionを使用してグラフを描画します。

Parameters
graph_functionデータを取得するために呼び出される関数。

Definition at line 79 of file src/ftxui/dom/graph.cpp.

◆ gridbox()

Element gridbox ( std::vector< Elements > lines)

A container displaying a grid of elements.

Parameters
linesA list of lines, each line being a list of elements.
Returns
The container.

Example

auto cell = [](const char* t) { return text(t) | border; };
auto document = gridbox({
{cell("north-west") , cell("north") , cell("north-east")} ,
{cell("west") , cell("center") , cell("east")} ,
{cell("south-west") , cell("south") , cell("south-east")} ,
});
Element border(Element child)
要素の周囲にボーダーを描画します。
Element gridbox(std::vector< Elements > lines)
A container displaying a grid of elements.

Output:

╭──────────╮╭──────╮╭──────────╮
│north-west││north ││north-east│
╰──────────╯╰──────╯╰──────────╯
╭──────────╮╭──────╮╭──────────╮
│west ││center││east │
╰──────────╯╰──────╯╰──────────╯
╭──────────╮╭──────╮╭──────────╮
│south-west││south ││south-east│
╰──────────╯╰──────╯╰──────────╯

Definition at line 178 of file src/ftxui/dom/gridbox.cpp.

◆ hbox()

Element hbox ( Elements children)

要素を水平方向に1つずつ表示するコンテナ。

Parameters
childrenコンテナ内の要素
Returns
コンテナ。

例

text("Left"),
text("Right"),
});
Element hbox(Elements children)
要素を水平方向に1つずつ表示するコンテナ。
Definition hbox.cpp:93

Definition at line 93 of file hbox.cpp.

◆ reflect()

Decorator reflect ( Box & box)

Definition at line 43 of file reflect.cpp.

◆ selectionStyleReset()

Element selectionStyleReset ( Element child)

要素の選択スタイルをリセットします。

Parameters
child入力要素。
Returns
選択スタイルがリセットされた出力要素。

Definition at line 55 of file selection_style.cpp.

◆ selectionBackgroundColor()

Decorator selectionBackgroundColor ( Color foreground)

要素が選択されたときの背景色を設定します。 スタイルは既存のスタイルに重ねて適用されることに注意してください。

Definition at line 61 of file selection_style.cpp.

◆ selectionForegroundColor()

Decorator selectionForegroundColor ( Color foreground)

要素が選択されたときの描画色を設定します。 スタイルは既存のスタイルに重ねて適用されることに注意してください。

Definition at line 69 of file selection_style.cpp.

◆ selectionColor()

Decorator selectionColor ( Color foreground)

要素が選択されたときの色を設定します。

Parameters
foreground適用する色。 スタイルは既存のスタイルに重ねて適用されることに注意してください。

Definition at line 78 of file selection_style.cpp.

◆ selectionStyle()

Decorator selectionStyle ( std::function< void(Cell &)> style)

要素が選択されたときのスタイルを設定します。

Parameters
style適用するスタイル。 スタイルは既存のスタイルに重ねて適用されることに注意してください。

Definition at line 86 of file selection_style.cpp.

◆ GetColorInfo() [1/2]

ColorInfo GetColorInfo ( Color::Palette256 index)

Definition at line 273 of file color_info.cpp.

◆ GetColorInfo() [2/2]

ColorInfo GetColorInfo ( Color::Palette16 index)

Definition at line 277 of file color_info.cpp.

◆ ColorInfoSorted2D()

std::vector< std::vector< ColorInfo > > ColorInfoSorted2D ( )

Definition at line 282 of file color_info.cpp.

◆ EatCodePoint() [1/2]

bool EatCodePoint ( std::string_view input,
size_t start,
size_t * end,
uint32_t * ucs )

Definition at line 135 of file string.cpp.

◆ EatCodePoint() [2/2]

bool EatCodePoint ( std::wstring_view input,
size_t start,
size_t * end,
uint32_t * ucs )

Definition at line 202 of file string.cpp.

◆ IsCombining()

bool IsCombining ( uint32_t ucs)

Definition at line 240 of file string.cpp.

◆ IsFullWidth()

bool IsFullWidth ( uint32_t ucs)

Definition at line 244 of file string.cpp.

◆ IsControl()

bool IsControl ( uint32_t ucs)

Definition at line 252 of file string.cpp.

◆ CodepointToWordBreakProperty()

WordBreakProperty CodepointToWordBreakProperty ( uint32_t codepoint)

Definition at line 266 of file string.cpp.

◆ wchar_width()

int wchar_width ( wchar_t ucs)

Definition at line 272 of file string.cpp.

◆ wstring_width()

int wstring_width ( const std::wstring & text)

Definition at line 276 of file string.cpp.

◆ string_width()

int string_width ( std::string_view input)

Definition at line 293 of file string.cpp.

◆ GlyphPrevious()

size_t GlyphPrevious ( std::string_view input,
size_t start )

Definition at line 384 of file string.cpp.

◆ GlyphNext()

size_t GlyphNext ( std::string_view input,
size_t start )

Definition at line 409 of file string.cpp.

◆ GlyphIterate()

size_t GlyphIterate ( std::string_view input,
int glyph_offset,
size_t start )

Definition at line 434 of file string.cpp.

◆ GlyphCount()

int GlyphCount ( std::string_view input)

Definition at line 489 of file string.cpp.

◆ Utf8ToWordBreakProperty()

std::vector< WordBreakProperty > Utf8ToWordBreakProperty ( std::string_view input)

Definition at line 516 of file string.cpp.

◆ to_string()

std::string to_string ( std::wstring_view s)

std::wstringをUTF8 std::stringに変換します。

Definition at line 547 of file string.cpp.

◆ to_wstring() [4/4]

std::wstring to_wstring ( std::string_view s)

UTF8 std::stringをstd::wstringに変換します。

Definition at line 619 of file string.cpp.

◆ IsWordBreakingCharacter()

bool IsWordBreakingCharacter ( std::string_view input,
size_t glyph_index )

Variable Documentation

◆ show

const bool* show

Definition at line 159 of file component.hpp.

◆ direction

Direction direction

Definition at line 80 of file elements.hpp.

◆ Color

Color
default

透明な色を構築します。

RGB表現から色を構築します。 https://en.wikipedia.org/wiki/RGB_color_model.

Palette256の色を使用して色を構築します。

Palette16の色を使用して色を構築します。

Parameters
red赤の量 [0,255]
green緑の量 [0,255]
blue青の量 [0,255]
alphaアルファの量 [0,255]

Definition at line 96 of file elements.hpp.

◆ image_index

size_t image_index

Definition at line 101 of file elements.hpp.

◆ y

float y

Definition at line 131 of file elements.hpp.

◆ shrink

int shrink

Definition at line 162 of file elements.hpp.

◆ Constraint

Definition at line 192 of file elements.hpp.

◆ value

int value

Definition at line 192 of file elements.hpp.

◆ element

const Element& element

Definition at line 94 of file node.hpp.

◆ node

Node* node

Definition at line 95 of file node.hpp.

◆ g_uniformize

const std::map<std::string, std::string> g_uniformize

Definition at line 19 of file terminal_input_parser.cpp.

◆ palette256

const std::array<ColorInfo, 256> palette256

Definition at line 14 of file color_info.cpp.