1 #ifndef _plat_wxwidgets__window_mainwindow__hpp__included__
2 #define _plat_wxwidgets__window_mainwindow__hpp__included__
4 #include "core/filedownload.hpp"
5 #include "core/window.hpp"
6 #include "platform/wxwidgets/window_status.hpp"
7 #include "platform/wxwidgets/menu_recent.hpp"
8 #include "platform/wxwidgets/menu_loadrom.hpp"
9 #include "library/dispatch.hpp"
10 #include "library/recentfiles.hpp"
14 #include <wx/string.h>
17 class wxwin_mainwindow
: public wxFrame
20 class panel
: public wxPanel
24 void on_paint(wxPaintEvent
& e
);
26 void on_erase(wxEraseEvent
& e
);
27 void on_keyboard_down(wxKeyEvent
& e
);
28 void on_keyboard_up(wxKeyEvent
& e
);
29 void on_mouse(wxMouseEvent
& e
);
31 wxwin_mainwindow(bool fscreen
);
33 void notify_update() throw();
34 void notify_update_status() throw();
35 void notify_resized() throw();
36 void notify_exit() throw();
37 void refresh_title() throw();
38 void on_close(wxCloseEvent
& e
);
39 void menu_start(wxString name
);
40 void menu_special(wxString name
, wxMenu
* menu
);
41 wxMenuItem
* menu_special_sub(wxString name
, wxMenu
* menu
);
42 void menu_entry(int id
, wxString name
);
43 void menu_entry_check(int id
, wxString name
);
44 void menu_start_sub(wxString name
);
46 bool menu_ischecked(int id
);
47 void menu_check(int id
, bool newstate
);
48 void menu_enable(int id
, bool newstate
);
49 void menu_separator();
50 void handle_menu_click(wxCommandEvent
& e
);
51 void update_statusbar(const std::map
<std::string
, std::u32string
>& vars
);
52 void action_updated();
53 void enter_or_leave_fullscreen(bool fs
);
54 void request_rom(rom_request
& req
);
55 recent_menu
<recentfile_multirom
>* recent_roms
;
56 recent_menu
<recentfile_path
>* recent_movies
;
57 recent_menu
<recentfile_path
>* recent_scripts
;
58 loadrom_menu
* loadroms
;
59 file_download
* download_in_progress
;
61 void do_load_rom_image(core_type
* t
);
62 void handle_menu_click_cancelable(wxCommandEvent
& e
);
66 wxStatusBar
* statusbar
;
67 wxwin_status::panel
* spanel
;
69 wxwin_status
* mwindow
;
70 wxFlexGridSizer
* toplevel
;
71 std::map
<int, wxMenuItem
*> checkitems
;
72 std::stack
<wxMenu
*> upper
;
79 struct dispatch::target
<> corechange
;
80 struct dispatch::target
<> titlechange
;
81 struct dispatch::target
<> newcore
;
82 struct dispatch::target
<bool> unmuted
;
83 struct dispatch::target
<bool> modechange
;