FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
ftxui Namespace Reference

El espacio de nombres ftxui:: de FTXUI. More...

Namespaces

namespace  animation
 
namespace  box_helper
 
namespace  Container
 
namespace  Dimension
 Define cómo deben ser las dimensiones de la pantalla.
 
namespace  flexbox_helper
 
namespace  literals
 
namespace  task
 
namespace  Terminal
 
namespace  util
 

Classes

class  AnimationTask
 
class  AutoReset
 Asigna un valor a una variable, restaurando su valor antiguo al salir del ámbito. More...
 
class  ConstRef
 Un adaptador. Posee o referencia un objeto inmutable. More...
 
class  MultiReceiverBuffer
 
class  ReceiverImpl
 
class  Ref
 Un adaptador. Posee o referencia un objeto mutable. 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 es una enumeración que representa las cuatro cardinales direcciones. More...
 
enum  BorderStyle : uint8_t {
  LIGHT ,
  DASHED ,
  HEAVY ,
  DOUBLE ,
  ROUNDED ,
  EMPTY
}
 BorderStyle es una enumeración que representa los diferentes estilos de bordes que se pueden aplicar a los elementos en la interfaz de usuario de la terminal. 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 = {})
 Implementa el renderizado de sí mismo como ftxui::Element. Implementa la navegación por teclado respondiendo a 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)
 Dibuja un botón. Ejecuta una función cuando se hace clic.
 
Component Checkbox (ConstStringRef label, bool *checked, CheckboxOption option)
 Dibuja un elemento marcable.
 
Component Input (StringRef content, InputOption option)
 Una caja de entrada para editar texto.
 
Component Input (StringRef content, StringRef placeholder, InputOption option)
 Una caja de entrada para editar texto.
 
Component Menu (ConstStringListRef entries, int *selected, MenuOption option)
 Una lista de texto. El elemento enfocado está seleccionado.
 
Component MenuEntry (ConstStringRef label, MenuEntryOption option)
 Una entrada de menú específica. Se pueden colocar en un Container::Vertical para formar un menú.
 
Component Radiobox (ConstStringListRef entries, int *selected, RadioboxOption option)
 Una lista de elementos, donde solo uno puede ser seleccionado.
 
Component Dropdown (ConstStringListRef entries, int *selected)
 Un menú desplegable.
 
Component Toggle (ConstStringListRef entries, int *selected)
 Una lista horizontal de elementos. El usuario puede navegar a través de ellos.
 
template<typename T >
Component Slider (SliderOption< T > options)
 Un control deslizante en cualquier dirección.
 
Component Slider (ConstStringRef label, Ref< int > value, ConstRef< int > min, ConstRef< int > max, ConstRef< int > increment)
 Un control deslizante horizontal.
 
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)
 Una división entre dos componentes.
 
Component ResizableSplitLeft (Component main, Component back, int *main_size)
 Una división horizontal entre dos componentes, configurable usando el ratón.
 
Component ResizableSplitRight (Component main, Component back, int *main_size)
 Una división horizontal entre dos componentes, configurable usando el ratón.
 
Component ResizableSplitTop (Component main, Component back, int *main_size)
 Una división vertical entre dos componentes, configurable usando el ratón.
 
Component ResizableSplitBottom (Component main, Component back, int *main_size)
 Una división vertical entre dos componentes, configurable usando el ratón.
 
Component Renderer (Component child, std::function< Element()> render)
 Devuelve un nuevo Component, similar a |child|, pero usando |render| como el evento Component::Render().
 
FTXUI_EXPORT(COMPONENT) Component Renderer(std Component Renderer (std::function< Element(bool)> render)
 Devuelve un componente enfocable, usando |render| para renderizar su interfaz.
 
Component CatchEvent (Component child, std::function< bool(Event)>)
 
ComponentDecorator CatchEvent (std::function< bool(Event)> on_event)
 Decora un componente, usando |on_event| para capturar eventos. Esta función debe devolver true cuando el evento ha sido manejado, false en caso contrario.
 
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)
 Un componente plegable. Muestra una casilla de verificación con una flecha. Una vez activado, se muestra el componente hijo.
 
Component Hoverable (Component component, bool *hover)
 Envuelve un componente. Permite saber si el ratón lo está "hovering".
 
Component Hoverable (Component component, std::function< void()> on_enter, std::function< void()> on_leave)
 Envuelve un componente. Utiliza callbacks.
 
Component Hoverable (Component component, std::function< void(bool)> on_change)
 Envuelve un componente. Permite saber si el ratón lo está "hovering".
 
ComponentDecorator Hoverable (std::function< void()> on_enter, std::function< void()> on_leave)
 Envuelve un componente. Permite saber si el ratón lo está "hovering".
 
ComponentDecorator Hoverable (std::function< void(bool)> on_change)
 Envuelve un componente. Permite saber si el ratón lo está "hovering".
 
template<class T >
Receiver< T > MakeReceiver ()
 
struct FTXUI_EXPORT (DOM) Canvas
 Canvas es un búfer dibujable asociado con operaciones de dibujo.
 
 FTXUI_EXPORT (DOM) Element &operator|
 
