HP-UX Reference (11i v2 03/08) - 3 Library Functions N-Z (vol 7)

s
slk_attroff(3X) slk_attroff(3X)
(ENHANCED CURSES)
NAME
slk_attroff, slk_attr_off, slk_attron, slk_attr_on, slk_attrset, slk_attr_set, slk_clear, slk_color, slk_init,
slk_label, slk_noutrefresh, slk_refresh, slk_restore, slk_set, slk_touch, slk_wset soft label functions
SYNOPSIS
#include <curses.h>
int slk_attroff(const chtype attrs);
int slk_attr_off(const attr_t attrs, void *opts);
int slk_attron(const chtype attrs);
int slk_attr_on(const attr_t attrs, void *opts);
int slk_attrset(const chtype attrs);
int slk_attr_set(const attr_t attrs, short color_pair, void *opts);
int slk_clear(void);
int slk_color(short color_pair);
int slk_init(int fmt);
char *slk_label(int labnum);
int slk_noutrefresh(void);
int slk_refresh(void);
int slk_restore(void);
int slk_set(int labnum, const char *label, int justify);
int slk_touch(void);
int slk_wset(int labnum, const wchar_t *label, int justify);
DESCRIPTION
The Curses interface manipulates the set of soft function-key labels that exist on many terminals. For
those terminals that do not have soft labels, Curses takes over the bottom line of stdscr , reducing the size
of stdscr and the value of the
LINES external variable. There can be up to eight labels of up to eight
display columns each.
To use soft labels,
slk_init() must be called before initscr(), newterm() or ripoffline() is
called. If initscr() eventually uses a line from stdscr to emulate the soft labels, then fmt determines
how the labels are arranged on the screen. Setting fmt to 0 indicates a 3-2-3 arrangement of the labels; 1
indicates a 4-4 arrangement. Other values for fmt are unspecified.
The
slk_init() function has the effect of calling ripoffline() to reserve one screen line to accom-
modate the requested format.
The
slk_set() and slk_wset() functions specify the text of soft label number labnum, within the
range from 1 to and including 8. The label argument is the string to be put on the label. With
slk_set(), and slk_wset(), the width of the label is limited to eight column positions. A null string
or a null pointer specifies a blank label. The justify argument can have the following values to indicate
how to justify label within the space reserved for it:
0 Align the start of label with the start of the space
1 Center label within the space
2 Align the end of label with the end of the space
The
slk_refresh() and slk_noutrefresh() functions correspond to the wrefresh() and
wnoutrefresh() functions.
The
slk_label() function obtains soft label number labnum.
The
slk_clear() function immediately clears the soft labels from the screen.
The
slk_restore() function immediately restores the soft labels to the screen after a call to
slk_clear().
Section 3968 Hewlett-Packard Company 1 HP-UX 11i Version 2: August 2003