summaryrefslogtreecommitdiffstats
path: root/ncurses-5.2/doc/html/man/curs_slk.3x.html
blob: cf77d62daa946c6f58d1b7de187bfca94e75f359 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<HTML>
<BODY>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->

</PRE>
<H2>NAME</H2><PRE>
       <B>slk_init</B>,     <B>slk_set</B>,    <B>slk_refresh</B>,    <B>slk_noutrefresh</B>,
       <B>slk_label</B>, <B>slk_clear</B>, <B>slk_restore</B>, <B>slk_touch</B>,  <B>slk_attron</B>,
       <B>slk_attrset</B>,   <B>slk_attroff</B>,   <B>slk_attr_on</B>,   <B>slk_attr_set</B>,
       <B>slk_attr_off</B>, <B>slk_attr</B> <B>slk_color</B> - <B>curses</B> soft label  rou-
       tines


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>#include</B> <B>&lt;curses.h&gt;</B>

       <B>int</B> <B>slk_init(int</B> <B>fmt);</B>
       <B>int</B> <B>slk_set(int</B> <B>labnum,</B> <B>const</B> <B>char</B> <B>*label,</B> <B>int</B> <B>fmt);</B>
       <B>int</B> <B>slk_refresh(void);</B>
       <B>int</B> <B>slk_noutrefresh(void);</B>
       <B>char</B> <B>*slk_label(int</B> <B>labnum);</B>
       <B>int</B> <B>slk_clear(void);</B>
       <B>int</B> <B>slk_restore(void);</B>
       <B>int</B> <B>slk_touch(void);</B>
       <B>int</B> <B>slk_attron(const</B> <B>chtype</B> <B>attrs);</B>
       <B>int</B> <B>slk_attroff(const</B> <B>chtype</B> <B>attrs);</B>
       <B>int</B> <B>slk_attrset(const</B> <B>chtype</B> <B>attrs);</B>
       <B>int</B> <B>slk_attr_on(attr_t</B> <B>attrs,</B> <B>void*</B> <B>opts);</B>
       <B>int</B> <B>slk_attr_off(const</B> <B>attr_t</B> <B>attrs,</B> <B>void</B> <B>*</B> <B>opts);</B>
       <B>int</B> <B>slk_attr_set(const</B> <B>attr_t</B> <B>attrs,</B>
            <B>short</B> <B>color_pair_number,</B> <B>void*</B> <B>opts);</B>
       <B>attr_t</B> <B>slk_attr(void);</B>
       <B>int</B> <B>slk_color(short</B> <B>color_pair_number);</B>


</PRE>
<H2>DESCRIPTION</H2><PRE>
       The slk* functions manipulate the set of soft function-key
       labels that exist on many terminals.  For those  terminals
       that do not have soft labels, <B>curses</B> takes over the bottom
       line of <B>stdscr</B>, reducing the size of <B>stdscr</B> and the  vari-
       able  <B>LINES</B>.  <B>curses</B> standardizes on eight labels of up to
       eight characters each. In addition to  this,  the  ncurses
       implementation  supports  a  mode  where  it  simulates 12
       labels of up to five characters each. This is most  common
       for  todays  PC  like  enduser  devices.  Please note that
       ncurses simulates this mode by taking over up to two lines
       at  the  bottom  of  the screen, it doesn't try to use any
       hardware support for this mode.

       The <B>slk_init</B> routine must  be  called  before  <B>initscr</B>  or
       <B>newterm</B> is called.  If <B>initscr</B> eventually uses a line from
       <B>stdscr</B> to emulate the soft labels, then <I>fmt</I> determines how
       the  labels  are arranged on the screen.  Setting <I>fmt</I> to <B>0</B>
       indicates a 3-2-3 arrangement of the labels, <B>1</B> indicates a
       4-4 arrangement and <B>2</B> indicates the PC like 4-4-4 mode. If
       <B>fmt</B> is set to <B>3</B>, it is again the PC like 4-4-4  mode,  but
       in  addition  an index line is generated, helping the user
       to identify the key numbers easily.

       The <B>slk_set</B> routine requires <I>labnum</I> to be a label  number,
       from <B>1</B> to <B>8</B> (resp. <B>12</B>); <I>label</I> must be the string to be put
       on the label, up  to  eight  (resp.  five)  characters  in
       length.   A  null string or a null pointer sets up a blank
       label. <I>fmt</I> is either <B>0</B>, <B>1</B>, or <B>2</B>,  indicating  whether  the
       label  is  to be left-justified, centered, or right-justi-
       fied, respectively, within the label.

       The <B>slk_refresh</B> and <B>slk_noutrefresh</B> routines correspond to
       the <B>wrefresh</B> and <B>wnoutrefresh</B> routines.

       The  <B>slk_label</B> routine returns the current label for label
       number <I>labnum</I>, with leading and trailing blanks  stripped.

       The  <B>slk_clear</B>  routine  clears  the  soft labels from the
       screen.

       The <B>slk_restore</B> routine, restores the soft labels  to  the
       screen after a <B>slk_clear</B> has been performed.

       The  <B>slk_touch</B>  routine  forces  all the soft labels to be
       output the next time a <B>slk_noutrefresh</B> is performed.

       The <B>slk_attron</B>, <B>slk_attrset</B>, <B>slk_attroff</B> and <B>slk_attr</B> rou-
       tines correspond to <B>attron</B>, <B>attrset</B>, <B>attroff</B> and <B>attr_get</B>.
       They have an effect only if soft labels are  simulated  on
       the  bottom line of the screen.  The default highlight for
       soft keys is A_STANDOUT (as in System V curses, which does
       not document this fact).

       The  <B>slk_color</B> routine corresponds to <B>color_set</B>. It has an
       effect only if soft labels are  simulated  on  the  bottom
       line of the screen.



</PRE>
<H2>RETURN VALUE</H2><PRE>
       These routines return <B>ERR</B> upon failure and OK (SVr4 speci-
       fies only "an integer value other than <B>ERR</B>") upon success-
       ful  completion.  <B>slk_attr</B>  returns the attribute used for
       the soft keys.

       <B>slk_label</B> returns <B>NULL</B> on error.


</PRE>
<H2>NOTES</H2><PRE>
       Most applications would use <B>slk_noutrefresh</B> because a <B>wre-</B>
       <B>fresh</B> is likely to follow soon.


</PRE>
<H2>PORTABILITY</H2><PRE>
       The  XSI  Curses  standard, Issue 4, describes these func-
       tions.  It changes the argument  type  of  the  attribute-
       manipulation     functions     <B>slk_attron</B>,    <B>slk_attroff</B>,
       <B>slk_attrset</B> to be <B>attr_t</B>, and adds <B>const</B>  qualifiers.  The
       format  codes  <B>2</B>  and  <B>3</B>  for  <B>slk_init()</B> and the function
       <B>slk_attr</B> are specific to ncurses.



</PRE>
<H2>SEE ALSO</H2><PRE>
       <B><A HREF="ncurses.3x.html">curses(3x)</A></B>,        <B><A HREF="curs_attr.3x.html">curs_attr(3x)</A></B>,        <B><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></B>,
       <B><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></B>



















































</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>