FTXUI_EXPORT(DOM) Element separatorCharacter(std Element separatorHSelector (float left, float right, Color unselected_color, Color selected_color)
 Dibuja una barra horizontal, con el área entre izquierda/derecha coloreada de forma diferente.
 
Element separatorVSelector (float up, float down, Color unselected_color, Color selected_color)
 Dibuja una barra vertical, con el área entre arriba/abajo coloreada de forma diferente.
 
Element gaugeCharset (float progress, std::vector< std::string > charset, Direction direction)
 Dibuja una barra de progreso de alta definición usando un conjunto de caracteres personalizado.
 
Element window (Element title, Element content, BorderStyle border)
 Dibuja una ventana con un título y un borde alrededor del elemento.
 
Element canvas (int width, int height, std::function< void(Canvas &)> fn)
 Produce un elemento dibujando un lienzo del tamaño solicitado.
 
Element flexbox (Elements children, FlexboxConfig config)
 Un contenedor que muestra elementos en filas/columnas y es capaz de ajustarse a la siguiente columna/fila cuando está lleno.
 
FTXUI_EXPORT(DOM) Element gridbox(std Element hflow (Elements children)
 Un contenedor que muestra elementos en filas de izquierda a derecha. Cuando está lleno, comienza en una nueva fila debajo.
 
Element vflow (Elements children)
 Un contenedor que muestra elementos en filas de arriba a abajo. Cuando está lleno, comienza en una nueva columna a la derecha.
 
Element xflex (Element child)
 Expandir/Minimizar si es posible/necesario en el eje X.
 
Element xflex_grow (Element child)
 Expandir si es posible en el eje X.
 
Element xflex_shrink (Element child)
 Minimizar si es necesario en el eje X.
 
Element yflex (Element child)
 Expandir/Minimizar si es posible/necesario en el eje Y.
 
Element yflex_grow (Element child)
 Expandir si es posible en el eje Y.
 
Element yflex_shrink (Element child)
 Minimizar si es necesario en el eje Y.
 
void Render (Screen &screen, Node *node, Selection &selection)
 
std::string GetNodeSelectedContent (Screen &screen, Node *node, Selection &selection)
 
struct FTXUI_EXPORT (SCREEN) Box
 Box es una estructura que representa un área rectangular en un espacio 2D.
 
 FTXUI_EXPORT (SCREEN) Color operator""_rgb(unsigned long long int combined)
 Crea un color a partir de una representación RGB hexadecimal combinada, por ejemplo, 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)
 Dibuja un botón. Ejecuta una función cuando se hace clic.
 
Component CatchEvent (Component child, std::function< bool(Event event)> on_event)
 Devuelve un componente, usando |on_event| para capturar eventos. Esta función debe devolver true cuando el evento ha sido manejado, false en caso contrario.
 
Component Checkbox (CheckboxOption option)
 Dibuja un elemento marcable.
 
Component Dropdown (DropdownOption option)
 Un menú desplegable.
 
ComponentDecorator Hoverable (bool *hover)
 Envuelve un componente. Permite saber si el ratón lo está "hovering".
 
Component Input (InputOption option)
 Una caja de entrada para editar texto.
 
Component Maybe (Component child, std::function< bool()> show)
 Decora un componente |child|. Se muestra solo cuando |show| devuelve verdadero.
 
ComponentDecorator Maybe (std::function< bool()> show)
 Decora un componente. Se muestra solo cuando la función |show| devuelve verdadero.
 
Component Maybe (Component child, const bool *show)
 Decora un componente |child|. Se muestra solo cuando |show| es verdadero.
 
ComponentDecorator Maybe (const bool *show)
 Decora un componente. Se muestra solo cuando |show| es verdadero.
 
Component Menu (MenuOption option)
 Una lista de texto. El elemento enfocado está seleccionado.
 
Component MenuEntry (MenuEntryOption option)
 Una entrada de menú específica. Se pueden colocar en un Container::Vertical para formar un menú.
 
Component Radiobox (RadioboxOption option)
 Una lista de elementos, donde solo uno puede ser seleccionado.
 
Component Renderer (std::function< Element()> render)
 Devuelve un componente, usando |render| para renderizar su interfaz.
 
ComponentDecorator Renderer (ElementDecorator decorator)
 Decora un componente, decorando lo que renderiza.
 
Component Window (WindowOptions option)
 Una ventana arrastrable y redimensionable. Para usar varias, deben apilarse usando el componente Container::Stacked({...});.
 
Element automerge (Element child)
 Permite que los caracteres se fusionen automáticamente con otros cercanos.
 
Element blink (Element child)
 El texto dibujado alterna entre visible y oculto.
 
Element bold (Element child)
 Utiliza una fuente en negrita, para elementos con más énfasis.
 
Element border (Element child)
 Dibuja un borde alrededor del elemento.
 
Decorator borderWith (const Cell &pixel)
 Igual que border pero con un Cell constante alrededor del elemento.
 
Decorator borderStyled (BorderStyle style)
 Igual que border pero con estilos diferentes.
 
Decorator borderStyled (Color foreground_color)
 Igual que border pero con un color de primer plano.
 
Decorator borderStyled (BorderStyle style, Color foreground_color)
 Igual que border pero con un color de primer plano y un estilo diferente.
 
Element borderDashed (Element child)
 Dibuja un borde discontinuo alrededor del elemento.
 
Element borderLight (Element child)
 Dibuja un borde ligero alrededor del elemento.
 
Element borderHeavy (Element child)
 Dibuja un borde grueso alrededor del elemento.
 
Element borderDouble (Element child)
 Dibuja un borde doble alrededor del elemento.
 
Element borderRounded (Element child)
 Dibuja un borde redondeado alrededor del elemento.
 
Element borderEmpty (Element child)
 Dibuja un borde vacío alrededor del elemento.
 
Element canvas (ConstRef< Canvas > canvas)
 Produce un elemento a partir de un Canvas, o una referencia a un Canvas.
 
Element canvas (std::function< void(Canvas &)> fn)
 Produce un elemento dibujando un lienzo.
 
Element clear_under (Element element)
 Antes de dibujar |child|, limpia las celdas debajo. Esto es útil en combinación con dbox.
 
Element color (Color color, Element child)
 Establece el color de primer plano de un elemento.
 
Element bgcolor (Color color, Element child)
 Establece el color de fondo de un elemento.
 
Decorator color (Color c)
 Decora usando un color de primer plano.
 
Decorator bgcolor (Color color)
 Decora usando un color de fondo.
 
Element hcenter (Element child)
 Centra un elemento horizontalmente.
 
Element vcenter (Element child)
 Centra un elemento verticalmente.
 
Element center (Element child)
 Centra un elemento horizontal y verticalmente.
 
Element align_right (Element child)
 Alinea un elemento a la derecha.
 
Element dbox (Elements children_)
 Apila varios elementos uno encima de otro.
 
Element dim (Element child)
 Usa una fuente clara para elementos con menos énfasis.
 
Element filler ()
 Un elemento que se expandirá proporcionalmente al espacio restante en un contenedor.
 
Element flex (Element child)
 Hace que un elemento hijo se expanda proporcionalmente al espacio restante en un contenedor.
 
Element flex_grow (Element child)
 Expandir si es posible.
 
Element flex_shrink (Element child)
 Minimizar si es necesario.
 
Element notflex (Element child)
 Hace que el elemento no sea flexible.
 
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)
 Utilizado dentro de un frame, esto fuerza que la vista se desplace hacia una posición determinada. La posición se expresa en proporción del tamaño solicitado.
 
