FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
ftxui/dom

Detailed Description

Please check the tutorial of the ftxui/dom module.

Functions

Element automerge (Element child)
 Enable character to be automatically merged with others nearby.
 
Element blink (Element child)
 The text drawn alternates in between visible and hidden.
 
Element bold (Element child)
 Use a bold font, for elements with more emphasis.
 
Element border (Element child)
 Draw a border around the element.
 
Decorator borderWith (const Pixel &pixel)
 Same as border but with a constant Pixel around the element.
 
Decorator borderStyled (BorderStyle style)
 Same as border but with different styles.
 
Decorator borderStyled (Color foreground_color)
 Same as border but with a foreground color.
 
Decorator borderStyled (BorderStyle style, Color foreground_color)
 Same as border but with a foreground color and a different style.
 
Element borderDashed (Element child)
 Draw a dashed border around the element.
 
Element borderLight (Element child)
 Draw a light border around the element.
 
Element borderHeavy (Element child)
 Draw a heavy border around the element.
 
Element borderDouble (Element child)
 Draw a double border around the element.
 
Element borderRounded (Element child)
 Draw a rounded border around the element.
 
Element borderEmpty (Element child)
 Draw an empty border around the element.
 
Element window (Element title, Element content, BorderStyle border)
 Draw window with a title and a border around the element.
 
Element clear_under (Element element)
 Before drawing |child|, clear the pixels below. This is useful in combination with dbox.
 
Element color (Color color, Element child)
 Set the foreground color of an element.
 
Element bgcolor (Color color, Element child)
 Set the background color of an element.
 
Decorator color (Color c)
 Decorate using a foreground color.
 
Decorator bgcolor (Color color)
 Decorate using a background color.
 
Element hcenter (Element child)
 Center an element horizontally.
 
Element vcenter (Element child)
 Center an element vertically.
 
Element center (Element child)
 Center an element horizontally and vertically.
 
Element align_right (Element child)
 Align an element on the right side.
 
Element dbox (Elements children_)
 Stack several element on top of each other.
 
Element dim (Element child)
 Use a light font, for elements with less emphasis.
 
Element filler ()
 An element that will take expand proportionally to the space left in a container.
 
Element flex (Element child)
 Make a child element to expand proportionally to the space left in a container.
 
Element xflex (Element child)
 Expand/Minimize if possible/needed on the X axis.
 
Element yflex (Element child)
 Expand/Minimize if possible/needed on the Y axis.
 
Element flex_grow (Element child)
 Expand if possible.
 
Element xflex_grow (Element child)
 Expand if possible on the X axis.
 
Element yflex_grow (Element child)
 Expand if possible on the Y axis.
 
Element flex_shrink (Element child)
 Minimize if needed.
 
Element xflex_shrink (Element child)
 Minimize if needed on the X axis.
 
Element yflex_shrink (Element child)
 Minimize if needed on the Y axis.
 
Element notflex (Element child)
 Make the element not flexible.
 
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.
 
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.
 
Element focus (Element child)
 Set the child to be the one focused among its siblings.
 
Element focusCursorBlock (Element child)
 Same as focus, but set the cursor shape to be a still block.
 
Element focusCursorBlockBlinking (Element child)
 Same as focus, but set the cursor shape to be a blinking block.
 
Element focusCursorBar (Element child)
 Same as focus, but set the cursor shape to be a still block.
 
Element focusCursorBarBlinking (Element child)
 Same as focus, but set the cursor shape to be a blinking bar.
 
Element focusCursorUnderline (Element child)
 Same as focus, but set the cursor shape to be a still underline.
 
Element focusCursorUnderlineBlinking (Element child)
 Same as focus, but set the cursor shape to be a blinking underline.
 
Element gaugeDirection (float progress, Direction direction)
 Draw a high definition progress bar progressing in specified direction.
 
Element gaugeRight (float progress)
 Draw a high definition progress bar progressing from left to right.
 
Element gaugeLeft (float progress)
 Draw a high definition progress bar progressing from right to left.
 
Element gaugeUp (float progress)
 Draw a high definition progress bar progressing from bottom to top.
 
Element gaugeDown (float progress)
 Draw a high definition progress bar progressing from top to bottom.
 
Element gauge (float progress)
 Draw a high definition progress bar.
 
Element hyperlink (std::string link, Element child)
 Make the rendered area clickable using a web browser. The link will be opened when the user clicks on it. This is supported only on a limited set of terminal emulators. List: https://github.com/Alhadis/OSC8-Adoption/.
 
Decorator hyperlink (std::string link)
 Decorate using a hyperlink. The link will be opened when the user clicks on it. This is supported only on a limited set of terminal emulators. List: https://github.com/Alhadis/OSC8-Adoption/.
 
Element inverted (Element child)
 Add a filter that will invert the foreground and the background colors.
 
Element italic (Element child)
 Apply a underlinedDouble to text.
 
Element color (const LinearGradient &gradient, Element child)
 Set the foreground color of an element with linear-gradient effect.
 
Element bgcolor (const LinearGradient &gradient, Element child)
 Set the background color of an element with linear-gradient effect.
 
Decorator color (const LinearGradient &gradient)
 Decorate using a linear-gradient effect on the foreground color.
 
Decorator bgcolor (const LinearGradient &gradient)
 Decorate using a linear-gradient effect on the background color.
 
void Render (Screen &screen, const Element &element)
 Display an element on a ftxui::Screen.
 
void Render (Screen &screen, Node *node)
 Display an element on a ftxui::Screen.
 
Element paragraph (const std::string &the_text)
 Return an element drawing the paragraph on multiple lines.
 
Element paragraphAlignLeft (const std::string &the_text)
 Return an element drawing the paragraph on multiple lines, aligned on the left.
 
Element paragraphAlignRight (const std::string &the_text)
 Return an element drawing the paragraph on multiple lines, aligned on the right.
 
Element paragraphAlignCenter (const std::string &the_text)
 Return an element drawing the paragraph on multiple lines, aligned on the center.
 
Element paragraphAlignJustify (const std::string &the_text)
 Return an element drawing the paragraph on multiple lines, aligned using a justified alignment. the center.
 
Element vscroll_indicator (Element child)
 Display a vertical scrollbar on the right. Colors follow the content.
 
Element hscroll_indicator (Element child)
 Display a horizontal scrollbar at the bottom. Colors follow the content.
 
Element separator ()
 Draw a vertical or horizontal separation in between two other elements.
 
Element separatorStyled (BorderStyle style)
 Draw a vertical or horizontal separation in between two other elements.
 
Element separatorLight ()
 Draw a vertical or horizontal separation in between two other elements, using the LIGHT style.
 
Element separatorDashed ()
 Draw a vertical or horizontal separation in between two other elements, using the DASHED style.
 
Element separatorHeavy ()
 Draw a vertical or horizontal separation in between two other elements, using the HEAVY style.
 
Element separatorDouble ()
 Draw a vertical or horizontal separation in between two other elements, using the DOUBLE style.
 
Element separatorEmpty ()
 Draw a vertical or horizontal separation in between two other elements, using the EMPTY style.
 
Element separatorCharacter (std::string value)
 Draw a vertical or horizontal separation in between two other elements.
 
Element separator (Pixel pixel)
 Draw a separator in between two element filled with a given pixel.
 
Decorator size (WidthOrHeight direction, Constraint constraint, int value)
 Apply a constraint on the size of an element.
 
Element spinner (int charset_index, size_t image_index)
 Useful to represent the effect of time and/or events. This displays an ASCII art "video".
 
Element strikethrough (Element child)
 Apply a strikethrough to text.
 
Element text (std::string text)
 Display a piece of UTF8 encoded unicode text.
 
Element text (std::wstring text)
 Display a piece of unicode text.
 
Element vtext (std::string text)
 Display a piece of unicode text vertically.
 
Element vtext (std::wstring text)
 Display a piece unicode text vertically.
 
Element underlined (Element child)
 Underline the given element.
 
Element underlinedDouble (Element child)
 Apply a underlinedDouble to text.
 
Element nothing (Element element)
 A decoration doing absolutely nothing.
 
Decorator operator| (Decorator a, Decorator b)
 Compose two decorator into one.
 
Elements operator| (Elements elements, Decorator decorator)
 From a set of element, apply a decorator to every elements.
 
Element operator| (Element element, Decorator decorator)
 From an element, apply a decorator.
 
Elementoperator|= (Element &e, Decorator d)
 Apply a decorator to an element.
 
Element emptyElement ()
 
Element vbox (Elements children)
 A container displaying elements vertically one by one.
 
void SetColorSupport (Color color)
 Override terminal color support in case auto-detection fails.
 
FlexboxConfigSet (FlexboxConfig::Direction)
 Set the flexbox direction.
 
FlexboxConfigSet (FlexboxConfig::Wrap)
 Set the flexbox wrap.
 
FlexboxConfigSet (FlexboxConfig::JustifyContent)
 Set the flexbox justify content.
 
FlexboxConfigSet (FlexboxConfig::AlignItems)
 Set the flexbox align items.
 
FlexboxConfigSet (FlexboxConfig::AlignContent)
 Set the flexbox align content.
 
FlexboxConfigSetGap (int gap_x, int gap_y)
 Set the flexbox flex direction.
 
 LinearGradient ()
 Build the "empty" gradient. This is often followed by calls to LinearGradient::Angle() and LinearGradient::Stop(). Example:
 
 LinearGradient (Color begin, Color end)
 Build a gradient with two colors.
 
 LinearGradient (float angle, Color begin, Color end)
 Build a gradient with two colors and an angle.
 
LinearGradientAngle (float angle)
 Set the angle of the gradient.
 
LinearGradientStop (Color color)
 Add a color stop to the gradient.
 
virtual void ComputeRequirement ()
 Compute how much space an element needs.
 
virtual void SetBox (Box box)
 Assign a position and a dimension to an element for drawing.
 
virtual void Select (Selection &selection)
 Compute the selection of an element.
 
virtual void Render (Screen &screen)
 Display an element on a ftxui::Screen.
 
 Table ()
 Create an empty table.
 
 Table (std::vector< std::vector< std::string > >)
 Create a table from a vector of vector of string.
 
 Table (std::vector< std::vector< Element > >)
 Create a table from a vector of vector of Element.
 
TableSelection SelectRow (int row_index)
 Select a row of the table.
 
TableSelection SelectRows (int row_min, int row_max)
 Select a range of rows of the table.
 
TableSelection SelectColumn (int column_index)
 Select a column of the table.
 
TableSelection SelectColumns (int column_min, int column_max)
 Select a range of columns of the table.
 
TableSelection SelectCell (int column, int row)
 Select a cell of the table.
 
TableSelection SelectRectangle (int column_min, int column_max, int row_min, int row_max)
 Select a rectangle of the table.
 
TableSelection SelectAll ()
 Select all the table.
 
Element Render ()
 Render the table.
 
void Decorate (Decorator)
 Apply the decorator to the selection. This decorate both the cells, the lines and the corners.
 
void DecorateCells (Decorator)
 Apply the decorator to the selection.
 
void DecorateAlternateColumn (Decorator, int modulo=2, int shift=0)
 Apply the decorator to the selection. This decorate only the lines modulo modulo with a shift of shift.
 
void DecorateAlternateRow (Decorator, int modulo=2, int shift=0)
 Apply the decorator to the selection. This decorate only the lines modulo modulo with a shift of shift.
 
void DecorateCellsAlternateColumn (Decorator, int modulo=2, int shift=0)
 Apply the decorator to the selection. This decorate only the corners modulo modulo with a shift of shift.
 
void DecorateCellsAlternateRow (Decorator, int modulo=2, int shift=0)
 Apply the decorator to the selection. This decorate only the corners modulo modulo with a shift of shift.
 
void Border (BorderStyle border=LIGHT)
 Apply a border around the selection.
 
void Separator (BorderStyle border=LIGHT)
 Draw some separator lines in the selection.
 
void SeparatorVertical (BorderStyle border=LIGHT)
 Draw some vertical separator lines in the selection.
 
void SeparatorHorizontal (BorderStyle border=LIGHT)
 Draw some horizontal separator lines in the selection.
 
void BorderLeft (BorderStyle border=LIGHT)
 Draw some separator lines to the left side of the selection.
 
void BorderRight (BorderStyle border=LIGHT)
 Draw some separator lines to the right side of the selection.
 
void BorderTop (BorderStyle border=LIGHT)
 Draw some separator lines to the top side of the selection.
 
