win(3FORM)
β¨ NAME β¨</p>
form_win β bestie, this is the one that makes and breaks form window and subwindow associations π
π SYNOPSIS π
#include <form.h>
int set_form_win(FORM *form, WINDOW *win);
WINDOW *form_win(const FORM *form);
int set_form_sub(FORM *form, WINDOW *sub);
WINDOW *form_sub(const FORM *form);
int scale_form(const FORM *form, int *rows, int *columns);
π¦ DESCRIPTION π¦
okay so. every form has a whole pair of associated curses windows, right? like they're a duo, they're a package deal π
- the form window is the one showing off β it displays any title and border associated with the window π
- the form subwindow is the one doing the actual work β it displays the items of the form that are currently available for selection π
the first four functions are your getters and setters for those windows. and no, you don't have to set either one β by default, the driver code just uses stdscr for both. lowkey convenient, ngl β¨
in the set_ functions:
- a window argument of
NULLgets treated as though it werestsdcr - a form argument of
NULLis treated as a request to change the system default form window or subwindow
and scale_form? she returns the minimum size required for the subwindow of form π periodt.
π RETURN VALUE π
routines that return pointers return NULL on error, no cap. routines that return an integer return one of these error codes:
E_OKβ the routine succeeded π slay.E_SYSTEM_ERRORβ system error occurred (seeerrno(3)). something went wrong in the system, bestie πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. wrong vibes, wrong input πE_POSTEDβ the form has already been posted. she's already out there, you can't do this rn πE_NOT_CONNECTEDβ no items are connected to the form. nothing's linked up, it's giving empty π«Ά
π PORTABILITY π
these routines emulate the System V forms library. they were not supported on Version 7 or BSD versions β so don't come looking for them there, iykyk π§
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. icons, both of them π
πΈ SEE ALSO πΈ
ncurses(3NCURSES)curses_variables(3NCURSES)form(3FORM)
and that's the whole page, bestie!! this one's from ncurses 6.6, dated 2024-12-28 β go forth and associate those windows, you absolute main character π«Άβ¨
π¦ where this page comes from
- ubuntu resolute: ncurses-doc 6.6+20251231-1 Β· MIT/X11
- ubuntu stonking: ncurses-doc 6.6+20260608-2 Β· MIT/X11
- Copyright 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2006,2010 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms