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