MiniDevil As beautiful as a shell
drawing_box.c File Reference

Box drawing (renders bordered containers with titles) More...

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

Detailed Description

Box drawing (renders bordered containers with titles)

Definition in file drawing_box.c.

Functions

static void draw_box_top (t_box *b)
 Draw the top border of a box. More...
 
void draw_box_bottom (t_box *b)
 Draw the bottom border of a box. More...
 
void draw_box_sides (t_box *b)
 Draw the left and right borders of a box. More...
 
void draw_box (t_box *b)
 Draw a complete box. More...
 
void draw_box_title (t_box *b, const char *title)
 Draw the top border of a box with title in the center. More...
 

Function Documentation

◆ draw_box_top()

static void draw_box_top ( t_box b)
static

Draw the top border of a box.

Parameters
bBox descriptor (with position, width and colors)

Definition at line 20 of file drawing_box.c.

References BOX_TL, BOX_TR, t_box::color, draw_hline(), print_at(), RESET, t_box::w, t_box::x, and t_box::y.

Referenced by draw_box().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ draw_box_bottom()

void draw_box_bottom ( t_box b)

Draw the bottom border of a box.

Parameters
bBox descriptor (with position, width and colors)

Definition at line 34 of file drawing_box.c.

References BOX_BL, BOX_BR, t_box::color, draw_hline(), t_box::h, print_at(), RESET, t_box::w, t_box::x, and t_box::y.

Referenced by draw_box(), draw_cmd_box(), draw_out_box(), and draw_waifu_box().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ draw_box_sides()

void draw_box_sides ( t_box b)

Draw the left and right borders of a box.

Parameters
bBox descriptor (with position, width and colors)

Definition at line 48 of file drawing_box.c.

References BOX_V, t_box::color, print_at(), RESET, t_box::w, t_box::x, and t_box::y.

Referenced by draw_box(), draw_cmd_box(), and draw_waifu_box().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ draw_box()

void draw_box ( t_box b)

Draw a complete box.

Parameters
bBox descriptor (with position, width and colors)

Definition at line 70 of file drawing_box.c.

References draw_box_bottom(), draw_box_sides(), and draw_box_top().

Referenced by draw_exit_box().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ draw_box_title()

void draw_box_title ( t_box b,
const char *  title 
)

Draw the top border of a box with title in the center.

Parameters
bBox descriptor (with position, width and colors)
titleLabel string to embed in the border

Definition at line 83 of file drawing_box.c.

References BOLD, BOX_TL, BOX_TR, t_box::color, draw_hline(), print_at(), RESET, visual_strlen(), t_box::w, t_box::x, and t_box::y.

Referenced by draw_cmd_box(), draw_out_box(), and draw_waifu_box().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Go to the source code of this file.