MiniDevil
As beautiful as a shell
Main drawing (renders command box, output & waifu) More...
#include "minishell_ui.h"
Include dependency graph for drawing.c:Main drawing (renders command box, output & waifu)
Definition in file drawing.c.
Functions | |
| void | draw_cmd_box (t_ui *ui) |
| Draw the command input box (top left of the UI) More... | |
| void | draw_exit_box (t_ui *ui) |
| Draw the exit code status box (right sidebare, below waifu) More... | |
| void | draw_ui (t_ui *ui) |
| Clear the screen and redraw the UI from scratch. More... | |
| void | redraw_cmd_only (t_ui *ui) |
| Redraws only the command input line. More... | |
| void draw_cmd_box | ( | t_ui * | ui | ) |
Draw the command input box (top left of the UI)
Render a titled box with a block cursor
| ui | UI state |
Definition at line 22 of file drawing.c.
References BOLD, t_cmd::buf, C_FIRE3, C_FIRE4, t_ui::cmd, t_box::color, draw_box_bottom(), draw_box_sides(), draw_box_title(), t_box::h, t_cmd::len, print_at(), RESET, 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 draw_exit_box | ( | t_ui * | ui | ) |
Draw the exit code status box (right sidebare, below waifu)
Colours the exit code green on success and red on failure
| ui | UI state |
Definition at line 50 of file drawing.c.
References BOLD, C_FIRE1, C_FIRE2, C_FIRE5, t_box::color, draw_box(), EXIT_BOX_H, t_out::exit_code, t_box::h, t_ui::out, print_at(), RESET, 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 draw_ui | ( | t_ui * | ui | ) |
Clear the screen and redraw the UI from scratch.
Draw all 4 panels: command box, waifu, exit box and output box
| ui | UI state |
Definition at line 76 of file drawing.c.
References CLEAR_SCREEN, draw_cmd_box(), draw_exit_box(), draw_out_box(), and draw_waifu_box().
Referenced by check_resize(), and ui_loop().
Here is the call graph for this function:
Here is the caller graph for this function:| void redraw_cmd_only | ( | t_ui * | ui | ) |
Redraws only the command input line.
| ui | UI state |
Definition at line 90 of file drawing.c.
References BOLD, t_cmd::buf, C_FIRE4, t_ui::cmd, t_cmd::len, print_at(), RESET, t_ui::term, WAIFU_BOX_W, and t_term::width.
Referenced by ui_loop().
Here is the call graph for this function:
Here is the caller graph for this function: