| 1 |
.\"*************************************************************************** |
| 2 |
.\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 3 |
.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * |
| 4 |
.\" * |
| 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 |
.\" |
| 30 |
.\" $Id: menu_spacing.3x,v 1.39 2024/12/28 21:26:21 tom Exp $ |
| 31 |
.TH spacing 3MENU 2024-12-28 "ncurses 6.6" "Library calls" |
| 32 |
.SH NAME |
| 33 |
\fBset_menu_spacing\fP, |
| 34 |
\fBmenu_spacing\fP \- |
| 35 |
set and get spacing between menu items. |
| 36 |
.SH SYNOPSIS |
| 37 |
.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 |
| 49 |
.SH DESCRIPTION |
| 50 |
The function \fBset_menu_spacing\fP sets the spacing information for the menu. |
| 51 |
Its parameters provide the description and the size (in rows and columns). |
| 52 |
.TP |
| 53 |
\fIspc_description\fP |
| 54 |
controls the number of spaces |
| 55 |
between an item name and an item description. |
| 56 |
It must not be larger than \fBTABSIZE\fP. |
| 57 |
The menu system puts in the |
| 58 |
middle of this spacing area the pad character. |
| 59 |
The remaining parts are filled with |
| 60 |
spaces. |
| 61 |
.TP |
| 62 |
\fIspc_rows\fP |
| 63 |
controls the number of rows |
| 64 |
that are used for an item. |
| 65 |
It must not be larger than 3. |
| 66 |
The menu system inserts the blank lines between item rows, these lines |
| 67 |
will contain the pad character in the appropriate positions. |
| 68 |
.TP |
| 69 |
\fIspc_columns\fP |
| 70 |
controls the number of blanks between columns of items. |
| 71 |
It must not be larger than \fBTABSIZE\fP. |
| 72 |
A value of 0 for all the spacing values resets them to the default, |
| 73 |
which is 1 for all of them. |
| 74 |
.PP |
| 75 |
The function \fBmenu_spacing\fP returns the spacing information for the menu. |
| 76 |
If a pointer is |
| 77 |
.IR NULL "," |
| 78 |
the corresponding information is simply not returned. |
| 79 |
.SH RETURN VALUE |
| 80 |
Both routines return \fBE_OK\fP on success. |
| 81 |
\fBset_menu_spacing\fP may return |
| 82 |
\fBE_POSTED\fP if the menu is posted, or \fBE_BAD_ARGUMENT\fP if one of the |
| 83 |
spacing values is out of range. |
| 84 |
.SH PORTABILITY |
| 85 |
These routines are specific to \fI\%ncurses\fP. |
| 86 |
They were not supported on |
| 87 |
Version 7, BSD or System V implementations. |
| 88 |
It is recommended that |
| 89 |
any code depending on them be conditioned using NCURSES_VERSION. |
| 90 |
.SH AUTHORS |
| 91 |
Juergen Pfeifer. |
| 92 |
Manual pages and adaptation for new curses by Eric S. Raymond. |
| 93 |
.SH SEE ALSO |
| 94 |
\fB\%ncurses\fP(3NCURSES), |
| 95 |
\fB\%curses_variables\fP(3NCURSES), |
| 96 |
\fB\%menu\fP(3MENU) |