blob: d15e77d542a5cf2e5c908afab4cdaee5f7ca7e00 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2018-2023,2024 Thomas E. Dickey *
3.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $Id: menu_spacing.3x,v 1.37 2024/03/16 15:35:01 tom Exp $
31.TH menu_spacing 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053032.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040033\fBset_menu_spacing\fP,
34\fBmenu_spacing\fP \-
35set and get spacing between menu items.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053036.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040037.nf
38\fB#include <menu.h>
39.PP
40\fBint set_menu_spacing(MENU *\fImenu\fP,
41 \fBint \fIspc_description\fB,\fR
42 \fBint \fIspc_rows\fB,\fR
43 \fBint \fIspc_columns\fB);\fR
44\fBint menu_spacing(const MENU *\fImenu\fB,\fR
45 \fBint* \fIspc_description\fB,\fR
46 \fBint* \fIspc_rows\fB,\fR
47 \fBint* \fIspc_columns\fB);\fR
48.fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053049.SH DESCRIPTION
micky3879b9f5e72025-07-08 18:04:53 -040050The function \fBset_menu_spacing\fP sets the spacing information for the menu.
51Its parameters provide the description and the size (in rows and columns).
52.TP
53\fIspc_description\fP
54controls the number of spaces
55between an item name and an item description.
56It must not be larger than \fBTABSIZE\fP.
Steve Kondikae271bc2015-11-15 02:50:53 +010057The menu system puts in the
58middle of this spacing area the pad character.
59The remaining parts are filled with
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053060spaces.
micky3879b9f5e72025-07-08 18:04:53 -040061.TP
62\fIspc_rows\fP
63controls the number of rows
64that are used for an item.
Steve Kondikae271bc2015-11-15 02:50:53 +010065It must not be larger than 3.
66The menu system inserts the blank lines between item rows, these lines
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053067will contain the pad character in the appropriate positions.
micky3879b9f5e72025-07-08 18:04:53 -040068.TP
69\fIspc_columns\fP
70controls the number of blanks between columns of items.
71It must not be larger than \fBTABSIZE\fP.
72A value of 0 for all the spacing values resets them to the default,
73which is 1 for all of them.
74.PP
75The function \fBmenu_spacing\fP returns the spacing information for the menu.
76If a pointer is NULL, the corresponding information is simply not returned.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053077.SH RETURN VALUE
micky3879b9f5e72025-07-08 18:04:53 -040078Both routines return \fBE_OK\fP on success.
79\fBset_menu_spacing\fP may return
80\fBE_POSTED\fP if the menu is posted, or \fBE_BAD_ARGUMENT\fP if one of the
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053081spacing values is out of range.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053082.SH PORTABILITY
micky3879b9f5e72025-07-08 18:04:53 -040083These routines are specific to \fI\%ncurses\fP.
Steve Kondikae271bc2015-11-15 02:50:53 +010084They were not supported on
85Version 7, BSD or System V implementations.
86It is recommended that
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053087any code depending on them be conditioned using NCURSES_VERSION.
88.SH AUTHORS
Steve Kondikae271bc2015-11-15 02:50:53 +010089Juergen Pfeifer.
90Manual pages and adaptation for new curses by Eric S. Raymond.
micky3879b9f5e72025-07-08 18:04:53 -040091.SH SEE ALSO
92\fB\%curses\fP(3X),
93\fB\%curs_variables\fP(3X),
94\fB\%menu\fP(3X)