void BorderBottom (BorderStyle border=LIGHT)
 Draw some separator lines to the bottom side of the selection.
 

Function Documentation

◆ automerge()

Element automerge ( Element child)

Enable character to be automatically merged with others nearby.

Definition at line 17 of file automerge.cpp.

◆ blink()

Element blink ( Element child)

The text drawn alternates in between visible and hidden.

Definition at line 33 of file blink.cpp.

◆ bold()

Element bold ( Element child)

Use a bold font, for elements with more emphasis.

Definition at line 33 of file bold.cpp.

◆ border()

Element border ( Element child)

Draw a border around the element.

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderEmpty
borderRounded
borderStyled
borderWith

Add a border around an element

Example

// Use 'border' as a function...
Element document = border(text("The element"));
// ...Or as a 'pipe'.
Element document = text("The element") | border;
Element text(std::wstring text)
Display a piece of unicode text.
Definition text.cpp:160
Element border(Element)
Draw a border around the element.
std::shared_ptr< Node > Element
Definition elements.hpp:22

Output

┌───────────┐
│The element│
└───────────┘

Definition at line 227 of file src/ftxui/dom/border.cpp.

◆ borderWith()

Decorator borderWith ( const Pixel & pixel)

Same as border but with a constant Pixel around the element.

See also
border

Definition at line 234 of file src/ftxui/dom/border.cpp.

◆ borderStyled() [1/3]

Decorator borderStyled ( BorderStyle style)

Same as border but with different styles.

See also
border

Definition at line 243 of file src/ftxui/dom/border.cpp.

◆ borderStyled() [2/3]

Decorator borderStyled ( Color foreground_color)

Same as border but with a foreground color.

See also
border

Definition at line 252 of file src/ftxui/dom/border.cpp.

◆ borderStyled() [3/3]

Decorator borderStyled ( BorderStyle style,
Color foreground_color )

Same as border but with a foreground color and a different style.

See also
border

Definition at line 262 of file src/ftxui/dom/border.cpp.

◆ borderDashed()

Element borderDashed ( Element child)

Draw a dashed border around the element.

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

Add a border around an element

Example

// Use 'borderDash' as a function...
Element document = borderDash(text("The element"));
// ...Or as a 'pipe'.
Element document = text("The element") | borderDAsh;

Output

┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓
╏The element ╏
┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛

Definition at line 300 of file src/ftxui/dom/border.cpp.

◆ borderLight()

Element borderLight ( Element child)

Draw a light border around the element.

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

Add a border around an element

Example

// Use 'borderLight' as a function...
Element document = borderLight(text("The element"));
// ...Or as a 'pipe'.
Element document = text("The element") | borderLight;
Element borderLight(Element)
Draw a light border around the element.

Output

┌──────────────┐
│The element │
└──────────────┘

Definition at line 335 of file src/ftxui/dom/border.cpp.

◆ borderHeavy()

Element borderHeavy ( Element child)

Draw a heavy border around the element.

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

Add a border around an element

Example

// Use 'borderHeavy' as a function...
Element document = borderHeavy(text("The element"));
// ...Or as a 'pipe'.
Element document = text("The element") | borderHeavy;
Element borderHeavy(Element)
Draw a heavy border around the element.

Output

┏━━━━━━━━━━━━━━┓
┃The element ┃
┗━━━━━━━━━━━━━━┛

Definition at line 370 of file src/ftxui/dom/border.cpp.

◆ borderDouble()

Element borderDouble ( Element child)

Draw a double border around the element.

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

Add a border around an element

Example

// Use 'borderDouble' as a function...
Element document = borderDouble(text("The element"));
// ...Or as a 'pipe'.
Element document = text("The element") | borderDouble;
Element borderDouble(Element)
Draw a double border around the element.

Output

╔══════════════╗
║The element ║
╚══════════════╝

Definition at line 405 of file src/ftxui/dom/border.cpp.

◆ borderRounded()

Element borderRounded ( Element child)

Draw a rounded border around the element.

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

Add a border around an element

Example

// Use 'borderRounded' as a function...
Element document = borderRounded(text("The element"));
// ...Or as a 'pipe'.
Element document = text("The element") | borderRounded;
Element borderRounded(Element)
Draw a rounded border around the element.

Output

╭──────────────╮
│The element │
╰──────────────╯

Definition at line 440 of file src/ftxui/dom/border.cpp.

◆ borderEmpty()

Element borderEmpty ( Element child)

Draw an empty border around the element.

See also
border
borderLight
borderDashed
borderDouble
borderHeavy
borderRounded
borderEmpty
borderStyled
borderWith

Add a border around an element

Example

// Use 'borderRounded' as a function...
Element document = borderRounded(text("The element"));
// ...Or as a 'pipe'.
Element document = text("The element") | borderRounded;

Output

The element

Definition at line 475 of file src/ftxui/dom/border.cpp.

◆ window()

Element window ( Element title,
Element content,
BorderStyle border )

Draw window with a title and a border around the element.

Parameters
titleThe title of the window.
contentThe element to be wrapped.
borderThe style of the border. Default is ROUNDED.
See also
border

Example

Element document = window(text("Title"),
text("content")
);
// With specifying border
Element document = window(text("Title"),
text("content"),
);
Element window(Element title, Element content, BorderStyle border=ROUNDED)
Draw window with a title and a border around the element.
@ ROUNDED
Definition elements.hpp:32

Output

┌Title──┐
│content│
└───────┘

Definition at line 507 of file src/ftxui/dom/border.cpp.

◆ clear_under()

Element clear_under ( Element element)

Before drawing |child|, clear the pixels below. This is useful in combination with dbox.

See also
ftxui::dbox

Definition at line 38 of file clear_under.cpp.

◆ color() [1/4]

Element color ( Color color,
Element child )

Set the foreground color of an element.

Parameters
colorThe color of the output element.
childThe input element.
Returns
The output element colored.

Example

Element document = color(Color::Green, text("Success")),
Decorator color(Color)
Decorate using a foreground color.

Definition at line 81 of file dom/color.cpp.

◆ bgcolor() [1/4]

Element bgcolor ( Color color,
Element child )

Set the background color of an element.

Parameters
colorThe color of the output element.
childThe input element.
Returns
The output element colored.

Example

