|
FTXUI 6.1.9
C++ functional terminal UI.
|
Go to the source code of this file.
Namespaces | |
| namespace | ftxui |
| FTXUI 的 ftxui:: 命名空間 | |
| namespace | ftxui::Dimension |
| 定義螢幕的維度外觀。 | |
Typedefs | |
| using | Element = std::shared_ptr<Node> |
| using | Elements = std::vector<Element> |
| using | Decorator = std::function<Element(Element)> |
| using | GraphFunction = std::function<std::vector<int>(int, int)> |
Enumerations | |
| enum | BorderStyle { LIGHT , DASHED , HEAVY , DOUBLE , ROUNDED , EMPTY } |
| BorderStyle 是一個列舉,表示可以應用於終端機 UI 元素的不同邊框樣式。 More... | |
| enum | WidthOrHeight { WIDTH , HEIGHT } |
| enum | Constraint { LESS_THAN , EQUAL , GREATER_THAN } |
Functions | |
| Element | operator| (Element element, Decorator decorator) |
| 從一個元素中,應用一個裝飾器。 | |
| Element & | operator|= (Element &e, Decorator d) |
| 對元素應用一個裝飾器。 | |
| Elements | operator| (Elements elements, Decorator decorator) |
| 從一組元素中,對每個元素應用一個裝飾器。 | |
| Decorator | operator| (Decorator a, Decorator b) |
| 將兩個裝飾器組合為一個。 | |
| Element | text (std::string text) |
| 顯示一段 UTF8 編碼的 Unicode 文字。 | |
| Element | vtext (std::string text) |
| 垂直顯示一段 Unicode 文字。 | |
| Element | separator () |
| 在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorLight () |
| 使用 LIGHT 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorDashed () |
| 使用 DASHED 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorHeavy () |
| 使用 HEAVY 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorDouble () |
| 使用 DOUBLE 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorRounded () |
| Element | separatorEmpty () |
| 使用 EMPTY 樣式在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorStyled (BorderStyle style) |
| 在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separator (Pixel pixel) |
| 在兩個元素之間繪製一個由給定像素填充的分隔線。 | |
| Element | separatorCharacter (std::string value) |
| 在兩個元素之間繪製垂直或水平分隔線。 | |
| Element | separatorHSelector (float left, float right, Color unselected_color, Color selected_color) |
| 繪製一個水平條,其中左右兩側之間的區域以不同顏色顯示。 | |
| Element | separatorVSelector (float up, float down, Color unselected_color, Color selected_color) |
| 繪製一個垂直條,其中上方/下方之間的區域以不同顏色顯示。 | |
| Element | gauge (float progress) |
| 繪製一個高解析度進度條。 | |
| Element | gaugeLeft (float progress) |
| 繪製一個從右到左進展的高解析度進度條。 | |
| Element | gaugeRight (float progress) |
| 繪製一個從左到右進展的高解析度進度條。 | |
| Element | gaugeUp (float progress) |
| 繪製一個從下到上進展的高解析度進度條。 | |
| Element | gaugeDown (float progress) |
| 繪製一個從上到下進展的高解析度進度條。 | |
| Element | gaugeDirection (float progress, Direction direction) |
| 繪製一個指定方向的高解析度進度條。 | |
| Element | border (Element child) |
| 在元素周圍繪製邊框。 | |
| Element | borderLight (Element child) |
| 在元素周圍繪製細邊框。 | |
| Element | borderDashed (Element child) |
| 在元素周圍繪製虛線邊框。 | |
| Element | borderHeavy (Element child) |
| 在元素周圍繪製粗邊框。 | |
| Element | borderDouble (Element child) |
| 在元素周圍繪製雙線邊框。 | |
| Element | borderRounded (Element child) |
| 在元素周圍繪製圓角邊框。 | |
| Element | borderEmpty (Element child) |
| 在元素周圍繪製空邊框。 | |
| Decorator | borderStyled (BorderStyle style) |
| 與 border 相同,但具有不同的樣式。 | |
| Decorator | borderStyled (BorderStyle style, Color foreground_color) |
| 與 border 相同,但具有前景色和不同的樣式。 | |
| Decorator | borderStyled (Color foreground_color) |
| 與 border 相同,但具有前景色。 | |
| Decorator | borderWith (const Pixel &pixel) |
| 與 border 相同,但在元素周圍使用恆定的像素。 | |
| Element | window (Element title, Element content, BorderStyle border) |
| 繪製帶有標題和邊框的視窗。 | |
| Element | spinner (int charset_index, size_t image_index) |
| 用於表示時間和/或事件的效果。這將顯示 一個 ASCII 藝術「影片」。 | |
| 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 | graph (GraphFunction graph_function) |
| 使用 GraphFunction 繪製圖形。 | |
| Element | emptyElement () |
| Element | canvas (ConstRef< Canvas >) |
| Element | canvas (int width, int height, std::function< void(Canvas &)>) |
| Element | canvas (std::function< void(Canvas &)>) |
| Element | bold (Element child) |
| 使用粗體字型,用於需要更多強調的元素。 | |
| Element | dim (Element child) |
| 使用淺色字體,適用於不那麼強調的元素。 | |
| Element | italic (Element child) |
| 將文字套用斜體。 | |
| Element | inverted (Element child) |
| 添加一個濾鏡,它將反轉前景和背景 顏色。 | |
| Element | underlined (Element child) |
| 為給定元素加上底線。 | |
| Element | underlinedDouble (Element child) |
| 對文字應用雙底線。 | |
| Element | blink (Element child) |
| 繪製的文字在可見和隱藏之間交替。 | |
| Element | strikethrough (Element child) |
| 對文字應用刪除線。 | |
| Decorator | color (Color c) |
| 使用前景顏色進行裝飾。 | |
| Decorator | bgcolor (Color color) |
| 使用背景顏色進行裝飾。 | |
| Decorator | color (const LinearGradient &gradient) |
| 使用線性漸變效果裝飾前景色。 | |
| Decorator | bgcolor (const LinearGradient &gradient) |
| 使用線性漸變效果裝飾背景顏色。 | |
| Element | color (Color color, Element child) |
| 設定元素的前景顏色。 | |
| Element | bgcolor (Color color, Element child) |
| 設定元素的背景顏色。 | |
| Element | color (const LinearGradient &gradient, Element child) |
| 使用線性漸變效果設定元素的前景色。 | |
| Element | bgcolor (const LinearGradient &gradient, Element child) |
| 使用線性漸變效果設定元素的背景顏色。 | |
| Decorator | focusPosition (int x, int y) |
在 frame 內部使用,這會強制視圖滾動到給定位置。該位置以單元格數表示。 | |
| Decorator | focusPositionRelative (float x, float y) |
在 frame 內部使用,這會強制視圖滾動到給定位置。該位置以請求大小的比例表示。 | |
| Element | automerge (Element child) |
| 啟用字符自動與附近其他字符合併。 | |
| Decorator | hyperlink (std::string link) |
| 使用超連結裝飾。 當用戶點擊時,連結將被開啟。 此功能僅在有限的終端模擬器中受支援。 List: https://github.com/Alhadis/OSC8-Adoption/ | |
| Element | hyperlink (std::string link, Element child) |
| 使渲染區域可點擊並使用網路瀏覽器開啟。 當用戶點擊時,連結將被開啟。 此功能僅在有限的終端模擬器中受支援。 List: https://github.com/Alhadis/OSC8-Adoption/ | |
| Element | selectionStyleReset (Element child) |
| 重設元素的選取樣式。 | |
| Decorator | selectionColor (Color foreground) |
| 設定元素被選取時的顏色。 | |
| Decorator | selectionBackgroundColor (Color foreground) |
| 設定元素被選取時的背景顏色。 請注意,此樣式會應用在現有樣式之上。 | |
| Decorator | selectionForegroundColor (Color foreground) |
| 設定元素被選取時的前景顏色。 請注意,此樣式會應用在現有樣式之上。 | |
| Decorator | selectionStyle (std::function< void(Pixel &)> style) |
| 設定元素被選取時的樣式。 | |
| Element | hbox (Elements children) |
| 一個逐一水平顯示元素的容器。 | |
| Element | vbox (Elements children) |
| 一個垂直一個接一個顯示元素的容器。 | |
| Element | dbox (Elements children_) |
| 將多個元素堆疊在一起。 | |
| Element | flexbox (Elements children, FlexboxConfig config) |
| 一個容器,用於在行/列中顯示元素,並在滿時能夠換行到下一列/行。 | |
| Element | gridbox (std::vector< Elements > lines) |
| 顯示元素網格的容器。 | |
| Element | hflow (Elements children) |
| 一個容器,用於從左到右在行中顯示元素。當填滿時,它會在下方的新行開始。 | |
| Element | vflow (Elements children) |
| 一個容器,用於從上到下在行中顯示元素。當填滿時,它會在右側的新列開始。 filled, it starts on a new row. is full, it starts a new row. | |
| Element | flex (Element child) |
| 使子元素按比例擴展以佔據容器中剩餘的空間。 | |
| Element | flex_grow (Element child) |
| 盡可能擴展。 | |
| Element | flex_shrink (Element child) |
| 在需要時最小化。 | |
| Element | xflex (Element child) |
| 在 X 軸上盡可能擴展/在需要時最小化。 | |
| Element | xflex_grow (Element child) |
| 在 X 軸上盡可能擴展。 | |
| Element | xflex_shrink (Element child) |
| 在 X 軸上在需要時最小化。 | |
| Element | yflex (Element child) |
| 在 Y 軸上盡可能擴展/在需要時最小化。 | |
| Element | yflex_grow (Element child) |
| 在 Y 軸上盡可能擴展。 | |
| Element | yflex_shrink (Element child) |
| 在 Y 軸上在需要時最小化。 | |
| Element | notflex (Element child) |
| 使元素不可伸縮。 | |
| Element | filler () |
| 一個元素,它會按比例擴展以佔據容器中剩餘的空間。 | |
| Decorator | size (WidthOrHeight direction, Constraint constraint, int value) |
| 限制元素的大小。 | |
| Element | frame (Element child) |
| 允許元素顯示在「虛擬」區域內。其大小可以大於其容器。在這種情況下,只會顯示較小的一部分。視圖可滾動以使聚焦元素可見。 | |
| Element | xframe (Element child) |
與 frame 相同,但僅限於 x 軸。 | |
| Element | yframe (Element child) |
與 frame 相同,但僅限於 y 軸。 | |
| Element | focus (Element child) |
將 child 設置為其同級元素中被聚焦的元素。 | |
| Element | select (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 | vscroll_indicator (Element child) |
| 在右側顯示一個垂直捲軸。 顏色與內容一致。 | |
| Element | hscroll_indicator (Element child) |
| 在底部顯示一個水平捲軸。 顏色與內容一致。 | |
| Decorator | reflect (Box &box) |
| Element | clear_under (Element element) |
| 在繪製 |child| 之前,清除下方的像素。這在與 dbox 結合使用時非常有用。 | |
| Element | hcenter (Element child) |
| 水平置中一個元素。 | |
| Element | vcenter (Element child) |
| 垂直置中一個元素。 | |
| Element | center (Element child) |
| 水平與垂直置中一個元素。 | |
| Element | align_right (Element child) |
| 將元素靠右對齊。 | |
| Element | nothing (Element element) |
| 一個什麼都不做的裝飾器。 | |
| Dimensions | Fit (Element &, bool extend_beyond_screen=false) |