]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_mark.3x
ncurses 6.2 - patch 20200919
[ncurses.git] / man / menu_mark.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_mark.3x,v 1.16 2020/03/28 19:06:28 tom Exp $
32 .TH menu_mark 3X ""
33 .SH NAME
34 \fBset_menu_mark\fP,
35 \fBmenu_mark\fR \- get and set the menu mark string
36 .SH SYNOPSIS
37 \fB#include <menu.h>\fR
38 .br
39 int set_menu_mark(MENU *menu, const char *mark);
40 .br
41 const char *menu_mark(const MENU *menu);
42 .br
43 .SH DESCRIPTION
44 In order to make menu selections visible on older terminals without
45 highlighting or color capability, the menu library marks selected items
46 in a menu with a prefix string.
47 .PP
48 The function \fBset_menu_mark\fR sets the mark string for the given menu.
49 Calling \fBset_menu_mark\fR with a null menu item will abolish the mark string.
50 Note that changing the length of the mark string for a menu while the
51 menu is posted is likely to produce unhelpful behavior.
52 .PP
53 The default string is "\-" (a dash).
54 Calling \fBset_menu_mark\fR with
55 a non-\fBNULL\fR menu argument will change this default.
56 .PP
57 The function \fBmenu_mark\fR returns the menu's mark string (or \fBNULL\fR if
58 there is none).
59 .SH RETURN VALUE
60 The function \fBmenu_mark\fR returns a pointer (which may be \fBNULL\fR).
61 It does not set \fBerrno\fP.
62 .PP
63 The function \fBset_menu_mark\fR may return the following error codes:
64 .TP 5
65 .B E_OK
66 The routine succeeded.
67 .TP 5
68 .B E_BAD_ARGUMENT
69 Routine detected an incorrect or out-of-range argument.
70 .TP 5
71 .B E_SYSTEM_ERROR
72 System error occurred (see \fBerrno\fR(3)).
73 .SH SEE ALSO
74 \fBcurses\fR(3X), \fBmenu\fR(3X).
75 .SH NOTES
76 The header file \fB<menu.h>\fR automatically includes the header file
77 \fB<curses.h>\fR.
78 .SH PORTABILITY
79 These routines emulate the System V menu library.
80 They were not supported on
81 Version 7 or BSD versions.
82 .SH AUTHORS
83 Juergen Pfeifer.
84 Manual pages and adaptation for new curses by Eric S. Raymond.