form_field_just(3X)

πŸ’… form_field_just β€” ok bestie let's talk field justification ✨

so this one's from the ncurses corner of the manual, section 3X, and it's all about field characteristics β€” specifically, how your text sits inside a form field. left? right? centered? none at all? we're choosing. periodt.


✨ NAME ✨

set_field_just, field_just β€” retrieve field characteristics πŸŽ€

🌸 SYNOPSIS 🌸

#include <form.h>

int set_field_just(FIELD *field, int justification);
int field_just(const FIELD *field);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. set_field_just sets the justification attribute of a field, and field_just hands it right back to you. it's giving "tell me your vibe" / "here's my vibe." πŸ’–

that attribute can be exactly one of these four, no substitutes:

  • NO_JUSTIFICATION
  • JUSTIFY_RIGHT
  • JUSTIFY_LEFT
  • JUSTIFY_CENTER

πŸ‘‘ RETURN VALUE πŸ‘‘

field_just returns one of these, literally one of these four and nothing else:

  • NO_JUSTIFICATION
  • JUSTIFY_RIGHT
  • JUSTIFY_LEFT
  • JUSTIFY_CENTER

set_field_just returns one of the following, and yes we're listing every single one:

  • E_OK β€” the routine succeeded. slay. πŸ’…
  • E_SYSTEM_ERROR β€” a system error occurred (go peek at errno(3), it'll tell you what's up).
  • E_BAD_ARGUMENT β€” the routine detected an incorrect or out-of-range argument. bestie. that's not a valid one. 😭

🌈 PORTABILITY 🌈

these routines emulate the System V forms library. they were not supported on Version 7 or BSD versions β€” so if you're kicking it old-school on those, this is a no. 🫢

πŸ’œ AUTHORS πŸ’œ

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. icons, honestly. πŸ‘‘

⭐ SEE ALSO ⭐

curses(3X) and related pages whose names begin β€œform_” for detailed descriptions of the entry points. iykyk πŸ’–


and that's the whole page, bestie β€” this one shipped with ncurses 6.6, dated 2024-03-16. go justify something gorgeous. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from