set_tab(3)

πŸ“¦ version 1.6, in fedora 43, fedora 44

✨ NAME ✨

set_tab β€” the lil function that plants a tab stop exactly where u want it πŸ’…


🌸 SYNOPSIS 🌸

#include <gstream.h>

void set_tab(int x, int color, FONT fnt);

πŸŽ€ DESCRIPTION πŸŽ€

okay bestie, listen. this is the basic function. it does one thing and it does it gorgeously: it creates a tab stop at the x-coordinate you give it, with the colour you give it and the font you give it. that's it. that's the vibe. πŸ¦‹

but here's the tea β€” the function is overloaded, so you're not locked into passing all three args every single time. if you just wanna drop a tab stop without touching the font or the colour, you can. if you only wanna change the colour, you can. if you only wanna swap the font, you can too. like:

  • set_tab(int x)
  • set_tab(int x, int color)
  • set_tab(int x, FONT fnt)

respectively, obviously. 🫢


πŸ’– some examples, as a treat πŸ’–

set_tab(130);
// set a tab stop at the x-position 130, don't change colour or font

set_tab(400);
// set a tab stop at 400, don't change colour or font

set_tab(80, 24);
// set a stop at 80 and let it change the colour to 24, no font change

set_tab(190, 57, my_arial_font);
// set tab stop at 190, change colour to 57 and font to 'my_arial_font'

set_tab(250, courier);
// set tab stop at 250, don't change colour, but change font to 'courier'
ngl the overloads are lowkey the whole point of this function, so use them, they're serving πŸ“

🌈 a lil history lesson 🌈

so, the first version of gstream did not have these overloaded functions. instead it used a way more clumsy syntax (it involved a constant, ikr 😭) and that whole situation is deprecated now. so don't do that. do this. periodt. πŸ’…


⭐ SEE ALSO ⭐


okay that's the whole page, love u, go set some tabs πŸ’œ this was set_tab from the gstream manual, version 1.6 β€” mwah, bye bestie πŸ‘‘βœ¨

πŸ“¦ where this page comes from