2013-11-28 22:22:00 +02:00
|
|
|
#ifndef _plat_wxwidgets__menu_tracelog__hpp__included__
|
|
|
|
#define _plat_wxwidgets__menu_tracelog__hpp__included__
|
|
|
|
|
|
|
|
#include "core/dispatch.hpp"
|
|
|
|
#include <wx/string.h>
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <map>
|
|
|
|
#include <set>
|
|
|
|
#include <vector>
|
|
|
|
|
2014-06-02 11:08:37 +03:00
|
|
|
class emulator_instance;
|
|
|
|
|
2013-11-28 22:22:00 +02:00
|
|
|
class tracelog_menu : public wxMenu
|
|
|
|
{
|
|
|
|
public:
|
2014-06-02 11:08:37 +03:00
|
|
|
tracelog_menu(wxWindow* win, emulator_instance& _inst, int wxid_low, int wxid_high);
|
2013-11-28 22:22:00 +02:00
|
|
|
~tracelog_menu();
|
|
|
|
void on_select(wxCommandEvent& e);
|
|
|
|
void update();
|
|
|
|
bool any_enabled();
|
2014-01-18 11:50:19 +02:00
|
|
|
void set_disabler(std::function<void(bool enabled)> fn) { disabler_fn = fn; }
|
2013-11-28 22:22:00 +02:00
|
|
|
private:
|
2013-12-19 01:04:42 +02:00
|
|
|
struct dispatch::target<> corechange;
|
2014-06-02 11:08:37 +03:00
|
|
|
emulator_instance& inst;
|
2013-11-28 22:22:00 +02:00
|
|
|
wxWindow* pwin;
|
|
|
|
int wxid_range_low;
|
|
|
|
int wxid_range_high;
|
|
|
|
std::vector<wxMenuItem*> items;
|
2014-02-12 15:57:33 +02:00
|
|
|
std::map<int, std::string> cpunames;
|
2014-01-18 11:50:19 +02:00
|
|
|
std::function<void(bool enabled)> disabler_fn;
|
2013-11-28 22:22:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|