Loading...
Searching...
No Matches
Selection Class Reference

Represent a selection in the terminal. More...

## Public Member Functions

| Selection ()
| Create an empty selection.
| Selection (int start_x, int start_y, int end_x, int end_y)
| Create a selection.
const Box & | GetBox () const
| Get the box of the selection.
Selection | SaturateHorizontal (Box box)
| Saturate the selection to be inside the box. This is called by hbox to propagate the selection to its children.
Selection | SaturateVertical (Box box)
| Saturate the selection to be inside the box. This is called by vbox to propagate the selection to its children.
bool | IsEmpty () const
void | AddPart (const std::string &part, int y, int left, int right)
std::string | GetParts ()

## Detailed Description

Represent a selection in the terminal.

Definition at line 17 of file selection.hpp.

## Constructor & Destructor Documentation

## Selection() [1/2]

Selection | ( |  | ) |

default

Create an empty selection.

## Selection() [2/2]

Selection | ( | int | start_x,
|  | int | start_y,
|  | int | end_x,
|  | int | end_y )

Create a selection.

Parameters

  start_x | The x coordinate of the start of the selection.
  start_y | The y coordinate of the start of the selection.
  end_x | The x coordinate of the end of the selection.
  end_y | The y coordinate of the end of the selection.

Definition at line 34 of file selection.cpp.

## Member Function Documentation

## GetBox()

const Box & GetBox | ( |  | ) | const

Get the box of the selection.

Returns
  The box of the selection.

Definition at line 67 of file selection.cpp.

## SaturateHorizontal()

Selection SaturateHorizontal | ( | Box | box | ) |

Saturate the selection to be inside the box. This is called by hbox to propagate the selection to its children.

Parameters

  box | The box to saturate the selection in.

Returns
  The saturated selection.

Definition at line 75 of file selection.cpp.

## SaturateVertical()

Selection SaturateVertical | ( | Box | box | ) |

Saturate the selection to be inside the box. This is called by vbox to propagate the selection to its children.

Parameters

  box | The box to saturate the selection in.

Returns
  The saturated selection.

Definition at line 113 of file selection.cpp.

## IsEmpty()

bool IsEmpty | ( |  | ) | const

inline

Definition at line 26 of file selection.hpp.

## AddPart()

void AddPart | ( | const std::string & | part,
|  | int | y,
|  | int | left,
|  | int | right )

Definition at line 146 of file selection.cpp.

## GetParts()

std::string GetParts | ( |  | ) |

inline

Definition at line 29 of file selection.hpp.

The documentation for this class was generated from the following files:

- include/ftxui/dom/selection.hpp
- src/ftxui/dom/selection.cpp