Element document = bgcolor(Color::Green, text("Success")),
Decorator bgcolor(Color)
Decorate using a background color.

Definition at line 96 of file dom/color.cpp.

◆ color() [2/4]

Decorator color ( Color c)

Decorate using a foreground color.

Parameters
cThe foreground color to be applied.
Returns
The Decorator applying the color.

Example

Element document = text("red") | color(Color::Red);

Definition at line 110 of file dom/color.cpp.

◆ bgcolor() [2/4]

Decorator bgcolor ( Color color)

Decorate using a background color.

Parameters
colorThe background color to be applied.
Returns
The Decorator applying the color.

Example

Element document = text("red") | bgcolor(Color::Red);

Definition at line 124 of file dom/color.cpp.

◆ hcenter()

Element hcenter ( Element child)

Center an element horizontally.

Parameters
childThe decorated element.
Returns
The centered element.

Definition at line 15 of file composite_decorator.cpp.

◆ vcenter()

Element vcenter ( Element child)

Center an element vertically.

Parameters
childThe decorated element.
Returns
The centered element.

Definition at line 23 of file composite_decorator.cpp.

◆ center()

Element center ( Element child)

Center an element horizontally and vertically.

Parameters
childThe decorated element.
Returns
The centered element.

Definition at line 31 of file composite_decorator.cpp.

◆ align_right()

Element align_right ( Element child)

Align an element on the right side.

Parameters
childThe decorated element.
Returns
The right aligned element.

Definition at line 39 of file composite_decorator.cpp.

◆ dbox()

Element dbox ( Elements children_)

Stack several element on top of each other.

Parameters
children_The input element.
Returns
The right aligned element.

Definition at line 55 of file src/ftxui/dom/dbox.cpp.

◆ dim()

Element dim ( Element child)

Use a light font, for elements with less emphasis.

Definition at line 33 of file dim.cpp.

◆ filler()

Element filler ( )

An element that will take expand proportionally to the space left in a container.

Definition at line 98 of file flex.cpp.

◆ flex()

Element flex ( Element child)

Make a child element to expand proportionally to the space left in a container.

Examples:

text("left") | border ,
text("middle") | border | flex,
text("right") | border,
});
Element flex(Element)
Make a child element to expand proportionally to the space left in a container.
Definition flex.cpp:123
Element hbox(Elements)
A container displaying elements horizontally one by one.
Definition hbox.cpp:94

Output:

┌────┐┌─────────────────────────────────────────────────────────┐┌─────┐
│left││middle ││right│
└────┘└─────────────────────────────────────────────────────────┘└─────┘

Definition at line 123 of file flex.cpp.

◆ xflex()

Element xflex ( Element child)

Expand/Minimize if possible/needed on the X axis.

Definition at line 129 of file flex.cpp.

◆ yflex()

Element yflex ( Element child)

Expand/Minimize if possible/needed on the Y axis.

Definition at line 135 of file flex.cpp.

◆ flex_grow()

Element flex_grow ( Element child)

Expand if possible.

Definition at line 141 of file flex.cpp.

◆ xflex_grow()

Element xflex_grow ( Element child)

Expand if possible on the X axis.

Definition at line 147 of file flex.cpp.

◆ yflex_grow()

Element yflex_grow ( Element child)

Expand if possible on the Y axis.

Definition at line 153 of file flex.cpp.

◆ flex_shrink()

Element flex_shrink ( Element child)

Minimize if needed.

Definition at line 159 of file flex.cpp.

◆ xflex_shrink()

Element xflex_shrink ( Element child)

Minimize if needed on the X axis.

Definition at line 165 of file flex.cpp.

◆ yflex_shrink()

Element yflex_shrink ( Element child)

Minimize if needed on the Y axis.

Definition at line 171 of file flex.cpp.

◆ notflex()

Element notflex ( Element child)

Make the element not flexible.

Definition at line 177 of file flex.cpp.

◆ focusPositionRelative()

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.

For instance:

  • (0, 0) means that the view is scrolled toward the upper left.
  • (1, 0) means that the view is scrolled toward the upper right.
  • (0, 1) means that the view is scrolled toward the bottom left.

Example

Element document = huge_document()
| frame;
Decorator focusPositionRelative(float x, float y)
Used inside a frame, this force the view to be scrolled toward a a given position....
Element frame(Element)
Allow an element to be displayed inside a 'virtual' area. It size can be larger than its container....
Definition frame.cpp:118

Definition at line 31 of file src/ftxui/dom/focus.cpp.

◆ focusPosition()

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.

Example

Element document = huge_document()
| focusPosition(10, 10)
| frame;
Decorator focusPosition(int x, int y)
Used inside a frame, this force the view to be scrolled toward a a given position....

Definition at line 69 of file src/ftxui/dom/focus.cpp.

◆ focus()

Element focus ( Element child)

Set the child to be the one focused among its siblings.

Parameters
childThe element to be focused.

Definition at line 101 of file frame.cpp.

◆ focusCursorBlock()

Element focusCursorBlock ( Element child)

Same as focus, but set the cursor shape to be a still block.

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 147 of file frame.cpp.

◆ focusCursorBlockBlinking()

Element focusCursorBlockBlinking ( Element child)

Same as focus, but set the cursor shape to be a blinking block.

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 161 of file frame.cpp.

◆ focusCursorBar()

Element focusCursorBar ( Element child)

Same as focus, but set the cursor shape to be a still block.

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 175 of file frame.cpp.

◆ focusCursorBarBlinking()

Element focusCursorBarBlinking ( Element child)

Same as focus, but set the cursor shape to be a blinking bar.

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 189 of file frame.cpp.

◆ focusCursorUnderline()

Element focusCursorUnderline ( Element child)

Same as focus, but set the cursor shape to be a still underline.

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 203 of file frame.cpp.

◆ focusCursorUnderlineBlinking()

Element focusCursorUnderlineBlinking ( Element child)

Same as focus, but set the cursor shape to be a blinking underline.

See also
focus
focusCursorBlock
focusCursorBlockBlinking
focusCursorBar
focusCursorBarBlinking
focusCursorUnderline
focusCursorUnderlineBlinking

Definition at line 217 of file frame.cpp.

◆ gaugeDirection()

Element gaugeDirection ( float progress,
Direction direction )

Draw a high definition progress bar progressing in specified direction.

