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

Detailed Description

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

Classes

struct  Canvas
 Canvasは、描画操作に関連付けられた描画可能なバッファです。 More...
 
struct  FlexboxConfig
 FlexboxConfigは、flexboxコンテナのレイアウトプロパティを定義する構成構造体です。 More...
 
struct  LinearGradient
 線形グラデーションカラー効果の設定を表すクラスです。 More...
 
class  Node
 NodeはDOMツリー内のすべての要素の基底クラスです。 More...
 
struct  Requirement
 Requirementは、ターミナルユーザーインターフェースにおけるNodeのレイアウト要件を定義する構造体です。 More...
 
class  Selection
 ターミナルユーザーインターフェースにおける選択範囲を表します。 More...
 
class  Table
 Tableは、テーブルを描画するためのユーティリティです。 More...
 

Enumerations

enum class  Direction {
  Up = 0 ,
  Down = 1 ,
  Left = 2 ,
  Right = 3
}
 Directionは、東西南北の4つの基本方向を表す列挙型です。 More...
 
enum  BorderStyle {
  LIGHT ,
  DASHED ,
  HEAVY ,
  DOUBLE ,
  ROUNDED ,
  EMPTY
}
 BorderStyleは、ターミナルUIの要素に適用できる様々なボーダースタイルを表す列挙型です。 More...
 

Functions

Element automerge (Element child)
 文字が近くの他の文字と自動的にマージされるようにします。
 
Element blink (Element child)
 描画されたテキストは、可視と非可視の間で交互に切り替わります。
 
Element bold (Element child)
 より強調したい要素に、太字フォントを使用します。
 
Element border (Element child)
 要素の周囲にボーダーを描画します。
 
Decorator borderWith (const Pixel &pixel)
 borderと同じですが、要素の周囲に一定のピクセルを使用します。
 
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 hyperlink (std::string link, Element child)
 ウェブブラウザを使用してレンダリングされた領域をクリック可能にします。 ユーザーがクリックするとリンクが開きます。 これは、限られたターミナルエミュレータでのみサポートされています。 リスト: https://github.com/Alhadis/OSC8-Adoption/
 
