jcs's openbsd hax
openbsd
1'\" t
2.\" $OpenBSD: menu_spacing.3,v 1.8 2023/10/17 09:52:10 nicm Exp $
3.\"
4.\"***************************************************************************
5.\" Copyright 2018-2022,2023 Thomas E. Dickey *
6.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
7.\" *
8.\" Permission is hereby granted, free of charge, to any person obtaining a *
9.\" copy of this software and associated documentation files (the *
10.\" "Software"), to deal in the Software without restriction, including *
11.\" without limitation the rights to use, copy, modify, merge, publish, *
12.\" distribute, distribute with modifications, sublicense, and/or sell *
13.\" copies of the Software, and to permit persons to whom the Software is *
14.\" furnished to do so, subject to the following conditions: *
15.\" *
16.\" The above copyright notice and this permission notice shall be included *
17.\" in all copies or substantial portions of the Software. *
18.\" *
19.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
20.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
21.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
22.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
23.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
24.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
25.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
26.\" *
27.\" Except as contained in this notice, the name(s) of the above copyright *
28.\" holders shall not be used in advertising or otherwise to promote the *
29.\" sale, use or other dealings in this Software without prior written *
30.\" authorization. *
31.\"***************************************************************************
32.\"
33.\" $Id: menu_spacing.3,v 1.8 2023/10/17 09:52:10 nicm Exp $
34.TH menu_spacing 3 2023-07-01 "ncurses 6.4" "Library calls"
35.SH NAME
36\fBset_menu_spacing\fP,
37\fBmenu_spacing\fP \- set and get spacing between menu items.
38.SH SYNOPSIS
39\fB#include <menu.h>\fP
40.sp
41\fBint set_menu_spacing(MENU *\fImenu\fB,\fR
42 \fBint \fIspc_description\fB,\fR
43 \fBint \fIspc_rows\fB,\fR
44 \fBint \fIspc_columns\fB);\fR
45.br
46\fBint menu_spacing(const MENU *\fImenu\fB,\fR
47 \fBint* \fIspc_description\fB,\fR
48 \fBint* \fIspc_rows\fB,\fR
49 \fBint* \fIspc_columns\fB);\fR
50.SH DESCRIPTION
51The function \fBset_menu_spacing\fP sets the spacing information for the menu.
52Its parameter \fBspc_description\fP controls the number of spaces
53between an item name and an item description.
54It must not be larger than \fBTABSIZE\fP.
55The menu system puts in the
56middle of this spacing area the pad character.
57The remaining parts are filled with
58spaces.
59The \fBspc_rows\fP parameter controls the number of rows
60that are used for an item.
61It must not be larger than 3.
62The menu system inserts the blank lines between item rows, these lines
63will contain the pad character in the appropriate positions.
64The \fBspc_columns\fP parameter controls
65the number of blanks between columns of items.
66It must not be larger than \fBTABSIZE\fP.
67A value of 0 for all the spacing values resets them to the default,
68which is 1 for all of them.
69.br
70The function \fBmenu_spacing\fP passes back the spacing info for the menu.
71If a
72pointer is NULL, this specific info is simply not returned.
73.SH RETURN VALUE
74Both routines return \fBE_OK\fP on success.
75\fBset_menu_spacing\fP may return
76\fBE_POSTED\fP if the menu is posted, or \fBE_BAD_ARGUMENT\fP if one of the
77spacing values is out of range.
78.SH SEE ALSO
79\fBcurses\fP(3),
80\fBcurs_variables\fP(3),
81\fBmenu\fP(3).
82.SH NOTES
83The header file \fB<menu.h>\fP automatically includes the header file
84\fB<curses.h>\fP.
85.SH PORTABILITY
86These routines are specific to ncurses.
87They were not supported on
88Version 7, BSD or System V implementations.
89It is recommended that
90any code depending on them be conditioned using NCURSES_VERSION.
91.SH AUTHORS
92Juergen Pfeifer.
93Manual pages and adaptation for new curses by Eric S. Raymond.