Move files around a lot
[lsnes.git] / include / plat-wxwidgets / common.hpp
blobc4a0a1cfd291cab44c0ed7b89ca7ed2366885b6e
1 #ifndef _wxwidgets_common__hpp__included__
2 #define _wxwidgets_common__hpp__included__
4 #include <wx/string.h>
5 #include <wx/wx.h>
7 wxString towxstring(const std::string& str);
8 std::string tostdstring(const wxString& str);
9 extern long primary_window_style;
10 extern long secondary_window_style;
11 typedef wxStaticText* wxStaticText_ptr;
13 extern wxFrame* window1;
14 extern wxFrame* window2;
16 template<class T>
17 void cmdbutton_action(T* target, wxButton* button, void (T::*fptr)(wxCommandEvent& e))
19 button->Connect(wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)(wxEventFunction)
20 static_cast<wxCommandEventFunction>(fptr), NULL, target);
23 template<class T>
24 void menu_action(T* target, int id, void (T::*fptr)(wxCommandEvent& e))
26 target->Connect(id, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)(wxEventFunction)
27 static_cast<wxCommandEventFunction>(fptr), NULL, target);
30 template<class T>
31 void menu_action(T* target, int id, void (T::*fptr)(wxCommandEvent& e), std::string subcmd)
33 target->Connect(id, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)(wxEventFunction)
34 static_cast<wxCommandEventFunction>(fptr), NULL, target);
37 #define CNAME_NONE "None"
38 #define CNAME_GAMEPAD "Gamepad"
39 #define CNAME_MULTITAP "Multitap"
40 #define CNAME_MOUSE "Mouse"
41 #define CNAME_SUPERSCOPE "Superscope"
42 #define CNAME_JUSTIFIER "Justifier"
43 #define CNAME_JUSTIFIERS "2 Justifiers"
45 #endif