2008-12-07 21:46:09 -07:00
|
|
|
#ifndef __FRAME_H_
|
|
|
|
#define __FRAME_H_
|
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/busyinfo.h>
|
|
|
|
class CGameListCtrl;
|
|
|
|
class CFrame : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CFrame(wxFrame* parent,
|
|
|
|
wxWindowID id = wxID_ANY,
|
2008-12-13 15:40:10 -07:00
|
|
|
const wxString& title = wxT("Dolphin"),
|
2008-12-07 21:46:09 -07:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE);
|
|
|
|
|
2008-12-13 15:40:10 -07:00
|
|
|
void* GetRenderHandle() {
|
|
|
|
#ifdef _WIN32
|
|
|
|
return(m_Panel->GetHandle());
|
|
|
|
#else
|
|
|
|
return this;
|
|
|
|
#endif
|
|
|
|
}
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2008-12-08 22:37:15 -07:00
|
|
|
wxStatusBar* m_pStatusBar;
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------
|
|
|
|
// Wiimote leds
|
|
|
|
// ---------
|
2008-12-09 07:57:55 -07:00
|
|
|
|
|
|
|
void ModifyStatusBar();
|
2008-12-08 22:37:15 -07:00
|
|
|
void CreateDestroy(int Case);
|
|
|
|
void CreateLeds(); void CreateSpeakers();
|
|
|
|
void UpdateLeds(); void UpdateSpeakers();
|
|
|
|
wxBitmap CreateBitmapForLeds(bool On);
|
|
|
|
wxBitmap CreateBitmapForSpeakers(int BitmapType, bool On);
|
2008-12-11 20:38:50 -07:00
|
|
|
void DoMoveIcons(); void MoveLeds(); void MoveSpeakers();
|
2008-12-08 22:37:15 -07:00
|
|
|
bool HaveLeds; bool HaveSpeakers;
|
|
|
|
|
|
|
|
wxStaticBitmap *m_StatBmp[7];
|
|
|
|
u8 g_Leds[4]; u8 g_Leds_[4];
|
|
|
|
u8 g_Speakers[3]; u8 g_Speakers_[3];
|
|
|
|
// ---------
|
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
wxBoxSizer* sizerPanel;
|
|
|
|
CGameListCtrl* m_GameListCtrl;
|
|
|
|
wxPanel* m_Panel;
|
|
|
|
|
|
|
|
enum EBitmaps
|
|
|
|
{
|
|
|
|
Toolbar_FileOpen,
|
|
|
|
Toolbar_Refresh,
|
|
|
|
Toolbar_Browse,
|
|
|
|
Toolbar_Play,
|
|
|
|
Toolbar_Stop,
|
|
|
|
Toolbar_Pause,
|
|
|
|
Toolbar_PluginOptions,
|
|
|
|
Toolbar_PluginGFX,
|
|
|
|
Toolbar_PluginDSP,
|
|
|
|
Toolbar_PluginPAD,
|
|
|
|
Toolbar_FullScreen,
|
|
|
|
Toolbar_Help,
|
2008-12-08 22:37:15 -07:00
|
|
|
Bitmaps_Max,
|
|
|
|
END
|
|
|
|
};
|
|
|
|
|
|
|
|
enum WiimoteBitmaps // Wiimote speaker bitmaps
|
|
|
|
{
|
|
|
|
CREATELEDS = END,
|
|
|
|
DESTROYLEDS,
|
|
|
|
CREATESPEAKERS,
|
|
|
|
DESTROYSPEAKERS
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
wxBitmap m_Bitmaps[Bitmaps_Max];
|
|
|
|
wxBitmap m_BitmapsMenu[Bitmaps_Max];
|
|
|
|
|
|
|
|
void InitBitmaps();
|
|
|
|
void PopulateToolbar(wxToolBar* toolBar);
|
|
|
|
void RecreateToolbar();
|
|
|
|
void CreateMenu();
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
// Override window proc for tricks like screensaver disabling
|
|
|
|
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
|
|
|
#endif
|
2008-12-23 01:47:37 -07:00
|
|
|
// Event functions
|
2008-12-07 21:46:09 -07:00
|
|
|
void OnQuit(wxCommandEvent& event);
|
|
|
|
void OnHelp(wxCommandEvent& event);
|
2008-12-23 01:47:37 -07:00
|
|
|
|
|
|
|
void OnOpen(wxCommandEvent& event); void DoOpen(bool Boot); // File
|
2008-12-07 21:46:09 -07:00
|
|
|
void OnRefresh(wxCommandEvent& event);
|
2008-12-23 01:47:37 -07:00
|
|
|
void OnBrowse(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void OnPlay(wxCommandEvent& event); // Emulation
|
|
|
|
void OnChangeDisc(wxCommandEvent& event);
|
|
|
|
void OnStop(wxCommandEvent& event);
|
|
|
|
void OnClose(wxCloseEvent &event);
|
|
|
|
void OnLoadState(wxCommandEvent& event);
|
|
|
|
void OnSaveState(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void OnConfigMain(wxCommandEvent& event); // Options
|
2008-12-07 21:46:09 -07:00
|
|
|
void OnPluginGFX(wxCommandEvent& event);
|
|
|
|
void OnPluginDSP(wxCommandEvent& event);
|
|
|
|
void OnPluginPAD(wxCommandEvent& event);
|
|
|
|
void OnPluginWiimote(wxCommandEvent& event);
|
2008-12-23 01:47:37 -07:00
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
void OnToggleFullscreen(wxCommandEvent& event);
|
|
|
|
void OnToggleDualCore(wxCommandEvent& event);
|
|
|
|
void OnToggleSkipIdle(wxCommandEvent& event);
|
|
|
|
void OnToggleThrottle(wxCommandEvent& event);
|
2008-12-11 20:38:50 -07:00
|
|
|
void OnResize(wxSizeEvent& event);
|
2008-12-07 21:46:09 -07:00
|
|
|
void OnToggleToolbar(wxCommandEvent& event);
|
|
|
|
void OnToggleStatusbar(wxCommandEvent& event);
|
|
|
|
void OnKeyDown(wxKeyEvent& event);
|
|
|
|
void OnHostMessage(wxCommandEvent& event);
|
|
|
|
|
2008-12-23 01:47:37 -07:00
|
|
|
void OnMemcard(wxCommandEvent& event); // Misc
|
|
|
|
void OnShow_CheatsWindow(wxCommandEvent& event);
|
|
|
|
|
|
|
|
// Menu items
|
2008-12-07 21:46:09 -07:00
|
|
|
wxMenuBar* m_pMenuBar;
|
|
|
|
|
2008-12-23 01:47:37 -07:00
|
|
|
wxMenuItem* m_pMenuItemOpen; // File
|
|
|
|
|
|
|
|
wxMenuItem* m_pMenuItemPlay; // Emulation
|
2008-12-07 21:46:09 -07:00
|
|
|
wxMenuItem* m_pMenuItemStop;
|
2008-12-23 01:47:37 -07:00
|
|
|
wxMenuItem* m_pMenuChangeDisc;
|
2008-12-07 21:46:09 -07:00
|
|
|
wxMenuItem* m_pPluginOptions;
|
|
|
|
wxMenuItem* m_pMenuItemLoad;
|
|
|
|
wxMenuItem* m_pMenuItemSave;
|
|
|
|
wxToolBarToolBase* m_pToolPlay;
|
|
|
|
|
|
|
|
void UpdateGUI();
|
|
|
|
|
2008-12-23 01:47:37 -07:00
|
|
|
// Old function that could be cool
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __FRAME_H_
|