Decorator hyperlink (std::string 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 (const std::string &the_text)
 段落を複数行で描画する要素を返します。
 
Element paragraphAlignLeft (const std::string &the_text)
 段落を複数行にわたって左揃えで描画する要素を返します。
 
Element paragraphAlignRight (const std::string &the_text)
 段落を複数行にわたって右揃えで描画する要素を返します。
 
Element paragraphAlignCenter (const std::string &the_text)
 段落を複数行にわたって中央揃えで描画する要素を返します。
 
Element paragraphAlignJustify (const std::string &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 text)
 UTF8エンコードされたユニコードテキストを表示します。
 
Element text (std::wstring text)
 ユニコードテキストを表示します。
 
Element vtext (std::string text)
 ユニコードテキストを垂直に表示します。
 
Element vtext (std::wstring 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)
 要素にデコレーターを適用します。
 
Elementoperator|= (Element &e, Decorator d)
 要素にデコレーターを適用します。
 
Element emptyElement ()
 
Element vbox (Elements children)
 要素を縦に一つずつ表示するコンテナ。
 
void SetColorSupport (Color color)
 自動検出が失敗した場合にターミナルの色サポートを上書きします
 

Class Documentation

◆ ftxui::Canvas

struct ftxui::Canvas

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

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

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

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

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

Examples
examples/component/canvas_animated.cpp, and examples/dom/canvas.cpp.

Definition at line 36 of file canvas.hpp.

Public Types

using Stylizer = std::function<void(Pixel&)>
 

Public Member Functions

 Canvas ()=default
 
 Canvas (int width, int height)
 コンストラクタ。
 
int width () const
 
int height () const
 
Pixel GetPixel (int x, int y) const
 セルの内容を取得します。
 
void DrawPointOn (int x, int y)
 点字ドットを描画します。
 
void DrawPointOff (int x, int y)
 点字ドットを消去します。
 
void DrawPointToggle (int x, int y)
 点字ドットを切り替えます。塗りつぶされたものは消去され、それ以外は描画されます。
 
void DrawPoint (int x, int y, bool value)
 点字ドットを描画します。
 
void DrawPoint (int x, int y, bool value, const Stylizer &s)
 点字ドットを描画します。
 
void DrawPoint (int x, int y, bool value, const Color &color)
 点字ドットを描画します。
 
void DrawPointLine (int x1, int y1, int x2, int y2)
 点字ドットで線を描画します。
 
void DrawPointLine (int x1, int y1, int x2, int y2, const Stylizer &s)
 点字ドットで線を描画します。
 
void DrawPointLine (int x1, int y1, int x2, int y2, const Color &color)
 点字ドットで線を描画します。
 
void DrawPointCircle (int x, int y, int radius)
 点字ドットで円を描画します。
 
void DrawPointCircle (int x, int y, int radius, const Stylizer &s)
 点字ドットで円を描画します。
 
void DrawPointCircle (int x, int y, int radius, const Color &color)
 点字ドットで円を描画します。
 
void DrawPointCircleFilled (int x, int y, int radius)
 点字ドットで塗りつぶされた円を描画します。
 
void DrawPointCircleFilled (int x, int y, int radius, const Stylizer &s)
 点字ドットで塗りつぶされた円を描画します。
 
void DrawPointCircleFilled (int x, int y, int radius, const Color &color)
 点字ドットで塗りつぶされた円を描画します。
 
void DrawPointEllipse (int x, int y, int r1, int r2)
 点字ドットで楕円を描画します。
 
void DrawPointEllipse (int x, int y, int r1, int r2, const Color &color)
 点字ドットで楕円を描画します。
 
void DrawPointEllipse (int x, int y, int r1, int r2, const Stylizer &s)
 点字ドットで楕円を描画します。
 
void DrawPointEllipseFilled (int x, int y, int r1, int r2)
 点字ドットで塗りつぶされた楕円を描画します。
 
void DrawPointEllipseFilled (int x, int y, int r1, int r2, const Color &color)
 点字ドットで塗りつぶされた楕円を描画します。
 
void DrawPointEllipseFilled (int x, int y, int r1, int r2, const Stylizer &s)
 点字ドットで塗りつぶされた楕円を描画します。
 
void DrawBlockOff (int x, int y)
 ブロックを消去します。
 
void DrawBlockToggle (int x, int y)
 ブロックを切り替えます。塗りつぶされている場合は消去され、空の場合は塗りつぶされます。
 
void DrawBlock (int x, int y, bool value)
 ブロックを描画します。
 
void DrawBlock (int x, int y, bool value, const Stylizer &s)
 ブロックを描画します。
 
void DrawBlock (int x, int y, bool value, const Color &color)
 ブロックを描画します。
 
void DrawBlockLine (int x1, int y1, int x2, int y2)
 ブロック文字で線を描画します。
 
void DrawBlockLine (int x1, int y1, int x2, int y2, const Stylizer &s)
 ブロック文字で線を描画します。
 
void DrawBlockLine (int x1, int y1, int x2, int y2, const Color &color)
 ブロック文字で線を描画します。
 
void DrawBlockCircle (int x1, int y1, int radius)
 ブロック文字で円を描画します。
 
void DrawBlockCircle (int x1, int y1, int radius, const Stylizer &s)
 ブロック文字で円を描画します。
 
void DrawBlockCircle (int x1, int y1, int radius, const Color &color)
 ブロック文字で円を描画します。
 
void DrawBlockCircleFilled (int x1, int y1, int radius)
 ブロック文字で塗りつぶされた円を描画します。
 
void DrawBlockCircleFilled (int x1, int y1, int radius, const Stylizer &s)
 ブロック文字で塗りつぶされた円を描画します。
 
void DrawBlockCircleFilled (int x1, int y1, int radius, const Color &color)
 ブロック文字で塗りつぶされた円を描画します。
 
void DrawBlockEllipse (int x1, int y1, int r1, int r2)
 ブロック文字で楕円を描画します。
 
void DrawBlockEllipse (int x1, int y1, int r1, int r2, const Stylizer &s)
 ブロック文字で楕円を描画します。
 
void DrawBlockEllipse (int x1, int y1, int r1, int r2, const Color &color)
 ブロック文字で楕円を描画します。
 
void DrawBlockEllipseFilled (int x1, int y1, int r1, int r2)
 ブロック文字で塗りつぶされた楕円を描画します。
 
void DrawBlockEllipseFilled (int x1, int y1, int r1, int r2, const Stylizer &s)
 ブロック文字で塗りつぶされた楕円を描画します。
 
void DrawBlockEllipseFilled (int x1, int y1, int r1, int r2, const Color &color)
 ブロック文字で塗りつぶされた楕円を描画します。
 
void DrawText (int x, int y, const std::string &value, const Color &color)
 テキストを描画します。
 
void DrawText (int x, int y, const std::string &value, const Stylizer &style)
 テキストを描画します。
 
void DrawImage (int x, int y, const Image &)
 定義済み画像を、指定された座標を左上隅として描画します 負の座標を指定して画像を自由に配置できます。 表示される部分のみが描画されます。
 

Member Typedef Documentation

◆ Stylizer

using Stylizer = std::function<void(Pixel&)>

Definition at line 46 of file canvas.hpp.

Constructor & Destructor Documentation

◆ Canvas() [1/2]

Canvas ( )
default

◆ Canvas() [2/2]

Canvas ( int width,
int height )

コンストラクタ。

Parameters
widthキャンバスの幅。セルは2x4の点字ドットです。
heightキャンバスの高さ。セルは2x4の点字ドットです。

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

Member Function Documentation

◆ width()

int width ( ) const
inline

Definition at line 42 of file canvas.hpp.

◆ height()

int height ( ) const
inline

Definition at line 43 of file canvas.hpp.

◆ GetPixel()

Pixel GetPixel ( int x,
int y ) const

セルの内容を取得します。

Parameters
xセルのx座標。
yセルのy座標。

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

◆ DrawPointOn()

void DrawPointOn ( int x,
int y )

点字ドットを描画します。

Parameters
xドットのx座標。
yドットのy座標。

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

◆ DrawPointOff()

void DrawPointOff ( int x,
int y )

点字ドットを消去します。

Parameters
xドットのx座標。
yドットのy座標。

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

◆ DrawPointToggle()

void DrawPointToggle ( int x,
int y )

点字ドットを切り替えます。塗りつぶされたものは消去され、それ以外は描画されます。

Parameters
xドットのx座標。
yドットのy座標。

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

◆ DrawPoint() [1/3]

void DrawPoint ( int x,
int y,
bool value )

点字ドットを描画します。

Parameters
xドットのx座標。
yドットのy座標。
valueドットが塗りつぶされているかどうか。

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

◆ DrawPoint() [2/3]

void DrawPoint ( int x,
int y,
bool value,
const Stylizer & style )

点字ドットを描画します。

Parameters
xドットのx座標。
yドットのy座標。
valueドットが塗りつぶされているかどうか。
styleセルのスタイル。

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

◆ DrawPoint() [3/3]

void DrawPoint ( int x,
int y,
bool value,
const Color & color )

点字ドットを描画します。

Parameters
xドットのx座標。
yドットのy座標。
valueドットが塗りつぶされているかどうか。
colorドットの色。

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

◆ DrawPointLine() [1/3]

void DrawPointLine ( int x1,
int y1,
int x2,
int y2 )

点字ドットで線を描画します。

Parameters
x1最初のドットのx座標。
y1最初のドットのy座標。
x22番目のドットのx座標。
y22番目のドットのy座標。

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

◆ DrawPointLine() [2/3]

void DrawPointLine ( int x1,
int y1,
int x2,
int y2,
const Stylizer & style )

点字ドットで線を描画します。

Parameters
x1最初のドットのx座標。
y1最初のドットのy座標。
x22番目のドットのx座標。
y22番目のドットのy座標。
style線のスタイル。

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

◆ DrawPointLine() [3/3]

void DrawPointLine ( int x1,
int y1,
int x2,
int y2,
const Color & color )

点字ドットで線を描画します。

Parameters
x1最初のドットのx座標。
y1最初のドットのy座標。
x22番目のドットのx座標。
y22番目のドットのy座標。
color線の色。

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

◆ DrawPointCircle() [1/3]

void DrawPointCircle ( int x,
int y,
int radius )

点字ドットで円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。

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

◆ DrawPointCircle() [2/3]

void DrawPointCircle ( int x,
int y,
int radius,
const Stylizer & style )

点字ドットで円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。
style円のスタイル。

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

◆ DrawPointCircle() [3/3]

void DrawPointCircle ( int x,
int y,
int radius,
const Color & color )

点字ドットで円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。
color円の色。

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

◆ DrawPointCircleFilled() [1/3]

void DrawPointCircleFilled ( int x,
int y,
int radius )

点字ドットで塗りつぶされた円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。

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

◆ DrawPointCircleFilled() [2/3]

void DrawPointCircleFilled ( int x,
int y,
int radius,
const Stylizer & style )

点字ドットで塗りつぶされた円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。
style円のスタイル。

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

◆ DrawPointCircleFilled() [3/3]

void DrawPointCircleFilled ( int x,
int y,
int radius,
const Color & color )

点字ドットで塗りつぶされた円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。
color円の色。

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

◆ DrawPointEllipse() [1/3]

void DrawPointEllipse ( int x,
int y,
int r1,
int r2 )

点字ドットで楕円を描画します。

Parameters
x楕円の中心のx座標。
y楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。

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

◆ DrawPointEllipse() [2/3]

void DrawPointEllipse ( int x,
int y,
int r1,
int r2,
const Color & color )

点字ドットで楕円を描画します。

Parameters
x楕円の中心のx座標。
y楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。
color楕円の色。

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

◆ DrawPointEllipse() [3/3]

void DrawPointEllipse ( int x1,
int y1,
int r1,
int r2,
const Stylizer & s )

点字ドットで楕円を描画します。

Parameters
x1楕円の中心のx座標。
y1楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。
s楕円のスタイル。

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

◆ DrawPointEllipseFilled() [1/3]

void DrawPointEllipseFilled ( int x1,
int y1,
int r1,
int r2 )

点字ドットで塗りつぶされた楕円を描画します。

Parameters
x1楕円の中心のx座標。
y1楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。

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

◆ DrawPointEllipseFilled() [2/3]

void DrawPointEllipseFilled ( int x1,
int y1,
int r1,
int r2,
const Color & color )

点字ドットで塗りつぶされた楕円を描画します。

Parameters
x1楕円の中心のx座標。
y1楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。
color楕円の色。

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

◆ DrawPointEllipseFilled() [3/3]

void DrawPointEllipseFilled ( int x1,
int y1,
int r1,
int r2,
const Stylizer & s )

点字ドットで塗りつぶされた楕円を描画します。

Parameters
x1楕円の中心のx座標。
y1楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。
s楕円のスタイル。

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

◆ DrawBlockOff()

void DrawBlockOff ( int x,
int y )

ブロックを消去します。

Parameters
xブロックのx座標。
yブロックのy座標。

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

◆ DrawBlockToggle()

void DrawBlockToggle ( int x,
int y )

ブロックを切り替えます。塗りつぶされている場合は消去され、空の場合は塗りつぶされます。

Parameters
xブロックのx座標。
yブロックのy座標。

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

◆ DrawBlock() [1/3]

void DrawBlock ( int x,
int y,
bool value )

ブロックを描画します。

Parameters
xブロックのx座標。
yブロックのy座標。
valueブロックが塗りつぶされているかどうか。

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

◆ DrawBlock() [2/3]

void DrawBlock ( int x,
int y,
bool value,
const Stylizer & style )

ブロックを描画します。

Parameters
xブロックのx座標。
yブロックのy座標。
valueブロックが塗りつぶされているかどうか。
styleブロックのスタイル。

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

◆ DrawBlock() [3/3]

void DrawBlock ( int x,
int y,
bool value,
const Color & color )

ブロックを描画します。

Parameters
xブロックのx座標。
yブロックのy座標。
valueブロックが塗りつぶされているかどうか。
colorブロックの色。

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

◆ DrawBlockLine() [1/3]

void DrawBlockLine ( int x1,
int y1,
int x2,
int y2 )

ブロック文字で線を描画します。

Parameters
x1線の最初の点のx座標。
y1線の最初の点のy座標。
x2線の2番目の点のx座標。
y2線の2番目の点のy座標。

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

◆ DrawBlockLine() [2/3]

void DrawBlockLine ( int x1,
int y1,
int x2,
int y2,
const Stylizer & style )

ブロック文字で線を描画します。

Parameters
x1線の最初の点のx座標。
y1線の最初の点のy座標。
x2線の2番目の点のx座標。
y2線の2番目の点のy座標。
style線のスタイル。

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

◆ DrawBlockLine() [3/3]

void DrawBlockLine ( int x1,
int y1,
int x2,
int y2,
const Color & color )

ブロック文字で線を描画します。

Parameters
x1線の最初の点のx座標。
y1線の最初の点のy座標。
x2線の2番目の点のx座標。
y2線の2番目の点のy座標。
color線の色。

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

◆ DrawBlockCircle() [1/3]

void DrawBlockCircle ( int x,
int y,
int radius )

ブロック文字で円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。

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

◆ DrawBlockCircle() [2/3]

void DrawBlockCircle ( int x,
int y,
int radius,
const Stylizer & style )

ブロック文字で円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。
style円のスタイル。

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

◆ DrawBlockCircle() [3/3]

void DrawBlockCircle ( int x,
int y,
int radius,
const Color & color )

ブロック文字で円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。
color円の色。

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

◆ DrawBlockCircleFilled() [1/3]

void DrawBlockCircleFilled ( int x,
int y,
int radius )

ブロック文字で塗りつぶされた円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。

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

◆ DrawBlockCircleFilled() [2/3]

void DrawBlockCircleFilled ( int x,
int y,
int radius,
const Stylizer & s )

ブロック文字で塗りつぶされた円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。
s円のスタイル。

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

◆ DrawBlockCircleFilled() [3/3]

void DrawBlockCircleFilled ( int x,
int y,
int radius,
const Color & color )

ブロック文字で塗りつぶされた円を描画します。

Parameters
x円の中心のx座標。
y円の中心のy座標。
radius円の半径。
color円の色。

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

◆ DrawBlockEllipse() [1/3]

void DrawBlockEllipse ( int x,
int y,
int r1,
int r2 )

ブロック文字で楕円を描画します。

Parameters
x楕円の中心のx座標。
y楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。

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

◆ DrawBlockEllipse() [2/3]

void DrawBlockEllipse ( int x1,
int y1,
int r1,
int r2,
const Stylizer & s )

ブロック文字で楕円を描画します。

Parameters
x1楕円の中心のx座標。
y1楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。
s楕円のスタイル。

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

◆ DrawBlockEllipse() [3/3]

void DrawBlockEllipse ( int x,
int y,
int r1,
int r2,
const Color & color )

ブロック文字で楕円を描画します。

Parameters
x楕円の中心のx座標。
y楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。
color楕円の色。

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

◆ DrawBlockEllipseFilled() [1/3]

void DrawBlockEllipseFilled ( int x,
int y,
int r1,
int r2 )

ブロック文字で塗りつぶされた楕円を描画します。

Parameters
x楕円の中心のx座標。
y楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。

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

◆ DrawBlockEllipseFilled() [2/3]

void DrawBlockEllipseFilled ( int x1,
int y1,
int r1,
int r2,
const Stylizer & s )

ブロック文字で塗りつぶされた楕円を描画します。

Parameters
x1楕円の中心のx座標。
y1楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。
s楕円のスタイル。

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

◆ DrawBlockEllipseFilled() [3/3]

void DrawBlockEllipseFilled ( int x,
int y,
int r1,
int r2,
const Color & color )

ブロック文字で塗りつぶされた楕円を描画します。

Parameters
x楕円の中心のx座標。
y楕円の中心のy座標。
r1x軸に沿った楕円の半径。
r2y軸に沿った楕円の半径。
color楕円の色。

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

◆ DrawText() [1/2]

void DrawText ( int x,
int y,
const std::string & value,
const Color & color )

テキストを描画します。

Parameters
xテキストのx座標。
yテキストのy座標。
value描画するテキスト。
colorテキストの色。

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

◆ DrawText() [2/2]

void DrawText ( int x,
int y,
const std::string & value,
const Stylizer & style )

テキストを描画します。

Parameters
xテキストのx座標。
yテキストのy座標。
value描画するテキスト。
styleテキストのスタイル。

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

◆ DrawImage()

void DrawImage ( int x,
int y,
const Image & image )

定義済み画像を、指定された座標を左上隅として描画します 負の座標を指定して画像を自由に配置できます。 表示される部分のみが描画されます。

Parameters
x画像の左上隅に対応するx座標。
y画像の左上隅に対応するy座標。
image描画する画像。

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

◆ ftxui::FlexboxConfig

struct ftxui::FlexboxConfig

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

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

Examples
examples/component/flexbox_gallery.cpp, and examples/component/homescreen.cpp.

Definition at line 24 of file flexbox_config.hpp.

Public Types

enum class  Direction {
  Row ,
  RowInversed ,
  Column ,
  ColumnInversed
}
 
enum class  Wrap {
  NoWrap ,
  Wrap ,
  WrapInversed
}
 
enum class  JustifyContent {
  FlexStart ,
  FlexEnd ,
  Center ,
  Stretch ,
  SpaceBetween ,
  SpaceAround ,
  SpaceEvenly
}
 
enum class  AlignItems {
  FlexStart ,
  FlexEnd ,
  Center ,
  Stretch
}
 
enum class  AlignContent {
  FlexStart ,
  FlexEnd ,
  Center ,
  Stretch ,
  SpaceBetween ,
  SpaceAround ,
  SpaceEvenly
}
 

Public Member Functions

FlexboxConfigSet (FlexboxConfig::Direction)
 フレックスボックスの方向を設定します。
 
FlexboxConfigSet (FlexboxConfig::Wrap)
 フレックスボックスの折り返しを設定します。
 
FlexboxConfigSet (FlexboxConfig::JustifyContent)
 フレックスボックスの justify content を設定します。
 
FlexboxConfigSet (FlexboxConfig::AlignItems)
 フレックスボックスの align items を設定します。
 
FlexboxConfigSet (FlexboxConfig::AlignContent)
 フレックスボックスの align content を設定します。
 
FlexboxConfigSetGap (int gap_x, int gap_y)
 フレックスボックスのギャップを設定します。
 

Public Attributes

Direction direction = Direction::Row
 
Wrap wrap = Wrap::Wrap
 
JustifyContent justify_content = JustifyContent::FlexStart
 
AlignItems align_items = AlignItems::FlexStart
 
AlignContent align_content = AlignContent::FlexStart
 
int gap_x = 0
 
int gap_y = 0
 

Member Enumeration Documentation

◆ Direction

enum class Direction
strong

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

Enumerator
Row 

フレックスアイテムは行に配置されます。

RowInversed 

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

Column 

フレックスアイテムは列に配置されます。

ColumnInversed 

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

Definition at line 28 of file flexbox_config.hpp.

◆ Wrap

enum class Wrap
strong

デフォルトでは、フレックスアイテムはすべて1行に収まろうとします。このプロパティを使用すると、 必要に応じてアイテムを折り返すことができます。

Enumerator
NoWrap 

フレックスアイテムはすべて1行に収まろうとします。

Wrap 

フレックスアイテムは複数行に折り返されます。

WrapInversed 

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

Definition at line 39 of file flexbox_config.hpp.

◆ JustifyContent

enum class JustifyContent
strong

これは主軸に沿った配置を定義します。 これは、行内のすべてのフレックスアイテムが柔軟でない場合、または柔軟であっても最大サイズに達した場合に 余分な空きスペースをどのように分配するかを決定します。 また、アイテムが一行に収まらない場合の配置にも影響を与えます。

Enumerator
FlexStart 

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

FlexEnd 

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

Center 

アイテムは行の中央に配置されます。

Stretch 

アイテムは行を埋めるように引き伸ばされます。

SpaceBetween 

アイテムは行に沿って均等に分配されます。最初のアイテムは開始行に、最後のアイテムは終了行に配置されます。

SpaceAround 

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

SpaceEvenly 

アイテムは、任意の2つのアイテム間のスペース(および端までのスペース)が均等になるように分配されます。

Definition at line 51 of file flexbox_config.hpp.

◆ AlignItems

enum class AlignItems
strong

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

Enumerator
FlexStart 

アイテムは交差軸の開始位置に配置されます。

FlexEnd 

アイテムは交差軸の終了位置に配置されます。

Center 

アイテムは交差軸の中央に配置されます。

Stretch 

アイテムは交差軸を埋めるように引き伸ばされます。

Definition at line 74 of file flexbox_config.hpp.

◆ AlignContent

enum class AlignContent
strong
Enumerator
FlexStart 

アイテムは交差軸の開始位置に配置されます。

FlexEnd 

アイテムは交差軸の終了位置に配置されます。

Center 

アイテムは交差軸の中央に配置されます。

Stretch 

アイテムは交差軸を埋めるように引き伸ばされます。

SpaceBetween 

アイテムは交差軸に沿って均等に分配されます。

SpaceAround 

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

SpaceEvenly 

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

Definition at line 84 of file flexbox_config.hpp.

Member Function Documentation

◆ Set() [1/5]

フレックスボックスの方向を設定します。

Examples
examples/component/flexbox_gallery.cpp.

Definition at line 8 of file flexbox_config.cpp.

◆ Set() [2/5]

フレックスボックスの折り返しを設定します。

Definition at line 14 of file flexbox_config.cpp.

◆ Set() [3/5]

フレックスボックスの justify content を設定します。

Definition at line 20 of file flexbox_config.cpp.

◆ Set() [4/5]

フレックスボックスの align items を設定します。

Definition at line 26 of file flexbox_config.cpp.

◆ Set() [5/5]

フレックスボックスの align content を設定します。

Definition at line 32 of file flexbox_config.cpp.

◆ SetGap()

FlexboxConfig & SetGap ( int gap_x,
int gap_y )

フレックスボックスのギャップを設定します。

Examples
examples/component/homescreen.cpp.

Definition at line 38 of file flexbox_config.cpp.

Member Data Documentation

◆ direction

Examples
examples/component/flexbox_gallery.cpp.

Definition at line 35 of file flexbox_config.hpp.

◆ wrap

Wrap wrap = Wrap::Wrap
Examples
examples/component/flexbox_gallery.cpp.

Definition at line 45 of file flexbox_config.hpp.

◆ justify_content

◆ align_items

◆ align_content

◆ gap_x

int gap_x = 0

Definition at line 97 of file flexbox_config.hpp.

◆ gap_y

int gap_y = 0

Definition at line 98 of file flexbox_config.hpp.

◆ ftxui::LinearGradient

struct ftxui::LinearGradient

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

例:

.Angle(45)
.Stop(Color::Red, 0.0)
.Stop(Color::Green, 0.5)
.Stop(Color::Blue, 1.0);
LinearGradient()
「空の」グラデーションを構築します。これはしばしば LinearGradient::Angle() および LinearGradient::Stop() の呼び出しが続きます。 例:

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

Examples
examples/component/input_style.cpp, examples/component/linear_gradient_gallery.cpp, examples/dom/linear_gradient.cpp, and examples/dom/style_color.cpp.

Definition at line 31 of file linear_gradient.hpp.

Public Member Functions

 LinearGradient ()
 「空の」グラデーションを構築します。これはしばしば LinearGradient::Angle() および LinearGradient::Stop() の呼び出しが続きます。 例:
 
 LinearGradient (Color begin, Color end)
 2色でグラデーションを構築します。
 
 LinearGradient (float angle, Color begin, Color end)
 2色と角度でグラデーションを構築します。
 
LinearGradientAngle (float angle)
 グラデーションの角度を設定します。
 
LinearGradientStop (Color color, float position)
 グラデーションにカラーストップを追加します。
 
LinearGradientStop (Color color)
 グラデーションにカラーストップを追加します。
 

Public Attributes

float angle = 0.f
 
std::vector< Stopstops
 

Constructor & Destructor Documentation

◆ LinearGradient() [1/3]

LinearGradient ( )
default

「空の」グラデーションを構築します。これはしばしば LinearGradient::Angle() および LinearGradient::Stop() の呼び出しが続きます。 例:

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

◆ LinearGradient() [2/3]

LinearGradient ( Color begin,
Color end )

2色でグラデーションを構築します。

Parameters
beginグラデーションの開始色。
endグラデーションの終了色。

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

◆ LinearGradient() [3/3]

LinearGradient ( float a,
Color begin,
Color end )

2色と角度でグラデーションを構築します。

Parameters
aグラデーションの角度。
beginグラデーションの開始色。
endグラデーションの終了色。

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

Member Function Documentation

◆ Angle()

LinearGradient & Angle ( float a)

グラデーションの角度を設定します。

Parameters
aグラデーションの角度。
Returns
グラデーション。

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

◆ Stop() [1/2]

LinearGradient & Stop ( Color c,
float p )

グラデーションにカラーストップを追加します。

Parameters
cストップの色。
pストップの位置。

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

◆ Stop() [2/2]

LinearGradient & Stop ( Color c)

グラデーションにカラーストップを追加します。

Parameters
cストップの色。
Returns
グラデーション。
Note
ストップの位置は近くのストップから補間されます。

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

Member Data Documentation

◆ angle

float angle = 0.f

Definition at line 32 of file linear_gradient.hpp.

◆ stops

std::vector<Stop> stops

Definition at line 42 of file linear_gradient.hpp.

◆ ftxui::Node

class ftxui::Node

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

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

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

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

Definition at line 36 of file node.hpp.

+ Inheritance diagram for Node:

Public Member Functions

 Node ()
 
 Node (Elements children)
 
 Node (const Node &)=delete
 
 Node (const Node &&)=delete
 
Nodeoperator= (const Node &)=delete
 
Nodeoperator= (const Node &&)=delete
 
virtual ~Node ()
 
virtual void ComputeRequirement ()
 要素が必要とするスペースを計算します。
 
Requirement requirement ()
 
virtual void SetBox (Box box)
 描画のために要素に位置と次元を割り当てます。
 
virtual void Select (Selection &selection)
 要素の選択を計算します。
 
virtual void Render (Screen &screen)
 要素をftxui::Screenに表示します。
 
virtual std::string GetSelectedContent (Selection &selection)
 
virtual void Check (Status *status)
 

Protected Attributes

Elements children_
 
Requirement requirement_
 
Box box_
 

Constructor & Destructor Documentation

◆ Node() [1/4]

Node ( )
default

◆ Node() [2/4]

Node ( Elements children)
explicit

Definition at line 16 of file node.cpp.

◆ Node() [3/4]

Node ( const Node & )
delete

◆ Node() [4/4]

Node ( const Node && )
delete

◆ ~Node()

~Node ( )
virtualdefault

Member Function Documentation

◆ operator=() [1/2]

Node & operator= ( const Node & )
delete

◆ operator=() [2/2]

Node & operator= ( const Node && )
delete

◆ ComputeRequirement()

void ComputeRequirement ( )
virtual

要素が必要とするスペースを計算します。

Reimplemented in NodeDecorator.

Definition at line 20 of file node.cpp.

◆ requirement()

Requirement requirement ( )
inline

Definition at line 50 of file node.hpp.

◆ SetBox()

void SetBox ( Box box)
virtual

描画のために要素に位置と次元を割り当てます。

Reimplemented in NodeDecorator.

Definition at line 41 of file node.cpp.

◆ Select()

void Select ( Selection & selection)
virtual

要素の選択を計算します。

Definition at line 46 of file node.cpp.

◆ Render()

void Render ( Screen & screen)
virtual

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

Definition at line 59 of file node.cpp.

◆ GetSelectedContent()

std::string GetSelectedContent ( Selection & selection)
virtual

Definition at line 72 of file node.cpp.

◆ Check()

void Check ( Status * status)
virtual

Definition at line 65 of file node.cpp.

Member Data Documentation

◆ children_

Elements children_
protected

Definition at line 76 of file node.hpp.

◆ requirement_

Requirement requirement_
protected

Definition at line 77 of file node.hpp.

◆ box_

Box box_
protected

Definition at line 78 of file node.hpp.

◆ ftxui::Requirement

struct ftxui::Requirement

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

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

Definition at line 17 of file requirement.hpp.

Public Attributes

int min_x = 0
 
int min_y = 0
 
int flex_grow_x = 0
 
int flex_grow_y = 0
 
int flex_shrink_x = 0
 
int flex_shrink_y = 0
 
Focused focused
 

Member Data Documentation

◆ min_x

int min_x = 0

Definition at line 19 of file requirement.hpp.

◆ min_y

int min_y = 0

Definition at line 20 of file requirement.hpp.

◆ flex_grow_x

int flex_grow_x = 0

Definition at line 23 of file requirement.hpp.

◆ flex_grow_y

int flex_grow_y = 0

Definition at line 24 of file requirement.hpp.

◆ flex_shrink_x

int flex_shrink_x = 0

Definition at line 25 of file requirement.hpp.

◆ flex_shrink_y

int flex_shrink_y = 0

Definition at line 26 of file requirement.hpp.

◆ focused

Focused focused

Definition at line 50 of file requirement.hpp.

◆ ftxui::Selection

class ftxui::Selection

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

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

Definition at line 20 of file selection.hpp.

Public Member Functions

 Selection ()
 空の選択を作成します。
 
 Selection (int start_x, int start_y, int end_x, int end_y)
 選択を作成します。
 
const BoxGetBox () const
 選択範囲のボックスを取得します。
 
Selection SaturateHorizontal (Box box)
 選択範囲をボックス内に収めます。 これはhboxによって、選択範囲をその子に伝播するために呼び出されます。
 
Selection SaturateVertical (Box box)
 選択範囲をボックス内に収めます。 これはvboxによって、選択範囲をその子に伝播するために呼び出されます。
 
bool IsEmpty () const
 
void AddPart (const std::string &part, int y, int left, int right)
 
std::string GetParts ()
 

Constructor & Destructor Documentation

◆ Selection() [1/2]

Selection ( )
default

空の選択を作成します。

◆ Selection() [2/2]

Selection ( int start_x,
int start_y,
int end_x,
int end_y )

選択を作成します。

Parameters
start_x選択範囲の開始X座標。
start_y選択範囲の開始Y座標。
end_x選択範囲の終了X座標。
end_y選択範囲の終了Y座標。

Definition at line 34 of file src/ftxui/dom/selection.cpp.

Member Function Documentation

◆ GetBox()

const Box & GetBox ( ) const

選択範囲のボックスを取得します。

Returns
選択範囲のボックス。

Definition at line 67 of file src/ftxui/dom/selection.cpp.

◆ SaturateHorizontal()

Selection SaturateHorizontal ( Box box)

選択範囲をボックス内に収めます。 これはhboxによって、選択範囲をその子に伝播するために呼び出されます。

Parameters
box選択範囲を収めるボックス。
Returns
収められた選択範囲。

Definition at line 75 of file src/ftxui/dom/selection.cpp.

◆ SaturateVertical()

Selection SaturateVertical ( Box box)

選択範囲をボックス内に収めます。 これはvboxによって、選択範囲をその子に伝播するために呼び出されます。

Parameters
box選択範囲を収めるボックス。
Returns
収められた選択範囲。

Definition at line 113 of file src/ftxui/dom/selection.cpp.

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Definition at line 29 of file selection.hpp.

◆ AddPart()

void AddPart ( const std::string & part,
int y,
int left,
int right )

Definition at line 146 of file src/ftxui/dom/selection.cpp.

◆ GetParts()

std::string GetParts ( )
inline

Definition at line 32 of file selection.hpp.

◆ ftxui::Table

class ftxui::Table

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

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();
Table()
空のテーブルを作成します。
@ DOUBLE
Definition elements.hpp:35
@ LIGHT
Definition elements.hpp:32
Examples
examples/dom/table.cpp.

Definition at line 35 of file table.hpp.

Public Member Functions

 Table ()
 空のテーブルを作成します。
 
 Table (std::vector< std::vector< std::string > >)
 文字列のベクターのベクターからテーブルを作成します。
 
 Table (std::vector< std::vector< Element > >)
 Element のベクターのベクターからテーブルを作成します。
 
 Table (std::initializer_list< std::vector< std::string > > init)
 
TableSelection SelectAll ()
 テーブル全体を選択します。
 
TableSelection SelectCell (int column, int row)
 テーブルのセルを選択します。
 
TableSelection SelectRow (int row_index)
 テーブルの行を選択します。
 
TableSelection SelectRows (int row_min, int row_max)
 テーブルの行の範囲を選択します。
 
TableSelection SelectColumn (int column_index)
 テーブルの列を選択します。
 
TableSelection SelectColumns (int column_min, int column_max)
 テーブルの列の範囲を選択します。
 
TableSelection SelectRectangle (int column_min, int column_max, int row_min, int row_max)
 テーブルの矩形を選択します。
 
Element Render ()
 テーブルをレンダリングします。
 

Constructor & Destructor Documentation

◆ Table() [1/4]

Table ( )

空のテーブルを作成します。

Definition at line 46 of file src/ftxui/dom/table.cpp.

◆ Table() [2/4]

Table ( std::vector< std::vector< std::string > > input)
explicit

文字列のベクターのベクターからテーブルを作成します。

Parameters
input入力データ。

Definition at line 52 of file src/ftxui/dom/table.cpp.

◆ Table() [3/4]

Table ( std::vector< std::vector< Element > > input)
explicit

Element のベクターのベクターからテーブルを作成します。

Parameters
input入力要素。

Definition at line 68 of file src/ftxui/dom/table.cpp.

◆ Table() [4/4]

Table ( std::initializer_list< std::vector< std::string > > init)

Definition at line 74 of file src/ftxui/dom/table.cpp.

Member Function Documentation

◆ SelectAll()

TableSelection SelectAll ( )

テーブル全体を選択します。

Examples
examples/dom/table.cpp.

Definition at line 199 of file src/ftxui/dom/table.cpp.

◆ SelectCell()

TableSelection SelectCell ( int column,
int row )

テーブルのセルを選択します。

Parameters
column選択するセルの列。
row選択するセルの行。
Note
負のインデックスを使用して末尾から選択できます。

Definition at line 168 of file src/ftxui/dom/table.cpp.

◆ SelectRow()

TableSelection SelectRow ( int index)

テーブルの行を選択します。

Parameters
index選択する行のインデックス。
Note
負のインデックスを使用して末尾から選択できます。

Definition at line 137 of file src/ftxui/dom/table.cpp.

◆ SelectRows()

TableSelection SelectRows ( int row_min,
int row_max )

テーブルの行の範囲を選択します。

Parameters
row_min選択する最初の行。
row_max選択する最後の行。
Note
負のインデックスを使用して末尾から選択できます。

Definition at line 145 of file src/ftxui/dom/table.cpp.

◆ SelectColumn()

TableSelection SelectColumn ( int index)

テーブルの列を選択します。

Parameters
index選択する列のインデックス。
Note
負のインデックスを使用して末尾から選択できます。

Definition at line 152 of file src/ftxui/dom/table.cpp.

◆ SelectColumns()

TableSelection SelectColumns ( int column_min,
int column_max )

テーブルの列の範囲を選択します。

Parameters
column_min選択する最初の列。
column_max選択する最後の列。
Note
負のインデックスを使用して末尾から選択できます。

Definition at line 160 of file src/ftxui/dom/table.cpp.

◆ SelectRectangle()

TableSelection SelectRectangle ( int column_min,
int column_max,
int row_min,
int row_max )

テーブルの矩形を選択します。

Parameters
column_min選択する最初の列。
column_max選択する最後の列。
row_min選択する最初の行。
row_max選択する最後の行。
Note
負のインデックスを使用して末尾から選択できます。

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

◆ Render()

Element Render ( )

テーブルをレンダリングします。

Returns
レンダリングされたテーブル。これは描画できる要素です。

Definition at line 211 of file src/ftxui/dom/table.cpp.

Enumeration Type Documentation

◆ Direction

enum class Direction
strong

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

Enumerator
Up 
Down 
Left 
Right 

Definition at line 11 of file direction.hpp.

◆ BorderStyle

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

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

Enumerator
LIGHT 
DASHED 
HEAVY 
DOUBLE 
ROUNDED 
EMPTY 

Definition at line 31 of file elements.hpp.

Function Documentation

◆ automerge()

Element automerge ( Element child)

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

Definition at line 16 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 border(Element child)
要素の周囲にボーダーを描画します。

出力

┌───────────┐
│The element│
└───────────┘
Examples
examples/component/checkbox_in_frame.cpp, examples/component/flexbox_gallery.cpp, examples/component/gallery.cpp, examples/component/input_style.cpp, examples/component/menu_in_frame.cpp, examples/component/menu_style.cpp, examples/component/modal_dialog.cpp, examples/component/print_key_press.cpp, examples/component/radiobox_in_frame.cpp, examples/component/renderer.cpp, examples/component/resizable_split.cpp, examples/dom/canvas.cpp, examples/dom/graph.cpp, examples/dom/gridbox.cpp, examples/dom/html_like.cpp, and examples/dom/spinner.cpp.

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

◆ borderWith()

Decorator borderWith ( const Pixel & pixel)

borderと同じですが、要素の周囲に一定のピクセルを使用します。

See also
border

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

◆ borderStyled() [1/3]

Decorator borderStyled ( BorderStyle style)

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

See also
border
Examples
examples/dom/border_colored.cpp.

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

◆ borderStyled() [2/3]

Decorator borderStyled ( Color foreground_color)

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

See also
border

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

◆ borderStyled() [3/3]

Decorator borderStyled ( BorderStyle style,
Color foreground_color )

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

See also
border

Definition at line 260 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 ╏
┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛
Examples
examples/dom/border_style.cpp.

Definition at line 298 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 │
└──────────────┘
Examples
examples/dom/border_style.cpp.

Definition at line 333 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 ┃
┗━━━━━━━━━━━━━━┛
Examples
examples/dom/border_style.cpp.

Definition at line 368 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 ║
╚══════════════╝
Examples
examples/component/input_style.cpp, examples/component/menu_style.cpp, and examples/dom/border_style.cpp.

Definition at line 403 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 │
╰──────────────╯
Examples
examples/component/input_style.cpp, and examples/dom/border_style.cpp.

Definition at line 438 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
Examples
examples/component/dropdown_custom.cpp, examples/component/input_style.cpp, examples/component/menu_underline_animated_gallery.cpp, and examples/component/with_restored_io.cpp.

Definition at line 473 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"),
ROUNDED
);
Element window(Element title, Element content, BorderStyle border)
要素の周囲にタイトルとボーダーを持つウィンドウを描画します。

出力

┌Title──┐
│content│
└───────┘
Examples
examples/component/flexbox_gallery.cpp, examples/component/homescreen.cpp, examples/component/menu_multiple.cpp, examples/component/resizable_split_clamp.cpp, examples/component/selection.cpp, examples/dom/color_truecolor_RGB.cpp, examples/dom/hflow.cpp, examples/dom/package_manager.cpp, examples/dom/size.cpp, and examples/dom/vflow.cpp.

Definition at line 505 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 text(std::wstring text)
ユニコードテキストを表示します。
Definition text.cpp:160
Decorator color(Color)
前景色を使用して装飾します。
std::shared_ptr< Node > Element
Definition elements.hpp:21

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")),
Decorator bgcolor(Color)
背景色を使用して装飾します。

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 55 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 96 of file flex.cpp.

◆ flex()

Element flex ( Element child)

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

Examples:

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

Output:

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

Definition at line 120 of file flex.cpp.

◆ xflex()

Element xflex ( Element child)

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

Definition at line 126 of file flex.cpp.

◆ yflex()

Element yflex ( Element child)

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

Definition at line 132 of file flex.cpp.

◆ flex_grow()

Element flex_grow ( Element child)

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

Definition at line 138 of file flex.cpp.

◆ xflex_grow()

