MiniDevil
As beautiful as a shell
Output rendering (draws command output in scrollable box) More...
#include "minishell_ui.h"
Include dependency graph for drawing_output.c:Output rendering (draws command output in scrollable box)
Definition in file drawing_output.c.
Functions | |
| static void | draw_line_content (t_ui *ui, int line_idx, int w) |
| Write a single scrolled output line's content to STDOUT. More... | |
| void | draw_out_line (t_ui *ui, int y, int i, int w) |
| Draw one raw inside the output box (including the side borders) More... | |
| void | draw_out_box (t_ui *ui) |
| Draw the full output box with title and borders. More... | |
| void | redraw_output_only (t_ui *ui) |
| Redraw only the output box interior rows without borders nor title. More... | |
|
static |
Write a single scrolled output line's content to STDOUT.
| ui | UI state |
| line_idx | Line index |
| w | Width of the output box in cols |
Definition at line 25 of file drawing_output.c.
References t_out::lines, t_ui::out, and truncate_line().
Referenced by draw_out_line().
Here is the call graph for this function:
Here is the caller graph for this function:| void draw_out_line | ( | t_ui * | ui, |
| int | y, | ||
| int | i, | ||
| int | w | ||
| ) |
Draw one raw inside the output box (including the side borders)
| ui | UI state |
| y | Top row of the output box |
| i | Row index within the box (0 based) |
| w | Width of the output box |
Definition at line 57 of file drawing_output.c.
References BOX_V, C_FIRE2, draw_line_content(), t_ui::out, print_at(), RESET, and t_out::scroll.
Referenced by draw_out_box(), and redraw_output_only().
Here is the call graph for this function:
Here is the caller graph for this function:| void draw_out_box | ( | t_ui * | ui | ) |
Draw the full output box with title and borders.
THe box grows to fill the terminal from row 5 to the last 2 rows
| ui | UI state |
Definition at line 79 of file drawing_output.c.
References C_FIRE2, t_box::color, draw_box_bottom(), draw_box_title(), draw_out_line(), t_box::h, t_term::height, t_ui::term, t_box::w, WAIFU_BOX_W, t_term::width, t_box::x, and t_box::y.
Referenced by draw_ui().
Here is the call graph for this function:
Here is the caller graph for this function:| void redraw_output_only | ( | t_ui * | ui | ) |
Redraw only the output box interior rows without borders nor title.
Used after scroll events in order to refresh content without full redraw
| ui | UI state |
Definition at line 106 of file drawing_output.c.
References draw_out_line(), t_term::height, t_ui::term, WAIFU_BOX_W, and t_term::width.
Referenced by handle_scroll().
Here is the call graph for this function:
Here is the caller graph for this function: