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 "platform/wxwidgets/menu_projects.hpp"
10 #include "library/dispatch.hpp"
11 #include "library/recentfiles.hpp"
15 #include <wx/string.h>
18 class wxwin_mainwindow
: public wxFrame
21 class panel
: public wxPanel
25 void on_paint(wxPaintEvent
& e
);
27 void on_erase(wxEraseEvent
& e
);
28 void on_keyboard_down(wxKeyEvent
& e
);
29 void on_keyboard_up(wxKeyEvent
& e
);
30 void on_mouse(wxMouseEvent
& e
);
32 wxwin_mainwindow(bool fscreen
);
35 void notify_update() throw();
36 void notify_update_status() throw();
37 void notify_resized() throw();
38 void notify_exit() throw();
39 void refresh_title() throw();
40 void on_close(wxCloseEvent
& e
);
41 void menu_start(wxString name
);
42 void menu_special(wxString name
, wxMenu
* menu
);
43 wxMenuItem
* menu_special_sub(wxString name
, wxMenu
* menu
);
44 void menu_entry(int id
, wxString name
);
45 void menu_entry_check(int id
, wxString name
);
46 void menu_start_sub(wxString name
);
48 bool menu_ischecked(int id
);
49 void menu_check(int id
, bool newstate
);
50 void menu_enable(int id
, bool newstate
);
51 void menu_separator();
52 void handle_menu_click(wxCommandEvent
& e
);
53 void update_statusbar(const std::map
<std::string
, std::u32string
>& vars
);
54 void action_updated();
55 void enter_or_leave_fullscreen(bool fs
);
56 void request_rom(rom_request
& req
);
57 recent_menu
<recentfiles::multirom
>* recent_roms
;
58 recent_menu
<recentfiles::path
>* recent_movies
;
59 recent_menu
<recentfiles::path
>* recent_scripts
;
60 loadrom_menu
* loadroms
;
61 file_download
* download_in_progress
;
63 void do_load_rom_image(core_type
* t
);
64 void handle_menu_click_cancelable(wxCommandEvent
& e
);
65 void project_selected(const std::string
& id
);
69 wxStatusBar
* statusbar
;
70 wxwin_status::panel
* spanel
;
72 wxwin_status
* mwindow
;
73 wxFlexGridSizer
* toplevel
;
74 std::map
<int, wxMenuItem
*> checkitems
;
75 std::stack
<wxMenu
*> upper
;
81 projects_menu
* projects
;
83 struct dispatch::target
<> corechange
;
84 struct dispatch::target
<> titlechange
;
85 struct dispatch::target
<> newcore
;
86 struct dispatch::target
<bool> unmuted
;
87 struct dispatch::target
<bool> modechange
;