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

L'espace de noms FTXUI ftxui:: More...

Namespaces

namespace  animation
 
namespace  box_helper
 
namespace  Container
 
namespace  Dimension
 Définit l'apparence des dimensions de l'écran.
 
namespace  flexbox_helper
 
namespace  literals
 
namespace  task
 
namespace  Terminal
 
namespace  util
 

Classes

class  AnimationTask
 
class  AutoReset
 Assigne une valeur à une variable, restaure son ancienne valeur lorsque la portée est quittée. More...
 
class  ConstRef
 Un adaptateur. Possède ou référence un objet immuable. More...
 
class  MultiReceiverBuffer
 
class  ReceiverImpl
 
class  Ref
 Un adaptateur. Possède ou référence un objet 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 est une énumération qui représente les quatre directions cardinales. More...
 
enum  BorderStyle : uint8_t {
  LIGHT ,
  DASHED ,
  HEAVY ,
  DOUBLE ,
  ROUNDED ,
  EMPTY
}
 BorderStyle est une énumération qui représente les différents styles de bordures pouvant être appliqués aux éléments de l'interface utilisateur du 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 = {})
 Il implémente son propre rendu en tant que ftxui::Element. Il implémente la navigation au clavier en répondant à 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)
 Dessine un bouton. Exécute une fonction lorsqu'il est cliqué.
 
Component Checkbox (ConstStringRef label, bool *checked, CheckboxOption option)
 Dessine un élément cochable.
 
Component Input (StringRef content, InputOption option)
 Une boîte de saisie pour éditer du texte.
 
Component Input (StringRef content, StringRef placeholder, InputOption option)
 Une boîte de saisie pour éditer du texte.
 
Component Menu (ConstStringListRef entries, int *selected, MenuOption option)
 Une liste de texte. L'élément focalisé est sélectionné.
 
Component MenuEntry (ConstStringRef label, MenuEntryOption option)
 Une entrée de menu spécifique. Elles peuvent être placées dans un Container::Vertical pour former un menu.
 
Component Radiobox (ConstStringListRef entries, int *selected, RadioboxOption option)
 Une liste d'éléments, où un seul peut être sélectionné.
 
Component Dropdown (ConstStringListRef entries, int *selected)
 Un menu déroulant.
 
Component Toggle (ConstStringListRef entries, int *selected)
 Une liste horizontale d'éléments. L'utilisateur peut naviguer à travers eux.
 
template<typename T >
Component Slider (SliderOption< T > options)
 Un curseur dans n'importe quelle direction.
 
Component Slider (ConstStringRef label, Ref< int > value, ConstRef< int > min, ConstRef< int > max, ConstRef< int > increment)
 Un curseur 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)
 Une séparation entre deux composants.
 
Component ResizableSplitLeft (Component main, Component back, int *main_size)
 Une division horizontale entre deux composants, configurable en utilisant la souris.
 
Component ResizableSplitRight (Component main, Component back, int *main_size)
 Une division horizontale entre deux composants, configurable en utilisant la souris.
 
Component ResizableSplitTop (Component main, Component back, int *main_size)
 Une division verticale entre deux composants, configurable en utilisant la souris.
 
Component ResizableSplitBottom (Component main, Component back, int *main_size)
 Une division verticale entre deux composants, configurable en utilisant la souris.
 
Component Renderer (Component child, std::function< Element()> render)
 Retourne un nouveau Component, similaire à |child|, mais utilisant |render| comme événement Component::Render().
 
