added helper functions
This commit is contained in:
46
draw.h
Normal file
46
draw.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef DRAW_H_
|
||||
#define DRAW_H_
|
||||
|
||||
|
||||
/**
|
||||
* @brief The width at which everything gets rendered.
|
||||
*/
|
||||
#define WIDTH 140
|
||||
|
||||
/**
|
||||
* @brief The character used for the edges and layout in general
|
||||
*/
|
||||
#define SEPERATION_CHAR '#'
|
||||
|
||||
/**
|
||||
* @brief Draws the Upper and Lower bar using the SEPERATION_CHAR
|
||||
*
|
||||
* This function prints out the SEPERATION_CHAR out by WIDTH amount of times.
|
||||
* It simply runs a for-loop
|
||||
*
|
||||
* @see WIDTH, SEPERATION_CHAR
|
||||
*/
|
||||
void drawEdges();
|
||||
|
||||
/**
|
||||
* @brief prints the title in the standard formatting centered.
|
||||
*
|
||||
* prints out the title centered and calculates the spacing based on the WIDTH and the length of the title.
|
||||
* Puts an SEPERATION_CHAR at the start and end of the line.
|
||||
*
|
||||
* @param title the title that should be printed out. Type is char*
|
||||
*
|
||||
* @see SEPERATION_CHAR, WIDTH
|
||||
*/
|
||||
void drawTitle(char* title);
|
||||
|
||||
/**
|
||||
* @brief Draws the amount of empty lines, passed as amount
|
||||
*
|
||||
* @param amount
|
||||
*/
|
||||
void drawEmptyLines(int amount);
|
||||
|
||||
char** splitByNewLine(char *str, int *lineCount);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user