Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 2 | .\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 3 | .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 30 | .\" $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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 32 | .SH NAME |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 33 | \fBset_menu_spacing\fP, |
| 34 | \fBmenu_spacing\fP \- |
| 35 | set and get spacing between menu items. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 36 | .SH SYNOPSIS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 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 |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 49 | .SH DESCRIPTION |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 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. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 57 | The menu system puts in the |
| 58 | middle of this spacing area the pad character. |
| 59 | The remaining parts are filled with |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 60 | spaces. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 61 | .TP |
| 62 | \fIspc_rows\fP |
| 63 | controls the number of rows |
| 64 | that are used for an item. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 65 | It must not be larger than 3. |
| 66 | The menu system inserts the blank lines between item rows, these lines |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 67 | will contain the pad character in the appropriate positions. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 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 NULL, the corresponding information is simply not returned. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 77 | .SH RETURN VALUE |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 78 | Both 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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 81 | spacing values is out of range. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 82 | .SH PORTABILITY |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 83 | These routines are specific to \fI\%ncurses\fP. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 84 | They were not supported on |
| 85 | Version 7, BSD or System V implementations. |
| 86 | It is recommended that |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 87 | any code depending on them be conditioned using NCURSES_VERSION. |
| 88 | .SH AUTHORS |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 89 | Juergen Pfeifer. |
| 90 | Manual pages and adaptation for new curses by Eric S. Raymond. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 91 | .SH SEE ALSO |
| 92 | \fB\%curses\fP(3X), |
| 93 | \fB\%curs_variables\fP(3X), |
| 94 | \fB\%menu\fP(3X) |