FTXUI_EXPORT(COMPONENT) Component Renderer(std Component Renderer (std::function< Element(bool)> render)
 Retourne un composant focalisable, utilisant |render| pour dessiner son interface.
 
Component CatchEvent (Component child, std::function< bool(Event)>)
 
ComponentDecorator CatchEvent (std::function< bool(Event)> on_event)
 Décore un composant, utilisant |on_event| pour intercepter les événements. Cette fonction doit retourner true lorsque l'événement a été traité, false sinon.
 
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 composant repliable. Il affiche une case à cocher avec une flèche. Une fois activé, l'enfant est affiché.
 
Component Hoverable (Component component, bool *hover)
 Encapsule un composant. Donne la possibilité de savoir s'il est survolé par la souris.
 
Component Hoverable (Component component, std::function< void()> on_enter, std::function< void()> on_leave)
 Encapsule un composant. Utilise des callbacks.
 
Component Hoverable (Component component, std::function< void(bool)> on_change)
 Encapsule un composant. Donne la possibilité de savoir s'il est survolé par la souris.
 
ComponentDecorator Hoverable (std::function< void()> on_enter, std::function< void()> on_leave)
 Encapsule un composant. Donne la possibilité de savoir s'il est survolé par la souris.
 
ComponentDecorator Hoverable (std::function< void(bool)> on_change)
 Encapsule un composant. Donne la possibilité de savoir s'il est survolé par la souris.
 
template<class T >
Receiver< T > MakeReceiver ()
 
struct FTXUI_EXPORT (DOM) Canvas
 Canvas est un tampon dessinable associé aux opérations de dessin.
 
 FTXUI_EXPORT (DOM) Element &operator|
 
FTXUI_EXPORT(DOM) Element separatorCharacter(std Element separatorHSelector (float left, float right, Color unselected_color, Color selected_color)
 Dessine une barre horizontale, avec la zone entre la gauche et la droite colorée différemment.
 
Element separatorVSelector (float up, float down, Color unselected_color, Color selected_color)
 Dessine une barre verticale, avec la zone entre le haut et le bas colorée différemment.
 
Element gaugeCharset (float progress, std::vector< std::string > charset, Direction direction)
 Dessine une barre de progression haute définition en utilisant un jeu de caractères personnalisé.
 
Element window (Element title, Element content, BorderStyle border)
 Dessine une fenêtre avec un titre et une bordure autour de l'élément.
 
Element canvas (int width, int height, std::function< void(Canvas &)> fn)
 Produit un élément dessinant un canevas de la taille demandée.
 
Element flexbox (Elements children, FlexboxConfig config)
 Un conteneur affichant des éléments sur des lignes/colonnes et capable de passer à la colonne/ligne suivante lorsqu'il est plein.
 
FTXUI_EXPORT(DOM) Element gridbox(std Element hflow (Elements children)
 Un conteneur affichant des éléments en lignes de gauche à droite. Quand il est rempli, il commence sur une nouvelle ligne en dessous.
 
Element vflow (Elements children)
 Un conteneur affichant des éléments en colonnes de haut en bas. Quand il est rempli, il commence sur une nouvelle colonne à droite.
 
Element xflex (Element child)
 Développer/Réduire si possible/nécessaire sur l'axe X.
 
Element xflex_grow (Element child)
 S'étend si possible sur l'axe X.
 
Element xflex_shrink (Element child)
 Minimiser si nécessaire sur l'axe X.
 
Element yflex (Element child)
 Développer/Réduire si possible/nécessaire sur l'axe Y.
 
Element yflex_grow (Element child)
 S'étend si possible sur l'axe Y.
 
Element yflex_shrink (Element child)
 Minimiser si nécessaire sur l'axe Y.
 
void Render (Screen &screen, Node *node, Selection &selection)
 
std::string GetNodeSelectedContent (Screen &screen, Node *node, Selection &selection)
 
struct FTXUI_EXPORT (SCREEN) Box
 Box est une structure qui représente une zone rectangulaire dans un espace 2D.
 
 FTXUI_EXPORT (SCREEN) Color operator""_rgb(unsigned long long int combined)
 Crée une couleur à partir d'une représentation RGB hexadécimale combinée, par exemple 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)
 Dessine un bouton. Exécute une fonction lorsqu'il est cliqué.
 
Component CatchEvent (Component child, std::function< bool(Event event)> on_event)
 Retourne un composant, utilisant |on_event| pour intercepter les événements. Cette fonction doit retourner true lorsque l'événement a été traité, false sinon.
 
Component Checkbox (CheckboxOption option)
 Dessine un élément cochable.
 
Component Dropdown (DropdownOption option)
 Un menu déroulant.
 
ComponentDecorator Hoverable (bool *hover)
 Encapsule un composant. Donne la possibilité de savoir s'il est survolé par la souris.
 
Component Input (InputOption option)
 Une boîte de saisie pour éditer du texte.
 
Component Maybe (Component child, std::function< bool()> show)
 Décore un composant |child|. Il est affiché uniquement lorsque |show| retourne vrai.
 
ComponentDecorator Maybe (std::function< bool()> show)
 Décore un composant. Il est affiché uniquement lorsque la fonction |show| retourne vrai.
 
Component Maybe (Component child, const bool *show)
 Décore un composant |child|. Il est affiché uniquement lorsque |show| est vrai.
 
ComponentDecorator Maybe (const bool *show)
 Décore un composant. Il est affiché uniquement lorsque |show| est vrai.
 
Component Menu (MenuOption option)
 Une liste de texte. L'élément focalisé est sélectionné.
 
Component MenuEntry (MenuEntryOption option)
 Une entrée de menu spécifique. Elles peuvent être placées dans un Container::Vertical pour former un menu.
 
Component Radiobox (RadioboxOption option)
 Une liste d'éléments, où un seul peut être sélectionné.
 
Component Renderer (std::function< Element()> render)
 Retourne un composant, utilisant |render| pour dessiner son interface.
 
ComponentDecorator Renderer (ElementDecorator decorator)
 Décore un composant, en décorant ce qu'il dessine.
 
Element automerge (Element child)
 Permet aux caractères d'être fusionnés automatiquement avec d'autres à proximité.
 
Element blink (Element child)
 Le texte affiché alterne entre visible et masqué.
 
Element bold (Element child)
 Utilise une police en gras, pour les éléments avec plus d'emphase.
 
Element border (Element child)
 Dessine une bordure autour de l'élément.
 
Decorator borderWith (const Cell &pixel)
 Identique à border mais avec une Cell constante autour de l'élément.
 
Decorator borderStyled (BorderStyle style)
 Identique à border mais avec différents styles.
 
Decorator borderStyled (Color foreground_color)
 Identique à border mais avec une couleur de premier plan.
 
Decorator borderStyled (BorderStyle style, Color foreground_color)
 Identique à border mais avec une couleur de premier plan et un style différent.
 
Element borderDashed (Element child)
 Dessine une bordure en pointillés autour de l'élément.
 
Element borderLight (Element child)
 Dessine une bordure fine autour de l'élément.
 
Element borderHeavy (Element child)
 Dessine une bordure épaisse autour de l'élément.
 
Element borderDouble (Element child)
 Dessine une double bordure autour de l'élément.
 
Element borderRounded (Element child)
 Dessine une bordure arrondie autour de l'élément.
 
Element borderEmpty (Element child)
 Dessine une bordure vide autour de l'élément.
 
Element canvas (ConstRef< Canvas > canvas)
 Produit un élément à partir d'un Canevas, ou une référence à un Canevas.
 
Element canvas (std::function< void(Canvas &)> fn)
 Produit un élément dessinant un canevas.
 
Element clear_under (Element element)
 Avant de dessiner |child|, efface les cellules en dessous. Ceci est utile en combinaison avec dbox.
 
Element color (Color color, Element child)
 Définit la couleur de premier plan d'un élément.
 
Element bgcolor (Color color, Element child)
 Définit la couleur d'arrière-plan d'un élément.
 
Decorator color (Color c)
 Décore en utilisant une couleur de premier plan.
 
Decorator bgcolor (Color color)
 Décore en utilisant une couleur d'arrière-plan.
 
Element hcenter (Element child)
 Centre un élément horizontalement.
 
Element vcenter (Element child)
 Centre un élément verticalement.
 
Element center (Element child)
 Centre un élément horizontalement et verticalement.
 
Element align_right (Element child)
 Aligne un élément sur le côté droit.
 
Element dbox (Elements children_)
 Empile plusieurs éléments les uns sur les autres.
 
Element dim (Element child)
 Utilise une police de caractères claire, pour les éléments moins mis en valeur.
 
Element filler ()
 Un élément qui s'étendra proportionnellement à l'espace restant dans un conteneur.
 
Element flex (Element child)
 Permet à un élément enfant de s'étendre proportionnellement à l'espace restant dans un conteneur.
 
Element flex_grow (Element child)
 S'étend si possible.
 
Element flex_shrink (Element child)
 Minimiser si nécessaire.
 
Element notflex (Element child)
 Rend l'élément non 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)
 Utilisé à l'intérieur d'un frame, cela force la vue à être défilée vers une position donnée. La position est exprimée en proportion de la taille demandée.
 
Decorator focusPosition (int x, int y)
 Utilisé à l'intérieur d'un frame, cela force la vue à être défilée vers une position donnée. La position est exprimée en nombre de cellules.
 
Element focus (Element child)
 Définit l'élément child comme étant celui qui est focalisé parmi ses frères.
 
Element select (Element e)
 Définit child comme étant l'élément focalisé parmi ses frères et sœurs.
 
Element frame (Element child)
 Permet à un élément d'être affiché dans une zone 'virtuelle'. Sa taille peut être plus grande que son conteneur. Dans ce cas, seule une plus petite partie est affichée. La vue est défilable pour rendre l'élément focalisé visible.
 
Element xframe (Element child)
 Identique à frame, mais seulement sur l'axe x.
 
Element yframe (Element child)
 Identique à frame, mais seulement sur l'axe y.
 
Element focusCursorBlock (Element child)
 Identique à focus, mais définit la forme du curseur comme un bloc fixe.
 
Element focusCursorBlockBlinking (Element child)
 Identique à focus, mais définit la forme du curseur comme un bloc clignotant.
 
Element focusCursorBar (Element child)
 Identique à focus, mais définit la forme du curseur comme un bloc fixe.
 
Element focusCursorBarBlinking (Element child)
 Identique à focus, mais définit la forme du curseur comme une barre clignotante.
 
Element focusCursorUnderline (Element child)
 Identique à focus, mais définit la forme du curseur comme un soulignement fixe.
 
Element focusCursorUnderlineBlinking (Element child)
 Identique à focus, mais définit la forme du curseur comme un soulignement clignotant.
 
Element gaugeDirection (float progress, Direction direction)
 Dessine une barre de progression haute définition progressant dans la direction spécifiée.
 
Element gaugeRight (float progress)
 Dessine une barre de progression en haute définition progressant de gauche à droite.
 
Element gaugeLeft (float progress)
 Dessine une barre de progression en haute définition progressant de droite à gauche.
 
Element gaugeUp (float progress)
 Dessine une barre de progression en haute définition progressant de bas en haut.
 
Element gaugeDown (float progress)
 Dessine une barre de progression haute définition progressant de haut en bas.
 
Element gauge (float progress)
 Dessine une barre de progression haute définition.
 
Element graph (GraphFunction graph_function)
 Dessine un graphique en utilisant une GraphFunction.
 
Element gridbox (std::vector< Elements > lines)
 A container displaying a grid of elements.
 
Element hbox (Elements children)
 Un conteneur affichant les éléments horizontalement un par un.
 
Element hyperlink (std::string_view link, Element child)
 Rend la zone affichée cliquable à l'aide d'un navigateur web. Le lien sera ouvert lorsque l'utilisateur cliquera dessus. Ceci n'est pris en charge que par un ensemble limité d'émulateurs de terminal. Liste: https://github.com/Alhadis/OSC8-Adoption/.
 
Decorator hyperlink (std::string_view link)
 Décore avec un hyperlien. Le lien sera ouvert lorsque l'utilisateur cliquera dessus. Ceci n'est pris en charge que par un ensemble limité d'émulateurs de terminal. Liste: https://github.com/Alhadis/OSC8-Adoption/.
 
Element inverted (Element child)
 Ajoute un filtre qui inversera les couleurs de premier plan et d'arrière-plan.
 
Element italic (Element child)
 Applique un double soulignement au texte.
 
Element color (const LinearGradient &gradient, Element child)
 Définit la couleur de premier plan d'un élément avec un effet de dégradé linéaire.
 
Element bgcolor (const LinearGradient &gradient, Element child)
 Définit la couleur de fond d'un élément avec un effet de dégradé linéaire.
 
Decorator color (const LinearGradient &gradient)
 Décore en utilisant un effet de dégradé linéaire sur la couleur de premier plan.
 
Decorator bgcolor (const LinearGradient &gradient)
 Décore en utilisant un effet de dégradé linéaire sur la couleur de fond.
 
void Render (Screen &screen, const Element &element)
 Affiche un élément sur un ftxui::Screen.
 
void Render (Screen &screen, Node *node)
 Affiche un élément sur un ftxui::Screen.
 
Element paragraph (std::string_view the_text)
 Renvoie un élément affichant le paragraphe sur plusieurs lignes.
 
Element paragraphAlignLeft (std::string_view the_text)
 Renvoie un élément affichant le paragraphe sur plusieurs lignes, aligné à gauche.
 
Element paragraphAlignRight (std::string_view the_text)
 Renvoie un élément affichant le paragraphe sur plusieurs lignes, aligné à droite.
 
Element paragraphAlignCenter (std::string_view the_text)
 Renvoie un élément affichant le paragraphe sur plusieurs lignes, aligné au centre.
 
Element paragraphAlignJustify (std::string_view the_text)
 Renvoie un élément affichant le paragraphe sur plusieurs lignes, aligné en utilisant un alignement justifié.
 
Decorator reflect (Box &box)
 
Element vscroll_indicator (Element child)
 Affiche une barre de défilement verticale à droite. Les couleurs suivent le contenu.
 
Element hscroll_indicator (Element child)
 Affiche une barre de défilement horizontale en bas. Les couleurs suivent le contenu.
 
Element selectionStyleReset (Element child)
 Réinitialise le style de sélection d'un élément.
 
Decorator selectionBackgroundColor (Color foreground)
 Définit la couleur d'arrière-plan d'un élément lorsqu'il est sélectionné. Notez que le style est appliqué en plus du style existant.
 
Decorator selectionForegroundColor (Color foreground)
 Définit la couleur de premier plan d'un élément lorsqu'il est sélectionné. Notez que le style est appliqué en plus du style existant.
 
Decorator selectionColor (Color foreground)
 Définit la couleur d'un élément lorsqu'il est sélectionné.
 
Decorator selectionStyle (std::function< void(Cell &)> style)
 Définit le style d'un élément lorsqu'il est sélectionné.
 
Element separator ()
 Dessine une séparation verticale ou horizontale entre deux autres éléments.
 
Element separatorStyled (BorderStyle style)
 Dessine une séparation verticale ou horizontale entre deux autres éléments.
 
Element separatorLight ()
 Dessine une séparation verticale ou horizontale entre deux autres éléments, en utilisant le style LIGHT.
 
Element separatorDashed ()
 Dessine une séparation verticale ou horizontale entre deux autres éléments, en utilisant le style DASHED.
 
Element separatorHeavy ()
 Dessine une séparation verticale ou horizontale entre deux autres éléments, en utilisant le style HEAVY.
 
Element separatorDouble ()
 Dessine une séparation verticale ou horizontale entre deux autres éléments, en utilisant le style DOUBLE.
 
Element separatorEmpty ()
 Dessine une séparation verticale ou horizontale entre deux autres éléments, en utilisant le style EMPTY.
 
Element separatorCharacter (std::string_view value)
 Dessine une séparation verticale ou horizontale entre deux autres éléments.
 
Element separator (Cell pixel)
 Dessine un séparateur entre deux éléments remplis avec un pixel donné.
 
Decorator size (WidthOrHeight direction, Constraint constraint, int value)
 Applique une contrainte sur la taille d'un élément.
 
Element spinner (int charset_index, size_t image_index)
 Utile pour représenter l'effet du temps et/ou des événements. Cela affiche une "vidéo" en art ASCII.
 
Element strikethrough (Element child)
 Applique un barré au texte.
 
Element text (std::string_view text)
 Affiche un morceau de texte unicode encodé en UTF8.
 
Element text (std::wstring_view text)
 Affiche un morceau de texte unicode.
 
Element vtext (std::string_view text)
 Affiche un morceau de texte unicode verticalement.
 
Element vtext (std::wstring_view text)
 Affiche un morceau de texte unicode verticalement.
 
Element underlined (Element child)
 Souligne l'élément donné.
 
Element underlinedDouble (Element child)
 Applique un double soulignement au texte.
 
Element nothing (Element element)
 Une décoration qui ne fait absolument rien.
 
Decorator operator| (Decorator a, Decorator b)
 Compose deux décorateurs en un seul.
 
Elements operator| (Elements elements, Decorator decorator)
 À partir d'un ensemble d'éléments, applique un décorateur à chaque élément.
 
Element operator| (Element element, Decorator decorator)
 À partir d'un élément, applique un décorateur.
 
Element & operator|= (Element &e, Decorator d)
 Applique un décorateur à un élément.
 
Element emptyElement ()
 
Element vbox (Elements children)
 Un conteneur affichant les éléments verticalement un par un.
 
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)
 Convertit un std::wstring en std::string UTF8.
 
std::wstring to_wstring (std::string_view s)
 Convertit un std::string UTF8 en std::wstring.
 
bool IsWordBreakingCharacter (std::string_view input, size_t glyph_index)
 

Variables

const bool * show
 
Direction direction
 
 Color
 Construit une couleur 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

L'espace de noms FTXUI 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 curseur dans n'importe quelle direction.

Parameters
optionsLes options

Exemple

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 curseur dans n'importe quelle direction.
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)

Une séparation entre deux composants.

Parameters
optionstous les paramètres.

Exemple

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()>)
Retourne un nouveau Component, similaire à |child|, mais utilisant |render| comme événement Component...
Element text(std::string_view text)
Affiche un morceau de texte unicode encodé en UTF8.
Element center(Element child)
Centre un élément horizontalement et verticalement.
Element separatorDouble()
Dessine une séparation verticale ou horizontale entre deux autres éléments, en utilisant le style DOU...
Component ResizableSplit(ResizableSplitOption options)
Une séparation entre deux composants.
std::uint8_t left
Definition screen.cpp:147
std::uint8_t right
Definition screen.cpp:149

