#ifndef MENU_CXX #define MENU_CXX #include "menu.h" #include "s_sock.h" using namespace std; menu::menu( int i_startx, int i_starty, int i_width, int i_height, char *c_header, char **choices, int i_numchoices, const chtype ch ) { this->i_startx = i_startx; this->i_starty = i_starty; this->i_height = i_height; this->i_width = i_width; this->c_header = c_header; this->choices = choices; this->i_numchoices = i_numchoices; initialize( ch ); } menu::~menu() { /* wborder(win, ' ', ' ', ' ',' ',' ',' ',' ',' '); wrefresh(win); delwin(win); */ } void menu::initialize( const chtype ch ) { this->i_highlight = 1; this->i_choice = 0; win = newwin( i_height, i_width, i_starty, i_startx ); wbkgd(win, ch); keypad(win, TRUE); } void menu::display() { int x, y, i; x = 2; y = 2; box( win, 0, 0 ); mvwprintw( win, y++, x, "%s", c_header ); for( i=0; i