Decorator focusPosition (int x, int y)
 Utilizado dentro de un frame, esto fuerza que la vista se desplace hacia una posición determinada. La posición se expresa en el número de celdas.
 
Element focus (Element child)
 Establece que child sea el elemento enfocado entre sus hermanos.
 
Element select (Element e)
 Establece el child como el enfocado entre sus hermanos.
 
Element frame (Element child)
 Permite que un elemento se muestre dentro de un área 'virtual'. Su tamaño puede ser mayor que su contenedor. En este caso, solo se muestra una porción más pequeña. La vista es desplazable para hacer visible el elemento enfocado.
 
Element xframe (Element child)
 Igual que frame, pero solo en el eje x.
 
Element yframe (Element child)
 Igual que frame, pero solo en el eje y.
 
Element focusCursorBlock (Element child)
 Igual que focus, pero establece la forma del cursor como un bloque fijo.
 
Element focusCursorBlockBlinking (Element child)
 Igual que focus, pero establece la forma del cursor como un bloque parpadeante.
 
Element focusCursorBar (Element child)
 Igual que focus, pero establece la forma del cursor como un bloque fijo.
 
Element focusCursorBarBlinking (Element child)
 Igual que focus, pero establece la forma del cursor como una barra parpadeante.
 
Element focusCursorUnderline (Element child)
 Igual que focus, pero establece la forma del cursor como un subrayado fijo.
 
Element focusCursorUnderlineBlinking (Element child)
 Igual que focus, pero establece la forma del cursor como un subrayado parpadeante.
 
Element gaugeDirection (float progress, Direction direction)
 Dibuja una barra de progreso de alta definición que avanza en la dirección especificada.
 
Element gaugeRight (float progress)
 Dibuja una barra de progreso de alta definición que avanza de izquierda a derecha.
 
Element gaugeLeft (float progress)
 Dibuja una barra de progreso de alta definición que avanza de derecha a izquierda.
 
Element gaugeUp (float progress)
 Dibuja una barra de progreso de alta definición que avanza de abajo hacia arriba.
 
Element gaugeDown (float progress)
 Dibuja una barra de progreso de alta definición que avanza de arriba hacia abajo.
 
Element gauge (float progress)
 Dibuja una barra de progreso de alta definición.
 
Element graph (GraphFunction graph_function)
 Dibuja un gráfico usando una GraphFunction.
 
Element gridbox (std::vector< Elements > lines)
 A container displaying a grid of elements.
 
Element hbox (Elements children)
 Un contenedor que muestra elementos horizontalmente uno por uno.
 
Element hyperlink (std::string_view link, Element child)
 Hace que el área renderizada sea clicable usando un navegador web. El enlace se abrirá cuando el usuario haga clic en él. Esto solo es compatible con un conjunto limitado de emuladores de terminal. Lista: https://github.com/Alhadis/OSC8-Adoption/.
 
Decorator hyperlink (std::string_view link)
 Decora usando un hipervínculo. El enlace se abrirá cuando el usuario haga clic en él. Esto solo es compatible con un conjunto limitado de emuladores de terminal. Lista: https://github.com/Alhadis/OSC8-Adoption/.
 
Element inverted (Element child)
 Agrega un filtro que invertirá los colores de primer plano y de fondo. colores.
 
Element italic (Element child)
 Aplica un doble subrayado al texto.
 
Element color (const LinearGradient &gradient, Element child)
 Establece el color de primer plano de un elemento con efecto de gradiente lineal.
 
Element bgcolor (const LinearGradient &gradient, Element child)
 Establece el color de fondo de un elemento con efecto de gradiente lineal.
 
