2
* Copyright (c) 2003 Billy Biggs <vektor@dumbterm.net>.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2, or (at your option)
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
#ifndef MENU_H_INCLUDED
20
#define MENU_H_INCLUDED
26
typedef struct menu_s menu_t;
28
menu_t *menu_new( const char *name );
29
void menu_delete( menu_t *menu );
31
void menu_set_text( menu_t *menu, int line, const char *text );
32
void menu_set_enter_command( menu_t *menu, int line, int command,
33
const char *argument );
34
void menu_set_back_command( menu_t *menu, int command, const char *argument );
35
void menu_set_cursor( menu_t *menu, int cursor );
36
void menu_set_default_cursor( menu_t *menu, int cursor );
37
void menu_reset_num_lines( menu_t *menu );
39
const char *menu_get_name( menu_t *menu );
40
int menu_get_num_lines( menu_t *menu );
41
int menu_get_cursor( menu_t *menu );
42
int menu_get_default_cursor( menu_t *menu );
44
const char *menu_get_text( menu_t *menu, int line );
46
int menu_get_enter_command( menu_t *menu, int line );
47
const char *menu_get_enter_argument( menu_t *menu, int line );
48
int menu_get_back_command( menu_t *menu );
49
const char *menu_get_back_argument( menu_t *menu );
54
#endif /* MENU_H_INCLUDED */