FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
elements.hpp File Reference

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 : uint8_t {
  LIGHT ,
  DASHED ,
  HEAVY ,
  DOUBLE ,
  ROUNDED ,
  EMPTY
}
 BorderStyle 是一個列舉,表示可以應用於終端機 UI 元素的不同邊框樣式。 More...
 
enum  WidthOrHeight : uint8_t {
  WIDTH ,
  HEIGHT
}
 
enum  Constraint : uint8_t {
  LESS_THAN ,
  EQUAL ,
  GREATER_THAN
}
 

Functions

struct FTXUI_EXPORT (DOM) Canvas
 畫布是與繪圖操作相關聯的可繪製緩衝區。
 
 FTXUI_EXPORT (DOM) Element &operator|
 
FTXUI_EXPORT(DOM) Element separatorCharacter(std Element separatorHSelector (float left, float right, Color unselected_color, Color selected_color)
 繪製一個水平條,其中左右兩側之間的區域以不同顏色顯示。
 
Element separatorVSelector (float up, float down, Color unselected_color, Color selected_color)
 繪製一個垂直條,其中上方/下方之間的區域以不同顏色顯示。
 
Element gaugeCharset (float progress, std::vector< std::string > charset, Direction direction)
 使用自訂字元集繪製高解析度進度條。
 
Element window (Element title, Element content, BorderStyle border)
 繪製帶有標題和邊框的視窗。
 
Element canvas (int width, int height, std::function< void(Canvas &)> fn)
 從指定大小的畫布中產生一個繪製畫布的元素。
 
Element flexbox (Elements children, FlexboxConfig config)
 一個容器,用於在行/列中顯示元素,並在滿時能夠換行到下一列/行。
 
FTXUI_EXPORT(DOM) Element gridbox(std Element hflow (Elements children)
 一個容器,用於從左到右在行中顯示元素。當填滿時,它會在下方的新行開始。
 
Element vflow (Elements children)
 一個容器,用於從上到下在行中顯示元素。當填滿時,它會在右側的新列開始。 filled, it starts on a new row. is full, it starts a new row.
 
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 軸上在需要時最小化。
 
 FTXUI_EXPORT (DOM) Dimensions Fit(Element &
 

Variables

Direction direction
 
 Color
 建立一個透明的顏色。
 
size_t image_index
 
int y
 
int shrink
 
 Constraint
 
int value
 
bool extend_beyond_screen = false)