|
FTXUI 7.0.3
C++ functional terminal UI.
|
請查看 ftxui/dom 模組的 教學。
Enumerations | |
| enum class | Direction : uint8_t { Up = 0 , Down = 1 , Left = 2 , Right = 3 } |
| Direction 是一個列舉,表示四個主要方向。 More... | |
| enum | BorderStyle : uint8_t { LIGHT , DASHED , HEAVY , DOUBLE , ROUNDED , EMPTY } |
| BorderStyle 是一個列舉,表示可以應用於終端機 UI 元素的不同邊框樣式。 More... | |
Functions | |
| struct | FTXUI_EXPORT (DOM) 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) |
將 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) |
| 使渲染區域可點擊並使用網路瀏覽器開啟。 當用戶點擊時,連結將被開啟。 此功能僅在有限的終端模擬器中受支援。 List: https://github.com/Alhadis/OSC8-Adoption/ | |
| Decorator | hyperlink (std::string_view link) |
| 使用超連結裝飾。 當用戶點擊時,連結將被開啟。 此功能僅在有限的終端模擬器中受支援。 List: 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 | separator () |
| 在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorStyled (BorderStyle style) |
| 在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorLight () |
| 使用 LIGHT 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorDashed () |
| 使用 DASHED 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorHeavy () |
| 使用 HEAVY 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorDouble () |
| 使用 DOUBLE 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorEmpty () |
| 使用 EMPTY 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorCharacter (std::string_view value) |
| 在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separator (Cell pixel) |
| 用指定的 pixel 填滿並在兩個元素之間繪製一條分隔線。 | |
| Decorator | size (WidthOrHeight direction, Constraint constraint, int value) |
| 對元素的大小套用限制。 | |
| Element | spinner (int charset_index, size_t image_index) |
| 用於表示時間和/或事件的效果。這將顯示 一個 ASCII 藝術「影片」。 | |
| Element | strikethrough (Element child) |
| 對文字應用刪除線。 | |
| Element | text (std::string_view text) |
| 顯示一段 UTF8 編碼的 Unicode 文字。 | |
| Element | text (std::wstring_view text) |
| 顯示一段 Unicode 文字。 | |
| Element | vtext (std::string_view text) |
| 垂直顯示一段 Unicode 文字。 | |
| Element | vtext (std::wstring_view text) |
| 垂直顯示一段 Unicode 文字。 | |
| Element | underlined (Element child) |
| 為給定元素加上底線。 | |
| Element | underlinedDouble (Element child) |
| 對文字應用雙底線。 | |
| Element | nothing (Element element) |
| 一個什麼都不做的裝飾器。 | |
| Decorator | operator| (Decorator a, Decorator b) |
| 將兩個裝飾器組合為一個。 | |
| 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) |
| 在自動偵測失敗時覆寫終端機顏色支援 | |
|
strong |
| enum BorderStyle : uint8_t |
BorderStyle 是一個列舉,表示可以應用於終端機 UI 元素的不同邊框樣式。
BorderStyle 是一個列舉,表示可以應用於終端機 UI 元素的不同邊框樣式。 它用於定義元素周圍邊框的視覺外觀,例如視窗、框架或分隔符。
| Enumerator | |
|---|---|
| LIGHT | |
| DASHED | |
| HEAVY | |
| DOUBLE | |
| ROUNDED | |
| EMPTY | |
Definition at line 35 of file elements.hpp.
| class FTXUI_EXPORT | ( | DOM | ) |
畫布是與繪圖操作相關聯的可繪製緩衝區。
Table 是一個用於繪製表格的工具。
表示終端機使用者介面中的選取範圍。
Requirement 是一個結構,定義了終端使用者介面中節點的佈局要求。
節點是DOM樹中所有元素的基底類別。
表示線性漸變顏色效果設定的類別。
FlexboxConfig 是一個配置結構,用於定義彈性盒容器的佈局屬性。
畫布是一個可繪製區域,可用於創建複雜的圖形。它支援使用 盲文、塊狀或普通字符繪製點、線條、圓形、橢圓、文本和圖像。
注意:終端包含單元格。一個單元格的單位是:
您需要將 x 座標乘以 2,將 y 座標乘以 4,才能在終端中獲得正確的位置。
它允許您指定彈性項目的方向、是否應該換行、它們在主軸上的對齊方式,以及 它們在交叉軸上的對齊方式。 它還包括彈性項目在主軸和交叉軸之間間距的屬性。 此結構用於配置終端使用者介面中彈性盒容器的佈局行為。
範例:
也有簡寫的建構函式:
它代表文件物件模型 (DOM) 中的單一節點,並提供佈局和渲染的基本結構。 它包含用於計算佈局需求、設定框尺寸、選取內容、渲染到螢幕以及檢查佈局狀態的方法。 它通常包含子元素,這些子元素也是節點的實例。
鼓勵使用者從這個類別派生以建立自訂元素。
內建元素的清單可以在 elements.hpp 檔案中找到。
它指定了完全繪製元素所需的最小尺寸。
Selection 是一個類別,表示終端機使用者介面中選取範圍的兩個端點。
範例
這決定了主軸,也就是彈性項目在彈性容器中 排列的方向。除了換行外,Flexbox 是單方向的 布局概念。可以將彈性項目想成主要以 水平列或垂直欄的方式排列。
< 彈性項目以列的方式排列。
< 彈性項目以列的方式排列,但順序相反。
< 彈性項目以欄的方式排列。
< 彈性項目以欄的方式排列,但順序 相反。
預設情況下,彈性項目都會嘗試放入同一行。你可以透過此屬性 改變此行為,讓項目視需要換行。
< 彈性項目都會嘗試放入同一行。
< 彈性項目會換行到多行。
< 彈性項目會換行到多行,但順序 相反。
這定義了沿主軸的對齊方式。它有助於分配 當一行中所有彈性項目都是不可彈性的,或雖可彈性但已達最大 大小時,剩餘的額外可用空間。它也在項目 超出該行時對對齊方式有一定的控制。
項目對齊到 flexbox 方向的起始處。
項目對齊到 flexbox 方向的結束處。
項目沿著該行置中對齊。
項目被拉伸以填滿該行。
項目在該行中平均分佈;第一個項目在起始
項目在該行中平均分佈,項目周圍留有相等的空間。 注意在視覺上這些空間並不相等,因為所有項目 在兩側都留有相等的空間。第一個項目相對於容器邊緣 只有一個單位的空間,但與下一個項目之間卻有兩個單位的 空間,因為下一個項目也套用了自己的間距。
項目分佈的方式,使任意兩個項目之間(以及與邊緣之間) 的間距都相等。
這定義了彈性項目在當前行上沿交叉軸佈局的預設行為。 將其視為交叉軸(垂直於主軸)的 justify-content 版本。
< 項目放置在交叉軸的起始處。
< 項目放置在交叉軸的結束處。
< 項目沿著交叉軸置中對齊。
< 項目被拉伸以填滿交叉軸。
< 項目放置在交叉軸的起始處。
< 項目放置在交叉軸的結束處。
< 項目沿著交叉軸置中對齊。
< 項目被拉伸以填滿交叉軸。
< 項目在交叉軸上平均分佈。
< 項目平均分佈,每一行周圍留有 相等的空間。
< 項目在交叉軸上平均分佈,項目周圍 留有相等的空間。
一個 stop 是漸層中特定位置上的顏色。 該位置是介於 0.0 與 1.0 之間的值, 0.0 代表漸層的起點, 1.0 代表漸層的終點。
這決定了主軸,也就是彈性項目在彈性容器中 排列的方向。除了換行外,Flexbox 是單方向的 布局概念。可以將彈性項目想成主要以 水平列或垂直欄的方式排列。
< 彈性項目以列的方式排列。
< 彈性項目以列的方式排列,但順序相反。
< 彈性項目以欄的方式排列。
< 彈性項目以欄的方式排列,但順序 相反。
預設情況下,彈性項目都會嘗試放入同一行。你可以透過此屬性 改變此行為,讓項目視需要換行。
< 彈性項目都會嘗試放入同一行。
< 彈性項目會換行到多行。
< 彈性項目會換行到多行,但順序 相反。
這定義了沿主軸的對齊方式。它有助於分配 當一行中所有彈性項目都是不可彈性的,或雖可彈性但已達最大 大小時,剩餘的額外可用空間。它也在項目 超出該行時對對齊方式有一定的控制。
項目對齊到 flexbox 方向的起始處。
項目對齊到 flexbox 方向的結束處。
項目沿著該行置中對齊。
項目被拉伸以填滿該行。
項目在該行中平均分佈;第一個項目在起始
項目在該行中平均分佈,項目周圍留有相等的空間。 注意在視覺上這些空間並不相等,因為所有項目 在兩側都留有相等的空間。第一個項目相對於容器邊緣 只有一個單位的空間,但與下一個項目之間卻有兩個單位的 空間,因為下一個項目也套用了自己的間距。
項目分佈的方式,使任意兩個項目之間(以及與邊緣之間) 的間距都相等。
這定義了彈性項目在當前行上沿交叉軸佈局的預設行為。 將其視為交叉軸(垂直於主軸)的 justify-content 版本。
< 項目放置在交叉軸的起始處。
< 項目放置在交叉軸的結束處。
< 項目沿著交叉軸置中對齊。
< 項目被拉伸以填滿交叉軸。
< 項目放置在交叉軸的起始處。
< 項目放置在交叉軸的結束處。
< 項目沿著交叉軸置中對齊。
< 項目被拉伸以填滿交叉軸。
< 項目在交叉軸上平均分佈。
< 項目平均分佈,每一行周圍留有 相等的空間。
< 項目在交叉軸上平均分佈,項目周圍 留有相等的空間。
一個 stop 是漸層中特定位置上的顏色。 該位置是介於 0.0 與 1.0 之間的值, 0.0 代表漸層的起點, 1.0 代表漸層的終點。
Definition at line 1 of file canvas.hpp.
啟用字符自動與附近其他字符合併。
Definition at line 17 of file automerge.cpp.
在元素周圍繪製邊框。
在元素周圍新增邊框
Definition at line 227 of file src/ftxui/dom/border.cpp.
| Decorator borderWith | ( | const Cell & | pixel | ) |
| Decorator borderStyled | ( | BorderStyle | style | ) |
| Decorator borderStyled | ( | Color | foreground_color | ) |
| Decorator borderStyled | ( | BorderStyle | style, |
| Color | foreground_color ) |
在元素周圍繪製虛線邊框。
在元素周圍新增邊框
Definition at line 300 of file src/ftxui/dom/border.cpp.
在元素周圍繪製細邊框。
在元素周圍新增邊框
Definition at line 335 of file src/ftxui/dom/border.cpp.
在元素周圍繪製粗邊框。
在元素周圍新增邊框
Definition at line 370 of file src/ftxui/dom/border.cpp.
在元素周圍繪製雙線邊框。
在元素周圍新增邊框
Definition at line 405 of file src/ftxui/dom/border.cpp.
在元素周圍繪製圓角邊框。
在元素周圍新增邊框
Definition at line 440 of file src/ftxui/dom/border.cpp.
在元素周圍繪製空邊框。
在元素周圍新增邊框
Definition at line 475 of file src/ftxui/dom/border.cpp.
| Element window | ( | Element | title, |
| Element | content, | ||
| BorderStyle | border ) |
繪製帶有標題和邊框的視窗。
| title | 視窗的標題。 |
| content | 要包裝的元素。 |
| border | 邊框的樣式。預設為 ROUNDED。 |
Definition at line 507 of file src/ftxui/dom/border.cpp.
在繪製 |child| 之前,先清除底下的儲存格。這在 搭配 dbox 使用時很有用。
Definition at line 38 of file clear_under.cpp.
設定元素的前景顏色。
| color | 輸出元素的顏色。 |
| child | 輸入元素。 |
Definition at line 81 of file dom/color.cpp.
設定元素的背景顏色。
| color | 輸出元素的顏色。 |
| child | 輸入元素。 |
Definition at line 96 of file dom/color.cpp.
| Decorator color | ( | Color | c | ) |
| Decorator bgcolor | ( | Color | color | ) |
使用背景顏色進行裝飾。
| color | 要應用的背景顏色。 |
Definition at line 124 of file dom/color.cpp.
水平置中一個元素。
| child | 被裝飾的元素。 |
Definition at line 15 of file composite_decorator.cpp.
垂直置中一個元素。
| child | 被裝飾的元素。 |
Definition at line 23 of file composite_decorator.cpp.
水平與垂直置中一個元素。
| child | 被裝飾的元素。 |
Definition at line 31 of file composite_decorator.cpp.
將元素靠右對齊。
| child | 被裝飾的元素。 |
Definition at line 39 of file composite_decorator.cpp.
將多個元素堆疊在一起。
| children_ | 輸入的元素。 |
Definition at line 59 of file src/ftxui/dom/dbox.cpp.
讓子元素依比例擴展以填滿容器中剩餘的空間。
| Decorator focusPositionRelative | ( | float | x, |
| float | y ) |
在 frame 內部使用,這會強制視圖滾動到給定位置。該位置以請求大小的比例表示。
例如:
Definition at line 29 of file src/ftxui/dom/focus.cpp.
| Decorator focusPosition | ( | int | x, |
| int | y ) |
在 frame 內部使用,這會強制視圖滾動到給定位置。該位置以單元格數表示。
Definition at line 66 of file src/ftxui/dom/focus.cpp.
繪製一個指定方向的高解析度進度條。
| progress | 填充區域的比例。範圍為 [0,1]。 |
| direction | 進度條的進展方向。 |
Definition at line 203 of file src/ftxui/dom/gauge.cpp.
| Element gaugeRight | ( | float | progress | ) |
繪製一個從左到右進展的高解析度進度條。
| progress | 填充區域的比例。範圍為 [0,1]。 |
一個儀表。它可以用來表示進度條。
Definition at line 225 of file src/ftxui/dom/gauge.cpp.
| Element gaugeLeft | ( | float | progress | ) |
繪製一個從右到左進展的高解析度進度條。
| progress | 填充區域的比例。範圍為 [0,1]。 |
一個儀表。它可以用來表示進度條。
Definition at line 247 of file src/ftxui/dom/gauge.cpp.
| Element gaugeUp | ( | float | progress | ) |
繪製一個從下到上進展的高解析度進度條。
| progress | 填充區域的比例。範圍為 [0,1]。 |
一個儀表。它可以用來表示進度條。
Definition at line 276 of file src/ftxui/dom/gauge.cpp.
| Element gaugeDown | ( | float | progress | ) |
繪製一個從上到下進展的高解析度進度條。
| progress | 填充區域的比例。範圍為 [0,1]。 |
一個儀表。它可以用來表示進度條。
Definition at line 305 of file src/ftxui/dom/gauge.cpp.
| Element gauge | ( | float | progress | ) |
繪製一個高解析度進度條。
| progress | 填充區域的比例。範圍為 [0,1]。 |
一個儀表。它可以用來表示進度條。
Definition at line 327 of file src/ftxui/dom/gauge.cpp.
使用自訂字元集繪製高解析度進度條。
| progress | 要填滿的區域比例。屬於 [0,1]。 |
| charset | 從「空」(索引 0)到「滿」(最後一個索引)的字符; 只有 2 個項目的字元集會產生單純無陰影的進度條。 |
| direction | 進度條前進的方向。預設為 Right。 |
使用自訂字元集而非預設方塊字符繪製的進度條。
Definition at line 353 of file src/ftxui/dom/gauge.cpp.
使渲染區域可點擊並使用網路瀏覽器開啟。 當用戶點擊時,連結將被開啟。 此功能僅在有限的終端模擬器中受支援。 List: https://github.com/Alhadis/OSC8-Adoption/
| link | 連結 |
| child | 輸入元素。 |
Definition at line 52 of file hyperlink.cpp.
| Decorator hyperlink | ( | std::string_view | link | ) |
使用超連結裝飾。 當用戶點擊時,連結將被開啟。 此功能僅在有限的終端模擬器中受支援。 List: https://github.com/Alhadis/OSC8-Adoption/
| link | 用於將用戶重定向到的連結。 |
Definition at line 71 of file hyperlink.cpp.
添加一個濾鏡,它將反轉前景和背景 顏色。
Definition at line 34 of file inverted.cpp.
對文字應用雙底線。
Definition at line 17 of file italic.cpp.
使用線性漸變效果設定元素的前景色。
| gradient | 要應用於輸出元素的漸變效果。 |
| child | 輸入元素。 |
Definition at line 243 of file src/ftxui/dom/linear_gradient.cpp.
使用線性漸變效果設定元素的背景顏色。
| gradient | 要應用於輸出元素的漸變效果。 |
| child | 輸入元素。 |
Definition at line 259 of file src/ftxui/dom/linear_gradient.cpp.
| Decorator color | ( | const LinearGradient & | gradient | ) |
使用線性漸變效果裝飾前景色。
| gradient | 要應用於輸出元素的漸變效果。 |
Definition at line 274 of file src/ftxui/dom/linear_gradient.cpp.
| Decorator bgcolor | ( | const LinearGradient & | gradient | ) |
使用線性漸變效果裝飾背景顏色。
| gradient | 要應用於輸出元素的漸變效果。 |
Definition at line 289 of file src/ftxui/dom/linear_gradient.cpp.
| void Render | ( | Screen & | screen, |
| const Element & | element ) |
| void Render | ( | Screen & | screen, |
| Node * | node ) |
| 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 | ) |
在右側顯示一個垂直捲軸。 顏色與內容一致。
Definition at line 21 of file scroll_indicator.cpp.
在底部顯示一個水平捲軸。 顏色與內容一致。
Definition at line 76 of file scroll_indicator.cpp.
| Element separator | ( | ) |
在兩個元素之間繪製垂直或水平分隔線。
在兩個元素之間添加視覺分隔。
Definition at line 135 of file src/ftxui/dom/separator.cpp.
| Element separatorStyled | ( | BorderStyle | style | ) |
在兩個元素之間繪製垂直或水平分隔線。
| style | 分隔線的樣式。 |
在兩個元素之間添加視覺分隔。
Definition at line 172 of file src/ftxui/dom/separator.cpp.
| Element separatorLight | ( | ) |
使用 LIGHT 樣式在兩個元素之間繪製垂直或水平分隔線。
在兩個元素之間添加視覺分隔。
Definition at line 208 of file src/ftxui/dom/separator.cpp.
| Element separatorDashed | ( | ) |
使用 DASHED 樣式在兩個元素之間繪製垂直或水平分隔線。
在兩個元素之間添加視覺分隔。
Definition at line 244 of file src/ftxui/dom/separator.cpp.
| Element separatorHeavy | ( | ) |
使用 HEAVY 樣式在兩個元素之間繪製垂直或水平分隔線。
在兩個元素之間添加視覺分隔。
Definition at line 280 of file src/ftxui/dom/separator.cpp.
| Element separatorDouble | ( | ) |
使用 DOUBLE 樣式在兩個元素之間繪製垂直或水平分隔線。
在兩個元素之間添加視覺分隔。
Definition at line 316 of file src/ftxui/dom/separator.cpp.
| Element separatorEmpty | ( | ) |
使用 EMPTY 樣式在兩個元素之間繪製垂直或水平分隔線。
在兩個元素之間添加視覺分隔。
Definition at line 352 of file src/ftxui/dom/separator.cpp.
| Element separatorCharacter | ( | std::string_view | value | ) |
在兩個元素之間繪製垂直或水平分隔線。
| value | 用於填充分隔線區域的字元。 |
在兩個元素之間添加視覺分隔。
Definition at line 389 of file src/ftxui/dom/separator.cpp.
| Element separator | ( | Cell | pixel | ) |
| Decorator size | ( | WidthOrHeight | direction, |
| Constraint | constraint, | ||
| int | value ) |
對元素的大小套用限制。
| direction | 該元素的 WIDTH 或 HEIGHT 是否 受到限制。 |
| constraint | 限制的類型。 |
| value | 值。 |
Definition at line 89 of file src/ftxui/dom/size.cpp.
| Element spinner | ( | int | charset_index, |
| size_t | image_index ) |
用於表示時間和/或事件的效果。這將顯示 一個 ASCII 藝術「影片」。
| charset_index | 「影片」的類型。 |
| image_index | 「影片」的「影格」。您需要針對 每個「步驟」增加此值。 |
Definition at line 282 of file src/ftxui/dom/spinner.cpp.
對文字應用刪除線。
Definition at line 17 of file strikethrough.cpp.
| Element text | ( | std::string_view | text | ) |
顯示一段 UTF8 編碼的 Unicode 文字。
Definition at line 218 of file src/ftxui/dom/text.cpp.
| Element text | ( | std::wstring_view | text | ) |
顯示一段 Unicode 文字。
Definition at line 237 of file src/ftxui/dom/text.cpp.
| Element vtext | ( | std::string_view | text | ) |
垂直顯示一段 Unicode 文字。
Definition at line 267 of file src/ftxui/dom/text.cpp.
| Element vtext | ( | std::wstring_view | text | ) |
垂直顯示一段 Unicode 文字。
Definition at line 297 of file src/ftxui/dom/text.cpp.
為給定元素加上底線。
Definition at line 33 of file underlined.cpp.
對文字應用雙底線。
Definition at line 17 of file underlined_double.cpp.
一個什麼都不做的裝飾器。
Definition at line 28 of file dom/util.cpp.
| Element emptyElement | ( | ) |
一個 0x0 大小,不繪製任何東西的元素。
Definition at line 140 of file dom/util.cpp.
| void SetColorSupport | ( | Color | color | ) |
在自動偵測失敗時覆寫終端機顏色支援
Definition at line 346 of file terminal.cpp.