WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Menu.h
1#ifndef _WINC_MENU
2#define _WINC_MENU
3
4#include <WXP/MenuItem.h>
5#include <WXP/String.h>
6
7namespace WXP {
8 class Menu {
9 MenuItem *items;
10 int *index;
11 int num;
12 int shown;
13 int main_menu;
14 int exit_menu;
15 int help_menu;
16 int min_item;
17 char title[50];
18
19 public:
20 Menu();
21 Menu( const char *title, MenuItem *menu, int flag );
22 int init();
23 int set( const char *title, MenuItem *menu, int flag );
24 int display();
25 int prompt( const char *prompt, String &str );
26 int search( const char *item );
27 const char *getAbbr( int index );
28 int check( int index );
29 /*
30 menu types
31 */
32 static const int EXIT = 1;
33 static const int MAIN = 2;
34 static const int HELP = 4;
35 };
36}
37#endif
This class creates a menu system.
Definition Menu.h:8
const char * getAbbr(int index)
Definition Menu.cc:287
int init()
Definition Menu.cc:45
int prompt(const char *prompt, String &str)
Definition Menu.cc:180
int search(const char *item)
Definition Menu.cc:267
int set(const char *title, MenuItem *menu, int flag)
Definition Menu.cc:61
int display()
Definition Menu.cc:85
int check(int index)
Definition Menu.cc:301
Menu()
Definition Menu.cc:25
This is a variable length string class.
Definition String.h:5
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct defines menu item parameters.
Definition MenuItem.h:11