MiniDevil As beautiful as a shell
drawing_utils.c File Reference

Drawing primitives: prints at coordinates & draws lines. More...

#include "minishell_ui.h"
+ Include dependency graph for drawing_utils.c:

Detailed Description

Drawing primitives: prints at coordinates & draws lines.

Definition in file drawing_utils.c.

Functions

void print_at (int row, int col, const char *str)
 Move the terminal cursor to [row, col] and write str. More...
 
void draw_hline (int width, const char *color)
 Draw a horizontal line of dashes with optional color. More...
 

Function Documentation

◆ print_at()

void print_at ( int  row,
int  col,
const char *  str 
)

Move the terminal cursor to [row, col] and write str.

Parameters
rowTarget row (starting at 1)
colTarget colum (starting at 1)
strString to print

Definition at line 22 of file drawing_utils.c.

Referenced by draw_box_bottom(), draw_box_sides(), draw_box_title(), draw_box_top(), draw_cmd_box(), draw_exit_box(), draw_happy(), draw_out_line(), draw_proud(), draw_upset(), and redraw_cmd_only().

+ Here is the caller graph for this function:

◆ draw_hline()

void draw_hline ( int  width,
const char *  color 
)

Draw a horizontal line of dashes with optional color.

Parameters
widthNumber of dash characters to write
colorANSI color escape string to apply

Definition at line 33 of file drawing_utils.c.

References RESET.

Referenced by draw_box_bottom(), draw_box_title(), and draw_box_top().

+ Here is the caller graph for this function:

Go to the source code of this file.