1**libfort** has a number of builtin border styles. 2To change border style of **libfort** tables one can use `set_default_border_style`, `set_border_style` functions: 3```C++ 4/* Change border style of all libfort tables that will be created */ 5bool set_default_border_style(struct ft_border_style *style); 6/* Change border style of the current table */ 7bool set_border_style(struct ft_border_style *style); 8``` 9 10Here is a simple example of creating table and setting border style: 11 12```C++ 13fort::char_table table; 14/* Set table border style */ 15table.set_border_style(FT_BASIC_STYLE); 16 17// Fill table with data 18table << fort::header 19 << "Rank" << "Title" << "Year" << "Rating" << fort::endr 20 << "1" << "The Shawshank Redemption" << "1994" << "9.5" << fort::endr 21 << "2" << "12 Angry Men" << "1957" << "8.8" << fort::endr 22 << "3" << "It's a Wonderful Life" << "1946" << "8.6" << fort::endr 23 << fort::separator 24 << "4" << "2001: A Space Odyssey" << "1968" << "8.5" << fort::endr 25 << "5" << "Blade Runner" << "1982" << "8.1" << fort::endr 26 << fort::endr; 27 28table.column(0).set_cell_text_align(fort::text_align::center); 29table.column(1).set_cell_text_align(fort::text_align::left); 30 31std::cout << table.to_string() << std::endl; 32``` 33Output: 34```text 35+------+--------------------------+------+--------+ 36| Rank | Title | Year | Rating | 37+------+--------------------------+------+--------+ 38| 1 | The Shawshank Redemption | 1994 | 9.5 | 39| 2 | 12 Angry Men | 1957 | 8.8 | 40| 3 | It's a Wonderful Life | 1946 | 8.6 | 41+------+--------------------------+------+--------+ 42| 4 | 2001: A Space Odyssey | 1968 | 8.5 | 43| 5 | Blade Runner | 1982 | 8.1 | 44+------+--------------------------+------+--------+ 45``` 46 47## FT_BASIC_STYLE 48```text 49+------+--------------------------+------+--------+ 50| Rank | Title | Year | Rating | 51+------+--------------------------+------+--------+ 52| 1 | The Shawshank Redemption | 1994 | 9.5 | 53| 2 | 12 Angry Men | 1957 | 8.8 | 54| 3 | It's a Wonderful Life | 1946 | 8.6 | 55+------+--------------------------+------+--------+ 56| 4 | 2001: A Space Odyssey | 1968 | 8.5 | 57| 5 | Blade Runner | 1982 | 8.1 | 58+------+--------------------------+------+--------+ 59``` 60 61## FT_BASIC2_STYLE 62```text 63+------+--------------------------+------+--------+ 64| Rank | Title | Year | Rating | 65+------+--------------------------+------+--------+ 66| 1 | The Shawshank Redemption | 1994 | 9.5 | 67+------+--------------------------+------+--------+ 68| 2 | 12 Angry Men | 1957 | 8.8 | 69+------+--------------------------+------+--------+ 70| 3 | It's a Wonderful Life | 1946 | 8.6 | 71+------+--------------------------+------+--------+ 72| 4 | 2001: A Space Odyssey | 1968 | 8.5 | 73+------+--------------------------+------+--------+ 74| 5 | Blade Runner | 1982 | 8.1 | 75+------+--------------------------+------+--------+ 76``` 77 78## FT_SIMPLE_STYLE 79```text 80 81 Rank Title Year Rating 82 ------ -------------------------- ------ -------- 83 1 The Shawshank Redemption 1994 9.5 84 2 12 Angry Men 1957 8.8 85 3 It's a Wonderful Life 1946 8.6 86 ------ -------------------------- ------ -------- 87 4 2001: A Space Odyssey 1968 8.5 88 5 Blade Runner 1982 8.1 89 90``` 91 92 93 94## FT_PLAIN_STYLE 95```text 96 ------------------------------------------------- 97 Rank Title Year Rating 98 ------------------------------------------------- 99 1 The Shawshank Redemption 1994 9.5 100 2 12 Angry Men 1957 8.8 101 3 It's a Wonderful Life 1946 8.6 102 ------------------------------------------------- 103 4 2001: A Space Odyssey 1968 8.5 104 5 Blade Runner 1982 8.1 105``` 106 107## FT_DOT_STYLE 108```text 109................................................... 110: Rank : Title : Year : Rating : 111:......:..........................:......:........: 112: 1 : The Shawshank Redemption : 1994 : 9.5 : 113: 2 : 12 Angry Men : 1957 : 8.8 : 114: 3 : It's a Wonderful Life : 1946 : 8.6 : 115:......:..........................:......:........: 116: 4 : 2001: A Space Odyssey : 1968 : 8.5 : 117: 5 : Blade Runner : 1982 : 8.1 : 118:......:..........................:......:........: 119``` 120 121 122 123## FT_EMPTY_STYLE 124```text 125 Rank Title Year Rating 126 1 The Shawshank Redemption 1994 9.5 127 2 12 Angry Men 1957 8.8 128 3 It's a Wonderful Life 1946 8.6 129 130 4 2001: A Space Odyssey 1968 8.5 131 5 Blade Runner 1982 8.1 132``` 133 134## FT_EMPTY2_STYLE 135```text 136 137 Rank Title Year Rating 138 1 The Shawshank Redemption 1994 9.5 139 2 12 Angry Men 1957 8.8 140 3 It's a Wonderful Life 1946 8.6 141 142 4 2001: A Space Odyssey 1968 8.5 143 5 Blade Runner 1982 8.1 144 145``` 146 147 148## FT_SOLID_STYLE 149```text 150┌──────┬──────────────────────────┬──────┬────────┐ 151│ Rank │ Title │ Year │ Rating │ 152├──────┼──────────────────────────┼──────┼────────┤ 153│ 1 │ The Shawshank Redemption │ 1994 │ 9.5 │ 154│ 2 │ 12 Angry Men │ 1957 │ 8.8 │ 155│ 3 │ It's a Wonderful Life │ 1946 │ 8.6 │ 156├──────┼──────────────────────────┼──────┼────────┤ 157│ 4 │ 2001: A Space Odyssey │ 1968 │ 8.5 │ 158│ 5 │ Blade Runner │ 1982 │ 8.1 │ 159└──────┴──────────────────────────┴──────┴────────╯ 160``` 161 162## FT_SOLID_ROUND_STYLE 163```text 164╭──────┬──────────────────────────┬──────┬────────╮ 165│ Rank │ Title │ Year │ Rating │ 166├──────┼──────────────────────────┼──────┼────────┤ 167│ 1 │ The Shawshank Redemption │ 1994 │ 9.5 │ 168│ 2 │ 12 Angry Men │ 1957 │ 8.8 │ 169│ 3 │ It's a Wonderful Life │ 1946 │ 8.6 │ 170├──────┼──────────────────────────┼──────┼────────┤ 171│ 4 │ 2001: A Space Odyssey │ 1968 │ 8.5 │ 172│ 5 │ Blade Runner │ 1982 │ 8.1 │ 173╰──────┴──────────────────────────┴──────┴────────╯ 174``` 175 176 177 178 179## FT_DOUBLE_STYLE 180```text 181╔══════╦══════════════════════════╦══════╦════════╗ 182║ Rank ║ Title ║ Year ║ Rating ║ 183╠══════╬══════════════════════════╬══════╬════════╣ 184║ 1 ║ The Shawshank Redemption ║ 1994 ║ 9.5 ║ 185║ 2 ║ 12 Angry Men ║ 1957 ║ 8.8 ║ 186║ 3 ║ It's a Wonderful Life ║ 1946 ║ 8.6 ║ 187╠══════╬══════════════════════════╬══════╬════════╣ 188║ 4 ║ 2001: A Space Odyssey ║ 1968 ║ 8.5 ║ 189║ 5 ║ Blade Runner ║ 1982 ║ 8.1 ║ 190╚══════╩══════════════════════════╩══════╩════════╝ 191``` 192 193 194## FT_DOUBLE2_STYLE 195```text 196╔══════╤══════════════════════════╤══════╤════════╗ 197║ Rank │ Title │ Year │ Rating ║ 198╠══════╪══════════════════════════╪══════╪════════╣ 199║ 1 │ The Shawshank Redemption │ 1994 │ 9.5 ║ 200╟──────┼──────────────────────────┼──────┼────────╢ 201║ 2 │ 12 Angry Men │ 1957 │ 8.8 ║ 202╟──────┼──────────────────────────┼──────┼────────╢ 203║ 3 │ It's a Wonderful Life │ 1946 │ 8.6 ║ 204╠══════╪══════════════════════════╪══════╪════════╣ 205║ 4 │ 2001: A Space Odyssey │ 1968 │ 8.5 ║ 206╟──────┼──────────────────────────┼──────┼────────╢ 207║ 5 │ Blade Runner │ 1982 │ 8.1 ║ 208╚══════╧══════════════════════════╧══════╧════════╝ 209``` 210 211## FT_BOLD_STYLE 212```text 213┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━┓ 214┃ Rank ┃ Title ┃ Year ┃ Rating ┃ 215┣━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━╋━━━━━━━━┫ 216┃ 1 ┃ The Shawshank Redemption ┃ 1994 ┃ 9.5 ┃ 217┃ 2 ┃ 12 Angry Men ┃ 1957 ┃ 8.8 ┃ 218┃ 3 ┃ It's a Wonderful Life ┃ 1946 ┃ 8.6 ┃ 219┣━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━╋━━━━━━━━┫ 220┃ 4 ┃ 2001: A Space Odyssey ┃ 1968 ┃ 8.5 ┃ 221┃ 5 ┃ Blade Runner ┃ 1982 ┃ 8.1 ┃ 222┗━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━┻━━━━━━━━┛ 223``` 224 225 226 227## FT_BOLD2_STYLE 228```text 229┏━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━┓ 230┃ Rank │ Title │ Year │ Rating ┃ 231┣━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━┿━━━━━━━━┫ 232┃ 1 │ The Shawshank Redemption │ 1994 │ 9.5 ┃ 233┠──────┼──────────────────────────┼──────┼────────┨ 234┃ 2 │ 12 Angry Men │ 1957 │ 8.8 ┃ 235┠──────┼──────────────────────────┼──────┼────────┨ 236┃ 3 │ It's a Wonderful Life │ 1946 │ 8.6 ┃ 237┣━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━┿━━━━━━━━┫ 238┃ 4 │ 2001: A Space Odyssey │ 1968 │ 8.5 ┃ 239┠──────┼──────────────────────────┼──────┼────────┨ 240┃ 5 │ Blade Runner │ 1982 │ 8.1 ┃ 241┗━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━┛ 242``` 243 244 245## FT_FRAME_STYLE 246```text 247▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜ 248▌ Rank ┃ Title ┃ Year ┃ Rating ▐ 249▌━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━╋━━━━━━━━▐ 250▌ 1 ┃ The Shawshank Redemption ┃ 1994 ┃ 9.5 ▐ 251▌ 2 ┃ 12 Angry Men ┃ 1957 ┃ 8.8 ▐ 252▌ 3 ┃ It's a Wonderful Life ┃ 1946 ┃ 8.6 ▐ 253▌━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━╋━━━━━━━━▐ 254▌ 4 ┃ 2001: A Space Odyssey ┃ 1968 ┃ 8.5 ▐ 255▌ 5 ┃ Blade Runner ┃ 1982 ┃ 8.1 ▐ 256▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟ 257```