FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
ftxui/dom

Detailed Description

ftxui/dom` モジュールの チュートリアル をご確認ください。

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...
 

Functions

struct FTXUI_EXPORT (DOM) Canvas
 Canvasは、描画操作に関連付けられた描画可能なバッファです。
 
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 window (Element title, Element content, BorderStyle border)
 要素の周囲にタイトルとボーダーを持つウィンドウを描画します。
 
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 xflex (Element child)
 必要に応じてX軸上で拡大・縮小します。
 
Element yflex (Element child)
 必要に応じてY軸上で拡大・縮小します。
 
Element flex_grow (Element child)
 可能であれば拡大します。
 
Element xflex_grow (Element child)
 可能であればX軸上で拡大します。
 
Element yflex_grow (Element child)
 可能であればY軸上で拡大します。
 
Element flex_shrink (Element child)
 必要であれば最小化します。
 
Element xflex_shrink (Element child)
 必要であればX軸上で最小化します。
 
Element yflex_shrink (Element child)
 必要であればY軸上で最小化します。
 
Element notflex (Element child)
 要素を柔軟にしないようにします。
 
Decorator focusPositionRelative (float x, float y)
 frame内で使用され、ビューを特定の位置にスクロールさせます。位置は要求されたサイズの割合で表されます。
 
Decorator focusPosition (int x, int y)
 frame内で使用され、ビューを特定の位置にスクロールさせます。位置はセル数で表されます。
 
Element focus (Element child)
 子要素を兄弟要素の中でフォーカスされたものとして設定します。
 
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 gaugeCharset (float progress, std::vector< std::string > charset, Direction direction)
 カスタム文字セットを使って高精細なプログレスバーを描画する。
 
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)
 段落を複数行にわたって両端揃えで描画する要素を返します。 中央に。
 
Element vscroll_indicator (Element child)
 右側に垂直スクロールバーを表示します。 色はコンテンツに従います。
 
Element hscroll_indicator (Element child)
 下部に水平スクロールバーを表示します。 色はコンテンツに従います。
 
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)
 要素を縦に一つずつ表示するコンテナ。
 
void SetColorSupport (Color color)
 自動検出が失敗した場合にターミナルの色サポートを上書きします
 

Enumeration Type Documentation

◆ Direction

enum class Direction : uint8_t
strong

Directionは、東西南北の4つの基本方向を表す列挙型です。

Enumerator
Up 
Down 
Left 
Right 

Definition at line 14 of file direction.hpp.

◆ BorderStyle

enum BorderStyle : uint8_t

BorderStyleは、ターミナルUIの要素に適用できる様々なボーダースタイルを表す列挙型です。

BorderStyleは、ターミナルUIの要素に適用できる様々なボーダースタイルを表す列挙型です。 ウィンドウ、フレーム、セパレータなどの要素の周囲の境界線の視覚的な外観を定義するために使用されます。

Enumerator
LIGHT 
DASHED 
HEAVY 
DOUBLE 
ROUNDED 
EMPTY 

Definition at line 35 of file elements.hpp.

Function Documentation

◆ FTXUI_EXPORT()

class FTXUI_EXPORT ( DOM )

Canvasは、描画操作に関連付けられた描画可能なバッファです。

Tableは、テーブルを描画するためのユーティリティです。

ターミナルユーザーインターフェースにおける選択範囲を表します。

Requirementは、ターミナルユーザーインターフェースにおけるNodeのレイアウト要件を定義する構造体です。

NodeはDOMツリー内のすべての要素の基底クラスです。

線形グラデーションカラー効果の設定を表すクラスです。

FlexboxConfigは、flexboxコンテナのレイアウトプロパティを定義する構成構造体です。

Canvasは、複雑なグラフィックを作成するために使用できる描画領域です。 点、線、円、楕円、テキスト、および画像を点字、ブロック、または通常の文字を使用して描画する ことができます。

注: ターミナルにはセルが含まれています。セルは以下の単位です。

  • 2x4点字文字 (1x1ピクセル)
  • 2x2ブロック文字 (2x2ピクセル)
  • 2x4通常文字 (2x4ピクセル)

ターミナルで正しい位置を取得するには、x座標を2倍し、y座標を4倍する必要があります。

これにより、フレックスアイテムの方向、折り返し、主軸に沿った整列方法、 および交差軸に沿った整列方法を指定できます。 また、主軸と交差軸の両方におけるフレックスアイテム間のギャップのプロパティも含まれます。 この構造体は、ターミナルユーザーインターフェースにおけるflexboxコンテナのレイアウト動作を 設定するために使用されます。

例:

LinearGradient()
.Angle(45)
.Stop(Color::Red, 0.0)
.Stop(Color::Green, 0.5)
.Stop(Color::Blue, 1.0);

短縮コンストラクタもあります:

LinearGradient(Color::Red, Color::Blue);
LinearGradient(45, Color::Red, Color::Blue);

DOM(Document Object Model)内の単一のノードを表し、レイアウトとレンダリングのための 基本的な構造を提供します。 レイアウト要件の計算、ボックスの寸法の設定、コンテンツの選択、画面へのレンダリング、 およびレイアウトステータスの確認のためのメソッドが含まれています。 通常、子要素もNodeのインスタンスです。

ユーザーはカスタム要素を作成するためにこのクラスから派生することが期待されます。

組み込み要素のリストは elements.hpp ファイルにあります。

要素を完全に描画するために必要な最小サイズを指定します。

Selectionは、ターミナルユーザーインターフェースにおける選択範囲の2つのエンドポイントを表すクラスです。

例

auto table = Table({
{"X", "Y"},
{"-1", "1"},
{"+0", "0"},
{"+1", "1"},
});
table.SelectAll().Border(LIGHT);
table.SelectRow(1).Border(DOUBLE);
table.SelectRow(1).SeparatorInternal(LIGHT);
std::move(table).Render();
@ DOUBLE
Definition elements.hpp:39
@ LIGHT
Definition elements.hpp:36

これは主軸を確立し、フレックスアイテムがフレックスコンテナ内に配置される方向を定義します。 Flexboxは(折り返しを除けば)単一方向のレイアウト概念です。 フレックスアイテムが主に水平な行または垂直な列に配置されると考えてください。

< フレックス項目は行方向にレイアウトされます。

< フレックス項目は行方向にレイアウトされますが、逆順です。

< フレックス項目は列方向にレイアウトされます。

< フレックスアイテムは列に配置されますが、逆順になります。 order.

デフォルトでは、フレックス項目はすべて1行に収まろうとします。この プロパティにより、必要に応じて項目を折り返すことを許可するように 変更できます。

< フレックス項目はすべて1行に収まろうとします。

< フレックス項目は複数行に折り返されます。

< フレックスアイテムは複数行に折り返されますが、逆順になります。 order.

これは主軸に沿った配置を定義します。行内のすべてのフレックス項目が 非柔軟である場合、または柔軟であるが最大サイズに達している場合に 残る余分な空きスペースを分配するのに役立ちます。また、項目が行を オーバーフローしたときの配置もある程度制御します。

アイテムはflexboxの方向の開始位置に揃えられます。

アイテムはflexboxの方向の終了位置に揃えられます。

項目は行に沿って中央揃えされます。

項目は行を埋めるように伸長されます。

項目は行内に均等に分配されます。最初の項目は開始行に、最後の項目は

項目は行内に均等に分配され、周囲に等しいスペースがあります。 すべての項目が両側に等しいスペースを持つため、視覚的にはスペースが 等しくないことに注意してください。最初の項目はコンテナの端に対して 1単位のスペースを持ちますが、次の項目にはその項目自体の間隔が 適用されるため、2単位のスペースがあります。

項目は、任意の2つの項目間の間隔(および端までのスペース)が 等しくなるように分配されます。

これは、現在の行の交差軸に沿ってフレックスアイテムがどのように配置されるかのデフォルトの動作を定義します。 主軸に垂直な交差軸に対するjustify-contentバージョンと考えてください。

< 項目は交差軸の開始位置に配置されます。

< 項目は交差軸の終了位置に配置されます。

< 項目は交差軸に沿って中央揃えされます。

< 項目は交差軸を埋めるように伸長されます。

< 項目は交差軸の開始位置に配置されます。

< 項目は交差軸の終了位置に配置されます。

< 項目は交差軸に沿って中央揃えされます。

< 項目は交差軸を埋めるように伸長されます。

< 項目は交差軸に均等に分配されます。

< アイテムは各行の周囲に等しいスペースを持って均等に分配されます。 line.

< アイテムは交差軸に沿って等しいスペースを持って均等に分配されます。 space around them.

ストップとは、グラデーション内の特定の位置における色です。 位置は0.0から1.0の間の値で、 0.0はグラデーションの開始、 1.0はグラデーションの終了です。

これは主軸を確立し、フレックスアイテムがフレックスコンテナ内に配置される方向を定義します。 Flexboxは(折り返しを除けば)単一方向のレイアウト概念です。 フレックスアイテムが主に水平な行または垂直な列に配置されると考えてください。

< フレックス項目は行方向にレイアウトされます。

< フレックス項目は行方向にレイアウトされますが、逆順です。

< フレックス項目は列方向にレイアウトされます。

< フレックスアイテムは列に配置されますが、逆順になります。 order.

デフォルトでは、フレックス項目はすべて1行に収まろうとします。この プロパティにより、必要に応じて項目を折り返すことを許可するように 変更できます。

< フレックス項目はすべて1行に収まろうとします。

< フレックス項目は複数行に折り返されます。

< フレックスアイテムは複数行に折り返されますが、逆順になります。 order.

これは主軸に沿った配置を定義します。行内のすべてのフレックス項目が 非柔軟である場合、または柔軟であるが最大サイズに達している場合に 残る余分な空きスペースを分配するのに役立ちます。また、項目が行を オーバーフローしたときの配置もある程度制御します。

アイテムはflexboxの方向の開始位置に揃えられます。

アイテムはflexboxの方向の終了位置に揃えられます。

項目は行に沿って中央揃えされます。

項目は行を埋めるように伸長されます。

項目は行内に均等に分配されます。最初の項目は開始行に、最後の項目は

項目は行内に均等に分配され、周囲に等しいスペースがあります。 すべての項目が両側に等しいスペースを持つため、視覚的にはスペースが 等しくないことに注意してください。最初の項目はコンテナの端に対して 1単位のスペースを持ちますが、次の項目にはその項目自体の間隔が 適用されるため、2単位のスペースがあります。

項目は、任意の2つの項目間の間隔(および端までのスペース)が 等しくなるように分配されます。

これは、現在の行の交差軸に沿ってフレックスアイテムがどのように配置されるかのデフォルトの動作を定義します。 主軸に垂直な交差軸に対するjustify-contentバージョンと考えてください。

< 項目は交差軸の開始位置に配置されます。

< 項目は交差軸の終了位置に配置されます。

< 項目は交差軸に沿って中央揃えされます。

< 項目は交差軸を埋めるように伸長されます。

< 項目は交差軸の開始位置に配置されます。

< 項目は交差軸の終了位置に配置されます。

< 項目は交差軸に沿って中央揃えされます。

< 項目は交差軸を埋めるように伸長されます。

< 項目は交差軸に均等に分配されます。

< アイテムは各行の周囲に等しいスペースを持って均等に分配されます。 line.

< アイテムは交差軸に沿って等しいスペースを持って均等に分配されます。 space around them.

ストップとは、グラデーション内の特定の位置における色です。 位置は0.0から1.0の間の値で、 0.0はグラデーションの開始、 1.0はグラデーションの終了です。

Definition at line 1 of file canvas.hpp.

◆ automerge()

Element automerge ( Element child)

文字が近くの他の文字と自動的にマージされるようにします。

Definition at line 17 of file automerge.cpp.

◆ blink()

Element blink ( Element child)

描画されたテキストは、可視と非可視の間で交互に切り替わります。

Definition at line 33 of file blink.cpp.

◆ bold()

Element bold ( Element child)

より強調したい要素に、太字フォントを使用します。

Definition at line 33 of file bold.cpp.

◆ border()

Element border ( Element child)

要素の周囲にボーダーを描画します。

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderEmpty
borderRounded
borderStyled
borderWith

要素の周囲にボーダーを追加します

例

// 関数として'border'を使用する...
Element document = border(text("The element"));
// ...または'パイプ'として。
Element document = text("The element") | border;
Element text(std::string_view text)
UTF8エンコードされたユニコードテキストを表示します。
Element border(Element child)
要素の周囲にボーダーを描画します。
std::shared_ptr< Node > Element
Definition elements.hpp:25

出力

┌───────────┐
│The element│
└───────────┘

Definition at line 227 of file src/ftxui/dom/border.cpp.

◆ borderWith()

Decorator borderWith ( const Cell & pixel)

borderと同じだが、周囲に一定のCellを使用する。

See also
border

Definition at line 234 of file src/ftxui/dom/border.cpp.

◆ borderStyled() [1/3]

Decorator borderStyled ( BorderStyle style)

borderと同じですが、異なるスタイルを使用します。

See also
border

Definition at line 243 of file src/ftxui/dom/border.cpp.

◆ borderStyled() [2/3]

Decorator borderStyled ( Color foreground_color)

borderと同じですが、前景色を使用します。

See also
border

Definition at line 252 of file src/ftxui/dom/border.cpp.

◆ borderStyled() [3/3]

Decorator borderStyled ( BorderStyle style,
Color foreground_color )

borderと同じですが、前景色と異なるスタイルを使用します

See also
border

Definition at line 262 of file src/ftxui/dom/border.cpp.

◆ borderDashed()

Element borderDashed ( Element child)

要素の周囲に破線のボーダーを描画します。

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

要素の周囲にボーダーを追加します

例

// 関数として'borderDash'を使用する...
Element document = borderDash(text("The element"));
// ...または'パイプ'として。
Element document = text("The element") | borderDAsh;

出力

┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓
╏The element ╏
┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛

Definition at line 300 of file src/ftxui/dom/border.cpp.

◆ borderLight()

Element borderLight ( Element child)

要素の周囲に細いボーダーを描画します。

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

要素の周囲にボーダーを追加します

例

// 関数として'borderLight'を使用する...
Element document = borderLight(text("The element"));
// ...または'パイプ'として。
Element document = text("The element") | borderLight;
Element borderLight(Element child)
要素の周囲に細いボーダーを描画します。

出力

┌──────────────┐
│The element │
└──────────────┘

Definition at line 335 of file src/ftxui/dom/border.cpp.

◆ borderHeavy()

Element borderHeavy ( Element child)

要素の周囲に太いボーダーを描画します。

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

要素の周囲にボーダーを追加します

例

// 関数として'borderHeavy'を使用する...
Element document = borderHeavy(text("The element"));
// ...または'パイプ'として。
Element document = text("The element") | borderHeavy;
Element borderHeavy(Element child)
要素の周囲に太いボーダーを描画します。

出力

┏━━━━━━━━━━━━━━┓
┃The element ┃
┗━━━━━━━━━━━━━━┛

Definition at line 370 of file src/ftxui/dom/border.cpp.

◆ borderDouble()

Element borderDouble ( Element child)

要素の周囲に二重線のボーダーを描画します。

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

要素の周囲にボーダーを追加します

例

// 関数として'borderDouble'を使用する...
Element document = borderDouble(text("The element"));
// ...または'パイプ'として。
Element document = text("The element") | borderDouble;
Element borderDouble(Element child)
要素の周囲に二重線のボーダーを描画します。

出力

╔══════════════╗
║The element ║
╚══════════════╝

Definition at line 405 of file src/ftxui/dom/border.cpp.

◆ borderRounded()

Element borderRounded ( Element child)

要素の周囲に角の丸いボーダーを描画します。

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

要素の周囲にボーダーを追加します

例

// 関数として'borderRounded'を使用する...
Element document = borderRounded(text("The element"));
// ...または'パイプ'として。
Element document = text("The element") | borderRounded;
Element borderRounded(Element child)
要素の周囲に角の丸いボーダーを描画します。

出力

╭──────────────╮
│The element │
╰──────────────╯

Definition at line 440 of file src/ftxui/dom/border.cpp.

◆ borderEmpty()

Element borderEmpty ( Element child)

要素の周囲に空のボーダーを描画します。

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

要素の周囲にボーダーを追加します

例

// 関数として'borderRounded'を使用する...
Element document = borderRounded(text("The element"));
// ...または'パイプ'として。
Element document = text("The element") | borderRounded;

出力

The element

Definition at line 475 of file src/ftxui/dom/border.cpp.

◆ window()

Element window ( Element title,
Element content,
BorderStyle border )

要素の周囲にタイトルとボーダーを持つウィンドウを描画します。

Parameters
titleウィンドウのタイトル。
contentラップする要素。
borderボーダーのスタイル。デフォルトはROUNDEDです。
See also
border

例

Element document = window(text("Title"),
text("content")
);
// ボーダーを指定する場合
Element document = window(text("Title"),
text("content"),
);
Element window(Element title, Element content, BorderStyle border=ROUNDED)
要素の周囲にタイトルとボーダーを持つウィンドウを描画します。
@ ROUNDED
Definition elements.hpp:40

出力

┌Title──┐
│content│
└───────┘

Definition at line 507 of file src/ftxui/dom/border.cpp.

◆ clear_under()

Element clear_under ( Element element)

|child|を描画する前に、その下のセルをクリアする。これは dboxとの組み合わせで有用。

See also
ftxui::dbox

Definition at line 38 of file clear_under.cpp.

◆ color() [1/4]

Element color ( Color color,
Element child )

要素の前景色を設定します。

Parameters
color出力要素の色。
child入力要素。
Returns
色付けされた出力要素。

例

Element document = color(Color::Green, text("Success")),
Element color(Color color, Element child)
要素の前景色を設定します。
Definition dom/color.cpp:81

Definition at line 81 of file dom/color.cpp.

◆ bgcolor() [1/4]

Element bgcolor ( Color color,
Element child )

要素の背景色を設定します。

Parameters
color出力要素の色。
child入力要素。
Returns
色付けされた出力要素。

例

Element document = bgcolor(Color::Green, text("Success")),
Element bgcolor(Color color, Element child)
要素の背景色を設定します。
Definition dom/color.cpp:96

Definition at line 96 of file dom/color.cpp.

◆ color() [2/4]

Decorator color ( Color c)

前景色を使用して装飾します。

Parameters
c適用する前景色。
Returns
色を適用するデコレータ。

例

Element document = text("red") | color(Color::Red);

Definition at line 110 of file dom/color.cpp.

◆ bgcolor() [2/4]

Decorator bgcolor ( Color color)

背景色を使用して装飾します。

Parameters
color適用する背景色。
Returns
色を適用するデコレータ。

例

Element document = text("red") | bgcolor(Color::Red);

Definition at line 124 of file dom/color.cpp.

◆ hcenter()

Element hcenter ( Element child)

要素を水平方向に中央揃えします。

Parameters
child装飾される要素。
Returns
中央揃えされた要素。

Definition at line 15 of file composite_decorator.cpp.

◆ vcenter()

Element vcenter ( Element child)

要素を垂直方向に中央揃えします。

Parameters
child装飾される要素。
Returns
中央揃えされた要素。

Definition at line 23 of file composite_decorator.cpp.

◆ center()

Element center ( Element child)

要素を水平方向および垂直方向に中央揃えします。

Parameters
child装飾される要素。
Returns
中央揃えされた要素。

Definition at line 31 of file composite_decorator.cpp.

◆ align_right()

Element align_right ( Element child)

要素を右側に揃えます。

Parameters
child装飾される要素。
Returns
右揃えされた要素。

Definition at line 39 of file composite_decorator.cpp.

◆ dbox()

Element dbox ( Elements children_)

複数の要素を互いに重ねて表示する。

Parameters
children_入力要素。
Returns
右揃えされた要素。

Definition at line 59 of file src/ftxui/dom/dbox.cpp.

◆ dim()

Element dim ( Element child)

強調を抑えたい要素に、明るいフォントを使用します。

Definition at line 33 of file dim.cpp.

◆ filler()

Element filler ( )

コンテナ内の残りのスペースに比例して拡大する要素。

Definition at line 69 of file flex.cpp.

◆ flex()

Element flex ( Element child)

子要素をコンテナに残されたスペースに比例して拡大させます。

Examples:

text("left") | border ,
text("middle") | border | flex,
text("right") | border,
});
Element flex(Element child)
子要素をコンテナに残されたスペースに比例して拡大させます。
Definition flex.cpp:93
Element hbox(Elements children)
要素を水平方向に1つずつ表示するコンテナ。
Definition hbox.cpp:93

Output:

┌────┐┌─────────────────────────────────────────────────────────┐┌─────┐
│left││middle ││right│
└────┘└─────────────────────────────────────────────────────────┘└─────┘

Definition at line 93 of file flex.cpp.

◆ xflex()

Element xflex ( Element child)

必要に応じてX軸上で拡大・縮小します。

Definition at line 99 of file flex.cpp.

◆ yflex()

Element yflex ( Element child)

必要に応じてY軸上で拡大・縮小します。

Definition at line 105 of file flex.cpp.

◆ flex_grow()

Element flex_grow ( Element child)

可能であれば拡大します。

Definition at line 111 of file flex.cpp.

◆ xflex_grow()

Element xflex_grow ( Element child)

可能であればX軸上で拡大します。

Definition at line 117 of file flex.cpp.

◆ yflex_grow()

Element yflex_grow ( Element child)

可能であればY軸上で拡大します。

Definition at line 123 of file flex.cpp.

◆ flex_shrink()

Element flex_shrink ( Element child)

必要であれば最小化します。

Definition at line 129 of file flex.cpp.

◆ xflex_shrink()

Element xflex_shrink ( Element child)

必要であればX軸上で最小化します。

Definition at line 135 of file flex.cpp.

◆ yflex_shrink()

Element yflex_shrink ( Element child)

必要であればY軸上で最小化します。

Definition at line 141 of file flex.cpp.

◆ notflex()

Element notflex ( Element child)

要素を柔軟にしないようにします。

Definition at line 147 of file flex.cpp.

◆ focusPositionRelative()

Decorator focusPositionRelative ( float x,
float y )

frame内で使用され、ビューを特定の位置にスクロールさせます。位置は要求されたサイズの割合で表されます。

例えば:

  • (0, 0) は、ビューが左上隅にスクロールされることを意味します。
  • (1, 0) は、ビューが右上隅にスクロールされることを意味します。
  • (0, 1) は、ビューが左下隅にスクロールされることを意味します。

Example

Element document = huge_document()
| frame;
Decorator focusPositionRelative(float x, float y)
frame内で使用され、ビューを特定の位置にスクロールさせます。位置は要求されたサイズの割合で表されます。
Element frame(Element child)
要素を「仮想」領域内に表示できるようにします。そのサイズはコンテナよりも大きくすることができます。 この場合、より小さい部分のみが表示されます。フォーカスされた要素を表示するためにビューはスクロール可能...
Definition frame.cpp:117

Definition at line 29 of file src/ftxui/dom/focus.cpp.

◆ focusPosition()

Decorator focusPosition ( int x,
int y )

frame内で使用され、ビューを特定の位置にスクロールさせます。位置はセル数で表されます。

Example

Element document = huge_document()
| focusPosition(10, 10)
| frame;
Decorator focusPosition(int x, int y)
frame内で使用され、ビューを特定の位置にスクロールさせます。位置はセル数で表されます。

Definition at line 66 of file src/ftxui/dom/focus.cpp.

◆ focus()

Element focus ( Element child)

子要素を兄弟要素の中でフォーカスされたものとして設定します。

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

Definition at line 101 of file frame.cpp.

◆ focusCursorBlock()

Element focusCursorBlock ( Element child)

focus と同じですが、カーソル形状を静止ブロックに設定します。

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 146 of file frame.cpp.

◆ focusCursorBlockBlinking()

Element focusCursorBlockBlinking ( Element child)

focus と同じですが、カーソル形状を点滅ブロックに設定します。

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 160 of file frame.cpp.

◆ focusCursorBar()

Element focusCursorBar ( Element child)

focus と同じですが、カーソル形状を静止ブロックに設定します。

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 174 of file frame.cpp.

◆ focusCursorBarBlinking()

Element focusCursorBarBlinking ( Element child)

focus と同じですが、カーソル形状を点滅バーに設定します。

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 188 of file frame.cpp.

◆ focusCursorUnderline()

Element focusCursorUnderline ( Element child)

focus と同じですが、カーソル形状を静止下線に設定します。

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 202 of file frame.cpp.

◆ focusCursorUnderlineBlinking()

Element focusCursorUnderlineBlinking ( Element child)

focus と同じですが、カーソル形状を点滅下線に設定します。

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 216 of file frame.cpp.

◆ gaugeDirection()

Element gaugeDirection ( float progress,
Direction direction )

指定された方向に進行する高精細プログレスバーを描画します。

Parameters
progress塗りつぶされる領域の割合。[0,1]に属します。
directionプログレスバーの進行方向。

Definition at line 204 of file src/ftxui/dom/gauge.cpp.

◆ gaugeRight()

Element gaugeRight ( float progress)

左から右へ進行する高精細プログレスバーを描画します。

Parameters
progress塗りつぶされる領域の割合。[0,1]に属します。

Example

ゲージ。プログレスバーとして使用できます。

Element gaugeRight(float progress)
左から右へ進行する高精細プログレスバーを描画します。

Output

┌──────────────────────────────────────────────────────────────────────────┐
│█████████████████████████████████████ │
└──────────────────────────────────────────────────────────────────────────┘

Definition at line 226 of file src/ftxui/dom/gauge.cpp.

◆ gaugeLeft()

Element gaugeLeft ( float progress)

右から左へ進行する高精細プログレスバーを描画します。

Parameters
progress塗りつぶされる領域の割合。[0,1]に属します。

Example

ゲージ。プログレスバーとして使用できます。

Element gaugeLeft(float progress)
右から左へ進行する高精細プログレスバーを描画します。

Output

┌──────────────────────────────────────────────────────────────────────────┐
│ █████████████████████████████████████│
└──────────────────────────────────────────────────────────────────────────┘

Definition at line 248 of file src/ftxui/dom/gauge.cpp.

◆ gaugeUp()

Element gaugeUp ( float progress)

下から上へ進行する高精細プログレスバーを描画します。

Parameters
progress塗りつぶされる領域の割合。[0,1]に属します。

Example

ゲージ。プログレスバーとして使用できます。

Element gaugeUp(float progress)
下から上へ進行する高精細プログレスバーを描画します。

Output

┌─┐
│ │
│ │
│ │
│ │
│█│
│█│
│█│
│█│
└─┘

Definition at line 277 of file src/ftxui/dom/gauge.cpp.

◆ gaugeDown()

Element gaugeDown ( float progress)

上から下へ進行する高精細プログレスバーを描画します。

Parameters
progress塗りつぶされる領域の割合。[0,1]に属します。

Example

ゲージ。プログレスバーとして使用できます。

Element gaugeDown(float progress)
上から下へ進行する高精細プログレスバーを描画します。

Output

┌─┐
│█│
│█│
│█│
│█│
│ │
│ │
│ │
│ │
└─┘

Definition at line 306 of file src/ftxui/dom/gauge.cpp.

◆ gauge()

Element gauge ( float progress)

高精細プログレスバーを描画します。

Parameters
progress塗りつぶされる領域の割合。[0,1]に属します。

Example

ゲージ。プログレスバーとして使用できます。

Element gauge(float progress)
高精細プログレスバーを描画します。

Output

┌──────────────────────────────────────────────────────────────────────────┐
│█████████████████████████████████████ │
└──────────────────────────────────────────────────────────────────────────┘

Definition at line 328 of file src/ftxui/dom/gauge.cpp.

◆ gaugeCharset()

Element gaugeCharset ( float progress,
std::vector< std::string > charset,
Direction direction )

カスタム文字セットを使って高精細なプログレスバーを描画する。

Parameters
progress塗りつぶす領域の割合。[0,1]に属する。
charset「empty」(インデックス0)から「full」(最後のインデックス) までのグリフ。2要素の文字セットは単純な塗りつぶしのないバーになる。
directionプログレスバーの進行方向。デフォルトはRight。

Example

デフォルトのブロック文字の代わりに、カスタム文字セットで描画された ゲージ。

border(gaugeCharset(0.5, {".", "#"}))
Element gaugeCharset(float progress, std::vector< std::string > charset, Direction direction=Direction::Right)
カスタム文字セットを使って高精細なプログレスバーを描画する。

Output

┌──────────────────────────────────────────────────────────────────────────┐
│#####################################.....................................│
└──────────────────────────────────────────────────────────────────────────┘

Definition at line 354 of file src/ftxui/dom/gauge.cpp.

◆ hyperlink() [1/2]

Element hyperlink ( std::string_view link,
Element child )

ウェブブラウザを使用してレンダリングされた領域をクリック可能にします。 ユーザーがクリックするとリンクが開きます。 これは、限られたターミナルエミュレータでのみサポートされています。 リスト: https://github.com/Alhadis/OSC8-Adoption/

Parameters
linkリンク
child入力要素。
Returns
リンクを持つ出力要素。

例

Element document =
hyperlink("https://github.com/ArthurSonzogni/FTXUI", "link");
Element hyperlink(std::string_view link, Element child)
ウェブブラウザを使用してレンダリングされた領域をクリック可能にします。 ユーザーがクリックするとリンクが開きます。 これは、限られたターミナルエミュレータでのみサポートされています。 リスト: http...
Definition hyperlink.cpp:52

Definition at line 52 of file hyperlink.cpp.

◆ hyperlink() [2/2]

Decorator hyperlink ( std::string_view link)

ハイパーリンクを使用して装飾します。 ユーザーがクリックするとリンクが開きます。 これは、限られたターミナルエミュレータでのみサポートされています。 リスト: https://github.com/Alhadis/OSC8-Adoption/

Parameters
linkユーザーをリダイレクトするリンク。
Returns
ハイパーリンクを適用するデコレータ。

例

Element document =
text("red") | hyperlink("https://github.com/Arthursonzogni/FTXUI");

Definition at line 71 of file hyperlink.cpp.

◆ inverted()

Element inverted ( Element child)

前景色と背景色を反転させるフィルターを追加します。

Definition at line 33 of file inverted.cpp.

◆ italic()

Element italic ( Element child)

テキストに二重下線を適用します。

Definition at line 17 of file italic.cpp.

◆ color() [3/4]

Element color ( const LinearGradient & gradient,
Element child )

線形グラデーション効果を持つ要素のフォアグラウンドカラーを設定します。

Parameters
gradient出力要素に適用されるグラデーション効果。
child入力要素。
Returns
色付けされた出力要素。

例

color(LinearGradient{0, {Color::Red, Color::Blue}}, text("Hello"))

Definition at line 243 of file src/ftxui/dom/linear_gradient.cpp.

◆ bgcolor() [3/4]

Element bgcolor ( const LinearGradient & gradient,
Element child )

線形グラデーション効果を持つ要素の背景色を設定します。

Parameters
gradient出力要素に適用されるグラデーション効果。
child入力要素。
Returns
色付けされた出力要素。

例

bgcolor(LinearGradient{0, {Color::Red, Color::Blue}}, text("Hello"))

Definition at line 259 of file src/ftxui/dom/linear_gradient.cpp.

◆ color() [4/4]

Decorator color ( const LinearGradient & gradient)

フォアグラウンドカラーに線形グラデーション効果を使用して装飾します。

Parameters
gradient出力要素に適用されるグラデーション効果。
Returns
色を適用するデコレーター。

例

text("Hello") | color(LinearGradient{0, {Color::Red, Color::Blue}})

Definition at line 274 of file src/ftxui/dom/linear_gradient.cpp.

◆ bgcolor() [4/4]

Decorator bgcolor ( const LinearGradient & gradient)

背景色に線形グラデーション効果を使用して装飾します。

Parameters
gradient出力要素に適用されるグラデーション効果。
Returns
色を適用するデコレーター。

例

text("Hello") | color(LinearGradient{0, {Color::Red, Color::Blue}})

Definition at line 289 of file src/ftxui/dom/linear_gradient.cpp.

◆ Render() [1/2]

void Render ( Screen & screen,
const Element & element )

要素をftxui::Screenに表示します。

Definition at line 93 of file node.cpp.

◆ Render() [2/2]

void Render ( Screen & screen,
Node * node )

要素をftxui::Screenに表示します。

Definition at line 100 of file node.cpp.

◆ paragraph()

Element paragraph ( std::string_view the_text)

段落を複数行で描画する要素を返します。

See also
flexbox.

Definition at line 48 of file src/ftxui/dom/paragraph.cpp.

◆ paragraphAlignLeft()

Element paragraphAlignLeft ( std::string_view the_text)

段落を複数行にわたって左揃えで描画する要素を返します。

See also
flexbox.

Definition at line 55 of file src/ftxui/dom/paragraph.cpp.

◆ paragraphAlignRight()

Element paragraphAlignRight ( std::string_view the_text)

段落を複数行にわたって右揃えで描画する要素を返します。

See also
flexbox.

Definition at line 65 of file src/ftxui/dom/paragraph.cpp.

◆ paragraphAlignCenter()

Element paragraphAlignCenter ( std::string_view the_text)

段落を複数行にわたって中央揃えで描画する要素を返します。

See also
flexbox.

Definition at line 76 of file src/ftxui/dom/paragraph.cpp.

◆ paragraphAlignJustify()

Element paragraphAlignJustify ( std::string_view the_text)

段落を複数行にわたって両端揃えで描画する要素を返します。 中央に。

See also
flexbox.

Definition at line 88 of file src/ftxui/dom/paragraph.cpp.

◆ vscroll_indicator()

Element vscroll_indicator ( Element child)

右側に垂直スクロールバーを表示します。 色はコンテンツに従います。

Definition at line 21 of file scroll_indicator.cpp.

◆ hscroll_indicator()

Element hscroll_indicator ( Element child)

下部に水平スクロールバーを表示します。 色はコンテンツに従います。

Definition at line 76 of file scroll_indicator.cpp.

◆ separatorStyled()

Element separatorStyled ( BorderStyle style)

他の2つの要素の間に垂直または水平の区切り線を描画します。

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

2つの要素間に視覚的な区切りを追加します。

Example

// 関数として \'border\' を使用...
Element document = vbox({
text("up"),
separator(),
text("down"),
}); */
Element separator() {
return std::make_shared<SeparatorAuto>(LIGHT);
}
/** @brief 他の2つの要素の間に垂直または水平の区切り線を描画します。
@param style 区切り線のスタイル。
@ingroup dom
@see separator
@see separatorLight
@see separatorDashed
@see separatorDouble
@see separatorHeavy
@see separatorEmpty
@see separatorRounded
@see separatorStyled
@see separatorCharacter
2つの要素間に視覚的な区切りを追加します。
### Example
Element vbox(Elements children)
要素を縦に一つずつ表示するコンテナ。
Definition vbox.cpp:95

cpp // 関数として \'border\' を使用... Element document = vbox({ text("up"), separatorStyled(DOUBLE), text("down"), });

Definition at line 154 of file src/ftxui/dom/separator.cpp.

◆ separatorDashed()

Element separatorDashed ( )

他の2つの要素の間にLIGHTスタイルで垂直または水平の区切り線を描画します。

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

2つの要素間に視覚的な区切りを追加します。

Example

// 関数として \'border\' を使用...
Element document = vbox({
text("up"),
separatorLight(),
text("down"),
}); */
Element separatorLight() {
return std::make_shared<SeparatorAuto>(LIGHT);
}
/** @brief 他の2つの要素の間にDASHEDスタイルで垂直または水平の区切り線を描画します。
@ingroup dom
@see separator
@see separatorLight
@see separatorDashed
@see separatorDouble
@see separatorHeavy
@see separatorEmpty
@see separatorRounded
@see separatorStyled
@see separatorCharacter
2つの要素間に視覚的な区切りを追加します。
### Example

cpp // 関数として \'border\' を使用... Element document = vbox({ text("up"), separatorDashed(), text("down"), });

Definition at line 208 of file src/ftxui/dom/separator.cpp.

◆ separatorDouble()

Element separatorDouble ( )

他の2つの要素の間にHEAVYスタイルで垂直または水平の区切り線を描画します。

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

2つの要素間に視覚的な区切りを追加します。

Example

// 関数として \'border\' を使用...
Element document = vbox({
text("up"),
separatorHeavy(),
text("down"),
}); */
Element separatorHeavy() {
return std::make_shared<SeparatorAuto>(HEAVY);
}
/** @brief 他の2つの要素の間にDOUBLEスタイルで垂直または水平の区切り線を描画します。
@ingroup dom
@see separator
@see separatorLight
@see separatorDashed
@see separatorDouble
@see separatorHeavy
@see separatorEmpty
@see separatorRounded
@see separatorStyled
@see separatorCharacter
2つの要素間に視覚的な区切りを追加します。
### Example
@ HEAVY
Definition elements.hpp:38

cpp // 関数として \'border\' を使用... Element document = vbox({ text("up"), separatorDouble(), text("down"), });

Definition at line 262 of file src/ftxui/dom/separator.cpp.

◆ separatorEmpty()

Element separatorEmpty ( )

他の2つの要素の間にEMPTYスタイルで垂直または水平の区切り線を描画します。

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

2つの要素間に視覚的な区切りを追加します。

Example

// 関数として \'border\' を使用...
Element document = vbox({
text("up"),
text("down"),
});
Element separatorEmpty()
他の2つの要素の間にEMPTYスタイルで垂直または水平の区切り線を描画します。

Output

up
down

Definition at line 298 of file src/ftxui/dom/separator.cpp.

◆ size()

Decorator size ( WidthOrHeight direction,
Constraint constraint,
int value )

要素のサイズに制約を適用する。

Parameters
direction要素のWIDTHまたはHEIGHTのどちらを制約するか。
constraint制約の種類。
value値。

Definition at line 88 of file src/ftxui/dom/size.cpp.

◆ spinner()

Element spinner ( int charset_index,
size_t image_index )

時間やイベントの効果を表現するのに便利です。これはアスキーアートの「ビデオ」を表示します。

Parameters
charset_index「ビデオ」の種類。
image_indexビデオの「フレーム」。これは「ステップ」ごとに増やす必要があります。

Definition at line 280 of file src/ftxui/dom/spinner.cpp.

◆ strikethrough()

Element strikethrough ( Element child)

テキストに打ち消し線を適用します。

Definition at line 17 of file strikethrough.cpp.

◆ text() [1/2]

Element text ( std::string_view text)

UTF8エンコードされたユニコードテキストを表示します。

See also
ftxui::to_wstring

例

Element document = text("Hello world!");

出力

Hello world!

Definition at line 218 of file src/ftxui/dom/text.cpp.

◆ text() [2/2]

Element text ( std::wstring_view text)

ユニコードテキストを表示します。

See also
ftxui::to_wstring

例

Element document = text(L"Hello world!");

出力

Hello world!

Definition at line 237 of file src/ftxui/dom/text.cpp.

◆ vtext() [1/2]

Element vtext ( std::string_view text)

ユニコードテキストを垂直に表示します。

See also
ftxui::to_wstring

例

Element document = vtext("Hello world!");
Element vtext(std::string_view text)
ユニコードテキストを垂直に表示します。

出力

H
e
l
l
o
w
o
r
l
d
!

Definition at line 267 of file src/ftxui/dom/text.cpp.

◆ vtext() [2/2]

Element vtext ( std::wstring_view text)

ユニコードテキストを垂直に表示します。

See also
ftxui::to_wstring

例

Element document = vtext(L"Hello world!");

出力

H
e
l
l
o
w
o
r
l
d
!

Definition at line 297 of file src/ftxui/dom/text.cpp.

◆ underlined()

Element underlined ( Element child)

指定された要素に下線を追加します。

Definition at line 33 of file underlined.cpp.

◆ underlinedDouble()

Element underlinedDouble ( Element child)

テキストに二重下線を適用します。

Definition at line 17 of file underlined_double.cpp.

◆ nothing()

Element nothing ( Element element)

何も行わないデコレーションです。

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

◆ operator|() [1/3]

Decorator operator| ( Decorator a,
Decorator b )

2つのデコレーターを1つに合成します。

例

auto decorator = bold | blink;
Element blink(Element child)
描画されたテキストは、可視と非可視の間で交互に切り替わります。
Definition blink.cpp:33

Definition at line 40 of file dom/util.cpp.

◆ operator|() [2/3]

Elements operator| ( Elements elements,
Decorator decorator )

要素のセットから、すべての要素にデコレーターを適用します。

Returns
デコレートされた要素のセット。

Definition at line 48 of file dom/util.cpp.

◆ operator|() [3/3]

Element operator| ( Element element,
Decorator decorator )

要素にデコレーターを適用します。

Returns
デコレートされた要素。

例

これらはどちらも同等です。

bold(text("Hello"));
Element bold(Element child)
より強調したい要素に、太字フォントを使用します。
Definition bold.cpp:33
text("Hello") | bold;

Definition at line 70 of file dom/util.cpp.

◆ operator|=()

Element & operator|= ( Element & e,
Decorator d )

要素にデコレーターを適用します。

Returns
デコレートされた要素。

例

これらはどちらも同等です。

auto element = text("Hello");
const Element & element
Definition node.hpp:94

Definition at line 85 of file dom/util.cpp.

◆ emptyElement()

Element emptyElement ( )

何も描画しない0x0サイズの要素。

Definition at line 140 of file dom/util.cpp.

◆ vbox()

Element vbox ( Elements children)

要素を縦に一つずつ表示するコンテナ。

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

例

text("Up"),
text("Down"),
});

Definition at line 95 of file vbox.cpp.

◆ SetColorSupport()

void SetColorSupport ( Color color)

自動検出が失敗した場合にターミナルの色サポートを上書きします

Definition at line 343 of file terminal.cpp.