1 #ifndef _plat_wxwidgets__menu_recent__hpp__included__
2 #define _plat_wxwidgets__menu_recent__hpp__included__
6 #include "library/recentfiles.hpp"
9 class emulator_instance
;
12 class recent_menu
: public wxMenu
15 recent_menu(wxWindow
* win
, emulator_instance
& _inst
, int wxid_low
, int wxid_high
, const std::string
& cfg
,
16 void (*cb
)(emulator_instance
& inst
, const T
& name
)) __attribute__((noinline
));
17 void on_select(wxCommandEvent
& e
);
19 void add(const T
& file
);
21 emulator_instance
& inst
;
22 class rhook
: public recentfiles::hook
25 rhook(recent_menu
& _pmenu
) : pmenu(_pmenu
) {}
27 void operator()() { pmenu
.update(); }
31 recentfiles::set
<T
> rfiles
;
33 std::map
<int, T
> entries
;
34 std::map
<int, wxMenuItem
*> items
;
37 void (*callback
)(emulator_instance
& inst
, const T
& name
);