Decorator color (const LinearGradient &gradient)
 Decora usando un efecto de gradiente lineal en el color de primer plano.
 
Decorator bgcolor (const LinearGradient &gradient)
 Decora usando un efecto de gradiente lineal en el color de fondo.
 
void Render (Screen &screen, const Element &element)
 Muestra un elemento en un ftxui::Screen.
 
void Render (Screen &screen, Node *node)
 Muestra un elemento en un ftxui::Screen.
 
Element paragraph (std::string_view the_text)
 Devuelve un elemento que dibuja el párrafo en varias líneas.
 
Element paragraphAlignLeft (std::string_view the_text)
 Devuelve un elemento que dibuja el párrafo en varias líneas, alineado a la izquierda.
 
Element paragraphAlignRight (std::string_view the_text)
 Devuelve un elemento que dibuja el párrafo en varias líneas, alineado a la derecha.
 
Element paragraphAlignCenter (std::string_view the_text)
 Devuelve un elemento que dibuja el párrafo en varias líneas, alineado al centro.
 
Element paragraphAlignJustify (std::string_view the_text)
 Devuelve un elemento que dibuja el párrafo en varias líneas, alineado utilizando una alineación justificada.
 
Decorator reflect (Box &box)
 
Element vscroll_indicator (Element child)
 Muestra una barra de desplazamiento vertical a la derecha. Los colores siguen el contenido.
 
Element hscroll_indicator (Element child)
 Muestra una barra de desplazamiento horizontal en la parte inferior. Los colores siguen el contenido.
 
Element selectionStyleReset (Element child)
 Restablece el estilo de selección de un elemento.
 
Decorator selectionBackgroundColor (Color foreground)
 Establece el color de fondo de un elemento cuando está seleccionado. Tenga en cuenta que el estilo se aplica además del estilo existente.
 
Decorator selectionForegroundColor (Color foreground)
 Establece el color de primer plano de un elemento cuando está seleccionado. Tenga en cuenta que el estilo se aplica además del estilo existente.
 
Decorator selectionColor (Color foreground)
 Establece el color de un elemento cuando está seleccionado.
 
Decorator selectionStyle (std::function< void(Cell &)> style)
 Establece el estilo de un elemento cuando está seleccionado.
 
Element separator ()
 Dibuja una separación vertical u horizontal entre otros dos elementos.
 
Element separatorStyled (BorderStyle style)
 Dibuja una separación vertical u horizontal entre otros dos elementos.
 
Element separatorLight ()
 Dibuja una separación vertical u horizontal entre otros dos elementos, usando el estilo LIGERO.
 
Element separatorDashed ()
 Dibuja una separación vertical u horizontal entre otros dos elementos, usando el estilo DISCONTINUO.
 
Element separatorHeavy ()
 Dibuja una separación vertical u horizontal entre otros dos elementos, usando el estilo GRUESO.
 
Element separatorDouble ()
 Dibuja una separación vertical u horizontal entre otros dos elementos, usando el estilo DOBLE.
 
Element separatorEmpty ()
 Dibuja una separación vertical u horizontal entre otros dos elementos, usando el estilo VACÍO.
 
Element separatorCharacter (std::string_view value)
 Dibuja una separación vertical u horizontal entre otros dos elementos.
 
Element separator (Cell pixel)
 Dibuja un separador entre dos elementos rellenado con un pixel dado.
 
Decorator size (WidthOrHeight direction, Constraint constraint, int value)
 Aplica una restricción al tamaño de un elemento.
 
Element spinner (int charset_index, size_t image_index)
 Útil para representar el efecto del tiempo y/o eventos. Esto muestra un "video" de arte ASCII.
 
Element strikethrough (Element child)
 Aplica un tachado al texto.
 
Element text (std::string_view text)
 Muestra un fragmento de texto Unicode codificado en UTF8.
 
Element text (std::wstring_view text)
 Muestra un fragmento de texto Unicode.
 
Element vtext (std::string_view text)
 Muestra un fragmento de texto Unicode verticalmente.
 
Element vtext (std::wstring_view text)
 Muestra un fragmento de texto Unicode verticalmente.
 
Element underlined (Element child)
 Subraya el elemento dado.
 
Element underlinedDouble (Element child)
 Aplica un doble subrayado al texto.
 
Element nothing (Element element)
 Una decoración que no hace absolutamente nada.
 
Decorator operator| (Decorator a, Decorator b)
 Compone dos decoradores en uno.
 
Elements operator| (Elements elements, Decorator decorator)
 A partir de un conjunto de elementos, aplica un decorador a cada elemento.
 
Element operator| (Element element, Decorator decorator)
 A partir de un elemento, aplica un decorador.
 
Element & operator|= (Element &e, Decorator d)
 Aplica un decorador a un elemento.
 
Element emptyElement ()
 
Element vbox (Elements children)
 Un contenedor que muestra elementos verticalmente uno por uno.
 
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 to_wstring (std::string_view s)
 
bool IsWordBreakingCharacter (std::string_view input, size_t glyph_index)
 

Variables

const bool * show
 
Direction direction
 
 Color
 Construye un color transparente.
 
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
 

Detailed Description

El espacio de nombres ftxui:: de FTXUI.

Typedef Documentation

◆ Component

typedef std::shared_ptr< ComponentBase > Component = std::shared_ptr<ComponentBase>

Definition at line 23 of file app.hpp.

◆ CapturedMouse

