menus.hh 1.89 KB
Newer Older
Sergio Costas's avatar
Sergio Costas committed
1
/*
2
 * Copyright 2003-2011 (C) Raster Software Vigo (Sergio Costas)
Sergio Costas's avatar
Sergio Costas committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16
 * This file is part of FBZX
 *
 * FBZX is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * FBZX is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 *
Sergio Costas's avatar
Sergio Costas committed
18 19
 */

20 21 22
using namespace std;
#include <string>

23 24
#include "llscreen.hh"

25 26
class fichero {
public:
27
	string nombre;     // filename (for files and directories)
28
	string nombrepath; // filename with path
29
	int tipo;          // file type (0=file, 1=directory, 2=parent directory)
Sergio Costas's avatar
Sergio Costas committed
30
	struct fichero *next;
31
	struct fichero *prev;
Sergio Costas's avatar
Sergio Costas committed
32 33
};

34
#define CURSOR_ELEMENT    '_'
35

36 37 38 39 40 41
enum LOAD_FILE_TYPES {
	FILETYPE_Z80,
	FILETYPE_TAP_TZX,
	FILETYPE_MDR,
	FILETYPE_SCR
};
42

Sergio Costas's avatar
Sergio Costas committed
43 44
void help_menu();
void load_z80file();
45 46 47

char *         select_file(string, char *, enum LOAD_FILE_TYPES);
class fichero *read_directory(char *, enum LOAD_FILE_TYPES);
Sergio Costas's avatar
Sergio Costas committed
48
unsigned int wait_key();
49 50

void print_files(class fichero *, int, int);
51
void delete_filelist(class fichero *);
Sergio Costas's avatar
Sergio Costas committed
52 53 54 55 56
void select_tapfile();
void save_z80file();
void settings_menu();
void snapshots_menu();
void taps_menu();
57
void create_tapfile(bool);
Sergio Costas's avatar
Sergio Costas committed
58 59 60 61
void select_mdrfile();
void create_mdrfile();
void microdrive_menu();
void keyboard_menu();
62
void load_scrfile();
63
int ask_filename(char *nombre, int y_coord, string extension, char *path);
64
void create_scrfile();
Sergio Costas's avatar
Sergio Costas committed
65
void do_poke();
66
int ask_value(int *final_value, int y_coord, int max_value);
67
void tools_menu();
68
int launch_menu(unsigned int key_pressed);