Support hiding the status panel
[lsnes.git] / include / plat-wxwidgets / window_mainwindow.hpp
blobc86cadcb7c6668c6bc7429df42fa79027dfb6a37
1 #ifndef _plat_wxwidgets__window_mainwindow__hpp__included__
2 #define _plat_wxwidgets__window_mainwindow__hpp__included__
4 #include "plat-wxwidgets/window_status.hpp"
6 #include <stack>
8 #include <wx/string.h>
9 #include <wx/wx.h>
11 class wxwin_mainwindow : public wxFrame
13 public:
14 class panel : public wxPanel
16 public:
17 panel(wxWindow* win);
18 void on_paint(wxPaintEvent& e);
19 void request_paint();
20 void on_erase(wxEraseEvent& e);
21 void on_keyboard_down(wxKeyEvent& e);
22 void on_keyboard_up(wxKeyEvent& e);
23 void on_mouse(wxMouseEvent& e);
25 wxwin_mainwindow();
26 void request_paint();
27 void notify_update() throw();
28 void notify_update_status() throw();
29 void notify_exit() throw();
30 void on_close(wxCloseEvent& e);
31 void menu_start(wxString name);
32 void menu_special(wxString name, wxMenu* menu);
33 void menu_special_sub(wxString name, wxMenu* menu);
34 void menu_entry(int id, wxString name);
35 void menu_entry_check(int id, wxString name);
36 void menu_start_sub(wxString name);
37 void menu_end_sub(wxString name);
38 bool menu_ischecked(int id);
39 void menu_check(int id, bool newstate);
40 void menu_separator();
41 void handle_menu_click(wxCommandEvent& e);
42 private:
43 void handle_menu_click_cancelable(wxCommandEvent& e);
44 panel* gpanel;
45 wxMenu* current_menu;
46 wxMenuBar* menubar;
47 wxwin_status::panel* spanel;
48 bool spanel_shown;
49 wxFlexGridSizer* toplevel;
50 std::map<int, wxMenuItem*> checkitems;
51 std::stack<wxMenu*> upper;
52 void* ahmenu;
53 void* sounddev;
54 void* dmenu;
57 #endif