Soft Label Keys (SLK) are a separate window area used for labels. Clicking an SLK returns a function key press (e.g., clicking the leftmost SLK returns KEY_F(1)).
Initialization
slk_init(int fmt) must be called before initscr() or newterm(). This call removes 1 or 2 lines from the usable screen to accommodate the SLK window.
Formats
0: 3-2-3 format1: 4-4 format2: 4-4-4 format3: 4-4-4 format with index line55: 5-5 format (PDCurses specific)- Hexadecimal Format (PDCursesMod extension): You can pass a hex value to
slk_init() to specify custom widths. For example, 0x414 results in a 4-1-4 format. Negating the fmt value adds an index line.
Re-initialization
In PDCursesMod, you can call slk_init() after initscr() to reset the label format. If you do this, you must reset the label text and call slk_refresh(). Note that you cannot toggle the index line or turn SLK on/off after initscr() has been called.
int slk_init(int fmt);
int slk_set(int labnum, const char *label, int justify);
int slk_refresh(void);
int slk_noutrefresh(void);
char *slk_label(int labnum);
int slk_clear(void);
int slk_restore(void);
int slk_touch(void);
int slk_attron(const chtype attrs);
int slk_attr_set(const attr_t attrs, short color_pair, void *opts);
int slk_attroff(const chtype attrs);
int slk_attr_off(const attr_t attrs, void *opts);
int slk_color(short color_pair);
int slk_wset(int labnum, const wchar_t *label, int justify);
wchar_t *slk_wlabel(int labnum);