Sortie

║
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 composant repliable. Il affiche une case à cocher avec une flèche. Une fois activé, l'enfant est affiché.

Parameters
labelLe libellé de la case à cocher.
childL'enfant à afficher.
showContient l'état indiquant si l'enfant est affiché ou non.

Exemple

auto component = Collapsible("Show details", details);
Component Collapsible(ConstStringRef label, Component child, Ref< bool > show=false)
Un composant repliable. Il affiche une case à cocher avec une flèche. Une fois activé,...

Sortie

▼ 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 )

Dessine une barre horizontale, avec la zone entre la gauche et la droite colorée différemment.

Parameters
leftla limite gauche de la zone active.
rightla limite droite de la zone active.
selected_colorla couleur de la zone sélectionnée.
unselected_colorla couleur de la zone non sélectionnée.

Exemple

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)
Dessine une barre horizontale, avec la zone entre la gauche et la droite colorée différemment.

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

◆ separatorVSelector()

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

Dessine une barre verticale, avec la zone entre le haut et le bas colorée différemment.

Parameters
upla limite supérieure de la zone active.
downla limite inférieure de la zone active.
selected_colorla couleur de la zone sélectionnée.
unselected_colorla couleur de la zone non sélectionnée.

Exemple

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 )

Produit un élément dessinant un canevas de la taille demandée.