Parameters
progressThe proportion of the area to be filled. Belong to [0,1].
directionDirection of progress bars progression.

Definition at line 169 of file src/ftxui/dom/gauge.cpp.

◆ gaugeRight()

Element gaugeRight ( float progress)

Draw a high definition progress bar progressing from left to right.

Parameters
progressThe proportion of the area to be filled. Belong to [0,1].

Example

A gauge. It can be used to represent a progress bar.

Element gaugeRight(float progress)
Draw a high definition progress bar progressing from left to right.

Output

┌──────────────────────────────────────────────────────────────────────────┐
│█████████████████████████████████████ │
└──────────────────────────────────────────────────────────────────────────┘

Definition at line 191 of file src/ftxui/dom/gauge.cpp.

◆ gaugeLeft()

Element gaugeLeft ( float progress)

Draw a high definition progress bar progressing from right to left.

Parameters
progressThe proportion of the area to be filled. Belong to [0,1].

Example

A gauge. It can be used to represent a progress bar.

Element gaugeLeft(float progress)
Draw a high definition progress bar progressing from right to left.

Output

┌──────────────────────────────────────────────────────────────────────────┐
│ █████████████████████████████████████│
└──────────────────────────────────────────────────────────────────────────┘

Definition at line 213 of file src/ftxui/dom/gauge.cpp.

◆ gaugeUp()

Element gaugeUp ( float progress)

Draw a high definition progress bar progressing from bottom to top.

Parameters
progressThe proportion of the area to be filled. Belong to [0,1].

Example

A gauge. It can be used to represent a progress bar.

Element gaugeUp(float progress)
Draw a high definition progress bar progressing from bottom to top.

Output

┌─┐
│ │
│ │
│ │
│ │
│█│
│█│
│█│
│█│
└─┘

Definition at line 242 of file src/ftxui/dom/gauge.cpp.

◆ gaugeDown()

Element gaugeDown ( float progress)

Draw a high definition progress bar progressing from top to bottom.

Parameters
progressThe proportion of the area to be filled. Belong to [0,1].

Example

A gauge. It can be used to represent a progress bar.

Element gaugeDown(float progress)
Draw a high definition progress bar progressing from top to bottom.

Output

┌─┐
│█│
│█│
│█│
│█│
│ │
│ │
│ │
│ │
└─┘

Definition at line 271 of file src/ftxui/dom/gauge.cpp.

◆ gauge()

Element gauge ( float progress)

Draw a high definition progress bar.

Parameters
progressThe proportion of the area to be filled. Belong to [0,1].

Example

A gauge. It can be used to represent a progress bar.

Element gauge(float progress)
Draw a high definition progress bar.

Output

┌──────────────────────────────────────────────────────────────────────────┐
│█████████████████████████████████████ │
└──────────────────────────────────────────────────────────────────────────┘

Definition at line 293 of file src/ftxui/dom/gauge.cpp.

◆ hyperlink() [1/2]

Element hyperlink ( std::string link,
Element child )

Make the rendered area clickable using a web browser. The link will be opened when the user clicks on it. This is supported only on a limited set of terminal emulators. List: https://github.com/Alhadis/OSC8-Adoption/.

Parameters
linkThe link
childThe input element.
Returns
The output element with the link.

Example

Element document =
hyperlink("https://github.com/ArthurSonzogni/FTXUI", "link");
Decorator hyperlink(std::string link)
Decorate using a hyperlink. The link will be opened when the user clicks on it. This is supported onl...
Definition hyperlink.cpp:70

Definition at line 51 of file hyperlink.cpp.

◆ hyperlink() [2/2]

Decorator hyperlink ( std::string link)

Decorate using a hyperlink. The link will be opened when the user clicks on it. This is supported only on a limited set of terminal emulators. List: https://github.com/Alhadis/OSC8-Adoption/.

Parameters
linkThe link to redirect the users to.
Returns
The Decorator applying the hyperlink.

Example

Element document =
text("red") | hyperlink("https://github.com/Arthursonzogni/FTXUI");

Definition at line 70 of file hyperlink.cpp.

◆ inverted()

Element inverted ( Element child)

Add a filter that will invert the foreground and the background colors.

Definition at line 34 of file inverted.cpp.

◆ italic()

Element italic ( Element child)

Apply a underlinedDouble to text.

Definition at line 17 of file italic.cpp.

◆ color() [3/4]

Element color ( const LinearGradient & gradient,
Element child )

Set the foreground color of an element with linear-gradient effect.

Parameters
gradientThe gradient effect to be applied on the output element.
childThe input element.
Returns
The output element colored.

Example

A class representing the settings for linear-gradient color effect.

Definition at line 251 of file src/ftxui/dom/linear_gradient.cpp.

◆ bgcolor() [3/4]

Element bgcolor ( const LinearGradient & gradient,
Element child )

Set the background color of an element with linear-gradient effect.

Parameters
gradientThe gradient effect to be applied on the output element.
childThe input element.
Returns
The output element colored.

Example

Definition at line 267 of file src/ftxui/dom/linear_gradient.cpp.

◆ color() [4/4]

Decorator color ( const LinearGradient & gradient)

Decorate using a linear-gradient effect on the foreground color.

Parameters
gradientThe gradient effect to be applied on the output element.
Returns
The Decorator applying the color.

Example

Definition at line 282 of file src/ftxui/dom/linear_gradient.cpp.

◆ bgcolor() [4/4]

Decorator bgcolor ( const LinearGradient & gradient)

Decorate using a linear-gradient effect on the background color.

Parameters
gradientThe gradient effect to be applied on the output element.
Returns
The Decorator applying the color.

Example

Definition at line 297 of file src/ftxui/dom/linear_gradient.cpp.

◆ Render() [1/4]

void Render ( Screen & screen,
const Element & element )

Display an element on a ftxui::Screen.

Definition at line 88 of file node.cpp.

◆ Render() [2/4]

void Render ( Screen & screen,
Node * node )

Display an element on a ftxui::Screen.

Definition at line 95 of file node.cpp.

◆ paragraph()

Element paragraph ( const std::string & the_text)

Return an element drawing the paragraph on multiple lines.

See also
flexbox.

Definition at line 41 of file src/ftxui/dom/paragraph.cpp.

◆ paragraphAlignLeft()

Element paragraphAlignLeft ( const std::string & the_text)

Return an element drawing the paragraph on multiple lines, aligned on the left.

See also
flexbox.

Definition at line 49 of file src/ftxui/dom/paragraph.cpp.

◆ paragraphAlignRight()

Element paragraphAlignRight ( const std::string & the_text)

Return an element drawing the paragraph on multiple lines, aligned on the right.

See also
flexbox.

Definition at line 60 of file src/ftxui/dom/paragraph.cpp.

◆ paragraphAlignCenter()

Element paragraphAlignCenter ( const std::string & the_text)

Return an element drawing the paragraph on multiple lines, aligned on the center.

See also
flexbox.

Definition at line 72 of file src/ftxui/dom/paragraph.cpp.

◆ paragraphAlignJustify()

Element paragraphAlignJustify ( const std::string & the_text)

Return an element drawing the paragraph on multiple lines, aligned using a justified alignment. the center.

See also
flexbox.

Definition at line 85 of file src/ftxui/dom/paragraph.cpp.

◆ vscroll_indicator()

Element vscroll_indicator ( Element child)

Display a vertical scrollbar on the right. Colors follow the content.

Definition at line 21 of file scroll_indicator.cpp.

◆ hscroll_indicator()

Element hscroll_indicator ( Element child)

Display a horizontal scrollbar at the bottom. Colors follow the content.

Definition at line 76 of file scroll_indicator.cpp.

◆ separator() [1/2]

Element separator ( )

Draw a vertical or horizontal separation in between two other elements.

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

Add a visual separation in between two elements.

Example

// Use 'border' as a function...
Element document = vbox({
text("up"),
text("down"),
});
Element separator()
Draw a vertical or horizontal separation in between two other elements.
Element vbox(Elements)
A container displaying elements vertically one by one.
Definition vbox.cpp:96

Output

up
────
down

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

◆ separatorStyled()

Element separatorStyled ( BorderStyle style)

Draw a vertical or horizontal separation in between two other elements.

Parameters
stylethe style of the separator.
See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

Add a visual separation in between two elements.

Example

// Use 'border' as a function...
Element document = vbox({
text("up"),
text("down"),
});
Element separatorStyled(BorderStyle)
Draw a vertical or horizontal separation in between two other elements.
@ DOUBLE
Definition elements.hpp:31

Output

up
════
down

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

◆ separatorLight()

Element separatorLight ( )

Draw a vertical or horizontal separation in between two other elements, using the LIGHT style.

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

Add a visual separation in between two elements.

Example

// Use 'border' as a function...
Element document = vbox({
text("up"),
text("down"),
});
Element separatorLight()
Draw a vertical or horizontal separation in between two other elements, using the LIGHT style.

Output

up
────
down

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

◆ separatorDashed()

Element separatorDashed ( )

Draw a vertical or horizontal separation in between two other elements, using the DASHED style.

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

Add a visual separation in between two elements.

Example

// Use 'border' as a function...
Element document = vbox({
text("up"),
text("down"),
});

Output

up
╍╍╍╍
down

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

◆ separatorHeavy()

Element separatorHeavy ( )

Draw a vertical or horizontal separation in between two other elements, using the HEAVY style.

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

Add a visual separation in between two elements.

Example

// Use 'border' as a function...
Element document = vbox({
text("up"),
text("down"),
});
Element separatorHeavy()
Draw a vertical or horizontal separation in between two other elements, using the HEAVY style.

Output

up
━━━━
down

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

◆ separatorDouble()

Element separatorDouble ( )

Draw a vertical or horizontal separation in between two other elements, using the DOUBLE style.

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

Add a visual separation in between two elements.

Example

// Use 'border' as a function...
Element document = vbox({
text("up"),
text("down"),
});
Element separatorDouble()
Draw a vertical or horizontal separation in between two other elements, using the DOUBLE style.

Output

up
════
down

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

◆ separatorEmpty()

Element separatorEmpty ( )

Draw a vertical or horizontal separation in between two other elements, using the EMPTY style.

See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

Add a visual separation in between two elements.

Example

// Use 'border' as a function...
Element document = vbox({
text("up"),
text("down"),
});

Output

up
down

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

◆ separatorCharacter()

Element separatorCharacter ( std::string value)

Draw a vertical or horizontal separation in between two other elements.

Parameters
valuethe character to fill the separator area.
See also
separator
separatorLight
separatorDashed
separatorDouble
separatorHeavy
separatorEmpty
separatorRounded
separatorStyled
separatorCharacter

Add a visual separation in between two elements.

Example

// Use 'border' as a function...
Element document = vbox({
text("up"),
text("down"),
});

Output

up
────
down

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

◆ separator() [2/2]

Element separator ( Pixel pixel)

Draw a separator in between two element filled with a given pixel.

See also
separator
separatorLight
separatorDashed
separatorHeavy
separatorDouble
separatorStyled

Example

Pixel empty;
Element document = vbox({
text("Up"),
separator(empty),
text("Down"),
})
A Unicode character and its associated style.
Definition pixel.hpp:15

Output

Up
Down

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

◆ size()

Decorator size ( WidthOrHeight direction,
Constraint constraint,
int value )

Apply a constraint on the size of an element.

Parameters
directionWhether the WIDTH of the HEIGHT of the element must be constrained.
constraintThe type of constaint.
valueThe value.

Definition at line 89 of file src/ftxui/dom/size.cpp.

◆ spinner()

Element spinner ( int charset_index,
size_t image_index )

Useful to represent the effect of time and/or events. This displays an ASCII art "video".

Parameters
charset_indexThe type of "video".
image_indexThe "frame" of the video. You need to increase this for every "step".

Definition at line 282 of file src/ftxui/dom/spinner.cpp.

◆ strikethrough()

Element strikethrough ( Element child)

Apply a strikethrough to text.

Definition at line 17 of file strikethrough.cpp.

◆ text() [1/2]

Element text ( std::string text)

Display a piece of UTF8 encoded unicode text.

See also
ftxui::to_wstring

Example

Element document = text("Hello world!");

Output

Hello world!

Definition at line 141 of file text.cpp.

◆ text() [2/2]

Element text ( std::wstring text)

Display a piece of unicode text.

See also
ftxui::to_wstring

Example

Element document = text(L"Hello world!");

Output