using CapturedMouse = std::unique_ptr<CapturedMouseInterface>

Definition at line 22 of file captured_mouse.hpp.

◆ ComponentDecorator

using ComponentDecorator = std::function<Component(Component)>

Definition at line 33 of file component.hpp.

◆ ElementDecorator

using ElementDecorator = std::function<Element(Element)>

Definition at line 34 of file component.hpp.

◆ Components

using Components = std::vector<Component>

Definition at line 26 of file component_base.hpp.

◆ Sender

template<class T >
using Sender = std::unique_ptr<SenderImpl<T>>

Definition at line 52 of file receiver.hpp.

◆ Receiver

template<class T >
using Receiver = std::unique_ptr<ReceiverImpl<T>>

Definition at line 54 of file receiver.hpp.

◆ ScreenInteractive

using ScreenInteractive = App

Definition at line 10 of file screen_interactive.hpp.

◆ Closure

using Closure = std::function<void()>

Definition at line 13 of file task.hpp.

◆ Task

using Task = std::variant<Event, Closure, AnimationTask>

Definition at line 14 of file task.hpp.

◆ Element

typedef std::shared_ptr< Node > Element = std::shared_ptr<Node>

Definition at line 25 of file elements.hpp.

◆ Elements

typedef std::vector< Element > Elements = std::vector<Element>

Definition at line 26 of file elements.hpp.

◆ Decorator

Decorator = std::function<Element(Element)>

Definition at line 27 of file elements.hpp.

◆ GraphFunction

using GraphFunction = std::function<std::vector<int>(int, int)>

Definition at line 28 of file elements.hpp.

◆ Image

using Image = Surface

Definition at line 11 of file image.hpp.

◆ Pixel

using Pixel = Cell

Definition at line 10 of file pixel.hpp.

Enumeration Type Documentation

◆ WidthOrHeight

enum WidthOrHeight : uint8_t
Enumerator
WIDTH 
HEIGHT 

Definition at line 193 of file elements.hpp.

◆ Constraint

enum Constraint : uint8_t
Enumerator
LESS_THAN 
EQUAL 
GREATER_THAN 

Definition at line 194 of file elements.hpp.

◆ AppDimension

enum class AppDimension
strong
Enumerator
FitComponent 
Fixed 
Fullscreen 
TerminalOutput 

Definition at line 66 of file app.cpp.

◆ WordBreakProperty

enum class WordBreakProperty : int8_t
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.

Function Documentation

◆ Make()

template<class T , class... Args>
std::shared_ptr< T > Make ( Args &&... args)

Definition at line 28 of file component.hpp.

◆ operator|() [1/2]

Component operator| ( Component component,
ComponentDecorator decorator )

Definition at line 12 of file component/util.cpp.

◆ operator|() [2/2]

Component operator| ( Component component,
ElementDecorator decorator )

Definition at line 17 of file component/util.cpp.

◆ operator|=() [1/2]

Component & operator|= ( Component & component,
ComponentDecorator decorator )

Definition at line 22 of file component/util.cpp.

◆ operator|=() [2/2]

Component & operator|= ( Component & component,
ElementDecorator decorator )

Definition at line 28 of file component/util.cpp.

◆ Slider() [1/3]

template<typename T >
Component Slider ( SliderOption< T > options)

Un control deslizante en cualquier dirección.

Parameters
optionsLas opciones

Ejemplo

auto screen = App::TerminalOutput();
int value = 50;
auto slider = Slider({
.value = &value,
.min = 0,
.max = 100,
.increment= 20,
});
screen.Loop(slider);
Component Slider(SliderOption< T > options)
Un control deslizante en cualquier dirección.
int value
Definition elements.hpp:195

Definition at line 315 of file src/ftxui/component/slider.cpp.

◆ Slider() [2/3]

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.

◆ Slider() [3/3]

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.

◆ ResizableSplit()

Component ResizableSplit ( ResizableSplitOption options)

Una división entre dos componentes.

Parameters
optionstodos los parámetros.

Ejemplo

auto left = Renderer([] { return text("Left") | center;});
auto right = Renderer([] { return text("right") | center;});
int left_size = 10;
auto component = ResizableSplit({
.main = left,
.back = right,
.direction = Direction::Left,
.main_size = &left_size,
.separator_func = [] { return separatorDouble(); },
});
Component Renderer(Component child, std::function< Element()>)
Devuelve un nuevo Component, similar a |child|, pero usando |render| como el evento Component::Render...
Element text(std::string_view text)
Muestra un fragmento de texto Unicode codificado en UTF8.
Element center(Element child)
Centra un elemento horizontal y verticalmente.
Element separatorDouble()
Dibuja una separación vertical u horizontal entre otros dos elementos, usando el estilo DOBLE.
Component ResizableSplit(ResizableSplitOption options)
Una división entre dos componentes.
std::uint8_t left
Definition screen.cpp:147
std::uint8_t right
Definition screen.cpp:149

Salida

║
left ║ right
║

Definition at line 170 of file src/ftxui/component/resizable_split.cpp.

◆ CatchEvent()

Component CatchEvent ( Component child,
std::function< bool(Event)>  )

◆ Collapsible()

Component Collapsible ( ConstStringRef label,
Component child,
Ref< bool > show )

Un componente plegable. Muestra una casilla de verificación con una flecha. Una vez activado, se muestra el componente hijo.

Parameters
labelLa etiqueta de la casilla de verificación.
childEl componente hijo a mostrar.
showMantiene el estado sobre si el componente hijo se muestra o no.

