File: buttons.c

package info (click to toggle)
gramofile 1.6-11
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 1,436 kB
  • ctags: 1,125
  • sloc: ansic: 11,252; makefile: 60
file content (32 lines) | stat: -rw-r--r-- 536 bytes parent folder | download | duplicates (6)
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
/* Buttons

 * Copyright (C) 1998 J.A. Bezemer
 *
 * Licensed under the terms of the GNU General Public License.
 * ABSOLUTELY NO WARRANTY.
 * See the file `COPYING' in this directory.
 */

#include "buttons.h"
#ifndef OLD_CURSES
#include <ncurses.h>
#else
#include <curses.h>
#endif


void
button_display (button_t * button)
{
  int y, x;
  if (button->selected)
    attron (A_STANDOUT);

  mvaddstr (button->y, button->x, button->text);

  getyx (stdscr, y, x);
  move (y, x - 1);

  if (button->selected)
    attroff (A_STANDOUT);
}