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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
/***************************************************************************
ui/imgcntrl.h
MESS's clunky built-in file manager
***************************************************************************/
#ifndef MAME_FRONTEND_UI_IMAGECNTRL_H
#define MAME_FRONTEND_UI_IMAGECNTRL_H
#pragma once
#include "ui/filesel.h"
#include "ui/menu.h"
#include "ui/swlist.h"
namespace ui {
// ======================> menu_control_device_image
class menu_control_device_image : public menu
{
public:
menu_control_device_image(mame_ui_manager &mui, render_container &container, device_image_interface &image);
virtual ~menu_control_device_image() override;
protected:
enum
{
START_FILE, START_OTHER_PART, START_SOFTLIST,
SELECT_PARTLIST, SELECT_ONE_PART, SELECT_OTHER_PART,
SELECT_FILE, CREATE_FILE, CREATE_CONFIRM, CHECK_CREATE, DO_CREATE, SELECT_SOFTLIST,
LAST_ID
};
// this is a single union that contains all of the different types of
// results we could get from child menus
union
{
menu_file_selector::result filesel;
menu_software_parts::result swparts;
menu_select_rw::result rw;
int i;
} m_submenu_result;
// instance variables - made protected so they can be shared with floppycntrl.cpp
int m_state;
device_image_interface & m_image;
std::string m_current_directory;
std::string m_current_file;
bool m_create_ok;
// methods
virtual void menu_activated() override;
virtual void handle(event const *ev) override;
virtual void hook_load(const std::string &filename);
private:
// instance variables
bool m_create_confirmed;
const software_info * m_swi;
const software_part * m_swp;
class software_list_device * m_sld;
std::string m_software_info_name;
// methods
virtual void populate(float &customtop, float &custombottom) override;
void test_create(bool &can_create, bool &need_confirm);
void load_software_part();
};
} // namespace ui
#endif // MAME_FRONTEND_UI_IMAGECNTRL_H
|