|
FTXUI 6.1.9
C++ functional terminal UI.
|
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase 更多...
命名空间 | |
| namespace | animation |
| FTXUI ftxui::animation:: 命名空间 | |
| namespace | box_helper |
| namespace | Container |
| namespace | Dimension |
| 定义屏幕的尺寸应如何呈现。 | |
| namespace | flexbox_helper |
| namespace | literals |
| namespace | task |
| namespace | Terminal |
| namespace | util |
类 | |
| struct | AnimatedColorOption |
| 可能是动画颜色的选项。 更多... | |
| struct | AnimatedColorsOption |
| class | AnimationTask |
| class | AutoReset |
| 为变量赋值,当超出作用域时恢复其旧值。 更多... | |
| struct | Box |
| Box是一个表示2D空间中矩形区域的结构体。 更多... | |
| struct | ButtonOption |
| AnimatedButton 组件的选项。 更多... | |
| struct | Canvas |
| Canvas 是一个与绘图操作相关的可绘制缓冲区。 更多... | |
| class | CapturedMouseInterface |
| struct | CheckboxOption |
| Checkbox 组件的选项。 更多... | |
| class | Color |
| Color 是一个表示终端用户界面中颜色的类。 更多... | |
| struct | ColorInfo |
| ColorInfo是一个包含终端颜色调色板信息的结构。 颜色调色板信息。 更多... | |
| class | ComponentBase |
| 它将自身实现为 ftxui::Element。它通过响应 ftxui::Event 来实现键盘导航。 更多... | |
| class | ConstRef |
| 一个适配器。拥有或引用一个不可变对象。 更多... | |
| class | ConstStringListRef |
| 一个适配器。引用一个字符串列表。 更多... | |
| class | ConstStringRef |
| 一个适配器。拥有或引用一个常量字符串。为了方便,这个 类将多个不可变字符串转换为共享表示。 更多... | |
| struct | Dimensions |
| Dimensions 是一个表示终端大小的结构。 更多... | |
| struct | DropdownOption |
| Dropdown 组件的选项。下拉菜单是打开/关闭单选框的复选框。 更多... | |
| struct | EntryState |
| 来自 |ButtonOption|、|CheckboxOption|、 |RadioboxOption|、|MenuEntryOption|、|MenuOption| 的转换参数。 更多... | |
| struct | Event |
| 代表一个事件。它可以是按键事件、终端大小调整等等... 更多... | |
| struct | FlexboxConfig |
| FlexboxConfig 是一个配置结构体,定义了弹性盒子容器的布局属性。 更多... | |
| class | Image |
| 像素的矩形网格。 更多... | |
| struct | InputOption |
| Input 组件的选项。 更多... | |
| struct | InputState |
| 用于定义 Input 组件的样式。 更多... | |
| struct | LinearGradient |
| 一个表示线性渐变颜色效果设置的类。 更多... | |
| class | Loop |
| Loop 是一个管理组件事件循环的类。 更多... | |
| struct | MenuEntryOption |
| MenuEntry 组件的选项。 更多... | |
| struct | MenuOption |
| Menu 组件的选项。 更多... | |
| struct | Mouse |
| 一个鼠标事件。它包含鼠标的坐标、按下的按钮以及修饰符(shift、ctrl、meta)。 更多... | |
| class | Node |
| Node 是 DOM 树中所有元素的基类。 更多... | |
| class | NodeDecorator |
| struct | Pixel |
| 一个 Unicode 字符及其相关样式。 更多... | |
| struct | RadioboxOption |
| Radiobox 组件的选项。 更多... | |
| class | ReceiverImpl |
| class | Ref |
| 一个适配器。拥有或引用一个可变对象。 更多... | |
| struct | Requirement |
| Requirement 是一个结构体,用于定义终端用户界面中 Node 的布局要求。 更多... | |
| struct | ResizableSplitOption |
| class | Screen |
| 像素的矩形网格。 更多... | |
| class | ScreenInteractive |
ScreenInteractive 是一个可以处理事件、运行主循环和管理组件的 Screen。 更多... | |
| class | Selection |
| 代表终端用户界面中的选择。 更多... | |
| class | SenderImpl |
| struct | SliderOption |
| class | StringRef |
| 一个适配器。拥有或引用一个常量字符串。为了方便,这个 类将多个可变字符串转换为共享表示。 更多... | |
| class | Table |
| Table 是一个绘制表格的实用工具。 更多... | |
| class | TableSelection |
| class | TerminalInputParser |
| struct | UnderlineOption |
| 下划线效果的选项。 更多... | |
| struct | WindowOptions |
| struct | WindowRenderState |
传递给 Window 组件渲染函数的 State。 更多... | |
类型定义 | |
| using | CapturedMouse = std::unique_ptr<CapturedMouseInterface> |
| using | ComponentDecorator = std::function<Component(Component)> |
| using | ElementDecorator = std::function<Element(Element)> |
| using | Component = std::shared_ptr<ComponentBase> |
| 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 | 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)> |
枚举 | |
| enum class | Direction { Up = 0 , Down = 1 , Left = 2 , Right = 3 } |
| Direction 是一个枚举,表示四个基本方向。 更多... | |
| enum | BorderStyle { LIGHT , DASHED , HEAVY , DOUBLE , ROUNDED , EMPTY } |
| BorderStyle 是一个枚举,表示可应用于终端 UI 中元素的不同边框样式。 更多... | |
| enum | WidthOrHeight { WIDTH , HEIGHT } |
| enum | Constraint { LESS_THAN , EQUAL , GREATER_THAN } |
| 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 } |
函数 | |
| 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 (ButtonOption option) |
| 绘制一个按钮。点击时执行一个函数。 | |
| Component | Button (ConstStringRef label, std::function< void()> on_click, ButtonOption option) |
| 绘制一个按钮。点击时执行一个函数。 | |
| Component | Checkbox (CheckboxOption option) |
| 绘制可勾选元素。 | |
| Component | Checkbox (ConstStringRef label, bool *checked, CheckboxOption option) |
| 绘制可勾选元素。 | |
| Component | Input (InputOption option) |
| 用于编辑文本的输入框。 | |
| Component | Input (StringRef content, InputOption option) |
| 用于编辑文本的输入框。 | |
| Component | Input (StringRef content, StringRef placeholder, InputOption option) |
| 用于编辑文本的输入框。 | |
| Component | Menu (MenuOption option) |
| 文本列表。選定的元素是焦點。 | |
| Component | Menu (ConstStringListRef entries, int *selected, MenuOption option) |
| 文本列表。選定的元素是焦點。 | |
| Component | MenuEntry (MenuEntryOption option) |
| 一個特定的菜單條目。它們可以放入 Container::Vertical 中形成一個菜單。 | |
| Component | MenuEntry (ConstStringRef label, MenuEntryOption option) |
| 一個特定的菜單條目。它們可以放入 Container::Vertical 中形成一個菜單。 | |
| Component | Radiobox (RadioboxOption option) |
| 元素列表,其中只能选择一个。 | |
| Component | Radiobox (ConstStringListRef entries, int *selected, RadioboxOption option) |
| 元素列表,其中只能选择一个。 | |
| Component | Dropdown (ConstStringListRef entries, int *selected) |
| 一个下拉菜单。 | |
| Component | Dropdown (DropdownOption option) |
| 一个下拉菜单。 | |
| 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) |
| 返回一个新组件,类似于 |child|,但使用 |render| 作为 Component::Render() 事件。 | |
| Component | Renderer (std::function< Element()> render) |
| 返回一个组件,使用 |render| 来渲染其界面。 | |
| Component | Renderer (std::function< Element(bool)> render) |
| 返回一个可聚焦的组件,使用 |render| 来渲染其界面。 | |
| ComponentDecorator | Renderer (ElementDecorator decorator) |
| 装饰一个组件,通过装饰其渲染内容。 | |
| Component | CatchEvent (Component child, std::function< bool(Event)>) |
| ComponentDecorator | CatchEvent (std::function< bool(Event)> on_event) |
| 装饰一个组件,使用|on_event|捕获事件。当事件已被处理时,此函数必须返回true,否则返回false。 | |
| Component | Maybe (Component child, const bool *show) |
| 装饰一个组件 |child|。它仅在 |show| 为 true 时显示。 | |
| Component | Maybe (Component child, std::function< bool()> show) |
| 装饰一个组件 |child|。它仅在 |show| 返回 true 时显示。 true。 | |
| ComponentDecorator | Maybe (const bool *show) |
| 装饰一个组件。它仅在 |show| 为 true 时显示。 | |
| ComponentDecorator | Maybe (std::function< bool()> show) |
| 装饰一个组件。它仅在 |show| 函数返回 true 时显示。 返回 true。 | |
| 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=false) |
| 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 (bool *hover) |
| 包装一个组件。使其能够知道鼠标是否悬停在其上。 | |
| ComponentDecorator | Hoverable (std::function< void()> on_enter, std::function< void()> on_leave) |
| 包装一个组件。使其能够知道鼠标是否悬停在其上。 | |
| ComponentDecorator | Hoverable (std::function< void(bool)> on_change) |
| 包装一个组件。使其能够知道鼠标是否悬停在其上。 | |
| Component | Window (WindowOptions option) |
一个可拖动/可调整大小的窗口。要使用多个窗口,它们必须 使用 Container::Stacked({...}) 组件进行堆叠; | |
| template<class T > | |
| Receiver< T > | MakeReceiver () |
| Element | text (std::wstring text) |
| 显示一段Unicode文本。 | |
| Element | vtext (std::wstring text) |
| 垂直显示一段Unicode文本。 | |
| Elements | paragraph (std::wstring text) |
| 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 | 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) |
| Element | borderLight (Element) |
| Element | borderDashed (Element) |
| Element | borderHeavy (Element) |
| Element | borderDouble (Element) |
| Element | borderRounded (Element) |
| Element | borderEmpty (Element) |
| Decorator | borderStyled (BorderStyle) |
| Decorator | borderStyled (BorderStyle, Color) |
| Decorator | borderStyled (Color) |
| Decorator | borderWith (const Pixel &) |
| Element | window (Element title, Element content, BorderStyle border=ROUNDED) |
| 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 > canvas) |
| 从 Canvas 或 Canvas 引用生成元素。 | |
| Element | canvas (int width, int height, std::function< void(Canvas &)> fn) |
| 生成一个绘制指定大小画布的元素。 | |
| Element | canvas (std::function< void(Canvas &)> fn) |
| 生成一个绘制画布的元素。 | |
| 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 &) |
| Decorator | bgcolor (const LinearGradient &) |
| Element | color (Color color, Element child) |
| 设置元素的前景颜色。 | |
| Element | bgcolor (Color color, Element child) |
| 设置元素的背景颜色。 | |
| Element | color (const LinearGradient &, Element) |
| Element | bgcolor (const LinearGradient &, Element) |
| Decorator | focusPosition (int x, int y) |
在 frame 内部使用,这会强制视图滚动到给定位置。位置以单元格数量表示。 | |
| Decorator | focusPositionRelative (float x, float y) |
在 frame 内部使用,这会强制视图滚动到给定位置。位置以请求大小的比例表示。 | |
| Element | automerge (Element child) |
| 启用字符自动与附近的其它字符合并。 | |
| Decorator | hyperlink (std::string link) |
| 使用超链接进行装饰。 当用户点击时,链接将被打开。 这仅在有限的终端模拟器中受支持。 列表:https://github.com/Alhadis/OSC8-Adoption/ | |
| Element | hyperlink (std::string link, Element child) |
| 使渲染区域可通过网络浏览器点击。 当用户点击时,链接将被打开。 这仅在有限的终端模拟器中受支持。 列表: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) |
| 一个容器,用于从上到下在行中显示元素。当填满时,它会在右侧开始新的一列。 | |
| 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) |
| Element | focusCursorBlockBlinking (Element) |
| Element | focusCursorBar (Element) |
| Element | focusCursorBarBlinking (Element) |
| Element | focusCursorUnderline (Element) |
| Element | focusCursorUnderlineBlinking (Element) |
| 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) |
| 一个什么都不做的装饰器。 | |
| void | Render (Screen &screen, const Element &element) |
| 在 ftxui::Screen 上显示元素。 | |
| void | Render (Screen &screen, Node *node) |
| 在 ftxui::Screen 上显示元素。 | |
| void | Render (Screen &screen, Node *node, Selection &selection) |
| std::string | GetNodeSelectedContent (Screen &screen, Node *node, Selection &selection) |
| Color | operator""_rgb (unsigned long long int combined) |
| 从组合的十六进制 RGB 表示创建颜色, 例如 0x808000_rgb | |
| ColorInfo | GetColorInfo (Color::Palette256 index) |
| ColorInfo | GetColorInfo (Color::Palette16 index) |
| int | wchar_width (wchar_t) |
| int | wstring_width (const std::wstring &) |
| std::string | to_string (const std::wstring &s) |
| 将 std::wstring 转换为 UTF8 std::string。 | |
| std::wstring | to_wstring (const std::string &s) |
| 将 UTF8 std::string 转换为 std::wstring。 | |
| template<typename T > | |
| std::wstring | to_wstring (T s) |
| int | string_width (const std::string &) |
| std::vector< std::string > | Utf8ToGlyphs (const std::string &input) |
| std::vector< int > | CellToGlyphIndex (const std::string &input) |
| Component | CatchEvent (Component child, std::function< bool(Event event)> on_event) |
| 返回一个组件,使用|on_event|捕获事件。当事件已被处理时,此函数必须返回true,否则返回false。 | |
| template Component | Slider (SliderOption< int8_t >) |
| template Component | Slider (SliderOption< int16_t >) |
| template Component | Slider (SliderOption< int32_t >) |
| template Component | Slider (SliderOption< int64_t >) |
| template Component | Slider (SliderOption< uint8_t >) |
| template Component | Slider (SliderOption< uint16_t >) |
| template Component | Slider (SliderOption< uint32_t >) |
| template Component | Slider (SliderOption< uint64_t >) |
| template Component | Slider (SliderOption< float >) |
| template Component | Slider (SliderOption< double >) |
| Element | operator| (Element element, Decorator decorator) |
| 从一个元素中,应用一个装饰器。 | |
| bool | EatCodePoint (const std::string &input, size_t start, size_t *end, uint32_t *ucs) |
| bool | EatCodePoint (const std::wstring &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) |
| size_t | GlyphPrevious (const std::string &input, size_t start) |
| size_t | GlyphNext (const std::string &input, size_t start) |
| size_t | GlyphIterate (const std::string &input, int glyph_offset, size_t start) |
| int | GlyphCount (const std::string &input) |
| std::vector< WordBreakProperty > | Utf8ToWordBreakProperty (const std::string &input) |
| bool | IsWordBreakingCharacter (const std::string &input, size_t glyph_index) |
变量 | |
| const std::map< std::string, std::string > | g_uniformize |
| const std::array< ColorInfo, 256 > | palette256 |
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase
FTXUI 的 ftxui:: 命名空间
FTXUI ftxui::命名空间
FTXUI ftxui:: 命名空间
| using CapturedMouse = std::unique_ptr<CapturedMouseInterface> |
在文件 captured_mouse.hpp 第 20 行定义.
| using ComponentDecorator = std::function<Component(Component)> |
在文件 component.hpp 第 32 行定义.
| using ElementDecorator = std::function<Element(Element)> |
在文件 component.hpp 第 33 行定义.
| typedef std::shared_ptr< ComponentBase > Component = std::shared_ptr<ComponentBase> |
在文件 component_base.hpp 第 23 行定义.
| using Components = std::vector<Component> |
在文件 component_base.hpp 第 24 行定义.
| using Sender = std::unique_ptr<SenderImpl<T>> |
在文件 receiver.hpp 第 51 行定义.
| using Receiver = std::unique_ptr<ReceiverImpl<T>> |
在文件 receiver.hpp 第 53 行定义.
在文件 elements.hpp 第 22 行定义.
在文件 elements.hpp 第 23 行定义.
在文件 elements.hpp 第 24 行定义.
| using GraphFunction = std::function<std::vector<int>(int, int)> |
在文件 elements.hpp 第 25 行定义.
| enum WidthOrHeight |
| 枚举值 | |
|---|---|
| WIDTH | |
| HEIGHT | |
在文件 elements.hpp 第 157 行定义.
| enum Constraint |
| 枚举值 | |
|---|---|
| LESS_THAN | |
| EQUAL | |
| GREATER_THAN | |
在文件 elements.hpp 第 158 行定义.
|
strong |
| 枚举值 | |
|---|---|
| ALetter | |
| CR | |
| Double_Quote | |
| Extend | |
| ExtendNumLet | |
| Format | |
| Hebrew_Letter | |
| Katakana | |
| LF | |
| MidLetter | |
| MidNum | |
| MidNumLet | |
| Newline | |
| Numeric | |
| Regional_Indicator | |
| Single_Quote | |
| WSegSpace | |
| ZWJ | |
在文件 string_internal.hpp 第 38 行定义.
| std::shared_ptr< T > Make | ( | Args &&... | args | ) |
在文件 component.hpp 第 27 行定义.
| Component operator| | ( | Component | component, |
| ComponentDecorator | decorator ) |
在文件 component/util.cpp 第 11 行定义.
| Component operator| | ( | Component | component, |
| ElementDecorator | decorator ) |
在文件 component/util.cpp 第 16 行定义.
| Component & operator|= | ( | Component & | component, |
| ComponentDecorator | decorator ) |
在文件 component/util.cpp 第 21 行定义.
| Component & operator|= | ( | Component & | component, |
| ElementDecorator | decorator ) |
在文件 component/util.cpp 第 27 行定义.
| Component Slider | ( | SliderOption< T > | options | ) |
任意方向的滑块。
| options | 选项 |
在文件 src/ftxui/component/slider.cpp 第 316 行定义.
| Component Slider | ( | ConstStringRef | label, |
| Ref< float > | value, | ||
| ConstRef< float > | min = 0.f, | ||
| ConstRef< float > | max = 100.f, | ||
| ConstRef< float > | increment = 5.f ) |
在文件 src/ftxui/component/slider.cpp 第 273 行定义.
| Component Slider | ( | ConstStringRef | label, |
| Ref< long > | value, | ||
| ConstRef< long > | min = 0L, | ||
| ConstRef< long > | max = 100L, | ||
| ConstRef< long > | increment = 5L ) |
在文件 src/ftxui/component/slider.cpp 第 286 行定义.
| Component ResizableSplit | ( | ResizableSplitOption | options | ) |
两个组件之间的分割。
| options | 所有参数。 |
在文件 src/ftxui/component/resizable_split.cpp 第 169 行定义.
| Component Collapsible | ( | ConstStringRef | label, |
| Component | child, | ||
| Ref< bool > | show = false ) |
| Receiver< T > MakeReceiver | ( | ) |
在文件 receiver.hpp 第 148 行定义.
| Elements paragraph | ( | std::wstring | text | ) |
| Element separatorHSelector | ( | float | left, |
| float | right, | ||
| Color | unselected_color, | ||
| Color | selected_color ) |
绘制一个水平条,左右区域颜色不同。
| left | 活动区域的左侧限制。 |
| right | 活动区域的右侧限制。 |
| selected_color | 选定区域的颜色。 |
| unselected_color | 未选定区域的颜色。 |
在文件 src/ftxui/dom/separator.cpp 第 432 行定义.
绘制一个垂直条,上下区域颜色不同。
| up | 活动区域的左侧限制。 |
| down | 活动区域的右侧限制。 |
| selected_color | 选定区域的颜色。 |
| unselected_color | 未选定区域的颜色。 |
在文件 src/ftxui/dom/separator.cpp 第 501 行定义.
| Element gauge | ( | float | progress | ) |
绘制一个高清进度条。
| progress | 要填充区域的比例。范围在 [0,1] 之间。 |
一个仪表盘。它可以用来表示进度条。
在文件 src/ftxui/dom/gauge.cpp 第 284 行定义.
| Element gaugeLeft | ( | float | progress | ) |
绘制一个从右到左推进的高清进度条。
| progress | 要填充区域的比例。范围在 [0,1] 之间。 |
一个仪表盘。它可以用来表示进度条。
在文件 src/ftxui/dom/gauge.cpp 第 207 行定义.
| Element gaugeRight | ( | float | progress | ) |
绘制一个从左到右推进的高清进度条。
| progress | 要填充区域的比例。范围在 [0,1] 之间。 |
一个仪表盘。它可以用来表示进度条。
在文件 src/ftxui/dom/gauge.cpp 第 186 行定义.
| Element gaugeUp | ( | float | progress | ) |
绘制一个从下到上推进的高清进度条。
| progress | 要填充区域的比例。范围在 [0,1] 之间。 |
一个仪表盘。它可以用来表示进度条。
在文件 src/ftxui/dom/gauge.cpp 第 235 行定义.
| Element gaugeDown | ( | float | progress | ) |
绘制一个从上到下推进的高清进度条。
| progress | 要填充区域的比例。范围在 [0,1] 之间。 |
一个仪表盘。它可以用来表示进度条。
在文件 src/ftxui/dom/gauge.cpp 第 263 行定义.
| Decorator borderStyled | ( | BorderStyle | ) |
| Decorator borderStyled | ( | BorderStyle | , |
| Color | ) |
| Element window | ( | Element | title, |
| Element | content, | ||
| BorderStyle | border = ROUNDED ) |
| Element graph | ( | GraphFunction | graph_function | ) |
在文件 src/ftxui/dom/canvas.cpp 第 890 行定义.
| Decorator color | ( | const LinearGradient & | ) |
| Decorator bgcolor | ( | const LinearGradient & | ) |
| Element color | ( | const LinearGradient & | , |
| Element | ) |
| Element bgcolor | ( | const LinearGradient & | , |
| Element | ) |
设置元素选中时的背景颜色。 请注意,此样式是在现有样式之上应用的。
在文件 selection_style.cpp 第 60 行定义.
设置元素选中时的前景色。 请注意,此样式是在现有样式之上应用的。
在文件 selection_style.cpp 第 68 行定义.
| Element flexbox | ( | Elements | children, |
| FlexboxConfig | config ) |
一个容器,用于在行/列中显示元素,并且在填满时能够换行到下一列/行。
| children | 容器中的元素 |
| config | 选项 |
在文件 flexbox.cpp 第 249 行定义.
一个显示元素网格的容器。
| lines | 行的列表,每行都是元素的列表。 |
Output:
在文件 src/ftxui/dom/gridbox.cpp 第 172 行定义.
在文件 reflect.cpp 第 43 行定义.
| ColorInfo GetColorInfo | ( | Color::Palette256 | index | ) |
在文件 color_info.cpp 第 271 行定义.
| ColorInfo GetColorInfo | ( | Color::Palette16 | index | ) |
在文件 color_info.cpp 第 275 行定义.
| int wchar_width | ( | wchar_t | ucs | ) |
在文件 string.cpp 第 1311 行定义.
| int wstring_width | ( | const std::wstring & | text | ) |
在文件 string.cpp 第 1315 行定义.
| std::string to_string | ( | const std::wstring & | s | ) |
将 std::wstring 转换为 UTF8 std::string。
在文件 string.cpp 第 1563 行定义.
| std::wstring to_wstring | ( | const std::string & | s | ) |
将 UTF8 std::string 转换为 std::wstring。
在文件 string.cpp 第 1635 行定义.
| std::wstring to_wstring | ( | T | s | ) |
在文件 string.hpp 第 15 行定义.
| int string_width | ( | const std::string & | input | ) |
在文件 string.cpp 第 1328 行定义.
| std::vector< std::string > Utf8ToGlyphs | ( | const std::string & | input | ) |
在文件 string.cpp 第 1355 行定义.
| std::vector< int > CellToGlyphIndex | ( | const std::string & | input | ) |
在文件 string.cpp 第 1462 行定义.
| template Component Slider | ( | SliderOption< int8_t > | ) |
| template Component Slider | ( | SliderOption< int16_t > | ) |
| template Component Slider | ( | SliderOption< int32_t > | ) |
| template Component Slider | ( | SliderOption< int64_t > | ) |
| template Component Slider | ( | SliderOption< uint8_t > | ) |
| template Component Slider | ( | SliderOption< uint16_t > | ) |
| template Component Slider | ( | SliderOption< uint32_t > | ) |
| template Component Slider | ( | SliderOption< uint64_t > | ) |
| template Component Slider | ( | SliderOption< float > | ) |
| template Component Slider | ( | SliderOption< double > | ) |
| bool EatCodePoint | ( | const std::string & | input, |
| size_t | start, | ||
| size_t * | end, | ||
| uint32_t * | ucs ) |
在文件 string.cpp 第 1172 行定义.
| bool EatCodePoint | ( | const std::wstring & | input, |
| size_t | start, | ||
| size_t * | end, | ||
| uint32_t * | ucs ) |
在文件 string.cpp 第 1241 行定义.
| bool IsCombining | ( | uint32_t | ucs | ) |
在文件 string.cpp 第 1279 行定义.
| bool IsFullWidth | ( | uint32_t | ucs | ) |
在文件 string.cpp 第 1283 行定义.
| bool IsControl | ( | uint32_t | ucs | ) |
在文件 string.cpp 第 1291 行定义.
| WordBreakProperty CodepointToWordBreakProperty | ( | uint32_t | codepoint | ) |
在文件 string.cpp 第 1305 行定义.
| size_t GlyphPrevious | ( | const std::string & | input, |
| size_t | start ) |
在文件 string.cpp 第 1397 行定义.
| size_t GlyphNext | ( | const std::string & | input, |
| size_t | start ) |
在文件 string.cpp 第 1422 行定义.
| size_t GlyphIterate | ( | const std::string & | input, |
| int | glyph_offset, | ||
| size_t | start ) |
在文件 string.cpp 第 1448 行定义.
| int GlyphCount | ( | const std::string & | input | ) |
在文件 string.cpp 第 1503 行定义.
| std::vector< WordBreakProperty > Utf8ToWordBreakProperty | ( | const std::string & | input | ) |
在文件 string.cpp 第 1531 行定义.
| bool IsWordBreakingCharacter | ( | const std::string & | input, |
| size_t | glyph_index ) |
| const std::map<std::string, std::string> g_uniformize |
在文件 terminal_input_parser.cpp 第 19 行定义.
| const std::array<ColorInfo, 256> palette256 |
在文件 color_info.cpp 第 12 行定义.