wxwidgets: Allow entering fullscreen mode from commandline
[lsnes.git] / include / platform / wxwidgets / window_mainwindow.hpp
blob7ba33f43ea411ca08487a33056560a74e936f47b
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"
12 #include <stack>
14 #include <wx/string.h>
15 #include <wx/wx.h>
17 class wxwin_mainwindow : public wxFrame
19 public:
20 class panel : public wxPanel
22 public:
23 panel(wxWindow* win);
24 void on_paint(wxPaintEvent& e);
25 void request_paint();
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);
32 void request_paint();
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);
45 void menu_end_sub();
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;
60 private:
61 void do_load_rom_image(core_type* t);
62 void handle_menu_click_cancelable(wxCommandEvent& e);
63 panel* gpanel;
64 wxMenu* current_menu;
65 wxMenuBar* menubar;
66 wxStatusBar* statusbar;
67 wxwin_status::panel* spanel;
68 bool spanel_shown;
69 wxwin_status* mwindow;
70 wxFlexGridSizer* toplevel;
71 std::map<int, wxMenuItem*> checkitems;
72 std::stack<wxMenu*> upper;
73 void* sysmenu;
74 void* ahmenu;
75 void* sounddev1;
76 void* sounddev2;
77 void* dmenu;
78 wxTimer* focus_timer;
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;
86 #endif