Euphoria
|
textbox.h
Go to the documentation of this file.
17 constexpr unsigned char bit_no_line = static_cast<unsigned char>(~(bit_up | bit_down | bit_left | bit_right));
321 [[nodiscard]] std::vector<std::string> to_string(const TextBoxStyle& style = get_terminal_style()) const;
Definition: argparse.cc:45
constexpr TextBoxStyle utf_8double_line_style
Definition: textbox.h:88
@ end
Definition: textbox.h:20
constexpr TextBoxStyle(F connections_func)
Definition: textbox.h:22
std::string_view get_string(char s) const
Definition: textbox.cc:47
Definition: textbox.h:143
int get_vertical_append_position(int x, const TextBox &b) const
Calculate the earliest Y coordinate where the given box could be placed without colliding with existi...
Definition: textbox.cc:326
int get_horizontal_append_position(int y, const TextBox &b) const
Calculate the earliest X coordinate where the given box could be placed.
Definition: textbox.cc:310
void put_string(int x, int y, const std::string &s)
Put a string of characters starting at the given coordinate.
Definition: textbox.cc:116
TextBox put_box_copy(int x, int y, const TextBox &b) const
Definition: textbox.cc:183
static TextBox create_tree_graph(const T &e, int maxwidth, TToStringFunc &&to_string, TCountChildrenFunc &&count_children_func, TOneLinerTestFunc &&oneliner_test_func, TSimpleTestFunc &&simple_test_func, int margin=4, int firstx=2)
An utility function that can be used to create a tree graph rendering from a structure.
Definition: textbox.h:214
void put_horizontal_line(int x, int y, int width, bool bef, bool aft)
Draw a horizontal line.
Definition: textbox.cc:245
static TextBox create_from_strings(const std::vector< std::string > &str)
Definition: textbox.cc:84
void put_char(int x, int y, char c)
Place a single character in the given coordinate.
Definition: textbox.cc:93
static TextBox from_string(const std::string &s, int x=0, int y=0)
Definition: textbox.cc:129
std::vector< std::string > to_string(const TextBoxStyle &style=get_terminal_style()) const
Definition: textbox.cc:344
void put_vertical_line(int x, int y, int height, bool bef, bool aft)
Draw a vertical line.
Definition: textbox.cc:278