FTXUI  0.11.1
C++ functional terminal UI.
elements.hpp File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ftxui
 
 ftxui::Dimension
 Define how the Screen's dimensions should look like.
 

Typedefs

using Element = std::shared_ptr< Node >
 
using Elements = std::vector< Element >
 
using Decorator = std::function< Element(Element)>
 
using GraphFunction = std::function< std::vector< int >(int, int)>
 

Enumerations

enum  BorderStyle {
  LIGHT , HEAVY , DOUBLE , ROUNDED ,
  EMPTY
}
 
enum  Direction { WIDTH , HEIGHT }
 
enum  Constraint { LESS_THAN , EQUAL , GREATER_THAN }
 

Functions

Element operator| (Element element, Decorator decorator)
 From an element, apply a decorator. More...
 
Elements operator| (Elements elements, Decorator decorator)
 From a set of element, apply a decorator to every elements. More...
 
Decorator operator| (Decorator a, Decorator b)
 Compose two decorator into one. More...
 
Element text (std::string text)
 Display a piece of UTF8 encoded unicode text. More...
 
Element vtext (std::string text)
 Display a piece of unicode text vertically. More...
 
Element separator ()
 Draw a vertical or horizontal separation in between two other elements. More...
 
Element separatorLight ()
 Draw a vertical or horizontal separation in between two other elements, using the LIGHT style. More...
 
Element separatorHeavy ()
 Draw a vertical or horizontal separation in between two other elements, using the HEAVY style. More...
 
Element separatorDouble ()
 Draw a vertical or horizontal separation in between two other elements, using the DOUBLE style. More...
 
Element separatorEmpty ()
 Draw a vertical or horizontal separation in between two other elements, using the EMPTY style. More...
 
Element separatorStyled (BorderStyle style)
 Draw a vertical or horizontal separation in between two other elements. More...
 
Element separator (Pixel pixel)
 Draw a separator in between two element filled with a given pixel. More...
 
Element separatorCharacter (std::string value)
 Draw a vertical or horizontal separation in between two other elements. More...
 
Element gauge (float progress)
 Draw a high definition progress bar. More...
 
Element border (Element child)
 Draw a border around the element. More...
 
Element borderLight (Element child)
 Draw a light border around the element. More...
 
Element borderHeavy (Element child)
 Draw a heavy border around the element. More...
 
Element borderDouble (Element child)
 Draw a double border around the element. More...
 
Element borderRounded (Element child)
 Draw a rounded border around the element. More...
 
Element borderEmpty (Element child)
 Draw an empty border around the element. More...
 
Decorator borderStyled (BorderStyle style)
 Same as border but with different styles. More...
 
Decorator borderWith (Pixel pixel)
 Same as border but with a constant Pixel around the element. More...
 
Element window (Element title, Element content)
 Draw window with a title and a border around the element. More...
 
Element spinner (int charset_index, size_t image_index)
 Useful to represent the effect of time and/or events. This display an ASCII art "video". More...
 
Element paragraph (std::string the_text)
 Return an element drawing the paragraph on multiple lines. More...
 
Element paragraphAlignLeft (std::string the_text)
 Return an element drawing the paragraph on multiple lines, aligned on the left. More...
 
Element paragraphAlignRight (std::string the_text)
 Return an element drawing the paragraph on multiple lines, aligned on the right. More...
 
Element paragraphAlignCenter (std::string the_text)
 Return an element drawing the paragraph on multiple lines, aligned on the center. More...
 
Element paragraphAlignJustify (std::string the_text)
 Return an element drawing the paragraph on multiple lines, aligned using a justified alignment. the center. More...
 
Element graph (GraphFunction graph_function)
 Draw a graph using a GraphFunction. More...
 
Element emptyElement ()
 
Element bold (Element child)
 Use a bold font, for elements with more emphasis. More...
 
Element dim (Element child)
 Use a light font, for elements with less emphasis. More...
 
Element inverted (Element child)
 Add a filter that will invert the foreground and the background colors. More...
 
Element underlined (Element child)
 Make the underlined element to be underlined. More...
 
Element blink (Element child)
 The text drawn alternates in between visible and hidden. More...
 
Decorator color (Color c)
 Decorate using a foreground color. More...
 
Decorator bgcolor (Color color)
 Decorate using a background color. More...
 
Element color (Color color, Element child)
 Set the foreground color of an element. More...
 
Element bgcolor (Color color, Element child)
 Set the background color of an element. More...
 
Decorator focusPosition (int x, int y)
 Used inside a frame, this force the view to be scrolled toward a a given position. The position is expressed in the numbers of cells. More...
 
Decorator focusPositionRelative (float x, float y)
 Used inside a frame, this force the view to be scrolled toward a a given position. The position is expressed in proportion of the requested size. More...
 
Element hbox (Elements children)
 A container displaying elements horizontally one by one. More...
 
Element vbox (Elements children)
 A container displaying elements vertically one by one. More...
 
Element dbox (Elements children_)
 Stack several element on top of each other. More...
 
Element flexbox (Elements, FlexboxConfig config=FlexboxConfig())
 
Element gridbox (std::vector< Elements > lines)
 A container displaying a grid of elements. More...
 
Element hflow (Elements)
 
Element vflow (Elements)
 
Element flex (Element child)
 Make a child element to expand proportionnally to the space left in a container. More...
 
Element flex_grow (Element child)
 Expand if possible. More...
 
Element flex_shrink (Element child)
 Minimize if needed. More...
 
Element xflex (Element child)
 Expand/Minimize if possible/needed on the X axis. More...
 
Element xflex_grow (Element child)
 Expand if possible on the X axis. More...
 
Element xflex_shrink (Element child)
 Minimize if needed on the X axis. More...
 
Element yflex (Element child)
 Expand/Minimize if possible/needed on the Y axis. More...
 
Element yflex_grow (Element child)
 Expand if possible on the Y axis. More...
 
Element yflex_shrink (Element child)
 Minimize if needed on the Y axis. More...
 
Element notflex (Element child)
 Make the element not flexible. More...
 
Element filler ()
 An element that will take expand proportionnally to the space left in a container. More...
 
Decorator size (Direction direction, Constraint constraint, int value)
 Apply a constraint on the size of an element. More...
 
Decorator reflect (Box &box)
 
Element frame (Element child)
 Allow an element to be displayed inside a 'virtual' area. It size can be larger than its container. In this case only a smaller portion is displayed. The view is scrollable to make the focused element visible. More...
 
Element xframe (Element)
 
Element yframe (Element)
 
Element focus (Element)
 
Element select (Element)
 
Element vscroll_indicator (Element child)
 Add a filter that will invert the foreground and the background colors. More...
 
Element hcenter (Element child)
 Center an element horizontally. More...
 
Element vcenter (Element child)
 Center an element vertically. More...
 
Element center (Element child)
 Center an element horizontally and vertically. More...
 
Element align_right (Element child)
 Align an element on the right side. More...
 
Element nothing (Element element)
 A decoration doing absolutely nothing. More...
 
Element clear_under (Element child)
 Before drawing |child|, clear the pixels below. This is useful in. More...
 
Dimensions Fit (Element &)