FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
homescreen.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 
 for (auto &column :info_columns)
 
 for (int value=0;value< 255;value+=16)
 
return flexbox ({ basic_color_display, palette_256_color_display, true_color_display, }, FlexboxConfig().SetGap(1, 1))
 
return hbox ({ text(std::to_string(int(progress *100))+"% ")|size(WIDTH, EQUAL, 5), gauge(progress), })
 
return window (text(title)|hcenter|bold, text("contenido")|hcenter|dim)|size(WIDTH
 
return dimx size (HEIGHT, EQUAL, dimy)
 
 while (!loop.HasQuitted())
 

Variables

auto basic_color_display
 
auto palette_256_color_display = text("Paleta de 256 colores:")
 
Elements columns
 
auto true_color_display = text("Colores verdaderos: 24bits:")
 
Elements array
 
float progress = (shift + delta) % 500 / 500.f
 
auto gauge_component
 
std::string title = std::to_string(dimx) + "x" + std::to_string(dimy)
 
return EQUAL
 
auto paragraph_renderer_left
 
auto paragraph_renderer_right
 
int paragraph_renderer_split_position = Terminal::Size().dimx / 2
 
auto paragraph_renderer_group
 
auto paragraph_renderer_group_renderer
 
int tab_index = 0
 
std::vector< std::string > tab_entries
 
auto tab_selection
 
auto tab_content
 
auto exit_button
 
auto main_container
 
auto main_renderer
 
Loop loop & screen
 
 return
 

Function Documentation

◆ main()

int main ( )

Definition at line 31 of file homescreen.cpp.

◆ for() [1/2]

for ( auto &column :info_columns )

Definition at line 326 of file homescreen.cpp.

◆ for() [2/2]

for ( )

Definition at line 347 of file homescreen.cpp.

◆ flexbox()

◆ hbox()

return hbox ( { text(std::to_string(int(progress *100))+"% ")|size(WIDTH, EQUAL, 5), gauge(progress), } )
Examples
examples/component/button_in_frame.cpp, examples/component/canvas_animated.cpp, examples/component/collapsible.cpp, examples/component/flexbox_gallery.cpp, examples/component/focus_cursor.cpp, examples/component/gallery.cpp, examples/component/homescreen.cpp, examples/component/input.cpp, examples/component/input_style.cpp, examples/component/menu2.cpp, examples/component/menu_entries.cpp, examples/component/menu_entries_animated.cpp, examples/component/menu_style.cpp, examples/component/modal_dialog_custom.cpp, examples/component/selection.cpp, examples/component/slider_rgb.cpp, examples/component/tab_vertical.cpp, examples/component/toggle.cpp, examples/component/with_restored_io.cpp, examples/dom/border.cpp, examples/dom/border_colored.cpp, examples/dom/color_gallery.cpp, examples/dom/color_info_palette256.cpp, examples/dom/color_truecolor_HSV.cpp, examples/dom/color_truecolor_RGB.cpp, examples/dom/gauge.cpp, examples/dom/gauge_direction.cpp, examples/dom/graph.cpp, examples/dom/package_manager.cpp, examples/dom/paragraph.cpp, examples/dom/separator.cpp, examples/dom/separator_style.cpp, examples/dom/size.cpp, examples/dom/spinner.cpp, examples/dom/style_blink.cpp, examples/dom/style_bold.cpp, examples/dom/style_color.cpp, examples/dom/style_dim.cpp, examples/dom/style_gallery.cpp, examples/dom/style_hyperlink.cpp, examples/dom/style_inverted.cpp, examples/dom/style_italic.cpp, examples/dom/style_strikethrough.cpp, examples/dom/style_underlined.cpp, examples/dom/style_underlined_double.cpp, and examples/dom/vbox_hbox.cpp.

◆ window()

◆ size()

◆ while()

while ( !loop. HasQuitted())

Definition at line 504 of file homescreen.cpp.

Variable Documentation

◆ basic_color_display

auto basic_color_display

◆ palette_256_color_display

palette_256_color_display = text("Paleta de 256 colores:")

◆ columns

Elements columns
Initial value:
{
std::vector<std::vector<ColorInfo>> info_columns = ColorInfoSorted2D()
std::vector< std::vector< ftxui::ColorInfo > > ColorInfoSorted2D()
Examples
examples/component/homescreen.cpp, and examples/dom/color_gallery.cpp.

Definition at line 325 of file homescreen.cpp.

◆ true_color_display

true_color_display = text("Colores verdaderos: 24bits:")

◆ array

Elements array
Initial value:
{
int saturation = 255
Examples
examples/component/homescreen.cpp, examples/dom/color_gallery.cpp, and examples/dom/color_truecolor_HSV.cpp.

Definition at line 346 of file homescreen.cpp.

◆ progress

float progress = (shift + delta) % 500 / 500.f
Examples
examples/component/homescreen.cpp.

Definition at line 375 of file homescreen.cpp.

◆ gauge_component

auto gauge_component
Initial value:
= Renderer([render_gauge] {
return vbox({
render_gauge(0) | color(Color::Black),
render_gauge(100) | color(Color::GrayDark),
render_gauge(50) | color(Color::GrayLight),
render_gauge(6894) | color(Color::White),
render_gauge(6841) | color(Color::Blue),
render_gauge(9813) | color(Color::BlueLight),
render_gauge(98765) | color(Color::Cyan),
render_gauge(98) | color(Color::CyanLight),
render_gauge(9846) | color(Color::Green),
render_gauge(1122) | color(Color::GreenLight),
render_gauge(84) | color(Color::Magenta),
render_gauge(645) | color(Color::MagentaLight),
render_gauge(568) | color(Color::Red),
render_gauge(2222) | color(Color::RedLight),
render_gauge(220) | color(Color::Yellow),
render_gauge(348) | color(Color::YellowLight),
});
})
Component Renderer(Component child, std::function< Element()>)
Retorna un nuevo Componente, similar a |child|, pero usando |render| como el evento Component::Render...
Element separator()
Dibuja una separación vertical u horizontal entre otros dos elementos.
Decorator color(Color)
Decora usando un color de primer plano.
Element vbox(Elements)
Examples
examples/component/homescreen.cpp.

Definition at line 383 of file homescreen.cpp.

◆ title

◆ EQUAL

◆ paragraph_renderer_left

auto paragraph_renderer_left
Examples
examples/component/homescreen.cpp.

Definition at line 413 of file homescreen.cpp.

◆ paragraph_renderer_right

auto paragraph_renderer_right
Initial value:
= Renderer([] {
return paragraph("<--- Esta barra vertical es redimensionable usando el ratón") |
})
Element center(Element)
Centra un elemento horizontal y verticalmente.
Elements paragraph(std::wstring text)
Examples
examples/component/homescreen.cpp.

Definition at line 449 of file homescreen.cpp.

◆ paragraph_renderer_split_position

int paragraph_renderer_split_position = Terminal::Size().dimx / 2
Examples
examples/component/homescreen.cpp.

Definition at line 454 of file homescreen.cpp.

◆ paragraph_renderer_group

auto paragraph_renderer_group
Initial value:
=
Component ResizableSplitLeft(Component main, Component back, int *main_size)
Una división horizontal entre dos componentes, configurable usando el ratón.
int paragraph_renderer_split_position
auto paragraph_renderer_right
auto paragraph_renderer_left
Examples
examples/component/homescreen.cpp.

Definition at line 455 of file homescreen.cpp.

◆ paragraph_renderer_group_renderer

auto paragraph_renderer_group_renderer
Initial value:
=
[&] { return paragraph_renderer_group->Render(); })
auto paragraph_renderer_group
Examples
examples/component/homescreen.cpp.

Definition at line 458 of file homescreen.cpp.

◆ tab_index

int tab_index = 0
Examples
examples/component/homescreen.cpp.

Definition at line 464 of file homescreen.cpp.

◆ tab_entries

std::vector<std::string> tab_entries
Initial value:
= {
"htop", "color", "spinner", "gauge", "compiler", "paragraph",
}
Examples
examples/component/homescreen.cpp.

Definition at line 465 of file homescreen.cpp.

◆ tab_selection

auto tab_selection
Initial value:
=
static MenuOption HorizontalAnimated()
Opciones estándar para un menú horizontal animado. Esto puede ser útil para implementar una barra de ...
Component Menu(MenuOption options)
Una lista de texto. El elemento enfocado es seleccionado.
std::vector< std::string > tab_entries
int tab_index
Examples
examples/component/homescreen.cpp.

Definition at line 468 of file homescreen.cpp.

◆ tab_content

auto tab_content
Initial value:
= Container::Tab(
{
htop,
color_tab_renderer,
spinner_tab_renderer,
compiler_renderer,
},
auto paragraph_renderer_group_renderer
auto gauge_component
Examples
examples/component/homescreen.cpp.

Definition at line 470 of file homescreen.cpp.

◆ exit_button

auto exit_button
Initial value:
=
Button("Salir", [&] { screen.Exit(); }, ButtonOption::Animated())
static ButtonOption Animated()
Component Button(ButtonOption options)
Dibuja un botón. Ejecuta una función al hacer clic.
Loop loop & screen
Examples
examples/component/homescreen.cpp.

Definition at line 481 of file homescreen.cpp.

◆ main_container

auto main_container
Initial value:
= Container::Vertical({
Container::Horizontal({
}),
})
auto exit_button
auto tab_content
auto tab_selection
Examples
examples/component/flexbox_gallery.cpp, examples/component/homescreen.cpp, and examples/component/modal_dialog_custom.cpp.

Definition at line 484 of file homescreen.cpp.

◆ main_renderer

auto main_renderer
Initial value:
return vbox({
text("Demostración de FTXUI") | bold | hcenter,
hbox({
tab_selection->Render() | flex,
}),
});
})
virtual void Render(Screen &screen)
Muestra un elemento en un ftxui::Screen.
Definition node.cpp:59
Element flex(Element)
Hace que un elemento hijo se expanda proporcionalmente al espacio restante en un contenedor.
Definition flex.cpp:123
Element text(std::wstring text)
Muestra un fragmento de texto Unicode.
Definition text.cpp:160
Element hcenter(Element)
Centra un elemento horizontalmente.
auto main_container
Element hbox(Elements)
Un contenedor que muestra elementos horizontalmente uno por uno.
Definition hbox.cpp:94
Examples
examples/component/flexbox_gallery.cpp, examples/component/homescreen.cpp, and examples/component/modal_dialog_custom.cpp.

Definition at line 492 of file homescreen.cpp.

◆ screen

Loop loop& screen

Definition at line 503 of file homescreen.cpp.

◆ return

return

Definition at line 518 of file homescreen.cpp.