Parameters
widthla largeur du canevas.
heightla hauteur du canevas.
fnune fonction dessinant le canevas.

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

◆ flexbox()

Element flexbox ( Elements children,
FlexboxConfig config )

Un conteneur affichant des éléments sur des lignes/colonnes et capable de passer à la colonne/ligne suivante lorsqu'il est plein.

Parameters
childrenLes éléments dans le conteneur
configLes options
Returns
Le conteneur.

Example

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 conteneur affichant des éléments sur des lignes/colonnes et capable de passer à la colonne/ligne s...
Definition flexbox.cpp:252

Definition at line 252 of file flexbox.cpp.

◆ hflow()

Element hflow ( Elements children)

Un conteneur affichant des éléments en lignes de gauche à droite. Quand il est rempli, il commence sur une nouvelle ligne en dessous.

Parameters
childrenLes éléments dans le conteneur
Returns
Le conteneur.

Example

text("element 1"),
text("element 2"),
text("element 3"),
});
FTXUI_EXPORT(DOM) Element gridbox(std Element hflow(Elements)
Un conteneur affichant des éléments en lignes de gauche à droite. Quand il est rempli,...
Definition flexbox.cpp:270

Definition at line 270 of file flexbox.cpp.

◆ vflow()

Element vflow ( Elements children)

Un conteneur affichant des éléments en colonnes de haut en bas. Quand il est rempli, il commence sur une nouvelle colonne à droite.

Parameters
childrenLes éléments dans le conteneur
Returns
Le conteneur.

Example

text("element 1"),
text("element 2"),
text("element 3"),
});
Element vflow(Elements)
Un conteneur affichant des éléments en colonnes de haut en bas. Quand il est rempli,...
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 352 of file string.cpp.

