lsnes/include/platform/wxwidgets/window_mainwindow.hpp

90 lines
2.6 KiB
C++
Raw Normal View History

2012-01-06 17:28:01 +02:00
#ifndef _plat_wxwidgets__window_mainwindow__hpp__included__
#define _plat_wxwidgets__window_mainwindow__hpp__included__
2013-11-11 01:49:06 +02:00
#include "core/filedownload.hpp"
2013-09-22 17:39:52 +03:00
#include "core/window.hpp"
#include "platform/wxwidgets/window_status.hpp"
2012-09-25 23:05:57 +03:00
#include "platform/wxwidgets/menu_recent.hpp"
2013-09-22 17:39:52 +03:00
#include "platform/wxwidgets/menu_loadrom.hpp"
2014-02-25 03:48:19 +02:00
#include "platform/wxwidgets/menu_projects.hpp"
2013-07-07 13:54:56 +03:00
#include "library/dispatch.hpp"
2013-09-22 17:39:52 +03:00
#include "library/recentfiles.hpp"
2012-01-18 20:56:54 +02:00
2012-01-06 17:28:01 +02:00
#include <stack>
#include <wx/string.h>
#include <wx/wx.h>
class wxwin_mainwindow : public wxFrame
{
public:
class panel : public wxPanel
{
public:
panel(wxWindow* win);
void on_paint(wxPaintEvent& e);
void request_paint();
void on_erase(wxEraseEvent& e);
void on_keyboard_down(wxKeyEvent& e);
void on_keyboard_up(wxKeyEvent& e);
void on_mouse(wxMouseEvent& e);
};
wxwin_mainwindow(bool fscreen);
2012-01-06 17:28:01 +02:00
void request_paint();
void notify_update() throw();
2012-01-18 20:56:54 +02:00
void notify_update_status() throw();
2012-03-26 23:50:14 +03:00
void notify_resized() throw();
2012-01-06 17:28:01 +02:00
void notify_exit() throw();
void refresh_title() throw();
2012-01-06 17:28:01 +02:00
void on_close(wxCloseEvent& e);
void menu_start(wxString name);
void menu_special(wxString name, wxMenu* menu);
2014-01-18 11:50:19 +02:00
wxMenuItem* menu_special_sub(wxString name, wxMenu* menu);
2012-01-06 17:28:01 +02:00
void menu_entry(int id, wxString name);
void menu_entry_check(int id, wxString name);
void menu_start_sub(wxString name);
void menu_end_sub();
2012-01-06 17:28:01 +02:00
bool menu_ischecked(int id);
void menu_check(int id, bool newstate);
2013-05-08 15:42:44 +03:00
void menu_enable(int id, bool newstate);
2012-01-06 17:28:01 +02:00
void menu_separator();
void handle_menu_click(wxCommandEvent& e);
void update_statusbar(const std::map<std::string, std::u32string>& vars);
void action_updated();
2013-08-11 22:37:11 +03:00
void enter_or_leave_fullscreen(bool fs);
void request_rom(rom_request& req);
recent_menu<recentfiles::multirom>* recent_roms;
recent_menu<recentfiles::path>* recent_movies;
recent_menu<recentfiles::path>* recent_scripts;
2013-09-22 17:39:52 +03:00
loadrom_menu* loadroms;
2013-11-11 01:49:06 +02:00
file_download* download_in_progress;
2012-01-06 17:28:01 +02:00
private:
2013-09-22 17:39:52 +03:00
void do_load_rom_image(core_type* t);
2012-01-20 16:44:53 +02:00
void handle_menu_click_cancelable(wxCommandEvent& e);
2014-02-25 03:48:19 +02:00
void project_selected(const std::string& id);
2012-01-06 17:28:01 +02:00
panel* gpanel;
wxMenu* current_menu;
wxMenuBar* menubar;
wxStatusBar* statusbar;
2012-01-18 20:56:54 +02:00
wxwin_status::panel* spanel;
2012-03-26 20:34:25 +03:00
bool spanel_shown;
wxwin_status* mwindow;
2012-03-26 20:34:25 +03:00
wxFlexGridSizer* toplevel;
2012-01-06 17:28:01 +02:00
std::map<int, wxMenuItem*> checkitems;
std::stack<wxMenu*> upper;
2013-06-30 13:20:23 +03:00
void* sysmenu;
2012-01-06 17:28:01 +02:00
void* ahmenu;
void* sounddev1;
void* sounddev2;
void* dmenu;
2014-02-25 03:48:19 +02:00
projects_menu* projects;
2013-12-04 18:23:58 +02:00
wxTimer* focus_timer;
struct dispatch::target<> corechange;
struct dispatch::target<> titlechange;
struct dispatch::target<> newcore;
struct dispatch::target<bool> unmuted;
struct dispatch::target<bool> modechange;
2012-01-06 17:28:01 +02:00
};
#endif