summaryrefslogtreecommitdiff
path: root/src/ncur/menu.h
blob: d931be3df1ec6ccc23ce3a1de0425bcf9b0e8d72 (plain)
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
#include "../incl.h"

#ifdef NCURSES

#ifndef MENU_H
#define MENU_H

#include <ncurses.h>

using namespace std;

class menu
{
private:
    char **choices;
    char *c_header;

    int i_startx, i_starty, i_width, i_height, i_highlight, i_choice,
    i_numchoices, c;

    WINDOW *win;

    void initialize( const chtype ch );

public:
    explicit menu( int i_startx, int i_starty, int i_width, int i_height, char *c_header, char **choices, int i_numchoices, const chtype ch );
    ~menu( );

    void display();
    void start( void (*swich_case_menu_action)(int) );

    void activate_menu_win()
    { 
	keypad(win, 1);
    }
};

#endif
#endif