Loading...
Searching...
No Matches
Loop Class Reference

## Public Member Functions

| Loop (ScreenInteractive *screen, Component component)
| A Loop is a wrapper around a Component and a ScreenInteractive. It is used to run a Component in a terminal.
| ~Loop ()
bool | HasQuitted ()
| Whether the loop has quitted.
void | RunOnce ()
| Execute the loop. Make the component to process every pending tasks/events. A new frame might be drawn if the previous was invalidated. Return true until the loop hasn't completed.
void | RunOnceBlocking ()
| Wait for at least one event to be handled and execute Loop::RunOnce().
void | Run ()
| Loop (const Loop &)=default
| Loop (Loop &&)=delete
Loop & | operator= (Loop &&)=delete
| Loop (const ScreenInteractive &)=delete
Loop & | operator= (const Loop &)=delete

## Detailed Description

Examples
  examples/component/custom_loop.cpp.

Definition at line 17 of file loop.hpp.

## Constructor & Destructor Documentation

## Loop() [1/4]

Loop | ( | ScreenInteractive * | screen,
|  | Component | component )

A Loop is a wrapper around a Component and a ScreenInteractive. It is used to run a Component in a terminal.

See also
  Component, ScreenInteractive.
  ScreenInteractive::Loop().
  ScreenInteractive::ExitLoop().

Parameters

  [in] | screen | The screen to use.
  [in] | component | The component to run.

Definition at line 21 of file loop.cpp.

## ~Loop()

~Loop | ( |  | ) |

Definition at line 26 of file loop.cpp.

## Loop() [2/4]

Loop | ( | const Loop & |  | ) |

default

## Loop() [3/4]

Loop | ( | Loop && |  | ) |

delete

## Loop() [4/4]

Loop | ( | const ScreenInteractive & |  | ) |

delete

## Member Function Documentation

## HasQuitted()

bool HasQuitted | ( |  | ) |

Whether the loop has quitted.

Definition at line 32 of file loop.cpp.

## RunOnce()

void RunOnce | ( |  | ) |

Execute the loop. Make the component to process every pending tasks/events. A new frame might be drawn if the previous was invalidated. Return true until the loop hasn't completed.

Definition at line 39 of file loop.cpp.

## RunOnceBlocking()

void RunOnceBlocking | ( |  | ) |

Wait for at least one event to be handled and execute Loop::RunOnce().

Definition at line 45 of file loop.cpp.

## Run()

void Run | ( |  | ) |

Execute the loop, blocking the current thread, up until the loop has quitted.

Definition at line 51 of file loop.cpp.

## operator=() [1/2]

Loop & operator= | ( | Loop && |  | ) |

delete

## operator=() [2/2]

Loop & operator= | ( | const Loop & |  | ) |

delete

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

- include/ftxui/component/loop.hpp
- src/ftxui/component/loop.cpp