Ejemplo

auto component = Collapsible("Show details", details);
Component Collapsible(ConstStringRef label, Component child, Ref< bool > show=false)
Un componente plegable. Muestra una casilla de verificación con una flecha. Una vez activado,...

Salida

▼ Show details
<details component>

Definition at line 33 of file src/ftxui/component/collapsible.cpp.

◆ MakeReceiver()

template<class T >
Receiver< T > MakeReceiver ( )

Definition at line 149 of file receiver.hpp.

◆ FTXUI_EXPORT() [1/2]

FTXUI_EXPORT ( DOM ) &

◆ separatorHSelector()

Element separatorHSelector ( float left,
float right,
Color unselected_color,
Color selected_color )

Dibuja una barra horizontal, con el área entre izquierda/derecha coloreada de forma diferente.

Parameters
leftel límite izquierdo del área activa.
rightel límite derecho del área activa.
selected_colorel color del área seleccionada.
unselected_colorel color del área no seleccionada.

Ejemplo

Element document = separatorHSelector(2,5, Color::White, Color::Blue);
std::shared_ptr< Node > Element
Definition elements.hpp:25
FTXUI_EXPORT(DOM) Element separatorCharacter(std Element separatorHSelector(float left, float right, Color unselected_color, Color selected_color)
Dibuja una barra horizontal, con el área entre izquierda/derecha coloreada de forma diferente.

Definition at line 444 of file src/ftxui/dom/separator.cpp.

◆ separatorVSelector()

Element separatorVSelector ( float up,
float down,
Color unselected_color,
Color selected_color )

Dibuja una barra vertical, con el área entre arriba/abajo coloreada de forma diferente.

Parameters
upel límite superior del área activa.
downel límite inferior del área activa.
selected_colorel color del área seleccionada.
unselected_colorel color del área no seleccionada.

Ejemplo

Element document = separatorHSelector(2,5, Color::White, Color::Blue);

Definition at line 514 of file src/ftxui/dom/separator.cpp.

◆ canvas() [1/3]

Element canvas ( int width,
int height,
std::function< void(Canvas &)> fn )

Produce un elemento dibujando un lienzo del tamaño solicitado.

Parameters
widthel ancho del lienzo.
heightla altura del lienzo.
fnuna función que dibuja el lienzo.

Definition at line 924 of file src/ftxui/dom/canvas.cpp.

◆ flexbox()

Element flexbox ( Elements children,
FlexboxConfig config )

Un contenedor que muestra elementos en filas/columnas y es capaz de ajustarse a la siguiente columna/fila cuando está lleno.

Parameters
childrenLos elementos en el contenedor
configLa opción
Returns
El contenedor.

Ejemplo

text("element 1"),
text("element 2"),
text("element 3"),
}, FlexboxConfig()
.Set(FlexboxConfig::Direction::Column)
.Set(FlexboxConfig::Wrap::WrapInversed)
.SetGapMainAxis(1)
.SetGapCrossAxis(1)
)
Element flexbox(Elements, FlexboxConfig config=FlexboxConfig())
Un contenedor que muestra elementos en filas/columnas y es capaz de ajustarse a la siguiente columna/...
Definition flexbox.cpp:252

Definition at line 252 of file flexbox.cpp.

◆ hflow()

Element hflow ( Elements children)

Un contenedor que muestra elementos en filas de izquierda a derecha. Cuando está lleno, comienza en una nueva fila debajo.

Parameters
childrenLos elementos en el contenedor
Returns
El contenedor.

Ejemplo

text("element 1"),
text("element 2"),
text("element 3"),
});
FTXUI_EXPORT(DOM) Element gridbox(std Element hflow(Elements)
Un contenedor que muestra elementos en filas de izquierda a derecha. Cuando está lleno,...
Definition flexbox.cpp:270

Definition at line 270 of file flexbox.cpp.

◆ vflow()

Element vflow ( Elements children)

Un contenedor que muestra elementos en filas de arriba a abajo. Cuando está lleno, comienza en una nueva columna a la derecha.

Parameters
childrenLos elementos en el contenedor
Returns
El contenedor.

Ejemplo

text("element 1"),
text("element 2"),
text("element 3"),
});
Element vflow(Elements)
Un contenedor que muestra elementos en filas de arriba a abajo. Cuando está lleno,...
Definition flexbox.cpp:288

Definition at line 288 of file flexbox.cpp.

◆ Render()

void Render ( Screen & screen,
Node * node,
Selection & selection )

Definition at line 105 of file node.cpp.

◆ GetNodeSelectedContent()

std::string GetNodeSelectedContent ( Screen & screen,
Node * node,
Selection & selection )

Definition at line 179 of file node.cpp.

◆ to_wstring() [1/4]

template<typename T >
FTXUI_EXPORT(SCREEN) std FTXUI_EXPORT(SCREEN) std std::wstring to_wstring ( T s)

Definition at line 18 of file string.hpp.

◆ to_wstring() [2/4]

std::wstring to_wstring ( const std::string & s)
inline

Definition at line 21 of file string.hpp.

◆ to_wstring() [3/4]

template<>
std::wstring to_wstring ( const char * s)
inline

Definition at line 25 of file string.hpp.

◆ Utf8ToGlyphs()

std::vector< std::string > Utf8ToGlyphs ( std::string_view input)

Definition at line 358 of file string.cpp.

◆ CellToGlyphIndex()

