36 ft_printf(
"%s", ui->
cmd.
buf);
37 write(STDOUT_FILENO,
"█", 3);
38 clear_len = b.
w - ui->
cmd.
len - 6;
39 while (clear_len-- > 0)
40 write(STDOUT_FILENO,
" ", 1);
98 write(STDOUT_FILENO,
"█", 3);
99 clear_len = width - ui->
cmd.
len - 8;
102 while (clear_len-- > 0)
103 write(STDOUT_FILENO,
" ", 1);
void redraw_cmd_only(t_ui *ui)
Redraws only the command input line.
void draw_exit_box(t_ui *ui)
Draw the exit code status box (right sidebare, below waifu)
void draw_cmd_box(t_ui *ui)
Draw the command input box (top left of the UI)
void draw_ui(t_ui *ui)
Clear the screen and redraw the UI from scratch.
void draw_box_bottom(t_box *b)
Draw the bottom border of a box.
void draw_box_title(t_box *b, const char *title)
Draw the top border of a box with title in the center.
void draw_box_sides(t_box *b)
Draw the left and right borders of a box.
void draw_box(t_box *b)
Draw a complete box.
void draw_out_box(t_ui *ui)
Draw the full output box with title and borders.
void print_at(int row, int col, const char *str)
Move the terminal cursor to [row, col] and write str.
UI mode structures, macros & function prototypes.
Box position & style for drawing.
const char * color
ANSI color str.
char buf[MAX_CMD_LEN]
Fixed size buffer.
int len
Current input length.
int exit_code
Last command exit code.
t_term term
Terminal state.
void draw_waifu_box(t_ui *ui)
Draw the waifu panel in the right sidebar.