◆ CellToGlyphIndex()

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

Definition at line 461 of file string.cpp.

◆ canvas() [2/3]

Element canvas ( ConstRef< Canvas > canvas)

Produit un élément à partir d'un Canevas, ou une référence à un Canevas.

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

◆ canvas() [3/3]

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

Produit un élément dessinant un canevas.

Parameters
fnune fonction dessinant le canevas.

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)

Définit child comme étant l'élément focalisé parmi ses frères et sœurs.

Ceci est déprécié. Utilisez focus à la place.

Parameters
eL'élément à focaliser.

Definition at line 108 of file frame.cpp.

◆ frame()

Element frame ( Element child)

Permet à un élément d'être affiché dans une zone 'virtuelle'. Sa taille peut être plus grande que son conteneur. Dans ce cas, seule une plus petite partie est affichée. La vue est défilable pour rendre l'élément focalisé visible.

See also
frame
xframe
yframe

Definition at line 118 of file frame.cpp.

◆ xframe()

Element xframe ( Element child)

Identique à frame, mais seulement sur l'axe x.

See also
frame
xframe
yframe

Definition at line 126 of file frame.cpp.

◆ yframe()

Element yframe ( Element child)

Identique à frame, mais seulement sur l'axe y.

See also
frame
xframe
yframe

Definition at line 134 of file frame.cpp.

◆ graph()

Element graph ( GraphFunction graph_function)

Dessine un graphique en utilisant une GraphFunction.

Parameters
graph_functionla fonction à appeler pour obtenir les données.

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)
Dessine une bordure autour de l'élément.
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 conteneur affichant les éléments horizontalement un par un.

Parameters
childrenLes éléments dans le conteneur
Returns
Le conteneur.

Exemple

text("Left"),
text("Right"),
});
Element hbox(Elements children)
Un conteneur affichant les éléments horizontalement un par un.
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)

Réinitialise le style de sélection d'un élément.

Parameters
childL'élément d'entrée.
Returns
L'élément de sortie avec le style de sélection réinitialisé.

Definition at line 55 of file selection_style.cpp.

◆ selectionBackgroundColor()

Decorator selectionBackgroundColor ( Color foreground)

Définit la couleur d'arrière-plan d'un élément lorsqu'il est sélectionné. Notez que le style est appliqué en plus du style existant.

Definition at line 61 of file selection_style.cpp.

◆ selectionForegroundColor()

Decorator selectionForegroundColor ( Color foreground)

Définit la couleur de premier plan d'un élément lorsqu'il est sélectionné. Notez que le style est appliqué en plus du style existant.

Definition at line 69 of file selection_style.cpp.

◆ selectionColor()

Decorator selectionColor ( Color foreground)

Définit la couleur d'un élément lorsqu'il est sélectionné.

Parameters
foregroundLa couleur à appliquer. Notez que le style est appliqué en plus du style existant.

Definition at line 78 of file selection_style.cpp.

◆ selectionStyle()

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

Définit le style d'un élément lorsqu'il est sélectionné.

Parameters
styleLe style à appliquer. Notez que le style est appliqué en plus du style existant.

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 )

Definition at line 139 of file string.cpp.

◆ EatCodePoint() [2/2]

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

Definition at line 209 of file string.cpp.

◆ IsCombining()

bool IsCombining ( uint32_t ucs)

Definition at line 247 of file string.cpp.

◆ IsFullWidth()

bool IsFullWidth ( uint32_t ucs)

Definition at line 251 of file string.cpp.

◆ IsControl()

bool IsControl ( uint32_t ucs)

Definition at line 259 of file string.cpp.

◆ CodepointToWordBreakProperty()

WordBreakProperty CodepointToWordBreakProperty ( uint32_t codepoint)

Definition at line 273 of file string.cpp.

◆ wchar_width()

int wchar_width ( wchar_t ucs)

Definition at line 279 of file string.cpp.

◆ wstring_width()

int wstring_width ( const std::wstring & text)

