]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/man/curs_slk.3x.html
ncurses 4.2
[ncurses.git] / Ada95 / html / man / curs_slk.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4        <STRONG>slk_init</STRONG>,     <STRONG>slk_set</STRONG>,    <STRONG>slk_refresh</STRONG>,    <STRONG>slk_noutrefresh</STRONG>,
5        <STRONG>slk_label</STRONG>, <STRONG>slk_clear</STRONG>, <STRONG>slk_restore</STRONG>, <STRONG>slk_touch</STRONG>,  <STRONG>slk_attron</STRONG>,
6        <STRONG>slk_attrset</STRONG>,  <STRONG>slk_attroff</STRONG>,  <STRONG>slk_color</STRONG>  - <STRONG>curses</STRONG> soft label
7        routines
8
9
10 </PRE>
11 <H2>SYNOPSIS</H2><PRE>
12        <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
13
14        <STRONG>int</STRONG> <STRONG>slk_init(int</STRONG> <STRONG>fmt);</STRONG>
15        <STRONG>int</STRONG> <STRONG>slk_set(int</STRONG> <STRONG>labnum,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*label,</STRONG> <STRONG>int</STRONG> <STRONG>fmt);</STRONG>
16        <STRONG>int</STRONG> <STRONG>slk_refresh(void);</STRONG>
17        <STRONG>int</STRONG> <STRONG>slk_noutrefresh(void);</STRONG>
18        <STRONG>char</STRONG> <STRONG>*slk_label(int</STRONG> <STRONG>labnum);</STRONG>
19        <STRONG>int</STRONG> <STRONG>slk_clear(void);</STRONG>
20        <STRONG>int</STRONG> <STRONG>slk_restore(void);</STRONG>
21        <STRONG>int</STRONG> <STRONG>slk_touch(void);</STRONG>
22        <STRONG>int</STRONG> <STRONG>slk_attron(const</STRONG> <STRONG>chtype</STRONG> <STRONG>attrs);</STRONG>
23        <STRONG>int</STRONG> <STRONG>slk_attrset(const</STRONG> <STRONG>chtype</STRONG> <STRONG>attrs);</STRONG>
24        <STRONG>attr_t</STRONG> <STRONG>slk_attr(void);</STRONG>
25        <STRONG>int</STRONG> <STRONG>slk_attroff(const</STRONG> <STRONG>chtype</STRONG> <STRONG>attrs);</STRONG>
26        <STRONG>int</STRONG> <STRONG>slk_color(short</STRONG> <STRONG>color_pair_number);</STRONG>
27
28
29 </PRE>
30 <H2>DESCRIPTION</H2><PRE>
31        The slk* functions manipulate the set of soft function-key
32        labels  that exist on many terminals.  For those terminals
33        that do not have soft labels, <STRONG>curses</STRONG> takes over the bottom
34        line  of <STRONG>stdscr</STRONG>, reducing the size of <STRONG>stdscr</STRONG> and the vari-
35        able <STRONG>LINES</STRONG>.  <STRONG>curses</STRONG> standardizes on eight labels of up  to
36        eight  characters  each.  In addition to this, the ncurses
37        implementation supports  a  mode  where  it  simulates  12
38        labels  of up to five characters each. This is most common
39        for todays PC like  enduser  devices.   Please  note  that
40        ncurses simulates this mode by taking over up to two lines
41        at the bottom of the screen, it doesn't  try  to  use  any
42        hardware support for this mode.
43
44        The  <STRONG>slk_init</STRONG>  routine  must  be  called before <STRONG>initscr</STRONG> or
45        <STRONG>newterm</STRONG> is called.  If <STRONG>initscr</STRONG> eventually uses a line from
46        <STRONG>stdscr</STRONG> to emulate the soft labels, then <EM>fmt</EM> determines how
47        the labels are arranged on the screen.  Setting <EM>fmt</EM>  to  <STRONG>0</STRONG>
48        indicates a 3-2-3 arrangement of the labels, <STRONG>1</STRONG> indicates a
49        4-4 arrangement and <STRONG>2</STRONG> indicates the PC like 4-4-4 mode. If
50        <STRONG>fmt</STRONG>  is  set to <STRONG>3</STRONG>, it is again the PC like 4-4-4 mode, but
51        in addition an index line is generated, helping  the  user
52        to identify the key numbers easily.
53
54        The  <STRONG>slk_set</STRONG> routine requires <EM>labnum</EM> to be a label number,
55        from <STRONG>1</STRONG> to <STRONG>8</STRONG> (resp. <STRONG>12</STRONG>); <EM>label</EM> must be the string to be put
56        on  the  label,  up  to  eight  (resp. five) characters in
57        length.  A null string or a null pointer sets up  a  blank
58        label.  <EM>fmt</EM>  is  either <STRONG>0</STRONG>, <STRONG>1</STRONG>, or <STRONG>2</STRONG>, indicating whether the
59        label is  to be left-justified, centered, or  right-justi-
60        the <STRONG>wrefresh</STRONG> and <STRONG>wnoutrefresh</STRONG> routines.
61
62        The <STRONG>slk_label</STRONG> routine returns the current label for  label
63        number  <EM>labnum</EM>, with leading and trailing blanks stripped.
64
65        The <STRONG>slk_clear</STRONG> routine clears  the  soft  labels  from  the
66        screen.
67
68        The  <STRONG>slk_restore</STRONG>  routine, restores the soft labels to the
69        screen after a <STRONG>slk_clear</STRONG> has been performed.
70
71        The <STRONG>slk_touch</STRONG> routine forces all the  soft  labels  to  be
72        output the next time a <STRONG>slk_noutrefresh</STRONG> is performed.
73
74        The <STRONG>slk_attron</STRONG>, <STRONG>slk_attrset</STRONG>, <STRONG>slk_attroff</STRONG> and <STRONG>slk_attr</STRONG> rou-
75        tines correspond to <STRONG>attron</STRONG>, <STRONG>attrset</STRONG>, <STRONG>attroff</STRONG> and <STRONG>attr_get</STRONG>.
76        They  have  an effect only if soft labels are simulated on
77        the bottom line of the screen.  The default highlight  for
78        soft keys is A_STANDOUT (as in System V curses, which does
79        not document this fact).
80
81        The <STRONG>slk_color</STRONG> routine corresponds to <STRONG>color_set</STRONG>. It has  an
82        effect  only  if  soft  labels are simulated on the bottom
83        line of the screen.
84
85
86
87 </PRE>
88 <H2>RETURN VALUE</H2><PRE>
89        These routines return <STRONG>ERR</STRONG> upon failure and OK (SVr4 speci-
90        fies only "an integer value other than <STRONG>ERR</STRONG>") upon success-
91        ful completion. <STRONG>slk_attr</STRONG> returns the  attribute  used  for
92        the soft keys.
93
94        <STRONG>slk_label</STRONG> returns <STRONG>NULL</STRONG> on error.
95
96
97 </PRE>
98 <H2>NOTES</H2><PRE>
99        Most applications would use <STRONG>slk_noutrefresh</STRONG> because a <STRONG>wre-</STRONG>
100        <STRONG>fresh</STRONG> is likely to follow soon.
101
102
103 </PRE>
104 <H2>PORTABILITY</H2><PRE>
105        The XSI Curses standard, Issue 4,  describes  these  func-
106        tions.   It  changes  the  argument type of the attribute-
107        manipulation    functions     <STRONG>slk_attron</STRONG>,     <STRONG>slk_attroff</STRONG>,
108        <STRONG>slk_attrset</STRONG>  to  be <STRONG>attr_t</STRONG>, and adds <STRONG>const</STRONG> qualifiers. The
109        format codes <STRONG>2</STRONG> and  <STRONG>3</STRONG>  for  <STRONG>slk_init()</STRONG>  and  the  function
110        <STRONG>slk_attr</STRONG> are specific to ncurses.
111
112
113 </PRE>
114 <H2>SEE ALSO</H2><PRE>
115        <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>,        <STRONG><A HREF="curs_attr.3x.html">curs_attr(3X)</A></STRONG>,        <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3X)</A></STRONG>,
116        <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3X)</A></STRONG>
117
118
119
120 </PRE>
121 </BODY>
122 </HTML>