Element xflex_grow ( Element child)

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

Definition at line 144 of file flex.cpp.

◆ yflex_grow()

Element yflex_grow ( Element child)

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

Definition at line 150 of file flex.cpp.

◆ flex_shrink()

Element flex_shrink ( Element child)

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

Definition at line 156 of file flex.cpp.

◆ xflex_shrink()

Element xflex_shrink ( Element child)

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

Definition at line 162 of file flex.cpp.

◆ yflex_shrink()

Element yflex_shrink ( Element child)

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

Definition at line 168 of file flex.cpp.

◆ notflex()

Element notflex ( Element child)

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

Definition at line 174 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)
要素を「仮想」領域内に表示できるようにします。そのサイズはコンテナよりも大きくすることができます。 この場合、より小さい部分のみが表示されます。フォーカスされた要素を表示するためにビューはスクロール可能...
Definition frame.cpp:117

Definition at line 28 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 65 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 173 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 195 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 217 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 246 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 275 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 297 of file src/ftxui/dom/gauge.cpp.

◆ hyperlink() [1/2]

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

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

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

Element document =
hyperlink("https://github.com/ArthurSonzogni/FTXUI", "link");
Decorator hyperlink(std::string link)
ハイパーリンクを使用して装飾します。 ユーザーがクリックするとリンクが開きます。 これは、限られたターミナルエミュレータでのみサポートされています。 リスト: https://github....
Definition hyperlink.cpp:69

Definition at line 50 of file hyperlink.cpp.

◆ hyperlink() [2/2]

Decorator hyperlink ( std::string link)

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

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

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

Definition at line 69 of file hyperlink.cpp.

◆ inverted()

Element inverted ( Element child)

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

Definition at line 32 of file inverted.cpp.

◆ italic()

Element italic ( Element child)

テキストに斜体を適用します。

Definition at line 16 of file italic.cpp.

◆ color() [3/4]

Element color ( const LinearGradient & gradient,
Element child )

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

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

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

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

◆ bgcolor() [3/4]

Element bgcolor ( const LinearGradient & gradient,
Element child )

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

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

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

◆ color() [4/4]

Decorator color ( const LinearGradient & gradient)

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

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

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

◆ bgcolor() [4/4]

Decorator bgcolor ( const LinearGradient & gradient)

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

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

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

◆ Render() [1/2]

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

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

Definition at line 84 of file node.cpp.

◆ Render() [2/2]

void Render ( Screen & screen,
Node * node )

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

Definition at line 91 of file node.cpp.

◆ paragraph()

Element paragraph ( const std::string & the_text)

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

See also
flexbox.

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

◆ paragraphAlignLeft()

Element paragraphAlignLeft ( const std::string & the_text)

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

See also
flexbox.

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

◆ paragraphAlignRight()

Element paragraphAlignRight ( const std::string & the_text)

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

See also
flexbox.

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

◆ paragraphAlignCenter()

Element paragraphAlignCenter ( const std::string & the_text)

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

See also
flexbox.

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

◆ paragraphAlignJustify()

Element paragraphAlignJustify ( const std::string & the_text)

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

See also
flexbox.

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

◆ vscroll_indicator()

Element vscroll_indicator ( Element child)

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

Definition at line 20 of file scroll_indicator.cpp.

◆ hscroll_indicator()

Element hscroll_indicator ( Element child)

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

Definition at line 75 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"),
text("down"),
}); */
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)
要素を縦に一つずつ表示するコンテナ。
Definition vbox.cpp:94
Element separator()

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

Definition at line 152 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"),
text("down"),
}); */
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
Element separatorLight()

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

Definition at line 206 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"),
text("down"),
}); */
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:34
Element separatorHeavy()

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

Definition at line 260 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 296 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 16 of file strikethrough.cpp.

◆ text() [1/2]

Element text ( std::string text)

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

See also
ftxui::to_wstring

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

出力

Hello world!

Definition at line 141 of file text.cpp.

◆ text() [2/2]

Element text ( std::wstring text)

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

See also
ftxui::to_wstring

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

出力

Hello world!

Definition at line 160 of file text.cpp.

◆ vtext() [1/2]

Element vtext ( std::string text)

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

See also
ftxui::to_wstring

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

出力

H
e
l
l
o
w
o
r
l
d
!

Definition at line 190 of file text.cpp.

◆ vtext() [2/2]

Element vtext ( std::wstring 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 220 of file text.cpp.

◆ underlined()

Element underlined ( Element child)

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

Definition at line 32 of file underlined.cpp.

◆ underlinedDouble()

Element underlinedDouble ( Element child)

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

Definition at line 16 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)
描画されたテキストは、可視と非可視の間で交互に切り替わります。
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)
より強調したい要素に、太字フォントを使用します。
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");
element |= bold;

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 94 of file vbox.cpp.

◆ SetColorSupport()

void SetColorSupport ( Color color)

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

Definition at line 130 of file terminal.cpp.