Definition at line 283 of file string.cpp.

◆ string_width()

int string_width ( std::string_view input)

Definition at line 301 of file string.cpp.

◆ GlyphPrevious()

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

Definition at line 396 of file string.cpp.

◆ GlyphNext()

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

Definition at line 421 of file string.cpp.

◆ GlyphIterate()

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

Definition at line 447 of file string.cpp.

◆ GlyphCount()

int GlyphCount ( std::string_view input)

Definition at line 504 of file string.cpp.

◆ Utf8ToWordBreakProperty()

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

Definition at line 532 of file string.cpp.

◆ to_string()

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

Convertit un std::wstring en std::string UTF8.

Definition at line 563 of file string.cpp.

◆ to_wstring() [4/4]

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

Convertit un std::string UTF8 en std::wstring.

Definition at line 635 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

Construit une couleur transparente.

Construit une couleur à partir de sa représentation RGB. https://en.wikipedia.org/wiki/RGB_color_model.

Construit une couleur en utilisant les couleurs de la Palette256.

Construit une couleur en utilisant les couleurs de la Palette16.

Parameters
redLa quantité de rouge [0,255]
greenLa quantité de vert [0,255]
blueLa quantité de bleu [0,255]
alphaLa quantité d'alpha [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 94 of file node.hpp.

◆ node

Node* node

Definition at line 95 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.