std::vector< int > CellToGlyphIndex ( std::string_view input)

Definition at line 471 of file string.cpp.

◆ canvas() [2/3]

Element canvas ( ConstRef< Canvas > canvas)

Produce un elemento a partir de un Canvas, o una referencia a un Canvas.

Definition at line 900 of file src/ftxui/dom/canvas.cpp.

◆ canvas() [3/3]

Element canvas ( std::function< void(Canvas &)> fn)

Produce un elemento dibujando un lienzo.

Parameters
fnuna función que dibuja el lienzo.

Definition at line 954 of file src/ftxui/dom/canvas.cpp.

◆ flex_factor()

Decorator flex_factor ( int grow,
int shrink )

Definition at line 153 of file flex.cpp.

◆ flex_grow_factor()

Decorator flex_grow_factor ( int grow)

Definition at line 159 of file flex.cpp.

◆ flex_shrink_factor()

Decorator flex_shrink_factor ( int shrink)

Definition at line 165 of file flex.cpp.

◆ xflex_factor()

Decorator xflex_factor ( int grow,
int shrink )

Definition at line 171 of file flex.cpp.

◆ xflex_grow_factor()

Decorator xflex_grow_factor ( int grow)

Definition at line 177 of file flex.cpp.

◆ xflex_shrink_factor()

Decorator xflex_shrink_factor ( int shrink)

Definition at line 183 of file flex.cpp.

◆ yflex_factor()

Decorator yflex_factor ( int grow,
int shrink )

Definition at line 189 of file flex.cpp.

◆ yflex_grow_factor()

Decorator yflex_grow_factor ( int grow)

Definition at line 195 of file flex.cpp.

◆ yflex_shrink_factor()

Decorator yflex_shrink_factor ( int shrink)

Definition at line 201 of file flex.cpp.

◆ select()

Element select ( Element e)

Establece el child como el enfocado entre sus hermanos.

Esto está obsoleto. Use focus en su lugar.

Parameters
eEl elemento a enfocar.

Definition at line 108 of file frame.cpp.

◆ frame()

Element frame ( Element child)

Permite que un elemento se muestre dentro de un área 'virtual'. Su tamaño puede ser mayor que su contenedor. En este caso, solo se muestra una porción más pequeña. La vista es desplazable para hacer visible el elemento enfocado.

See also
frame
xframe
yframe

Definition at line 118 of file frame.cpp.

◆ xframe()

Element xframe ( Element child)

Igual que frame, pero solo en el eje x.

See also
frame
xframe
yframe

Definition at line 126 of file frame.cpp.

◆ yframe()

Element yframe ( Element child)

Igual que frame, pero solo en el eje y.

See also
frame
xframe
yframe

Definition at line 134 of file frame.cpp.

◆ graph()

Element graph ( GraphFunction graph_function)

Dibuja un gráfico usando una GraphFunction.

Parameters
graph_functionla función a ser llamada para obtener los datos.

Definition at line 79 of file src/ftxui/dom/graph.cpp.

◆ gridbox()

Element gridbox ( std::vector< Elements > lines)

A container displaying a grid of elements.

Parameters
linesA list of lines, each line being a list of elements.
Returns
The container.

Example

auto cell = [](const char* t) { return text(t) | border; };
auto document = gridbox({
{cell("north-west") , cell("north") , cell("north-east")} ,
{cell("west") , cell("center") , cell("east")} ,
{cell("south-west") , cell("south") , cell("south-east")} ,
});
Element border(Element child)
Dibuja un borde alrededor del elemento.
Element gridbox(std::vector< Elements > lines)
A container displaying a grid of elements.

Output:

╭──────────╮╭──────╮╭──────────╮
│north-west││north ││north-east│
╰──────────╯╰──────╯╰──────────╯
╭──────────╮╭──────╮╭──────────╮
│west ││center││east │
╰──────────╯╰──────╯╰──────────╯
╭──────────╮╭──────╮╭──────────╮
│south-west││south ││south-east│
╰──────────╯╰──────╯╰──────────╯

Definition at line 178 of file src/ftxui/dom/gridbox.cpp.

◆ hbox()

Element hbox ( Elements children)

Un contenedor que muestra elementos horizontalmente uno por uno.

Parameters
childrenLos elementos en el contenedor
Returns
El contenedor.

Ejemplo

text("Left"),
text("Right"),
});
Element hbox(Elements children)
Un contenedor que muestra elementos horizontalmente uno por uno.
Definition hbox.cpp:94

Definition at line 94 of file hbox.cpp.

◆ reflect()

Decorator reflect ( Box & box)

Definition at line 43 of file reflect.cpp.

◆ selectionStyleReset()

Element selectionStyleReset ( Element child)

Restablece el estilo de selección de un elemento.

Parameters
childEl elemento de entrada.
Returns
El elemento de salida con el estilo de selección restablecido.

Definition at line 55 of file selection_style.cpp.

◆ selectionBackgroundColor()

Decorator selectionBackgroundColor ( Color foreground)

Establece el color de fondo de un elemento cuando está seleccionado. Tenga en cuenta que el estilo se aplica además del estilo existente.

Definition at line 61 of file selection_style.cpp.

◆ selectionForegroundColor()

Decorator selectionForegroundColor ( Color foreground)

Establece el color de primer plano de un elemento cuando está seleccionado. Tenga en cuenta que el estilo se aplica además del estilo existente.

Definition at line 69 of file selection_style.cpp.

