]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_format.3x
ncurses 4.1
[ncurses.git] / man / menu_format.3x
1 '\" t
2 .TH menu_format 3X ""
3 .SH NAME
4 \fBmenu_format\fR - set and get menu sizes
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 int set_menu_format(MENU *menu, int rows, int cols);
9 .br
10 int menu_format(const MENU *menu, int *rows, int *cols);
11 .br
12 .SH DESCRIPTION
13 The function \fBset_menu_format\fR sets the maximum display size of the given
14 window.  If this size is too small to display all menu items, the menu will be
15 made scrollable.
16
17 The default format is 16 rows, 1 column.  Calling \fBset_menu_format\fR with a
18 null menu pointer will change this default.  A zero row or column argument to
19 \fBset_menu_format\fR is interpreted as a request not to change the current
20 value.
21  
22 The function \fBmenu_format\fR returns the maximum-size constraints for the
23 given menu into the storage addressed by \fBrows\fR and \fBcols\fR.
24 .SH RETURN VALUE
25 These routines returns one of the following:
26 .TP 5
27 \fBE_OK\fR
28 The routine succeeded.
29 .TP 5
30 \fBE_SYSTEM_ERROR\fR
31 System error occurred (see \fBerrno\fR).
32 .TP 5
33 \fBE_BAD_ARGUMENT\fR
34 Routine detected an incorrect or out-of-range argument.
35 .TP 5
36 \fBE_POSTED\fR
37 The menu is already posted.
38 .SH SEE ALSO
39 \fBcurses\fR(3X), \fBmenu\fR(3X).
40 .SH NOTES
41 The header file \fB<menu.h>\fR automatically includes the header file
42 \fB<curses.h>\fR.
43 .SH PORTABILITY
44 These routines emulate the System V menu library.  They were not supported on
45 Version 7 or BSD versions.
46 .SH AUTHORS
47 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
48 S. Raymond.
49 .\"#
50 .\"# The following sets edit modes for GNU EMACS
51 .\"# Local Variables:
52 .\"# mode:nroff
53 .\"# fill-column:79
54 .\"# End: