1 #ifndef _plat_wxwidgets__window_mainwindow__hpp__included__
2 #define _plat_wxwidgets__window_mainwindow__hpp__included__
4 #include "core/window.hpp"
5 #include "platform/wxwidgets/window_status.hpp"
6 #include "platform/wxwidgets/menu_recent.hpp"
7 #include "platform/wxwidgets/menu_loadrom.hpp"
8 #include "library/dispatch.hpp"
9 #include "library/recentfiles.hpp"
13 #include <wx/string.h>
16 class wxwin_mainwindow
: public wxFrame
19 class panel
: public wxPanel
23 void on_paint(wxPaintEvent
& e
);
25 void on_erase(wxEraseEvent
& e
);
26 void on_keyboard_down(wxKeyEvent
& e
);
27 void on_keyboard_up(wxKeyEvent
& e
);
28 void on_mouse(wxMouseEvent
& e
);
32 void notify_update() throw();
33 void notify_update_status() throw();
34 void notify_resized() throw();
35 void notify_exit() throw();
36 void refresh_title() throw();
37 void on_close(wxCloseEvent
& e
);
38 void menu_start(wxString name
);
39 void menu_special(wxString name
, wxMenu
* menu
);
40 void menu_special_sub(wxString name
, wxMenu
* menu
);
41 void menu_entry(int id
, wxString name
);
42 void menu_entry_check(int id
, wxString name
);
43 void menu_start_sub(wxString name
);
45 bool menu_ischecked(int id
);
46 void menu_check(int id
, bool newstate
);
47 void menu_enable(int id
, bool newstate
);
48 void menu_separator();
49 void handle_menu_click(wxCommandEvent
& e
);
50 void update_statusbar(const std::map
<std::string
, std::u32string
>& vars
);
51 void action_updated();
52 void enter_or_leave_fullscreen(bool fs
);
53 void request_rom(rom_request
& req
);
54 recent_menu
<recentfile_multirom
>* recent_roms
;
55 recent_menu
<recentfile_path
>* recent_movies
;
56 recent_menu
<recentfile_path
>* recent_scripts
;
57 loadrom_menu
* loadroms
;
59 void do_load_rom_image(core_type
* t
);
60 void handle_menu_click_cancelable(wxCommandEvent
& e
);
64 wxStatusBar
* statusbar
;
65 wxwin_status::panel
* spanel
;
67 wxwin_status
* mwindow
;
68 wxFlexGridSizer
* toplevel
;
69 std::map
<int, wxMenuItem
*> checkitems
;
70 std::stack
<wxMenu
*> upper
;
76 struct dispatch_target
<> corechange
;
77 struct dispatch_target
<> newcore
;
78 struct dispatch_target
<bool> unmuted
;
79 struct dispatch_target
<bool> modechange
;