◆ selectionColor()

Decorator selectionColor ( Color foreground)

Establece el color de un elemento cuando está seleccionado.

Parameters
foregroundEl color a aplicar. Tenga en cuenta que el estilo se aplica además del estilo existente.

Definition at line 78 of file selection_style.cpp.

◆ selectionStyle()

Decorator selectionStyle ( std::function< void(Cell &)> style)

Establece el estilo de un elemento cuando está seleccionado.

Parameters
styleEl estilo a aplicar. Tenga en cuenta que el estilo se aplica además del estilo existente.

Definition at line 86 of file selection_style.cpp.

◆ GetColorInfo() [1/2]

ColorInfo GetColorInfo ( Color::Palette256 index)

Definition at line 273 of file color_info.cpp.

◆ GetColorInfo() [2/2]

ColorInfo GetColorInfo ( Color::Palette16 index)

Definition at line 277 of file color_info.cpp.

◆ ColorInfoSorted2D()

std::vector< std::vector< ColorInfo > > ColorInfoSorted2D ( )

Definition at line 282 of file color_info.cpp.

◆ EatCodePoint() [1/2]

bool EatCodePoint ( std::string_view input,
size_t start,
size_t * end,
uint32_t * ucs )

From UTF8 encoded string |input|, eat in between 1 and 4 byte representing one codepoint. Put the codepoint into |ucs|. Start at |start| and update |end| to represent the beginning of the next byte to eat for consecutive executions.

Definition at line 142 of file string.cpp.

◆ EatCodePoint() [2/2]

bool EatCodePoint ( std::wstring_view input,
size_t start,
size_t * end,
uint32_t * ucs )

From UTF16 encoded string |input|, eat in between 1 and 4 byte representing one codepoint. Put the codepoint into |ucs|. Start at |start| and update |end| to represent the beginning of the next byte to eat for consecutive executions.

Definition at line 216 of file string.cpp.

◆ IsCombining()

bool IsCombining ( uint32_t ucs)

Definition at line 254 of file string.cpp.

◆ IsFullWidth()

bool IsFullWidth ( uint32_t ucs)

Definition at line 258 of file string.cpp.

◆ IsControl()

bool IsControl ( uint32_t ucs)

Definition at line 266 of file string.cpp.

◆ CodepointToWordBreakProperty()

WordBreakProperty CodepointToWordBreakProperty ( uint32_t codepoint)

Definition at line 280 of file string.cpp.

◆ wchar_width()

int wchar_width ( wchar_t ucs)

Definition at line 286 of file string.cpp.

◆ wstring_width()

int wstring_width ( const std::wstring & text)

Definition at line 290 of file string.cpp.

◆ string_width()

int string_width ( std::string_view input)

Definition at line 308 of file string.cpp.

◆ GlyphPrevious()

size_t GlyphPrevious ( std::string_view input,
size_t start )

Definition at line 402 of file string.cpp.

◆ GlyphNext()

size_t GlyphNext ( std::string_view input,
size_t start )

Definition at line 428 of file string.cpp.

◆ GlyphIterate()

size_t GlyphIterate ( std::string_view input,
int glyph_offset,
size_t start )

Definition at line 457 of file string.cpp.

◆ GlyphCount()

int GlyphCount ( std::string_view input)

Definition at line 514 of file string.cpp.

◆ Utf8ToWordBreakProperty()

std::vector< WordBreakProperty > Utf8ToWordBreakProperty ( std::string_view input)

Definition at line 544 of file string.cpp.

◆ to_string()

std::string to_string ( std::wstring_view s)

Convert a std::wstring into a UTF8 std::string. Convierte un std::wstring en un std::string UTF8.

Definition at line 576 of file string.cpp.

◆ to_wstring() [4/4]

std::wstring to_wstring ( std::string_view s)

Convert a UTF8 std::string into a std::wstring. Convierte un std::string UTF8 en un std::wstring.

Definition at line 650 of file string.cpp.

◆ IsWordBreakingCharacter()

bool IsWordBreakingCharacter ( std::string_view input,
size_t glyph_index )

Variable Documentation

◆ show

const bool* show

Definition at line 159 of file component.hpp.

◆ direction

Direction direction

Definition at line 83 of file elements.hpp.

◆ Color

Color
default

Construye un color transparente.

Construye un Color a partir de su representación RGB. https://en.wikipedia.org/wiki/RGB_color_model.

Construye un color usando los colores de la Paleta256.

Construye un color usando los colores de la Paleta16.

Parameters
redLa cantidad de rojo [0,255]
greenLa cantidad de verde [0,255]
blueLa cantidad de azul [0,255]
alphaLa cantidad de alfa [0,255]

Definition at line 99 of file elements.hpp.

◆ image_index

size_t image_index

Definition at line 104 of file elements.hpp.

◆ y

float y

Definition at line 134 of file elements.hpp.

◆ shrink

int shrink

Definition at line 165 of file elements.hpp.

◆ Constraint

Definition at line 195 of file elements.hpp.

◆ value

int value

Definition at line 195 of file elements.hpp.

◆ element

const Element& element

Definition at line 95 of file node.hpp.

◆ node

Node* node

Definition at line 96 of file node.hpp.

◆ g_uniformize

const std::map<std::string, std::string> g_uniformize

Definition at line 19 of file terminal_input_parser.cpp.

◆ palette256

const std::array<ColorInfo, 256> palette256

Definition at line 14 of file color_info.cpp.