Hello world!

Definition at line 160 of file text.cpp.

◆ vtext() [1/2]

Element vtext ( std::string text)

Display a piece of unicode text vertically.

See also
ftxui::to_wstring

Example

Element document = vtext("Hello world!");
Element vtext(std::wstring text)
Display a piece unicode text vertically.
Definition text.cpp:220

Output

H
e
l
l
o
w
o
r
l
d
!

Definition at line 190 of file text.cpp.

◆ vtext() [2/2]

Element vtext ( std::wstring text)

Display a piece unicode text vertically.

See also
ftxui::to_wstring

Example

Element document = vtext(L"Hello world!");

Output

H
e
l
l
o
w
o
r
l
d
!

Definition at line 220 of file text.cpp.

◆ underlined()

Element underlined ( Element child)

Underline the given element.

Definition at line 33 of file underlined.cpp.

◆ underlinedDouble()

Element underlinedDouble ( Element child)

Apply a underlinedDouble to text.

Definition at line 17 of file underlined_double.cpp.

◆ nothing()

Element nothing ( Element element)

A decoration doing absolutely nothing.

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

◆ operator|() [1/3]

Decorator operator| ( Decorator a,
Decorator b )

Compose two decorator into one.

Example

auto decorator = bold | blink;
Element blink(Element)
The text drawn alternates in between visible and hidden.
Definition blink.cpp:33

Definition at line 40 of file dom/util.cpp.

◆ operator|() [2/3]

Elements operator| ( Elements elements,
Decorator decorator )

From a set of element, apply a decorator to every elements.

Returns
the set of decorated element.

Definition at line 48 of file dom/util.cpp.

◆ operator|() [3/3]

Element operator| ( Element element,
Decorator decorator )

From an element, apply a decorator.

Returns
the decorated element.

Example

Both of these are equivalent:

bold(text("Hello"));
Element bold(Element)
Use a bold font, for elements with more emphasis.
Definition bold.cpp:33
text("Hello") | bold;

Definition at line 70 of file dom/util.cpp.

◆ operator|=()

Element & operator|= ( Element & e,
Decorator d )

Apply a decorator to an element.

Returns
the decorated element.

Example

Both of these are equivalent:

auto element = text("Hello");
element |= bold;

Definition at line 85 of file dom/util.cpp.

◆ emptyElement()

Element emptyElement ( )

An element of size 0x0 drawing nothing.

Definition at line 140 of file dom/util.cpp.

◆ vbox()

Element vbox ( Elements children)

A container displaying elements vertically one by one.

Parameters
childrenThe elements in the container
Returns
The container.

Example

text("Up"),
text("Down"),
});

Definition at line 96 of file vbox.cpp.

◆ SetColorSupport()

void SetColorSupport ( Color color)

Override terminal color support in case auto-detection fails.

Definition at line 140 of file terminal.cpp.

◆ Set() [1/5]

Set the flexbox direction.

Definition at line 10 of file flexbox_config.cpp.

◆ Set() [2/5]

Set the flexbox wrap.

Definition at line 17 of file flexbox_config.cpp.

◆ Set() [3/5]

Set the flexbox justify content.

Definition at line 24 of file flexbox_config.cpp.

◆ Set() [4/5]

Set the flexbox align items.

Definition at line 31 of file flexbox_config.cpp.

◆ Set() [5/5]

Set the flexbox align content.

Definition at line 38 of file flexbox_config.cpp.

◆ SetGap()

FlexboxConfig & SetGap ( int gap_x,
int gap_y )

Set the flexbox flex direction.

Definition at line 45 of file flexbox_config.cpp.

◆ LinearGradient() [1/3]

LinearGradient ( )
default

Build the "empty" gradient. This is often followed by calls to LinearGradient::Angle() and LinearGradient::Stop(). Example:

auto gradient =
.Angle(45)
.Stop(Color::Red, 0.0)
.Stop(Color::Green, 0.5)
.Stop(Color::Blue, 1.0);;
LinearGradient()
Build the "empty" gradient. This is often followed by calls to LinearGradient::Angle() and LinearGrad...

◆ LinearGradient() [2/3]

LinearGradient ( Color begin,
Color end )

Build a gradient with two colors.

Parameters
beginThe color at the beginning of the gradient.
endThe color at the end of the gradient.

Definition at line 199 of file src/ftxui/dom/linear_gradient.cpp.

◆ LinearGradient() [3/3]

LinearGradient ( float a,
Color begin,
Color end )

Build a gradient with two colors and an angle.

Parameters
aThe angle of the gradient.
beginThe color at the beginning of the gradient.
endThe color at the end of the gradient.

Definition at line 207 of file src/ftxui/dom/linear_gradient.cpp.

◆ Angle()

LinearGradient & Angle ( float a)

Set the angle of the gradient.

Parameters
aThe angle of the gradient.
Returns
The gradient.

Definition at line 216 of file src/ftxui/dom/linear_gradient.cpp.

◆ Stop()

LinearGradient & Stop ( Color c)

Add a color stop to the gradient.

Parameters
cThe color of the stop.
Returns
The gradient.
Note
The position of the stop is interpolated from nearby stops.

Definition at line 235 of file src/ftxui/dom/linear_gradient.cpp.

◆ ComputeRequirement()

void ComputeRequirement ( )
virtual

Compute how much space an element needs.

Reimplemented in NodeDecorator.

Definition at line 21 of file node.cpp.

◆ SetBox()

void SetBox ( Box box)
virtual

Assign a position and a dimension to an element for drawing.

Reimplemented in NodeDecorator.

Definition at line 43 of file node.cpp.

◆ Select()

void Select ( Selection & selection)
virtual

Compute the selection of an element.

Definition at line 49 of file node.cpp.

◆ Render() [3/4]

void Render ( Screen & screen)
virtual

Display an element on a ftxui::Screen.

Definition at line 63 of file node.cpp.

◆ Table() [1/3]

Table ( )

Create an empty table.

Definition at line 48 of file src/ftxui/dom/table.cpp.

◆ Table() [2/3]

Table ( std::vector< std::vector< std::string > > input)
explicit

Create a table from a vector of vector of string.

Parameters
inputThe input data.

Definition at line 55 of file src/ftxui/dom/table.cpp.

◆ Table() [3/3]

Table ( std::vector< std::vector< Element > > input)
explicit

