|
FTXUI 7.0.3
C++ functional terminal UI.
|
FTXUI ftxui:: 命名空間 More...
Namespaces | |
| namespace | animation |
| namespace | box_helper |
| namespace | Container |
| namespace | Dimension |
| 定義螢幕的維度外觀。 | |
| namespace | flexbox_helper |
| namespace | literals |
| namespace | task |
| namespace | Terminal |
| namespace | util |
Classes | |
| class | AnimationTask |
| class | AutoReset |
| 將一個值指派給變數,離開作用域時重設其舊值。 More... | |
| class | ConstRef |
| 一個適配器。擁有或引用一個不可變的物件。 More... | |
| class | MultiReceiverBuffer |
| class | ReceiverImpl |
| class | Ref |
| 一個適配器。擁有或引用一個可變的物件。 More... | |
| class | SenderImpl |
| struct | SliderOption |
| class | TerminalInputParser |
Typedefs | |
| using | Component = std::shared_ptr<ComponentBase> |
| using | CapturedMouse = std::unique_ptr<CapturedMouseInterface> |
| using | ComponentDecorator = std::function<Component(Component)> |
| using | ElementDecorator = std::function<Element(Element)> |
| using | Components = std::vector<Component> |
| template<class T > | |
| using | Sender = std::unique_ptr<SenderImpl<T>> |
| template<class T > | |
| using | Receiver = std::unique_ptr<ReceiverImpl<T>> |
| using | ScreenInteractive = App |
| using | Closure = std::function<void()> |
| using | Task = std::variant<Event, Closure, AnimationTask> |
| 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)> |
| using | Image = Surface |
| using | Pixel = Cell |
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... | |
| enum | WidthOrHeight : uint8_t { WIDTH , HEIGHT } |
| enum | Constraint : uint8_t { LESS_THAN , EQUAL , GREATER_THAN } |
| enum class | AppDimension { FitComponent , Fixed , Fullscreen , TerminalOutput } |
| enum class | WordBreakProperty : int8_t { ALetter , CR , Double_Quote , Extend , ExtendNumLet , Format , Hebrew_Letter , Katakana , LF , MidLetter , MidNum , MidNumLet , Newline , Numeric , Regional_Indicator , Single_Quote , WSegSpace , ZWJ } |
Functions | |
| class | FTXUI_EXPORT (COMPONENT) ComponentBase = {}) |
| 它將自己實作為 ftxui::Element 進行渲染。它透過回應 ftxui::Event 來實現鍵盤導航。 | |
| template<class T , class... Args> | |
| std::shared_ptr< T > | Make (Args &&... args) |
| Component | operator| (Component component, ComponentDecorator decorator) |
| Component | operator| (Component component, ElementDecorator decorator) |
| Component & | operator|= (Component &component, ComponentDecorator decorator) |
| Component & | operator|= (Component &component, ElementDecorator decorator) |
| Component | Button (ConstStringRef label, std::function< void()> on_click, ButtonOption option) |
| 繪製一個按鈕。點擊時執行一個函式。 | |
| Component | Checkbox (ConstStringRef label, bool *checked, CheckboxOption option) |
| 繪製可勾選的元素。 | |
| Component | Input (StringRef content, InputOption option) |
| 用於編輯文字的輸入框。 | |
| Component | Input (StringRef content, StringRef placeholder, InputOption option) |
| 用於編輯文字的輸入框。 | |
| Component | Menu (ConstStringListRef entries, int *selected, MenuOption option) |
| 一份文字清單。取得焦點的元素會被選取。 | |
| Component | MenuEntry (ConstStringRef label, MenuEntryOption option) |
| 一個特定的選單項目。可以將它們放入 Container::Vertical 以 組成一個選單。 | |
| Component | Radiobox (ConstStringListRef entries, int *selected, RadioboxOption option) |
| 一份元素清單,只能選取其中一個。 | |
| Component | Dropdown (ConstStringListRef entries, int *selected) |
| 下拉式選單。 | |
| Component | Toggle (ConstStringListRef entries, int *selected) |
| 元素的水平列表。使用者可以在其中導航。 | |
| template<typename T > | |
| Component | Slider (SliderOption< T > options) |
| 任意方向的滑桿。 | |
| Component | Slider (ConstStringRef label, Ref< int > value, ConstRef< int > min, ConstRef< int > max, ConstRef< int > increment) |
| 一個水平滑桿。 | |
| Component | Slider (ConstStringRef label, Ref< float > value, ConstRef< float > min=0.f, ConstRef< float > max=100.f, ConstRef< float > increment=5.f) |
| Component | Slider (ConstStringRef label, Ref< long > value, ConstRef< long > min=0L, ConstRef< long > max=100L, ConstRef< long > increment=5L) |
| Component | ResizableSplit (ResizableSplitOption options) |
| 兩個元件之間的分隔。 | |
| Component | ResizableSplitLeft (Component main, Component back, int *main_size) |
| 兩個元件之間的水平分割,可透過 滑鼠調整大小。 | |
| Component | ResizableSplitRight (Component main, Component back, int *main_size) |
| 兩個元件之間的水平分割,可透過 滑鼠調整大小。 | |
| Component | ResizableSplitTop (Component main, Component back, int *main_size) |
| 兩個元件之間的垂直分割,可透過 滑鼠調整大小。 | |
| Component | ResizableSplitBottom (Component main, Component back, int *main_size) |
| 兩個元件之間的垂直分割,可透過 滑鼠調整大小。 | |
| Component | Renderer (Component child, std::function< Element()> render) |
| 回傳一個新的 Component,類似 |child|,但使用 |render| 作為 Component::Render() 事件。 | |
| FTXUI_EXPORT(COMPONENT) Component Renderer(std Component | Renderer (std::function< Element(bool)> render) |
| 回傳一個可聚焦的元件,使用 |render| 來渲染其介面。 | |
| Component | CatchEvent (Component child, std::function< bool(Event)>) |
| ComponentDecorator | CatchEvent (std::function< bool(Event)> on_event) |
| 裝飾一個元件,使用 |on_event| 來攔截事件。此函式 在事件已被處理時必須回傳 true,否則回傳 false。 | |
| FTXUI_EXPORT(COMPONENT) ComponentDecorator Maybe(std Component | Modal (Component main, Component modal, const bool *show_modal) |
| ComponentDecorator | Modal (Component modal, const bool *show_modal) |
| Component | Collapsible (ConstStringRef label, Component child, Ref< bool > show) |
| 可折疊元件。它顯示一個帶有箭頭的核取方塊。一旦啟用,子元件就會顯示。 | |
| Component | Hoverable (Component component, bool *hover) |
| 包裝一個元件。提供能力以判斷滑鼠是否懸停在其上方。 | |
| Component | Hoverable (Component component, std::function< void()> on_enter, std::function< void()> on_leave) |
| 包裝一個元件。使用回呼函數。 | |
| Component | Hoverable (Component component, std::function< void(bool)> on_change) |
| 包裝一個元件。提供能力以判斷滑鼠是否懸停在其上方。 | |
| ComponentDecorator | Hoverable (std::function< void()> on_enter, std::function< void()> on_leave) |
| 包裝一個元件。提供能力以判斷滑鼠是否懸停在其上方。 | |
| ComponentDecorator | Hoverable (std::function< void(bool)> on_change) |
| 包裝一個元件。提供能力以判斷滑鼠是否懸停在其上方。 | |
| template<class T > | |
| Receiver< T > | MakeReceiver () |
| 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 軸上在需要時最小化。 | |
| void | Render (Screen &screen, Node *node, Selection &selection) |
| std::string | GetNodeSelectedContent (Screen &screen, Node *node, Selection &selection) |
| struct | FTXUI_EXPORT (SCREEN) Box |
| Box 是一個表示二維空間中矩形區域的結構。 | |
| FTXUI_EXPORT (SCREEN) Color operator""_rgb(unsigned long long int combined) | |
| 從組合的十六進位 RGB 表示建立顏色, 例如 0x808000_rgb | |
| template<typename T > | |
| FTXUI_EXPORT(SCREEN) std FTXUI_EXPORT(SCREEN) std std::wstring | to_wstring (T s) |
| std::wstring | to_wstring (const std::string &s) |
| template<> | |
| std::wstring | to_wstring (const char *s) |
| FTXUI_EXPORT(SCREEN) int string_width(std std::vector< std::string > | Utf8ToGlyphs (std::string_view input) |
| std::vector< int > | CellToGlyphIndex (std::string_view input) |
| Component | Button (ButtonOption option) |
| 繪製一個按鈕。點擊時執行一個函式。 | |
| Component | CatchEvent (Component child, std::function< bool(Event event)> on_event) |
| 傳回一個元件,使用 |on_event| 來攔截事件。此函式 在事件已被處理時必須回傳 true,否則回傳 false。 | |
| Component | Checkbox (CheckboxOption option) |
| 繪製可勾選的元素。 | |
| Component | Dropdown (DropdownOption option) |
| 下拉式選單。 | |
| ComponentDecorator | Hoverable (bool *hover) |
| 包裝一個元件。提供能力以判斷滑鼠是否懸停在其上方。 | |
| Component | Input (InputOption option) |
| 用於編輯文字的輸入框。 | |
| Component | Maybe (Component child, std::function< bool()> show) |
| 裝飾一個組件 |child|。它只在 |show| 返回 true 時顯示。 | |
| ComponentDecorator | Maybe (std::function< bool()> show) |
| 裝飾一個組件。它只在 |show| 函數返回 true 時顯示。 | |
| Component | Maybe (Component child, const bool *show) |
| 裝飾一個組件 |child|。它只在 |show| 為 true 時顯示。 | |
| ComponentDecorator | Maybe (const bool *show) |
| 裝飾一個組件。它只在 |show| 為 true 時顯示。 | |
| Component | Menu (MenuOption option) |
| 一份文字清單。取得焦點的元素會被選取。 | |
| Component | MenuEntry (MenuEntryOption option) |
| 一個特定的選單項目。可以將它們放入 Container::Vertical 以 組成一個選單。 | |
| Component | Radiobox (RadioboxOption option) |
| 一份元素清單,只能選取其中一個。 | |
| Component | Renderer (std::function< Element()> render) |
| 傳回一個元件,使用 |render| 來繪製其介面。 | |
| ComponentDecorator | Renderer (ElementDecorator decorator) |
| 透過裝飾元件所渲染的內容來裝飾該元件。 | |
| Component | Window (WindowOptions option) |
| 一個可拖曳/可調整大小的視窗。要使用多個視窗,它們必須透過 Container::Stacked({...}) 元件堆疊。 | |
| 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 | canvas (ConstRef< Canvas > canvas) |
| 從 Canvas 或對 Canvas 的參考中產生一個元素。 | |
| Element | canvas (std::function< void(Canvas &)> fn) |
| 從繪製畫布的函式中產生一個元素。 | |
| 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 | flex_grow (Element child) |
| 盡可能擴展。 | |
| Element | flex_shrink (Element child) |
| 在需要時最小化。 | |
| Element | notflex (Element child) |
| 使元素不可伸縮。 | |
| Decorator | flex_factor (int grow, int shrink) |
| Decorator | flex_grow_factor (int grow) |
| Decorator | flex_shrink_factor (int shrink) |
| Decorator | xflex_factor (int grow, int shrink) |
| Decorator | xflex_grow_factor (int grow) |
| Decorator | xflex_shrink_factor (int shrink) |
| Decorator | yflex_factor (int grow, int shrink) |
| Decorator | yflex_grow_factor (int grow) |
| Decorator | yflex_shrink_factor (int shrink) |
| Decorator | focusPositionRelative (float x, float y) |
在 frame 內部使用,這會強制視圖滾動到給定位置。該位置以請求大小的比例表示。 | |
| Decorator | focusPosition (int x, int y) |
在 frame 內部使用,這會強制視圖滾動到給定位置。該位置以單元格數表示。 | |
| Element | focus (Element child) |
將 child 設置為其同級元素中被聚焦的元素。 | |
| Element | select (Element e) |
將 child 設為其兄弟元素中被聚焦的那一個。 | |
| Element | frame (Element child) |
| 允許元素顯示在「虛擬」區域內。其大小可以大於其容器。在這種情況下,只會顯示較小的一部分。視圖可滾動以使聚焦元素可見。 | |
| Element | xframe (Element child) |
與 frame 相同,但僅限於 x 軸。 | |
| Element | yframe (Element child) |
與 frame 相同,但僅限於 y 軸。 | |
| 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 | graph (GraphFunction graph_function) |
| 使用 GraphFunction 繪製圖形。 | |
| Element | gridbox (std::vector< Elements > lines) |
| A container displaying a grid of elements. | |
| Element | hbox (Elements children) |
| 一個逐一水平顯示元素的容器。 | |
| 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) |
| 回傳一個在多行上繪製段落並使用左右對齊的元素。 | |
| Decorator | reflect (Box &box) |
| Element | vscroll_indicator (Element child) |
| 在右側顯示一個垂直捲軸。 顏色與內容一致。 | |
| Element | hscroll_indicator (Element child) |
| 在底部顯示一個水平捲軸。 顏色與內容一致。 | |
| Element | selectionStyleReset (Element child) |
| 重設元素的選取樣式。 | |
| Decorator | selectionBackgroundColor (Color foreground) |
| 設定元素被選取時的背景顏色。 請注意,此樣式會應用在現有樣式之上。 | |
| Decorator | selectionForegroundColor (Color foreground) |
| 設定元素被選取時的前景顏色。 請注意,此樣式會應用在現有樣式之上。 | |
| Decorator | selectionColor (Color foreground) |
| 設定元素被選取時的顏色。 | |
| Decorator | selectionStyle (std::function< void(Cell &)> style) |
| 設定元素被選取時的樣式。 | |
| 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) |
| 一個垂直一個接一個顯示元素的容器。 | |
| Color | operator""_rgb (unsigned long long int combined) |
| ColorInfo | GetColorInfo (Color::Palette256 index) |
| ColorInfo | GetColorInfo (Color::Palette16 index) |
| std::vector< std::vector< ColorInfo > > | ColorInfoSorted2D () |
| bool | EatCodePoint (std::string_view input, size_t start, size_t *end, uint32_t *ucs) |
| bool | EatCodePoint (std::wstring_view input, size_t start, size_t *end, uint32_t *ucs) |
| bool | IsCombining (uint32_t ucs) |
| bool | IsFullWidth (uint32_t ucs) |
| bool | IsControl (uint32_t ucs) |
| WordBreakProperty | CodepointToWordBreakProperty (uint32_t codepoint) |
| int | wchar_width (wchar_t ucs) |
| int | wstring_width (const std::wstring &text) |
| int | string_width (std::string_view input) |
| size_t | GlyphPrevious (std::string_view input, size_t start) |
| size_t | GlyphNext (std::string_view input, size_t start) |
| size_t | GlyphIterate (std::string_view input, int glyph_offset, size_t start) |
| int | GlyphCount (std::string_view input) |
| std::vector< WordBreakProperty > | Utf8ToWordBreakProperty (std::string_view input) |
| std::string | to_string (std::wstring_view s) |
| 將 std::wstring 轉換為 UTF8 std::string。 | |
| std::wstring | to_wstring (std::string_view s) |
| 將 UTF8 std::string 轉換為 std::wstring。 | |
| bool | IsWordBreakingCharacter (std::string_view input, size_t glyph_index) |
Variables | |
| const bool * | show |
| Direction | direction |
| Color | |
| 建立一個透明的顏色。 | |
| size_t | image_index |
| int | y |
| int | shrink |
| Constraint | |
| int | value |
| const Element & | element |
| Node * | node |
| const std::map< std::string, std::string > | g_uniformize |
| const std::array< ColorInfo, 256 > | palette256 |
FTXUI ftxui:: 命名空間
| typedef std::shared_ptr< ComponentBase > Component = std::shared_ptr<ComponentBase> |
| using CapturedMouse = std::unique_ptr<CapturedMouseInterface> |
Definition at line 22 of file captured_mouse.hpp.
| using ComponentDecorator = std::function<Component(Component)> |
Definition at line 33 of file component.hpp.
| using ElementDecorator = std::function<Element(Element)> |
Definition at line 34 of file component.hpp.
| using Components = std::vector<Component> |
Definition at line 26 of file component_base.hpp.
| using Sender = std::unique_ptr<SenderImpl<T>> |
Definition at line 52 of file receiver.hpp.
| using Receiver = std::unique_ptr<ReceiverImpl<T>> |
Definition at line 54 of file receiver.hpp.
| using ScreenInteractive = App |
Definition at line 10 of file screen_interactive.hpp.
| using Task = std::variant<Event, Closure, AnimationTask> |
| typedef std::shared_ptr< Node > Element = std::shared_ptr<Node> |
Definition at line 25 of file elements.hpp.
Definition at line 26 of file elements.hpp.
Definition at line 27 of file elements.hpp.
| using GraphFunction = std::function<std::vector<int>(int, int)> |
Definition at line 28 of file elements.hpp.
| enum WidthOrHeight : uint8_t |
| Enumerator | |
|---|---|
| WIDTH | |
| HEIGHT | |
Definition at line 190 of file elements.hpp.
| enum Constraint : uint8_t |
| Enumerator | |
|---|---|
| LESS_THAN | |
| EQUAL | |
| GREATER_THAN | |
Definition at line 191 of file elements.hpp.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| ALetter | |
| CR | |
| Double_Quote | |
| Extend | |
| ExtendNumLet | |
| Format | |
| Hebrew_Letter | |
| Katakana | |
| LF | |
| MidLetter | |
| MidNum | |
| MidNumLet | |
| Newline | |
| Numeric | |
| Regional_Indicator | |
| Single_Quote | |
| WSegSpace | |
| ZWJ | |
Definition at line 44 of file string_internal.hpp.
| std::shared_ptr< T > Make | ( | Args &&... | args | ) |
Definition at line 28 of file component.hpp.
| Component operator| | ( | Component | component, |
| ComponentDecorator | decorator ) |
Definition at line 12 of file component/util.cpp.
| Component operator| | ( | Component | component, |
| ElementDecorator | decorator ) |
Definition at line 17 of file component/util.cpp.
| Component & operator|= | ( | Component & | component, |
| ComponentDecorator | decorator ) |
Definition at line 22 of file component/util.cpp.
| Component & operator|= | ( | Component & | component, |
| ElementDecorator | decorator ) |
Definition at line 28 of file component/util.cpp.
| Component Slider | ( | SliderOption< T > | options | ) |
任意方向的滑桿。
| options | 選項 |
Definition at line 315 of file src/ftxui/component/slider.cpp.
| Component Slider | ( | ConstStringRef | label, |
| Ref< float > | value, | ||
| ConstRef< float > | min = 0.f, | ||
| ConstRef< float > | max = 100.f, | ||
| ConstRef< float > | increment = 5.f ) |
Definition at line 272 of file src/ftxui/component/slider.cpp.
| Component Slider | ( | ConstStringRef | label, |
| Ref< long > | value, | ||
| ConstRef< long > | min = 0L, | ||
| ConstRef< long > | max = 100L, | ||
| ConstRef< long > | increment = 5L ) |
Definition at line 285 of file src/ftxui/component/slider.cpp.
| Component ResizableSplit | ( | ResizableSplitOption | options | ) |
兩個元件之間的分隔。
| options | 所有參數。 |
Definition at line 170 of file src/ftxui/component/resizable_split.cpp.
可折疊元件。它顯示一個帶有箭頭的核取方塊。一旦啟用,子元件就會顯示。
| label | 核取方塊的標籤。 |
| child | 要顯示的子元件。 |
| show | 儲存子元件是否顯示的狀態。 |
Definition at line 32 of file src/ftxui/component/collapsible.cpp.
| Receiver< T > MakeReceiver | ( | ) |
Definition at line 149 of file receiver.hpp.
| FTXUI_EXPORT | ( | DOM | ) | & |
| Element separatorHSelector | ( | float | left, |
| float | right, | ||
| Color | unselected_color, | ||
| Color | selected_color ) |
繪製一個水平條,其中左右兩側之間的區域以不同顏色顯示。
| left | 活躍區域的左限。 |
| right | 活躍區域的右限。 |
| selected_color | 選定區域的顏色。 |
| unselected_color | 未選定區域的顏色。 |
Definition at line 435 of file src/ftxui/dom/separator.cpp.
| Element separatorVSelector | ( | float | up, |
| float | down, | ||
| Color | unselected_color, | ||
| Color | selected_color ) |
繪製一個垂直條,其中上方/下方之間的區域以不同顏色顯示。
| up | 活躍區域的上限。 |
| down | 活躍區域的下限。 |
| selected_color | 選定區域的顏色。 |
| unselected_color | 未選定區域的顏色。 |
Definition at line 504 of file src/ftxui/dom/separator.cpp.
| Element canvas | ( | int | width, |
| int | height, | ||
| std::function< void(Canvas &)> | fn ) |
從指定大小的畫布中產生一個繪製畫布的元素。
| width | 畫布的寬度。 |
| height | 畫布的高度。 |
| fn | 繪製畫布的函式。 |
Definition at line 921 of file src/ftxui/dom/canvas.cpp.
一個容器,用於在行/列中顯示元素,並在滿時能夠換行到下一列/行。
| children | 容器中的元素 |
| config | 選項 |
Definition at line 251 of file flexbox.cpp.
一個容器,用於從左到右在行中顯示元素。當填滿時,它會在下方的新行開始。
| children | 容器中的元素 |
Definition at line 268 of file flexbox.cpp.
一個容器,用於從上到下在行中顯示元素。當填滿時,它會在右側的新列開始。 filled, it starts on a new row. is full, it starts a new row.
| children | 容器中的元素 |
Definition at line 287 of file flexbox.cpp.
| void Render | ( | Screen & | screen, |
| Node * | node, | ||
| Selection & | selection ) |
| std::string GetNodeSelectedContent | ( | Screen & | screen, |
| Node * | node, | ||
| Selection & | selection ) |
| FTXUI_EXPORT(SCREEN) std FTXUI_EXPORT(SCREEN) std std::wstring to_wstring | ( | T | s | ) |
Definition at line 18 of file string.hpp.
|
inline |
Definition at line 21 of file string.hpp.
|
inline |
Definition at line 25 of file string.hpp.
| std::vector< std::string > Utf8ToGlyphs | ( | std::string_view | input | ) |
Definition at line 348 of file string.cpp.
| std::vector< int > CellToGlyphIndex | ( | std::string_view | input | ) |
Definition at line 455 of file string.cpp.
從 Canvas 或對 Canvas 的參考中產生一個元素。
Definition at line 897 of file src/ftxui/dom/canvas.cpp.
| Element canvas | ( | std::function< void(Canvas &)> | fn | ) |
| Element graph | ( | GraphFunction | graph_function | ) |
使用 GraphFunction 繪製圖形。
| graph_function | 用於獲取數據的函數。 |
Definition at line 79 of file src/ftxui/dom/graph.cpp.
A container displaying a grid of elements.
| lines | A list of lines, each line being a list of elements. |
Output:
Definition at line 178 of file src/ftxui/dom/gridbox.cpp.
| Decorator reflect | ( | Box & | box | ) |
Definition at line 43 of file reflect.cpp.
重設元素的選取樣式。
| child | 輸入元素。 |
Definition at line 55 of file selection_style.cpp.
| Decorator selectionBackgroundColor | ( | Color | foreground | ) |
設定元素被選取時的背景顏色。 請注意,此樣式會應用在現有樣式之上。
Definition at line 61 of file selection_style.cpp.
| Decorator selectionForegroundColor | ( | Color | foreground | ) |
設定元素被選取時的前景顏色。 請注意,此樣式會應用在現有樣式之上。
Definition at line 69 of file selection_style.cpp.
| Decorator selectionColor | ( | Color | foreground | ) |
設定元素被選取時的顏色。
| foreground | 要套用的顏色。 請注意,此樣式會應用在現有樣式之上。 |
Definition at line 78 of file selection_style.cpp.
| Decorator selectionStyle | ( | std::function< void(Cell &)> | style | ) |
設定元素被選取時的樣式。
| style | 要套用的樣式。 請注意,此樣式會應用在現有樣式之上。 |
Definition at line 86 of file selection_style.cpp.
| ColorInfo GetColorInfo | ( | Color::Palette256 | index | ) |
Definition at line 273 of file color_info.cpp.
| ColorInfo GetColorInfo | ( | Color::Palette16 | index | ) |
Definition at line 277 of file color_info.cpp.
| std::vector< std::vector< ColorInfo > > ColorInfoSorted2D | ( | ) |
Definition at line 282 of file color_info.cpp.
| bool EatCodePoint | ( | std::string_view | input, |
| size_t | start, | ||
| size_t * | end, | ||
| uint32_t * | ucs ) |
Definition at line 137 of file string.cpp.
| bool EatCodePoint | ( | std::wstring_view | input, |
| size_t | start, | ||
| size_t * | end, | ||
| uint32_t * | ucs ) |
Definition at line 206 of file string.cpp.
| bool IsCombining | ( | uint32_t | ucs | ) |
Definition at line 244 of file string.cpp.
| bool IsFullWidth | ( | uint32_t | ucs | ) |
Definition at line 248 of file string.cpp.
| bool IsControl | ( | uint32_t | ucs | ) |
Definition at line 256 of file string.cpp.
| WordBreakProperty CodepointToWordBreakProperty | ( | uint32_t | codepoint | ) |
Definition at line 270 of file string.cpp.
| int wchar_width | ( | wchar_t | ucs | ) |
Definition at line 276 of file string.cpp.
| int wstring_width | ( | const std::wstring & | text | ) |
Definition at line 280 of file string.cpp.
| int string_width | ( | std::string_view | input | ) |
Definition at line 298 of file string.cpp.
| size_t GlyphPrevious | ( | std::string_view | input, |
| size_t | start ) |
Definition at line 390 of file string.cpp.
| size_t GlyphNext | ( | std::string_view | input, |
| size_t | start ) |
Definition at line 415 of file string.cpp.
| size_t GlyphIterate | ( | std::string_view | input, |
| int | glyph_offset, | ||
| size_t | start ) |
Definition at line 441 of file string.cpp.
| int GlyphCount | ( | std::string_view | input | ) |
Definition at line 496 of file string.cpp.
| std::vector< WordBreakProperty > Utf8ToWordBreakProperty | ( | std::string_view | input | ) |
Definition at line 524 of file string.cpp.
| std::string to_string | ( | std::wstring_view | s | ) |
將 std::wstring 轉換為 UTF8 std::string。
Definition at line 555 of file string.cpp.
| std::wstring to_wstring | ( | std::string_view | s | ) |
將 UTF8 std::string 轉換為 std::wstring。
Definition at line 627 of file string.cpp.
| bool IsWordBreakingCharacter | ( | std::string_view | input, |
| size_t | glyph_index ) |
| const bool* show |
Definition at line 159 of file component.hpp.
| Direction direction |
Definition at line 80 of file elements.hpp.
|
default |
建立一個透明的顏色。
從 RGB 表示建立一個顏色。 https://en.wikipedia.org/wiki/RGB_color_model
使用 Palette256 顏色建立一個顏色。
使用 Palette16 顏色建立一個顏色。
| red | 紅色的量 [0,255] |
| green | 綠色的量 [0,255] |
| blue | 藍色的量 [0,255] |
| alpha | alpha 的量 [0,255] |
Definition at line 96 of file elements.hpp.
| size_t image_index |
Definition at line 101 of file elements.hpp.
| float y |
Definition at line 131 of file elements.hpp.
| int shrink |
Definition at line 162 of file elements.hpp.
Definition at line 192 of file elements.hpp.
| int value |
Definition at line 192 of file elements.hpp.
| const std::map<std::string, std::string> g_uniformize |
Definition at line 19 of file terminal_input_parser.cpp.
| const std::array<ColorInfo, 256> palette256 |
Definition at line 14 of file color_info.cpp.