Create a table from a vector of vector of Element.

Parameters
inputThe input elements.

Definition at line 72 of file src/ftxui/dom/table.cpp.

◆ SelectRow()

TableSelection SelectRow ( int index)

Select a row of the table.

Parameters
indexThe index of the row to select.
Note
You can use negative index to select from the end.

Definition at line 143 of file src/ftxui/dom/table.cpp.

◆ SelectRows()

TableSelection SelectRows ( int row_min,
int row_max )

Select a range of rows of the table.

Parameters
row_minThe first row to select.
row_maxThe last row to select.
Note
You can use negative index to select from the end.

Definition at line 152 of file src/ftxui/dom/table.cpp.

◆ SelectColumn()

TableSelection SelectColumn ( int index)

Select a column of the table.

Parameters
indexThe index of the column to select.
Note
You can use negative index to select from the end.

Definition at line 160 of file src/ftxui/dom/table.cpp.

◆ SelectColumns()

TableSelection SelectColumns ( int column_min,
int column_max )

Select a range of columns of the table.

Parameters
column_minThe first column to select.
column_maxThe last column to select.
Note
You can use negative index to select from the end.

Definition at line 169 of file src/ftxui/dom/table.cpp.

◆ SelectCell()

TableSelection SelectCell ( int column,
int row )

Select a cell of the table.

Parameters
columnThe column of the cell to select.
rowThe row of the cell to select.
Note
You can use negative index to select from the end.

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

◆ SelectRectangle()

TableSelection SelectRectangle ( int column_min,
int column_max,
int row_min,
int row_max )

Select a rectangle of the table.

Parameters
column_minThe first column to select.
column_maxThe last column to select.
row_minThe first row to select.
row_maxThe last row to select.
Note
You can use negative index to select from the end.

Definition at line 189 of file src/ftxui/dom/table.cpp.

◆ SelectAll()

TableSelection SelectAll ( )

Select all the table.

Definition at line 211 of file src/ftxui/dom/table.cpp.

◆ Render() [4/4]

Element Render ( )

Render the table.

Returns
The rendered table. This is an element you can draw.

Definition at line 224 of file src/ftxui/dom/table.cpp.

◆ Decorate()

void Decorate ( Decorator decorator)

Apply the decorator to the selection. This decorate both the cells, the lines and the corners.

Parameters
decoratorThe decorator to apply.

Definition at line 255 of file src/ftxui/dom/table.cpp.

◆ DecorateCells()

void DecorateCells ( Decorator decorator)

Apply the decorator to the selection.

Parameters
decoratorThe decorator to apply. This decorate only the cells.

Definition at line 269 of file src/ftxui/dom/table.cpp.

◆ DecorateAlternateColumn()

void DecorateAlternateColumn ( Decorator decorator,
int modulo = 2,
int shift = 0 )

Apply the decorator to the selection. This decorate only the lines modulo modulo with a shift of shift.

Parameters
decoratorThe decorator to apply.
moduloThe modulo of the lines to decorate.
shiftThe shift of the lines to decorate.

Definition at line 287 of file src/ftxui/dom/table.cpp.

◆ DecorateAlternateRow()

void DecorateAlternateRow ( Decorator decorator,
int modulo = 2,
int shift = 0 )

Apply the decorator to the selection. This decorate only the lines modulo modulo with a shift of shift.

Parameters
decoratorThe decorator to apply.
moduloThe modulo of the lines to decorate.
shiftThe shift of the lines to decorate.

Definition at line 307 of file src/ftxui/dom/table.cpp.

◆ DecorateCellsAlternateColumn()

void DecorateCellsAlternateColumn ( Decorator decorator,
int modulo = 2,
int shift = 0 )

Apply the decorator to the selection. This decorate only the corners modulo modulo with a shift of shift.

Parameters
decoratorThe decorator to apply.
moduloThe modulo of the corners to decorate.
shiftThe shift of the corners to decorate.

Definition at line 327 of file src/ftxui/dom/table.cpp.

◆ DecorateCellsAlternateRow()

void DecorateCellsAlternateRow ( Decorator decorator,
int modulo = 2,
int shift = 0 )

Apply the decorator to the selection. This decorate only the corners modulo modulo with a shift of shift.

Parameters
decoratorThe decorator to apply.
moduloThe modulo of the corners to decorate.
shiftThe shift of the corners to decorate.

Definition at line 347 of file src/ftxui/dom/table.cpp.

◆ Border()

void Border ( BorderStyle border = LIGHT)

Apply a border around the selection.

Parameters
borderThe border style to apply.

Definition at line 363 of file src/ftxui/dom/table.cpp.

◆ Separator()

void Separator ( BorderStyle border = LIGHT)

Draw some separator lines in the selection.

Parameters
borderThe border style to apply.

Definition at line 382 of file src/ftxui/dom/table.cpp.

◆ SeparatorVertical()

void SeparatorVertical ( BorderStyle border = LIGHT)

Draw some vertical separator lines in the selection.

Parameters
borderThe border style to apply.

Definition at line 398 of file src/ftxui/dom/table.cpp.

◆ SeparatorHorizontal()

void SeparatorHorizontal ( BorderStyle border = LIGHT)

Draw some horizontal separator lines in the selection.

Parameters
borderThe border style to apply.

Definition at line 412 of file src/ftxui/dom/table.cpp.

◆ BorderLeft()

void BorderLeft ( BorderStyle border = LIGHT)

Draw some separator lines to the left side of the selection.

Parameters
borderThe border style to apply.

Definition at line 426 of file src/ftxui/dom/table.cpp.

◆ BorderRight()

void BorderRight ( BorderStyle border = LIGHT)

Draw some separator lines to the right side of the selection.

Parameters
borderThe border style to apply.

Definition at line 436 of file src/ftxui/dom/table.cpp.

◆ BorderTop()

void BorderTop ( BorderStyle border = LIGHT)

Draw some separator lines to the top side of the selection.

Parameters
borderThe border style to apply.

Definition at line 446 of file src/ftxui/dom/table.cpp.

◆ BorderBottom()

void BorderBottom ( BorderStyle border = LIGHT)

Draw some separator lines to the bottom side of the selection.

Parameters
borderThe border style to apply.

Definition at line 456 of file src/ftxui/dom/table.cpp.