Some work on cleaning up the FrameAui code. Primarily this fixes the debugger windows for the audio and video plugins. They are now all subclasses of a wxPanel, instead of a mix of wxFrames and wxDialogs. This makes them work correctly in linux, windows (they really didn't before), and most likely on MacOSX too!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5913 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3457ead880
commit
b175397cb7
|
@ -100,10 +100,10 @@ void CPlugin::Config(HWND _hwnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debug: Open the Debugging window
|
// Debug: Open the Debugging window
|
||||||
void CPlugin::Debug(HWND _hwnd, bool Show)
|
void CPlugin::Debug(void *Parent, bool Show)
|
||||||
{
|
{
|
||||||
if (m_DllDebugger != NULL)
|
if (m_DllDebugger != NULL)
|
||||||
m_DllDebugger(_hwnd, Show);
|
m_DllDebugger(Parent, Show);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlugin::SetGlobals(PLUGIN_GLOBALS* _pluginGlobals) {
|
void CPlugin::SetGlobals(PLUGIN_GLOBALS* _pluginGlobals) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Common
|
||||||
{
|
{
|
||||||
typedef void (__cdecl * TGetDllInfo)(PLUGIN_INFO*);
|
typedef void (__cdecl * TGetDllInfo)(PLUGIN_INFO*);
|
||||||
typedef void (__cdecl * TDllConfig)(HWND);
|
typedef void (__cdecl * TDllConfig)(HWND);
|
||||||
typedef void (__cdecl * TDllDebugger)(HWND, bool);
|
typedef void (__cdecl * TDllDebugger)(void *, bool);
|
||||||
typedef void (__cdecl * TSetDllGlobals)(PLUGIN_GLOBALS*);
|
typedef void (__cdecl * TSetDllGlobals)(PLUGIN_GLOBALS*);
|
||||||
typedef void (__cdecl * TInitialize)(void *);
|
typedef void (__cdecl * TInitialize)(void *);
|
||||||
typedef void (__cdecl * TShutdown)();
|
typedef void (__cdecl * TShutdown)();
|
||||||
|
@ -49,7 +49,7 @@ public:
|
||||||
|
|
||||||
void Config(HWND _hwnd);
|
void Config(HWND _hwnd);
|
||||||
void About(HWND _hwnd);
|
void About(HWND _hwnd);
|
||||||
void Debug(HWND _hwnd, bool Show);
|
void Debug(void *Parent, bool Show);
|
||||||
void DoState(unsigned char **ptr, int mode);
|
void DoState(unsigned char **ptr, int mode);
|
||||||
void EmuStateChange(PLUGIN_EMUSTATE newState);
|
void EmuStateChange(PLUGIN_EMUSTATE newState);
|
||||||
void Initialize(void *init);
|
void Initialize(void *init);
|
||||||
|
|
|
@ -202,8 +202,7 @@ bool Init()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called from GUI thread or VI thread (why VI??? That must be bad. Window
|
// Called from GUI thread
|
||||||
// close? TODO: Investigate.)
|
|
||||||
void Stop() // - Hammertime!
|
void Stop() // - Hammertime!
|
||||||
{
|
{
|
||||||
const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||||
|
|
|
@ -448,10 +448,10 @@ void CPluginManager::OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TYP
|
||||||
switch(Type)
|
switch(Type)
|
||||||
{
|
{
|
||||||
case PLUGIN_TYPE_VIDEO:
|
case PLUGIN_TYPE_VIDEO:
|
||||||
GetVideo()->Debug((HWND)_Parent, Show);
|
GetVideo()->Debug(_Parent, Show);
|
||||||
break;
|
break;
|
||||||
case PLUGIN_TYPE_DSP:
|
case PLUGIN_TYPE_DSP:
|
||||||
GetDSP()->Debug((HWND)_Parent, Show);
|
GetDSP()->Debug(_Parent, Show);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlert("Type %d debug not supported in plugin %s", Type, _rFilename);
|
PanicAlert("Type %d debug not supported in plugin %s", Type, _rFilename);
|
||||||
|
|
|
@ -96,12 +96,13 @@ class CCodeWindow
|
||||||
void OnJITOff(wxCommandEvent& event);
|
void OnJITOff(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnToggleWindow(wxCommandEvent& event);
|
void OnToggleWindow(wxCommandEvent& event);
|
||||||
void OnToggleCodeWindow(bool,int);
|
void ToggleCodeWindow(bool bShow);
|
||||||
void OnToggleRegisterWindow(bool,int);
|
void ToggleRegisterWindow(bool bShow);
|
||||||
void OnToggleBreakPointWindow(bool,int);
|
void ToggleBreakPointWindow(bool bShow);
|
||||||
void OnToggleMemoryWindow(bool,int);
|
void ToggleMemoryWindow(bool bShow);
|
||||||
void OnToggleJitWindow(bool,int);
|
void ToggleJitWindow(bool bShow);
|
||||||
void OnToggleDLLWindow(int,bool,int);
|
void ToggleDLLWindow(int Id, bool bShow);
|
||||||
|
|
||||||
void OnChangeFont(wxCommandEvent& event);
|
void OnChangeFont(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnCodeStep(wxCommandEvent& event);
|
void OnCodeStep(wxCommandEvent& event);
|
||||||
|
@ -119,8 +120,8 @@ class CCodeWindow
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
bool bAutomaticStart; bool bBootToPause;
|
bool bAutomaticStart; bool bBootToPause;
|
||||||
bool bLogWindow; int iLogWindow;
|
int iLogWindow;
|
||||||
bool bConsoleWindow; int iConsoleWindow;
|
int iConsoleWindow;
|
||||||
bool bCodeWindow; int iCodeWindow; bool bFloatCodeWindow;
|
bool bCodeWindow; int iCodeWindow; bool bFloatCodeWindow;
|
||||||
bool bRegisterWindow; int iRegisterWindow; bool bFloatRegisterWindow;
|
bool bRegisterWindow; int iRegisterWindow; bool bFloatRegisterWindow;
|
||||||
bool bBreakpointWindow; int iBreakpointWindow; bool bFloatBreakpointWindow;
|
bool bBreakpointWindow; int iBreakpointWindow; bool bFloatBreakpointWindow;
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Include
|
|
||||||
// --------------
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
|
@ -31,7 +26,6 @@
|
||||||
#include <wx/tipwin.h>
|
#include <wx/tipwin.h>
|
||||||
#include <wx/fontdlg.h>
|
#include <wx/fontdlg.h>
|
||||||
|
|
||||||
// ugly that this lib included code from the main
|
|
||||||
#include "../../DolphinWX/Src/WxUtils.h"
|
#include "../../DolphinWX/Src/WxUtils.h"
|
||||||
|
|
||||||
#include "Host.h"
|
#include "Host.h"
|
||||||
|
@ -67,7 +61,6 @@
|
||||||
#include "PluginManager.h"
|
#include "PluginManager.h"
|
||||||
#include "ConfigManager.h"
|
#include "ConfigManager.h"
|
||||||
|
|
||||||
|
|
||||||
extern "C" // Bitmaps
|
extern "C" // Bitmaps
|
||||||
{
|
{
|
||||||
#include "../resources/toolbar_play.c"
|
#include "../resources/toolbar_play.c"
|
||||||
|
@ -77,8 +70,6 @@ extern "C" // Bitmaps
|
||||||
#include "../resources/toolbar_add_breakpoint.c"
|
#include "../resources/toolbar_add_breakpoint.c"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Save and load settings
|
// Save and load settings
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
void CCodeWindow::Load()
|
void CCodeWindow::Load()
|
||||||
|
@ -129,6 +120,7 @@ void CCodeWindow::Load()
|
||||||
ini.Get("ShowOnStart", "AutomaticStart", &bAutomaticStart, false);
|
ini.Get("ShowOnStart", "AutomaticStart", &bAutomaticStart, false);
|
||||||
ini.Get("ShowOnStart", "BootToPause", &bBootToPause, true);
|
ini.Get("ShowOnStart", "BootToPause", &bBootToPause, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCodeWindow::Save()
|
void CCodeWindow::Save()
|
||||||
{
|
{
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
|
@ -174,7 +166,6 @@ void CCodeWindow::Save()
|
||||||
ini.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
ini.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Symbols, JIT, Profiler
|
// Symbols, JIT, Profiler
|
||||||
// ----------------
|
// ----------------
|
||||||
void CCodeWindow::CreateMenuSymbols()
|
void CCodeWindow::CreateMenuSymbols()
|
||||||
|
@ -210,7 +201,6 @@ void CCodeWindow::CreateMenuSymbols()
|
||||||
pMenuBar->Append(pProfilerMenu, _T("&Profiler"));
|
pMenuBar->Append(pProfilerMenu, _T("&Profiler"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
|
void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
if (Core::GetState() == Core::CORE_RUN) {
|
if (Core::GetState() == Core::CORE_RUN) {
|
||||||
|
@ -373,7 +363,6 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CCodeWindow::NotifyMapLoaded()
|
void CCodeWindow::NotifyMapLoaded()
|
||||||
{
|
{
|
||||||
if (!codeview) return;
|
if (!codeview) return;
|
||||||
|
@ -392,7 +381,6 @@ void CCodeWindow::NotifyMapLoaded()
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
int index = symbols->GetSelection();
|
int index = symbols->GetSelection();
|
||||||
|
@ -417,7 +405,6 @@ void CCodeWindow::OnSymbolListContextMenu(wxContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Change the global DebuggerFont
|
// Change the global DebuggerFont
|
||||||
void CCodeWindow::OnChangeFont(wxCommandEvent& event)
|
void CCodeWindow::OnChangeFont(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
@ -432,157 +419,167 @@ void CCodeWindow::OnChangeFont(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Toogle windows
|
// Toogle windows
|
||||||
// ----------------
|
|
||||||
|
|
||||||
void CCodeWindow::OpenPages()
|
void CCodeWindow::OpenPages()
|
||||||
{
|
{
|
||||||
Parent->DoToggleWindow(IDM_CODEWINDOW, true);
|
ToggleCodeWindow(true);
|
||||||
if (bRegisterWindow) Parent->DoToggleWindow(IDM_REGISTERWINDOW, true);
|
if (bRegisterWindow)
|
||||||
if (bBreakpointWindow) Parent->DoToggleWindow(IDM_BREAKPOINTWINDOW, true);
|
ToggleRegisterWindow(true);
|
||||||
if (bMemoryWindow) Parent->DoToggleWindow(IDM_MEMORYWINDOW, true);
|
if (bBreakpointWindow)
|
||||||
if (bJitWindow) Parent->DoToggleWindow(IDM_JITWINDOW, true);
|
ToggleBreakPointWindow(true);
|
||||||
if (bSoundWindow) Parent->DoToggleWindow(IDM_SOUNDWINDOW, true);
|
if (bMemoryWindow)
|
||||||
if (bVideoWindow) Parent->DoToggleWindow(IDM_VIDEOWINDOW, true);
|
ToggleMemoryWindow(true);
|
||||||
|
if (bJitWindow)
|
||||||
|
ToggleJitWindow(true);
|
||||||
|
if (bSoundWindow)
|
||||||
|
ToggleDLLWindow(IDM_SOUNDWINDOW, true);
|
||||||
|
if (bVideoWindow)
|
||||||
|
ToggleDLLWindow(IDM_VIDEOWINDOW, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCodeWindow::OnToggleWindow(wxCommandEvent& event)
|
void CCodeWindow::OnToggleWindow(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
bool bShow = GetMenuBar()->IsChecked(event.GetId());
|
||||||
|
|
||||||
|
switch(event.GetId())
|
||||||
|
{
|
||||||
|
case IDM_REGISTERWINDOW:
|
||||||
|
ToggleRegisterWindow(bShow);
|
||||||
|
break;
|
||||||
|
case IDM_BREAKPOINTWINDOW:
|
||||||
|
ToggleBreakPointWindow(bShow);
|
||||||
|
break;
|
||||||
|
case IDM_MEMORYWINDOW:
|
||||||
|
ToggleMemoryWindow(bShow);
|
||||||
|
break;
|
||||||
|
case IDM_JITWINDOW:
|
||||||
|
ToggleJitWindow(bShow);
|
||||||
|
break;
|
||||||
|
case IDM_SOUNDWINDOW:
|
||||||
|
ToggleDLLWindow(IDM_SOUNDWINDOW, bShow);
|
||||||
|
break;
|
||||||
|
case IDM_VIDEOWINDOW:
|
||||||
|
ToggleDLLWindow(IDM_VIDEOWINDOW, bShow);
|
||||||
|
break;
|
||||||
|
}
|
||||||
event.Skip();
|
event.Skip();
|
||||||
Parent->DoToggleWindow(event.GetId(), GetMenuBar()->IsChecked(event.GetId()));
|
|
||||||
}
|
}
|
||||||
void CCodeWindow::OnToggleCodeWindow(bool _Show, int i)
|
|
||||||
|
void CCodeWindow::ToggleCodeWindow(bool bShow)
|
||||||
{
|
{
|
||||||
if (_Show)
|
if (bShow)
|
||||||
{
|
Parent->DoAddPage(this, iCodeWindow, wxT("Code"), bFloatCodeWindow);
|
||||||
Parent->DoAddPage(this, i, wxT("Code"), bFloatCodeWindow);
|
|
||||||
}
|
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(this);
|
Parent->DoRemovePage(this);
|
||||||
}
|
}
|
||||||
void CCodeWindow::OnToggleRegisterWindow(bool _Show, int i)
|
|
||||||
|
void CCodeWindow::ToggleRegisterWindow(bool bShow)
|
||||||
{
|
{
|
||||||
if (_Show)
|
GetMenuBar()->FindItem(IDM_REGISTERWINDOW)->Check(bShow);
|
||||||
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (!m_RegisterWindow) m_RegisterWindow = new CRegisterWindow(Parent, IDM_REGISTERWINDOW);
|
if (!m_RegisterWindow)
|
||||||
Parent->DoAddPage(m_RegisterWindow, i, wxT("Registers"), bFloatRegisterWindow);
|
m_RegisterWindow = new CRegisterWindow(Parent, IDM_REGISTERWINDOW);
|
||||||
|
Parent->DoAddPage(m_RegisterWindow, iRegisterWindow,
|
||||||
|
wxT("Registers"), bFloatRegisterWindow);
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(m_RegisterWindow);
|
Parent->DoRemovePage(m_RegisterWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCodeWindow::OnToggleBreakPointWindow(bool _Show, int i)
|
void CCodeWindow::ToggleBreakPointWindow(bool bShow)
|
||||||
{
|
{
|
||||||
if (_Show)
|
GetMenuBar()->FindItem(IDM_BREAKPOINTWINDOW)->Check(bShow);
|
||||||
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (!m_BreakpointWindow) m_BreakpointWindow = new CBreakPointWindow(this, Parent, IDM_BREAKPOINTWINDOW);
|
if (!m_BreakpointWindow)
|
||||||
Parent->DoAddPage(m_BreakpointWindow, i, wxT("Breakpoints"), bFloatBreakpointWindow);
|
m_BreakpointWindow = new CBreakPointWindow(this, Parent, IDM_BREAKPOINTWINDOW);
|
||||||
|
Parent->DoAddPage(m_BreakpointWindow, iBreakpointWindow,
|
||||||
|
wxT("Breakpoints"), bFloatBreakpointWindow);
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(m_BreakpointWindow);
|
Parent->DoRemovePage(m_BreakpointWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCodeWindow::ToggleMemoryWindow(bool bShow)
|
||||||
void CCodeWindow::OnToggleMemoryWindow(bool _Show, int i)
|
|
||||||
{
|
{
|
||||||
if (_Show)
|
GetMenuBar()->FindItem(IDM_MEMORYWINDOW)->Check(bShow);
|
||||||
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (!m_MemoryWindow) m_MemoryWindow = new CMemoryWindow(Parent, IDM_MEMORYWINDOW);
|
if (!m_MemoryWindow)
|
||||||
Parent->DoAddPage(m_MemoryWindow, i, wxT("Memory"), bFloatMemoryWindow);
|
m_MemoryWindow = new CMemoryWindow(Parent, IDM_MEMORYWINDOW);
|
||||||
|
Parent->DoAddPage(m_MemoryWindow, iMemoryWindow, wxT("Memory"), bFloatMemoryWindow);
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(m_MemoryWindow);
|
Parent->DoRemovePage(m_MemoryWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCodeWindow::ToggleJitWindow(bool bShow)
|
||||||
void CCodeWindow::OnToggleJitWindow(bool _Show, int i)
|
|
||||||
{
|
{
|
||||||
if (_Show)
|
GetMenuBar()->FindItem(IDM_JITWINDOW)->Check(bShow);
|
||||||
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (!m_JitWindow) m_JitWindow = new CJitWindow(Parent, IDM_JITWINDOW);
|
if (!m_JitWindow)
|
||||||
Parent->DoAddPage(m_JitWindow, i, wxT("JIT"), bFloatJitWindow);
|
m_JitWindow = new CJitWindow(Parent, IDM_JITWINDOW);
|
||||||
|
Parent->DoAddPage(m_JitWindow, iJitWindow, wxT("JIT"), bFloatJitWindow);
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(m_JitWindow);
|
Parent->DoRemovePage(m_JitWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notice: This windows docking will produce several wx debugging messages for plugin
|
||||||
/*
|
// windows when ::GetWindowRect and ::DestroyWindow fails in wxApp::CleanUp() for the
|
||||||
|
// plugin.
|
||||||
|
|
||||||
|
|
||||||
Notice: This windows docking for plugin windows will produce several wx debugging messages when
|
|
||||||
::GetWindowRect and ::DestroyWindow fails in wxApp::CleanUp() for the plugin.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// Toggle Sound Debugging Window
|
// Toggle Sound Debugging Window
|
||||||
void CCodeWindow::OnToggleDLLWindow(int Id, bool _Show, int i)
|
void CCodeWindow::ToggleDLLWindow(int Id, bool bShow)
|
||||||
{
|
{
|
||||||
std::string DLLName;
|
std::string DLLName;
|
||||||
wxString Title;
|
wxString Title;
|
||||||
int PLUGINTYPE;
|
int PluginType, i;
|
||||||
|
bool bFloat;
|
||||||
|
|
||||||
switch(Id)
|
switch(Id)
|
||||||
{
|
{
|
||||||
case IDM_SOUNDWINDOW:
|
case IDM_SOUNDWINDOW:
|
||||||
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str();
|
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str();
|
||||||
PLUGINTYPE = PLUGIN_TYPE_DSP;
|
PluginType = PLUGIN_TYPE_DSP;
|
||||||
Title = wxT("Sound");
|
Title = wxT("Sound");
|
||||||
|
i = iSoundWindow;
|
||||||
|
bFloat = bFloatSoundWindow;
|
||||||
break;
|
break;
|
||||||
case IDM_VIDEOWINDOW:
|
case IDM_VIDEOWINDOW:
|
||||||
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin.c_str();
|
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin.c_str();
|
||||||
PLUGINTYPE = PLUGIN_TYPE_VIDEO;
|
PluginType = PLUGIN_TYPE_VIDEO;
|
||||||
Title = wxT("Video");
|
Title = wxT("Video");
|
||||||
|
i = iVideoWindow;
|
||||||
|
bFloat = bFloatVideoWindow;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlert("CCodeWindow::OnToggleDLLWindow");
|
PanicAlert("CCodeWindow::ToggleDLLWindow called with invalid Id");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_Show)
|
GetMenuBar()->FindItem(Id)->Check(bShow);
|
||||||
{
|
|
||||||
if (Parent->GetNotebookCount() == 0) return;
|
|
||||||
if (i < 0 || i > Parent->GetNotebookCount()-1) i = 0;
|
|
||||||
wxWindow *Win = Parent->GetWxWindow(Title);
|
|
||||||
if (Win && Parent->GetNotebookFromId(i)->GetPageIndex(Win) != wxNOT_FOUND) return;
|
|
||||||
|
|
||||||
|
if (bShow)
|
||||||
|
{
|
||||||
// Show window
|
// Show window
|
||||||
CPluginManager::GetInstance().OpenDebug(Parent->GetHandle(), DLLName.c_str(), (PLUGIN_TYPE)PLUGINTYPE, _Show);
|
CPluginManager::GetInstance().OpenDebug(Parent,
|
||||||
|
DLLName.c_str(), (PLUGIN_TYPE)PluginType, bShow);
|
||||||
|
|
||||||
Win = Parent->GetWxWindow(Title);
|
|
||||||
if (Win)
|
|
||||||
{
|
|
||||||
Win->SetName(Title);
|
|
||||||
Win->Reparent(Parent);
|
|
||||||
Win->SetId(IDM_SOUNDWINDOW);
|
|
||||||
Parent->GetNotebookFromId(i)->AddPage(Win, Title, true, Parent->aNormalFile);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat("OpenDebug: Win not found\n").c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxWindow* Win = Parent->GetWxWindow(Title);
|
wxWindow* Win = Parent->GetWxWindow(Title);
|
||||||
if (Win)
|
if (Win)
|
||||||
{
|
{
|
||||||
Parent->DoRemovePage(Win, false);
|
Win->SetId(Id);
|
||||||
//Win->Reparent(NULL);
|
Parent->DoAddPage(Win, i, Title, bFloat);
|
||||||
// Destroy
|
}
|
||||||
CPluginManager::GetInstance().OpenDebug(Parent->GetHandle(), DLLName.c_str(), (PLUGIN_TYPE)PLUGINTYPE, _Show);
|
|
||||||
//WARN_LOG(CONSOLE, "Sound removed from NB");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//WARN_LOG(CONSOLE, "Sound not found (Win %i)", FindWindowByName(wxT("Sound")));
|
Parent->DoRemovePageId(Id, false, false);
|
||||||
|
CPluginManager::GetInstance().OpenDebug(Parent,
|
||||||
|
DLLName.c_str(), (PLUGIN_TYPE)PluginType, bShow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -365,7 +365,8 @@ CFrame::CFrame(wxFrame* parent,
|
||||||
// Give it a console early to show potential messages from this onward
|
// Give it a console early to show potential messages from this onward
|
||||||
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
||||||
if (SConfig::GetInstance().m_InterfaceConsole) Console->Open();
|
if (SConfig::GetInstance().m_InterfaceConsole) Console->Open();
|
||||||
if (SConfig::GetInstance().m_InterfaceLogWindow) m_LogWindow = new CLogWindow(this, IDM_LOGWINDOW);
|
m_LogWindow = new CLogWindow(this, IDM_LOGWINDOW);
|
||||||
|
m_LogWindow->Hide();
|
||||||
|
|
||||||
// Start debugging mazimized
|
// Start debugging mazimized
|
||||||
if (UseDebugger) this->Maximize(true);
|
if (UseDebugger) this->Maximize(true);
|
||||||
|
@ -467,8 +468,10 @@ CFrame::CFrame(wxFrame* parent,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetSimplePaneSize();
|
SetSimplePaneSize();
|
||||||
if (SConfig::GetInstance().m_InterfaceLogWindow) DoToggleWindow(IDM_LOGWINDOW, true);
|
if (SConfig::GetInstance().m_InterfaceLogWindow)
|
||||||
if (SConfig::GetInstance().m_InterfaceConsole) DoToggleWindow(IDM_CONSOLEWINDOW, true);
|
ToggleLogWindow(true);
|
||||||
|
if (SConfig::GetInstance().m_InterfaceConsole)
|
||||||
|
ToggleConsole(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show window
|
// Show window
|
||||||
|
@ -692,38 +695,16 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||||
m_RenderParent->SetCursor(wxCURSOR_BLANK);
|
m_RenderParent->SetCursor(wxCURSOR_BLANK);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
#if defined(HAVE_X11) && HAVE_X11
|
||||||
case WM_USER_STOP:
|
case WM_USER_STOP:
|
||||||
DoStop();
|
DoStop();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CFrame::OnCustomHostMessage(int Id)
|
|
||||||
{
|
|
||||||
wxWindow *Win;
|
|
||||||
|
|
||||||
switch(Id)
|
|
||||||
{
|
|
||||||
// Destroy windows
|
|
||||||
case AUDIO_DESTROY:
|
case AUDIO_DESTROY:
|
||||||
Win = GetWxWindow(wxT("Sound"));
|
if (g_pCodeWindow)
|
||||||
if (Win)
|
g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, false);
|
||||||
{
|
|
||||||
DoRemovePage(Win, false);
|
|
||||||
|
|
||||||
CPluginManager::GetInstance().OpenDebug(
|
|
||||||
GetHandle(),
|
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str(),
|
|
||||||
PLUGIN_TYPE_DSP, false
|
|
||||||
);
|
|
||||||
|
|
||||||
//Win->Reparent(NULL);
|
|
||||||
//g_pCodeWindow->OnToggleDLLWindow(false, 0);
|
|
||||||
GetMenuBar()->FindItem(IDM_SOUNDWINDOW)->Check(false);
|
|
||||||
NOTICE_LOG(CONSOLE, "%s", Core::StopMessage(true, "Sound debugging window closed").c_str());
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIDEO_DESTROY:
|
case VIDEO_DESTROY:
|
||||||
|
@ -906,10 +887,6 @@ void CFrame::OnKeyUp(wxKeyEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------
|
|
||||||
// Functions
|
|
||||||
|
|
||||||
|
|
||||||
wxFrame * CFrame::CreateParentFrame(wxWindowID Id, const wxString& Title, wxWindow * Child)
|
wxFrame * CFrame::CreateParentFrame(wxWindowID Id, const wxString& Title, wxWindow * Child)
|
||||||
{
|
{
|
||||||
wxFrame * Frame = new wxFrame(this, Id, Title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE);
|
wxFrame * Frame = new wxFrame(this, Id, Title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE);
|
||||||
|
@ -974,93 +951,3 @@ void CFrame::DoFullscreen(bool bF)
|
||||||
else
|
else
|
||||||
m_RenderFrame->Raise();
|
m_RenderFrame->Raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debugging, show loose windows
|
|
||||||
void CFrame::ListChildren()
|
|
||||||
{
|
|
||||||
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
|
||||||
wxAuiNotebook * NB = NULL;
|
|
||||||
|
|
||||||
Console->Log(LogTypes::LNOTICE, "--------------------------------------------------------------------\n");
|
|
||||||
|
|
||||||
for (u32 i = 0; i < this->GetChildren().size(); i++)
|
|
||||||
{
|
|
||||||
wxWindow * Win = this->GetChildren().Item(i)->GetData();
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat(
|
|
||||||
"%i: %s (%s) :: %s", i,
|
|
||||||
(const char*)Win->GetName().mb_str(), (const char*)Win->GetLabel().mb_str(), (const char*)Win->GetParent()->GetName().mb_str()).c_str());
|
|
||||||
//if (Win->GetName().IsSameAs(wxT("control")))
|
|
||||||
if (Win->IsKindOf(CLASSINFO(wxAuiNotebook)))
|
|
||||||
{
|
|
||||||
NB = (wxAuiNotebook*)Win;
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat(" :: NB", (const char*)NB->GetName().mb_str()).c_str());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NB = NULL;
|
|
||||||
}
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat("\n").c_str());
|
|
||||||
|
|
||||||
Win = this->GetChildren().Item(i)->GetData();
|
|
||||||
for (u32 j = 0; j < Win->GetChildren().size(); j++)
|
|
||||||
{
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat(
|
|
||||||
" %i.%i: %s (%s) :: %s", i, j,
|
|
||||||
(const char*)Win->GetName().mb_str(), (const char*)Win->GetLabel().mb_str(), (const char*)Win->GetParent()->GetName().mb_str()).c_str());
|
|
||||||
if (NB)
|
|
||||||
{
|
|
||||||
if (j < NB->GetPageCount())
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat(" :: %s", (const char*)NB->GetPage(j)->GetName().mb_str()).c_str());
|
|
||||||
}
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat("\n").c_str());
|
|
||||||
|
|
||||||
/*
|
|
||||||
Win = this->GetChildren().Item(j)->GetData();
|
|
||||||
for (int k = 0; k < Win->GetChildren().size(); k++)
|
|
||||||
{
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat(
|
|
||||||
" %i.%i.%i: %s (%s) :: %s\n", i, j, k,
|
|
||||||
Win->GetName().mb_str(), Win->GetLabel().mb_str(), Win->GetParent()->GetName().mb_str()).c_str());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Console->Log(LogTypes::LNOTICE, "--------------------------------------------------------------------\n");
|
|
||||||
|
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
|
||||||
{
|
|
||||||
if (!m_Mgr->GetAllPanes().Item(i).window->IsKindOf(CLASSINFO(wxAuiNotebook))) continue;
|
|
||||||
wxAuiNotebook * _NB = (wxAuiNotebook*)m_Mgr->GetAllPanes().Item(i).window;
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat("%i: %s\n", i, (const char *)m_Mgr->GetAllPanes().Item(i).name.mb_str()).c_str());
|
|
||||||
|
|
||||||
for (u32 j = 0; j < _NB->GetPageCount(); j++)
|
|
||||||
{
|
|
||||||
Console->Log(LogTypes::LNOTICE, StringFromFormat("%i.%i: %s\n", i, j, (const char *)_NB->GetPageText(j).mb_str()).c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Console->Log(LogTypes::LNOTICE, "--------------------------------------------------------------------\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
void CFrame::ListTopWindows()
|
|
||||||
{
|
|
||||||
wxWindowList::const_iterator i;
|
|
||||||
int j = 0;
|
|
||||||
const wxWindowList::const_iterator end = wxTopLevelWindows.end();
|
|
||||||
|
|
||||||
for (i = wxTopLevelWindows.begin(); i != end; ++i)
|
|
||||||
{
|
|
||||||
wxTopLevelWindow * const Win = wx_static_cast(wxTopLevelWindow *, *i);
|
|
||||||
NOTICE_LOG(CONSOLE, "%i: %i %s", j, Win, (const char *)Win->GetTitle().mb_str());
|
|
||||||
/*
|
|
||||||
if ( win->ShouldPreventAppExit() )
|
|
||||||
{
|
|
||||||
// there remains at least one important TLW, don't exit
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
j++;
|
|
||||||
}
|
|
||||||
NOTICE_LOG(CONSOLE, "\n");
|
|
||||||
}
|
|
||||||
|
|
|
@ -130,7 +130,6 @@ class CFrame : public CRenderFrame
|
||||||
void PostUpdateUIEvent(wxUpdateUIEvent& event);
|
void PostUpdateUIEvent(wxUpdateUIEvent& event);
|
||||||
void StatusBarMessage(const char * Text, ...);
|
void StatusBarMessage(const char * Text, ...);
|
||||||
void ClearStatusBar();
|
void ClearStatusBar();
|
||||||
void OnCustomHostMessage(int Id);
|
|
||||||
void OnSizeRequest(int& x, int& y, int& width, int& height);
|
void OnSizeRequest(int& x, int& y, int& width, int& height);
|
||||||
void BootGame(const std::string& filename);
|
void BootGame(const std::string& filename);
|
||||||
void OnRenderParentClose(wxCloseEvent& event);
|
void OnRenderParentClose(wxCloseEvent& event);
|
||||||
|
@ -166,8 +165,6 @@ class CFrame : public CRenderFrame
|
||||||
int Limit(int,int,int);
|
int Limit(int,int,int);
|
||||||
int PercentageToPixels(int,int);
|
int PercentageToPixels(int,int);
|
||||||
int PixelsToPercentage(int,int);
|
int PixelsToPercentage(int,int);
|
||||||
void ListChildren();
|
|
||||||
void ListTopWindows();
|
|
||||||
wxString GetMenuLabel(int Id);
|
wxString GetMenuLabel(int Id);
|
||||||
|
|
||||||
// Perspectives
|
// Perspectives
|
||||||
|
@ -176,17 +173,16 @@ class CFrame : public CRenderFrame
|
||||||
void OnAllowNotebookDnD(wxAuiNotebookEvent& event);
|
void OnAllowNotebookDnD(wxAuiNotebookEvent& event);
|
||||||
void OnNotebookPageChanged(wxAuiNotebookEvent& event);
|
void OnNotebookPageChanged(wxAuiNotebookEvent& event);
|
||||||
void OnFloatWindow(wxCommandEvent& event);
|
void OnFloatWindow(wxCommandEvent& event);
|
||||||
|
void ToggleFloatWindow(int Id);
|
||||||
void OnTab(wxAuiNotebookEvent& event);
|
void OnTab(wxAuiNotebookEvent& event);
|
||||||
int GetNootebookAffiliation(wxString Name);
|
int GetNootebookAffiliation(wxString Name);
|
||||||
void ClosePages();
|
void ClosePages();
|
||||||
void DoToggleWindow(int,bool);
|
|
||||||
void ShowAllNotebooks(bool Window = false);
|
void ShowAllNotebooks(bool Window = false);
|
||||||
void HideAllNotebooks(bool Window = false);
|
void HideAllNotebooks(bool Window = false);
|
||||||
void CloseAllNotebooks();
|
void CloseAllNotebooks();
|
||||||
void DoAddPage(wxWindow *, int, wxString, bool);
|
void DoAddPage(wxWindow *, int, wxString, bool);
|
||||||
void DoRemovePage(wxWindow *, bool Hide = true);
|
void DoRemovePage(wxWindow *, bool Hide = true);
|
||||||
void DoRemovePageId(wxWindowID Id, bool Hide = true, bool Destroy = false);
|
void DoRemovePageId(wxWindowID Id, bool bHide, bool bDestroy);
|
||||||
void DoRemovePageString(wxString, bool Hide = true, bool Destroy = false);
|
|
||||||
void TogglePane();
|
void TogglePane();
|
||||||
void SetSimplePaneSize();
|
void SetSimplePaneSize();
|
||||||
void SetPaneSize();
|
void SetPaneSize();
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
|
||||||
#include "Setup.h" // Common
|
#include "Setup.h" // Common
|
||||||
|
|
||||||
#include "NetWindow.h"
|
#include "NetWindow.h"
|
||||||
|
@ -48,7 +47,6 @@
|
||||||
|
|
||||||
#include <wx/datetime.h> // wxWidgets
|
#include <wx/datetime.h> // wxWidgets
|
||||||
|
|
||||||
|
|
||||||
// ------------
|
// ------------
|
||||||
// Aui events
|
// Aui events
|
||||||
|
|
||||||
|
@ -93,20 +91,20 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event)
|
||||||
void CFrame::OnToggleLogWindow(wxCommandEvent& event)
|
void CFrame::OnToggleLogWindow(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_InterfaceLogWindow = event.IsChecked();
|
SConfig::GetInstance().m_InterfaceLogWindow = event.IsChecked();
|
||||||
DoToggleWindow(event.GetId(), event.IsChecked());
|
ToggleLogWindow(event.IsChecked(), g_pCodeWindow ? g_pCodeWindow->iLogWindow : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::ToggleLogWindow(bool bShow, int i)
|
void CFrame::ToggleLogWindow(bool bShow, int i)
|
||||||
{
|
{
|
||||||
|
GetMenuBar()->FindItem(IDM_LOGWINDOW)->Check(bShow);
|
||||||
|
|
||||||
if (bShow)
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (!m_LogWindow) m_LogWindow = new CLogWindow(this, IDM_LOGWINDOW);
|
if (!m_LogWindow) m_LogWindow = new CLogWindow(this, IDM_LOGWINDOW);
|
||||||
DoAddPage(m_LogWindow, i, wxT("Log"), bFloatLogWindow);
|
DoAddPage(m_LogWindow, i, wxT("Log"), bFloatLogWindow);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
DoRemovePage(m_LogWindow, bShow);
|
DoRemovePage(m_LogWindow, bShow);
|
||||||
}
|
|
||||||
|
|
||||||
// Hide or Show the pane
|
// Hide or Show the pane
|
||||||
if (!g_pCodeWindow)
|
if (!g_pCodeWindow)
|
||||||
|
@ -117,16 +115,16 @@ void CFrame::ToggleLogWindow(bool bShow, int i)
|
||||||
void CFrame::OnToggleConsole(wxCommandEvent& event)
|
void CFrame::OnToggleConsole(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_InterfaceConsole = event.IsChecked();
|
SConfig::GetInstance().m_InterfaceConsole = event.IsChecked();
|
||||||
DoToggleWindow(event.GetId(), event.IsChecked());
|
ToggleConsole(event.IsChecked(), g_pCodeWindow ? g_pCodeWindow->iConsoleWindow : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::ToggleConsole(bool bShow, int i)
|
void CFrame::ToggleConsole(bool bShow, int i)
|
||||||
{
|
{
|
||||||
// Can anyone check this code under Linux ? commenting the windows console Hide/show
|
|
||||||
// should be enough to make it work.
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
||||||
|
|
||||||
|
GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(bShow);
|
||||||
|
|
||||||
if (bShow)
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (i < 0 || i > GetNotebookCount()-1) i = 0;
|
if (i < 0 || i > GetNotebookCount()-1) i = 0;
|
||||||
|
@ -166,42 +164,24 @@ void CFrame::ToggleConsole(bool bShow, int i)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Notebooks
|
// Notebooks
|
||||||
// ---------------------
|
// ---------------------
|
||||||
void CFrame::ClosePages()
|
void CFrame::ClosePages()
|
||||||
{
|
{
|
||||||
DoToggleWindow(IDM_LOGWINDOW, false);
|
ToggleLogWindow(false);
|
||||||
DoToggleWindow(IDM_CONSOLEWINDOW, false);
|
ToggleConsole(false);
|
||||||
DoToggleWindow(IDM_CODEWINDOW, false);
|
if (g_pCodeWindow)
|
||||||
DoToggleWindow(IDM_REGISTERWINDOW, false);
|
{
|
||||||
DoToggleWindow(IDM_BREAKPOINTWINDOW, false);
|
g_pCodeWindow->ToggleCodeWindow(false);
|
||||||
DoToggleWindow(IDM_MEMORYWINDOW, false);
|
g_pCodeWindow->ToggleRegisterWindow(false);
|
||||||
DoToggleWindow(IDM_JITWINDOW, false);
|
g_pCodeWindow->ToggleBreakPointWindow(false);
|
||||||
DoToggleWindow(IDM_SOUNDWINDOW, false);
|
g_pCodeWindow->ToggleMemoryWindow(false);
|
||||||
DoToggleWindow(IDM_VIDEOWINDOW, false);
|
g_pCodeWindow->ToggleJitWindow(false);
|
||||||
|
g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, false);
|
||||||
|
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, false);
|
||||||
}
|
}
|
||||||
void CFrame::DoToggleWindow(int Id, bool bShow)
|
|
||||||
{
|
|
||||||
switch (Id)
|
|
||||||
{
|
|
||||||
case IDM_LOGWINDOW: ToggleLogWindow(bShow, g_pCodeWindow ? g_pCodeWindow->iLogWindow : 0); break;
|
|
||||||
case IDM_CONSOLEWINDOW: ToggleConsole(bShow, g_pCodeWindow ? g_pCodeWindow->iConsoleWindow : 0); break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_pCodeWindow) return;
|
|
||||||
|
|
||||||
switch (Id)
|
|
||||||
{
|
|
||||||
case IDM_CODEWINDOW: g_pCodeWindow->OnToggleCodeWindow(bShow, g_pCodeWindow->iCodeWindow); break;
|
|
||||||
case IDM_REGISTERWINDOW: g_pCodeWindow->OnToggleRegisterWindow(bShow, g_pCodeWindow->iRegisterWindow); break;
|
|
||||||
case IDM_BREAKPOINTWINDOW: g_pCodeWindow->OnToggleBreakPointWindow(bShow, g_pCodeWindow->iBreakpointWindow); break;
|
|
||||||
case IDM_MEMORYWINDOW: g_pCodeWindow->OnToggleMemoryWindow(bShow, g_pCodeWindow->iMemoryWindow); break;
|
|
||||||
case IDM_JITWINDOW: g_pCodeWindow->OnToggleJitWindow(bShow, g_pCodeWindow->iJitWindow); break;
|
|
||||||
case IDM_SOUNDWINDOW: g_pCodeWindow->OnToggleDLLWindow(IDM_SOUNDWINDOW, bShow, g_pCodeWindow->iSoundWindow); break;
|
|
||||||
case IDM_VIDEOWINDOW: g_pCodeWindow->OnToggleDLLWindow(IDM_VIDEOWINDOW, bShow, g_pCodeWindow->iVideoWindow); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void CFrame::OnNotebookPageChanged(wxAuiNotebookEvent& event)
|
void CFrame::OnNotebookPageChanged(wxAuiNotebookEvent& event)
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -211,16 +191,26 @@ void CFrame::OnNotebookPageChanged(wxAuiNotebookEvent& event)
|
||||||
AddRemoveBlankPage();
|
AddRemoveBlankPage();
|
||||||
|
|
||||||
// Update the notebook affiliation
|
// Update the notebook affiliation
|
||||||
if(GetNootebookAffiliation(wxT("Log")) >= 0) g_pCodeWindow->iLogWindow = GetNootebookAffiliation(wxT("Log"));
|
if(GetNootebookAffiliation(wxT("Log")) >= 0)
|
||||||
if(GetNootebookAffiliation(wxT("Console")) >= 0) g_pCodeWindow->iConsoleWindow = GetNootebookAffiliation(wxT("Console"));
|
g_pCodeWindow->iLogWindow = GetNootebookAffiliation(wxT("Log"));
|
||||||
if(GetNootebookAffiliation(wxT("Code")) >= 0) g_pCodeWindow->iCodeWindow = GetNootebookAffiliation(wxT("Code"));
|
if(GetNootebookAffiliation(wxT("Console")) >= 0)
|
||||||
if(GetNootebookAffiliation(wxT("Registers")) >= 0) g_pCodeWindow->iRegisterWindow = GetNootebookAffiliation(wxT("Registers"));
|
g_pCodeWindow->iConsoleWindow = GetNootebookAffiliation(wxT("Console"));
|
||||||
if(GetNootebookAffiliation(wxT("Breakpoints")) >= 0) g_pCodeWindow->iBreakpointWindow = GetNootebookAffiliation(wxT("Breakpoints"));
|
if(GetNootebookAffiliation(wxT("Code")) >= 0)
|
||||||
if(GetNootebookAffiliation(wxT("JIT")) >= 0) g_pCodeWindow->iJitWindow = GetNootebookAffiliation(wxT("JIT"));
|
g_pCodeWindow->iCodeWindow = GetNootebookAffiliation(wxT("Code"));
|
||||||
if(GetNootebookAffiliation(wxT("Memory")) >= 0) g_pCodeWindow->iMemoryWindow = GetNootebookAffiliation(wxT("Memory"));
|
if(GetNootebookAffiliation(wxT("Registers")) >= 0)
|
||||||
if(GetNootebookAffiliation(wxT("Sound")) >= 0) g_pCodeWindow->iSoundWindow = GetNootebookAffiliation(wxT("Sound"));
|
g_pCodeWindow->iRegisterWindow = GetNootebookAffiliation(wxT("Registers"));
|
||||||
if(GetNootebookAffiliation(wxT("Video")) >= 0) g_pCodeWindow->iVideoWindow = GetNootebookAffiliation(wxT("Video"));
|
if(GetNootebookAffiliation(wxT("Breakpoints")) >= 0)
|
||||||
|
g_pCodeWindow->iBreakpointWindow = GetNootebookAffiliation(wxT("Breakpoints"));
|
||||||
|
if(GetNootebookAffiliation(wxT("JIT")) >= 0)
|
||||||
|
g_pCodeWindow->iJitWindow = GetNootebookAffiliation(wxT("JIT"));
|
||||||
|
if(GetNootebookAffiliation(wxT("Memory")) >= 0)
|
||||||
|
g_pCodeWindow->iMemoryWindow = GetNootebookAffiliation(wxT("Memory"));
|
||||||
|
if(GetNootebookAffiliation(wxT("Sound")) >= 0)
|
||||||
|
g_pCodeWindow->iSoundWindow = GetNootebookAffiliation(wxT("Sound"));
|
||||||
|
if(GetNootebookAffiliation(wxT("Video")) >= 0)
|
||||||
|
g_pCodeWindow->iVideoWindow = GetNootebookAffiliation(wxT("Video"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
|
void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
|
||||||
{
|
{
|
||||||
// Override event
|
// Override event
|
||||||
|
@ -228,47 +218,166 @@ void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
|
||||||
|
|
||||||
wxAuiNotebook* Ctrl = (wxAuiNotebook*)event.GetEventObject();
|
wxAuiNotebook* Ctrl = (wxAuiNotebook*)event.GetEventObject();
|
||||||
|
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Log"))) { GetMenuBar()->FindItem(IDM_LOGWINDOW)->Check(false); DoToggleWindow(IDM_LOGWINDOW, false); }
|
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Log")))
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Console"))) { GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(false); DoToggleWindow(IDM_CONSOLEWINDOW, false); }
|
ToggleLogWindow(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Registers"))) { GetMenuBar()->FindItem(IDM_REGISTERWINDOW)->Check(false); DoToggleWindow(IDM_REGISTERWINDOW, false); }
|
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Console")))
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Breakpoints"))) { GetMenuBar()->FindItem(IDM_BREAKPOINTWINDOW)->Check(false); DoToggleWindow(IDM_BREAKPOINTWINDOW, false); }
|
ToggleConsole(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("JIT"))) { GetMenuBar()->FindItem(IDM_JITWINDOW)->Check(false); DoToggleWindow(IDM_JITWINDOW, false); }
|
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Registers")))
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Memory"))) { GetMenuBar()->FindItem(IDM_MEMORYWINDOW)->Check(false); DoToggleWindow(IDM_MEMORYWINDOW, false); }
|
g_pCodeWindow->ToggleRegisterWindow(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Sound"))) { GetMenuBar()->FindItem(IDM_SOUNDWINDOW)->Check(false); DoToggleWindow(IDM_SOUNDWINDOW, false); }
|
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Breakpoints")))
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Video"))) { GetMenuBar()->FindItem(IDM_VIDEOWINDOW)->Check(false); DoToggleWindow(IDM_VIDEOWINDOW, false); }
|
g_pCodeWindow->ToggleBreakPointWindow(false);
|
||||||
|
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("JIT")))
|
||||||
|
g_pCodeWindow->ToggleJitWindow(false);
|
||||||
|
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Memory")))
|
||||||
|
g_pCodeWindow->ToggleMemoryWindow(false);
|
||||||
|
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Sound")))
|
||||||
|
g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, false);
|
||||||
|
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Video")))
|
||||||
|
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnFloatWindow(wxCommandEvent& event)
|
void CFrame::OnFloatWindow(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch(event.GetId())
|
ToggleFloatWindow(event.GetId());
|
||||||
{
|
|
||||||
case IDM_FLOAT_LOGWINDOW: if (GetNootebookPageFromId(IDM_LOGWINDOW)) { DoFloatNotebookPage(IDM_LOGWINDOW); return; } break;
|
|
||||||
case IDM_FLOAT_CONSOLEWINDOW: if (GetNootebookPageFromId(IDM_CONSOLEWINDOW)) { DoFloatNotebookPage(IDM_CONSOLEWINDOW); return; } break;
|
|
||||||
}
|
|
||||||
switch(event.GetId())
|
|
||||||
{
|
|
||||||
case IDM_FLOAT_LOGWINDOW: if (FindWindowById(IDM_LOGWINDOW)) DoUnfloatPage(IDM_LOGWINDOW_PARENT); break;
|
|
||||||
case IDM_FLOAT_CONSOLEWINDOW: if (FindWindowById(IDM_CONSOLEWINDOW)) DoUnfloatPage(IDM_CONSOLEWINDOW_PARENT); break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_pCodeWindow) return;
|
void CFrame::ToggleFloatWindow(int Id)
|
||||||
|
{
|
||||||
|
switch(Id)
|
||||||
|
{
|
||||||
|
case IDM_FLOAT_LOGWINDOW:
|
||||||
|
if (GetNootebookPageFromId(IDM_LOGWINDOW))
|
||||||
|
{
|
||||||
|
DoFloatNotebookPage(IDM_LOGWINDOW);
|
||||||
|
bFloatLogWindow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_CONSOLEWINDOW:
|
||||||
|
if (GetNootebookPageFromId(IDM_CONSOLEWINDOW))
|
||||||
|
{
|
||||||
|
DoFloatNotebookPage(IDM_CONSOLEWINDOW);
|
||||||
|
bFloatConsoleWindow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
switch(Id)
|
||||||
|
{
|
||||||
|
case IDM_FLOAT_LOGWINDOW:
|
||||||
|
if (FindWindowById(IDM_LOGWINDOW))
|
||||||
|
DoUnfloatPage(IDM_LOGWINDOW_PARENT);
|
||||||
|
bFloatLogWindow = false;
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_CONSOLEWINDOW:
|
||||||
|
if (FindWindowById(IDM_CONSOLEWINDOW))
|
||||||
|
DoUnfloatPage(IDM_CONSOLEWINDOW_PARENT);
|
||||||
|
bFloatConsoleWindow = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch(event.GetId())
|
if (!g_pCodeWindow)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch(Id)
|
||||||
{
|
{
|
||||||
case IDM_FLOAT_CODEWINDOW: if (GetNootebookPageFromId(IDM_CODEWINDOW)) { DoFloatNotebookPage(IDM_CODEWINDOW); return; } break;
|
case IDM_FLOAT_CODEWINDOW:
|
||||||
case IDM_FLOAT_REGISTERWINDOW: if (GetNootebookPageFromId(IDM_REGISTERWINDOW)) { DoFloatNotebookPage(IDM_REGISTERWINDOW); return; } break;
|
if (GetNootebookPageFromId(IDM_CODEWINDOW))
|
||||||
case IDM_FLOAT_BREAKPOINTWINDOW: if (GetNootebookPageFromId(IDM_BREAKPOINTWINDOW)) { DoFloatNotebookPage(IDM_BREAKPOINTWINDOW); return; } break;
|
|
||||||
case IDM_FLOAT_MEMORYWINDOW: if (GetNootebookPageFromId(IDM_MEMORYWINDOW)) { DoFloatNotebookPage(IDM_MEMORYWINDOW); return; } break;
|
|
||||||
case IDM_FLOAT_JITWINDOW: if (GetNootebookPageFromId(IDM_JITWINDOW)) { DoFloatNotebookPage(IDM_JITWINDOW); return; } break;
|
|
||||||
}
|
|
||||||
switch(event.GetId())
|
|
||||||
{
|
{
|
||||||
case IDM_FLOAT_CODEWINDOW: if (FindWindowById(IDM_CODEWINDOW)) DoUnfloatPage(IDM_LOGWINDOW_PARENT); break;
|
DoFloatNotebookPage(IDM_CODEWINDOW);
|
||||||
case IDM_FLOAT_REGISTERWINDOW: if (FindWindowById(IDM_REGISTERWINDOW)) DoUnfloatPage(IDM_REGISTERWINDOW_PARENT); break;
|
g_pCodeWindow->bFloatCodeWindow = true;
|
||||||
case IDM_FLOAT_BREAKPOINTWINDOW: if (FindWindowById(IDM_BREAKPOINTWINDOW)) DoUnfloatPage(IDM_BREAKPOINTWINDOW_PARENT); break;
|
return;
|
||||||
case IDM_FLOAT_MEMORYWINDOW: if (FindWindowById(IDM_MEMORYWINDOW)) DoUnfloatPage(IDM_MEMORYWINDOW_PARENT); break;
|
}
|
||||||
case IDM_FLOAT_JITWINDOW: if (FindWindowById(IDM_JITWINDOW)) DoUnfloatPage(IDM_JITWINDOW_PARENT); break;
|
break;
|
||||||
|
case IDM_FLOAT_REGISTERWINDOW:
|
||||||
|
if (GetNootebookPageFromId(IDM_REGISTERWINDOW))
|
||||||
|
{
|
||||||
|
DoFloatNotebookPage(IDM_REGISTERWINDOW);
|
||||||
|
g_pCodeWindow->bFloatRegisterWindow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_BREAKPOINTWINDOW:
|
||||||
|
if (GetNootebookPageFromId(IDM_BREAKPOINTWINDOW))
|
||||||
|
{
|
||||||
|
DoFloatNotebookPage(IDM_BREAKPOINTWINDOW);
|
||||||
|
g_pCodeWindow->bFloatBreakpointWindow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_MEMORYWINDOW:
|
||||||
|
if (GetNootebookPageFromId(IDM_MEMORYWINDOW))
|
||||||
|
{
|
||||||
|
DoFloatNotebookPage(IDM_MEMORYWINDOW);
|
||||||
|
g_pCodeWindow->bFloatMemoryWindow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_JITWINDOW:
|
||||||
|
if (GetNootebookPageFromId(IDM_JITWINDOW))
|
||||||
|
{
|
||||||
|
DoFloatNotebookPage(IDM_JITWINDOW);
|
||||||
|
g_pCodeWindow->bFloatJitWindow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_SOUNDWINDOW:
|
||||||
|
if (GetNootebookPageFromId(IDM_SOUNDWINDOW))
|
||||||
|
{
|
||||||
|
DoFloatNotebookPage(IDM_SOUNDWINDOW);
|
||||||
|
g_pCodeWindow->bFloatSoundWindow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_VIDEOWINDOW:
|
||||||
|
if (GetNootebookPageFromId(IDM_VIDEOWINDOW))
|
||||||
|
{
|
||||||
|
DoFloatNotebookPage(IDM_VIDEOWINDOW);
|
||||||
|
g_pCodeWindow->bFloatVideoWindow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
switch(Id)
|
||||||
|
{
|
||||||
|
case IDM_FLOAT_CODEWINDOW:
|
||||||
|
if (FindWindowById(IDM_CODEWINDOW))
|
||||||
|
DoUnfloatPage(IDM_CODEWINDOW_PARENT);
|
||||||
|
g_pCodeWindow->bFloatCodeWindow = false;
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_REGISTERWINDOW:
|
||||||
|
if (FindWindowById(IDM_REGISTERWINDOW))
|
||||||
|
DoUnfloatPage(IDM_REGISTERWINDOW_PARENT);
|
||||||
|
g_pCodeWindow->bFloatRegisterWindow = false;
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_BREAKPOINTWINDOW:
|
||||||
|
if (FindWindowById(IDM_BREAKPOINTWINDOW))
|
||||||
|
DoUnfloatPage(IDM_BREAKPOINTWINDOW_PARENT);
|
||||||
|
g_pCodeWindow->bFloatBreakpointWindow = false;
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_MEMORYWINDOW:
|
||||||
|
if (FindWindowById(IDM_MEMORYWINDOW))
|
||||||
|
DoUnfloatPage(IDM_MEMORYWINDOW_PARENT);
|
||||||
|
g_pCodeWindow->bFloatMemoryWindow = false;
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_JITWINDOW:
|
||||||
|
if (FindWindowById(IDM_JITWINDOW))
|
||||||
|
DoUnfloatPage(IDM_JITWINDOW_PARENT);
|
||||||
|
g_pCodeWindow->bFloatJitWindow = false;
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_SOUNDWINDOW:
|
||||||
|
if (FindWindowById(IDM_SOUNDWINDOW))
|
||||||
|
DoUnfloatPage(IDM_SOUNDWINDOW_PARENT);
|
||||||
|
g_pCodeWindow->bFloatSoundWindow = false;
|
||||||
|
break;
|
||||||
|
case IDM_FLOAT_VIDEOWINDOW:
|
||||||
|
if (FindWindowById(IDM_VIDEOWINDOW))
|
||||||
|
DoUnfloatPage(IDM_VIDEOWINDOW_PARENT);
|
||||||
|
g_pCodeWindow->bFloatVideoWindow = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnTab(wxAuiNotebookEvent& event)
|
void CFrame::OnTab(wxAuiNotebookEvent& event)
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -277,40 +386,48 @@ void CFrame::OnTab(wxAuiNotebookEvent& event)
|
||||||
// Create the popup menu
|
// Create the popup menu
|
||||||
wxMenu* MenuPopup = new wxMenu;
|
wxMenu* MenuPopup = new wxMenu;
|
||||||
|
|
||||||
wxMenuItem* Item = new wxMenuItem(MenuPopup, wxID_ANY, wxT("Select floating windows"));
|
wxMenuItem* Item = new wxMenuItem(MenuPopup, wxID_ANY,
|
||||||
|
wxT("Select floating windows"));
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Enable(false);
|
Item->Enable(false);
|
||||||
MenuPopup->Append(new wxMenuItem(MenuPopup));
|
MenuPopup->Append(new wxMenuItem(MenuPopup));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_LOGWINDOW, WindowNameFromId(IDM_LOGWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_LOGWINDOW,
|
||||||
|
WindowNameFromId(IDM_LOGWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_LOGWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_LOGWINDOW_PARENT));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_CONSOLEWINDOW, WindowNameFromId(IDM_CONSOLEWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_CONSOLEWINDOW,
|
||||||
|
WindowNameFromId(IDM_CONSOLEWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_CONSOLEWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_CONSOLEWINDOW_PARENT));
|
||||||
MenuPopup->Append(new wxMenuItem(MenuPopup));
|
MenuPopup->Append(new wxMenuItem(MenuPopup));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_CODEWINDOW, WindowNameFromId(IDM_CODEWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_CODEWINDOW,
|
||||||
|
WindowNameFromId(IDM_CODEWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_CODEWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_CODEWINDOW_PARENT));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_REGISTERWINDOW, WindowNameFromId(IDM_REGISTERWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_REGISTERWINDOW,
|
||||||
|
WindowNameFromId(IDM_REGISTERWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_REGISTERWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_REGISTERWINDOW_PARENT));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_BREAKPOINTWINDOW, WindowNameFromId(IDM_BREAKPOINTWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_BREAKPOINTWINDOW,
|
||||||
|
WindowNameFromId(IDM_BREAKPOINTWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_BREAKPOINTWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_BREAKPOINTWINDOW_PARENT));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_MEMORYWINDOW, WindowNameFromId(IDM_MEMORYWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_MEMORYWINDOW,
|
||||||
|
WindowNameFromId(IDM_MEMORYWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_MEMORYWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_MEMORYWINDOW_PARENT));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_JITWINDOW, WindowNameFromId(IDM_JITWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_JITWINDOW,
|
||||||
|
WindowNameFromId(IDM_JITWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_JITWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_JITWINDOW_PARENT));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_SOUNDWINDOW, WindowNameFromId(IDM_SOUNDWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_SOUNDWINDOW,
|
||||||
|
WindowNameFromId(IDM_SOUNDWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_SOUNDWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_SOUNDWINDOW_PARENT));
|
||||||
Item->Enable(false);
|
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_VIDEOWINDOW,
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_VIDEOWINDOW, WindowNameFromId(IDM_VIDEOWINDOW), wxT(""), wxITEM_CHECK);
|
WindowNameFromId(IDM_VIDEOWINDOW), wxT(""), wxITEM_CHECK);
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Check(!!FindWindowById(IDM_VIDEOWINDOW_PARENT));
|
Item->Check(!!FindWindowById(IDM_VIDEOWINDOW_PARENT));
|
||||||
Item->Enable(false);
|
|
||||||
|
|
||||||
// Line up our menu with the cursor
|
// Line up our menu with the cursor
|
||||||
wxPoint Pt = ::wxGetMousePosition();
|
wxPoint Pt = ::wxGetMousePosition();
|
||||||
|
@ -318,12 +435,14 @@ void CFrame::OnTab(wxAuiNotebookEvent& event)
|
||||||
// Show
|
// Show
|
||||||
PopupMenu(MenuPopup, Pt);
|
PopupMenu(MenuPopup, Pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& event)
|
void CFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& event)
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
event.Allow();
|
event.Allow();
|
||||||
ResizeConsole();
|
ResizeConsole();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::TogglePane()
|
void CFrame::TogglePane()
|
||||||
{
|
{
|
||||||
// Get the first notebook
|
// Get the first notebook
|
||||||
|
@ -344,48 +463,8 @@ void CFrame::TogglePane()
|
||||||
SetSimplePaneSize();
|
SetSimplePaneSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::DoRemovePageString(wxString Str, bool /*_Hide*/, bool _Destroy)
|
|
||||||
{
|
|
||||||
wxWindow * Win = FindWindowByName(Str);
|
|
||||||
|
|
||||||
if (Win)
|
|
||||||
{
|
|
||||||
Win->Reparent(this);
|
|
||||||
Win->Hide();
|
|
||||||
FindWindowById(WindowParentIdFromChildId(Win->GetId()))->Destroy();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
|
||||||
{
|
|
||||||
if (!m_Mgr->GetAllPanes().Item(i).window->IsKindOf(CLASSINFO(wxAuiNotebook))) continue;
|
|
||||||
wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes().Item(i).window;
|
|
||||||
for (u32 j = 0; j < NB->GetPageCount(); j++)
|
|
||||||
{
|
|
||||||
if (NB->GetPageText(j).IsSameAs(Str))
|
|
||||||
{
|
|
||||||
if (!_Destroy)
|
|
||||||
{
|
|
||||||
// Reparent to avoid destruction if the notebook is closed and destroyed
|
|
||||||
wxWindow * NBPageWin = NB->GetPage(j);
|
|
||||||
NB->RemovePage(j);
|
|
||||||
NBPageWin->Reparent(this);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NB->DeletePage(j);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void CFrame::DoRemovePage(wxWindow * Win, bool _Hide)
|
void CFrame::DoRemovePage(wxWindow * Win, bool _Hide)
|
||||||
{
|
{
|
||||||
// If m_dialog is NULL, then possibly the system didn't report the checked menu item status correctly.
|
|
||||||
// It should be true just after the menu item was selected, if there was no modeless dialog yet.
|
|
||||||
//wxASSERT(Win != NULL);
|
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
|
|
||||||
if (Win->GetId() > 0 && FindWindowById(WindowParentIdFromChildId(Win->GetId())))
|
if (Win->GetId() > 0 && FindWindowById(WindowParentIdFromChildId(Win->GetId())))
|
||||||
|
@ -410,34 +489,43 @@ void CFrame::DoRemovePage(wxWindow * Win, bool _Hide)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::DoRemovePageId(wxWindowID Id, bool bHide, bool bDestroy)
|
void CFrame::DoRemovePageId(wxWindowID Id, bool bHide, bool bDestroy)
|
||||||
{
|
{
|
||||||
if (!FindWindowById(Id)) return;
|
|
||||||
wxWindow *Win = FindWindowById(Id);
|
wxWindow *Win = FindWindowById(Id);
|
||||||
|
if (!Win)
|
||||||
|
return;
|
||||||
|
|
||||||
if (FindWindowById(WindowParentIdFromChildId(Id)))
|
wxWindow *Parent = FindWindowById(WindowParentIdFromChildId(Id));
|
||||||
|
|
||||||
|
if (Parent)
|
||||||
{
|
{
|
||||||
Win->Reparent(this);
|
Win->Reparent(this);
|
||||||
if (bDestroy)
|
if (bDestroy)
|
||||||
Win->Destroy();
|
Win->Destroy();
|
||||||
else
|
else
|
||||||
Win->Hide();
|
Win->Hide();
|
||||||
FindWindowById(WindowParentIdFromChildId(Id))->Destroy();
|
Parent->Destroy();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = 0; i < GetNotebookCount(); i++)
|
for (int i = 0; i < GetNotebookCount(); i++)
|
||||||
{
|
{
|
||||||
if (GetNotebookFromId(i)->GetPageIndex(Win) != wxNOT_FOUND)
|
int PageIndex = GetNotebookFromId(i)->GetPageIndex(Win);
|
||||||
|
if (PageIndex != wxNOT_FOUND)
|
||||||
|
{
|
||||||
|
GetNotebookFromId(i)->RemovePage(PageIndex);
|
||||||
|
if (bHide)
|
||||||
{
|
{
|
||||||
GetNotebookFromId(i)->RemovePage(GetNotebookFromId(i)->GetPageIndex(Win));
|
|
||||||
// Reparent to avoid destruction if the notebook is closed and destroyed
|
// Reparent to avoid destruction if the notebook is closed and destroyed
|
||||||
Win->Reparent(this);
|
Win->Reparent(this);
|
||||||
if (bHide) Win->Hide();
|
Win->Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CFrame::DoAddPage(wxWindow * Win, int i, wxString Name, bool Float)
|
void CFrame::DoAddPage(wxWindow * Win, int i, wxString Name, bool Float)
|
||||||
{
|
{
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
|
@ -452,7 +540,7 @@ void CFrame::DoAddPage(wxWindow * Win, int i, wxString Name, bool Float)
|
||||||
|
|
||||||
void CFrame::DoUnfloatPage(int Id)
|
void CFrame::DoUnfloatPage(int Id)
|
||||||
{
|
{
|
||||||
wxFrame * Win = (wxFrame*)this->FindWindowById(Id);
|
wxFrame * Win = (wxFrame*)FindWindowById(Id);
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
|
|
||||||
wxWindow * Child = Win->GetWindowChildren().Item(0)->GetData();
|
wxWindow * Child = Win->GetWindowChildren().Item(0)->GetData();
|
||||||
|
@ -460,10 +548,12 @@ void CFrame::DoUnfloatPage(int Id)
|
||||||
DoAddPage(Child, 0, Win->GetTitle(), false);
|
DoAddPage(Child, 0, Win->GetTitle(), false);
|
||||||
Win->Destroy();
|
Win->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnFloatingPageClosed(wxCloseEvent& event)
|
void CFrame::OnFloatingPageClosed(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
DoUnfloatPage(event.GetId());
|
ToggleFloatWindow(event.GetId() - IDM_LOGWINDOW_PARENT + IDM_FLOAT_LOGWINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnFloatingPageSize(wxSizeEvent& event)
|
void CFrame::OnFloatingPageSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -520,6 +610,7 @@ void CFrame::OnDropDownSettingsToolbar(wxAuiToolBarEvent& event)
|
||||||
if (!m_bEdit) Tb->SetToolSticky(event.GetId(), false);
|
if (!m_bEdit) Tb->SetToolSticky(event.GetId(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnDropDownToolbarItem(wxAuiToolBarEvent& event)
|
void CFrame::OnDropDownToolbarItem(wxAuiToolBarEvent& event)
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -556,6 +647,7 @@ void CFrame::OnDropDownToolbarItem(wxAuiToolBarEvent& event)
|
||||||
tb->SetToolSticky(event.GetId(), false);
|
tb->SetToolSticky(event.GetId(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnToolBar(wxCommandEvent& event)
|
void CFrame::OnToolBar(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
ClearStatusBar();
|
ClearStatusBar();
|
||||||
|
@ -583,6 +675,7 @@ void CFrame::OnToolBar(wxCommandEvent& event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
|
void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
ClearStatusBar();
|
ClearStatusBar();
|
||||||
|
@ -633,9 +726,6 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Functions
|
|
||||||
// ---------------------
|
|
||||||
void CFrame::ResetToolbarStyle()
|
void CFrame::ResetToolbarStyle()
|
||||||
{
|
{
|
||||||
wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes();
|
wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes();
|
||||||
|
@ -703,6 +793,7 @@ void CFrame::ToggleNotebookStyle(bool On, long Style)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnSelectPerspective(wxCommandEvent& event)
|
void CFrame::OnSelectPerspective(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
u32 _Selection = event.GetId() - IDM_PERSPECTIVES_0;
|
u32 _Selection = event.GetId() - IDM_PERSPECTIVES_0;
|
||||||
|
@ -718,9 +809,7 @@ void CFrame::ResizeConsole()
|
||||||
wxWindow * Win = FindWindowById(IDM_CONSOLEWINDOW);
|
wxWindow * Win = FindWindowById(IDM_CONSOLEWINDOW);
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
|
||||||
// Get OS version
|
// Get OS version
|
||||||
// ------------------
|
|
||||||
int wxBorder, Border, LowerBorder, MenuBar, ScrollBar, WidthReduction;
|
int wxBorder, Border, LowerBorder, MenuBar, ScrollBar, WidthReduction;
|
||||||
OSVERSIONINFO osvi;
|
OSVERSIONINFO osvi;
|
||||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||||
|
@ -743,7 +832,7 @@ void CFrame::ResizeConsole()
|
||||||
ScrollBar = 19;
|
ScrollBar = 19;
|
||||||
}
|
}
|
||||||
WidthReduction = 30 - Border;
|
WidthReduction = 30 - Border;
|
||||||
// --------------------------------
|
|
||||||
// Get the client size
|
// Get the client size
|
||||||
int X = Win->GetClientSize().GetX();
|
int X = Win->GetClientSize().GetX();
|
||||||
int Y = Win->GetClientSize().GetY();
|
int Y = Win->GetClientSize().GetY();
|
||||||
|
@ -869,11 +958,10 @@ void CFrame::ReloadPanes()
|
||||||
// Open notebook pages
|
// Open notebook pages
|
||||||
AddRemoveBlankPage();
|
AddRemoveBlankPage();
|
||||||
if (g_pCodeWindow) g_pCodeWindow->OpenPages();
|
if (g_pCodeWindow) g_pCodeWindow->OpenPages();
|
||||||
if (SConfig::GetInstance().m_InterfaceLogWindow) DoToggleWindow(IDM_LOGWINDOW, true);
|
if (SConfig::GetInstance().m_InterfaceLogWindow) ToggleLogWindow(true);
|
||||||
if (SConfig::GetInstance().m_InterfaceConsole) DoToggleWindow(IDM_CONSOLEWINDOW, true);
|
if (SConfig::GetInstance().m_InterfaceConsole) ToggleConsole(true);
|
||||||
|
|
||||||
//Console->Log(LogTypes::LNOTICE, StringFromFormat("ReloadPanes end: Sound %i\n", FindWindowByName(wxT("Sound"))).c_str());
|
//Console->Log(LogTypes::LNOTICE, StringFromFormat("ReloadPanes end: Sound %i\n", FindWindowByName(wxT("Sound"))).c_str());
|
||||||
//ListChildren();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::DoLoadPerspective()
|
void CFrame::DoLoadPerspective()
|
||||||
|
@ -930,6 +1018,7 @@ void CFrame::SaveLocal()
|
||||||
Perspectives.push_back(Tmp);
|
Perspectives.push_back(Tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::Save()
|
void CFrame::Save()
|
||||||
{
|
{
|
||||||
if (Perspectives.size() == 0) return;
|
if (Perspectives.size() == 0) return;
|
||||||
|
@ -998,6 +1087,7 @@ void CFrame::NamePanes()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::AddPane()
|
void CFrame::AddPane()
|
||||||
{
|
{
|
||||||
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo()
|
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo()
|
||||||
|
@ -1008,7 +1098,6 @@ void CFrame::AddPane()
|
||||||
m_Mgr->Update();
|
m_Mgr->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Utility
|
// Utility
|
||||||
// ---------------------
|
// ---------------------
|
||||||
|
|
||||||
|
@ -1018,11 +1107,13 @@ int CFrame::Limit(int i, int Low, int High)
|
||||||
if (i > High) return High;
|
if (i > High) return High;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CFrame::PercentageToPixels(int Percentage, int Total)
|
int CFrame::PercentageToPixels(int Percentage, int Total)
|
||||||
{
|
{
|
||||||
int Pixels = (int)((float)Total * ((float)Percentage / 100.0));
|
int Pixels = (int)((float)Total * ((float)Percentage / 100.0));
|
||||||
return Pixels;
|
return Pixels;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CFrame::PixelsToPercentage(int Pixels, int Total)
|
int CFrame::PixelsToPercentage(int Pixels, int Total)
|
||||||
{
|
{
|
||||||
int Percentage = (int)(((float)Pixels / (float)Total) * 100.0);
|
int Percentage = (int)(((float)Pixels / (float)Total) * 100.0);
|
||||||
|
@ -1038,6 +1129,7 @@ wxWindow * CFrame::GetWxWindowHwnd(HWND hWnd)
|
||||||
return Win;
|
return Win;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxWindow * CFrame::GetWxWindow(wxString Name)
|
wxWindow * CFrame::GetWxWindow(wxString Name)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1052,20 +1144,15 @@ wxWindow * CFrame::GetWxWindow(wxString Name)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (FindWindowByName(Name))
|
if (FindWindowByName(Name))
|
||||||
{
|
|
||||||
return FindWindowByName(Name);
|
return FindWindowByName(Name);
|
||||||
}
|
|
||||||
else if (FindWindowByLabel(Name))
|
else if (FindWindowByLabel(Name))
|
||||||
{
|
|
||||||
return FindWindowByLabel(Name);
|
return FindWindowByLabel(Name);
|
||||||
}
|
|
||||||
else if (GetNootebookPage(Name))
|
else if (GetNootebookPage(Name))
|
||||||
{
|
|
||||||
return GetNootebookPage(Name);
|
return GetNootebookPage(Name);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow * CFrame::GetFloatingPage(int Id)
|
wxWindow * CFrame::GetFloatingPage(int Id)
|
||||||
{
|
{
|
||||||
if (this->FindWindowById(Id))
|
if (this->FindWindowById(Id))
|
||||||
|
@ -1073,6 +1160,7 @@ wxWindow * CFrame::GetFloatingPage(int Id)
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow * CFrame::GetNootebookPage(wxString Name)
|
wxWindow * CFrame::GetNootebookPage(wxString Name)
|
||||||
{
|
{
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||||
|
@ -1087,6 +1175,7 @@ wxWindow * CFrame::GetNootebookPage(wxString Name)
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow * CFrame::GetNootebookPageFromId(wxWindowID Id)
|
wxWindow * CFrame::GetNootebookPageFromId(wxWindowID Id)
|
||||||
{
|
{
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||||
|
@ -1100,6 +1189,7 @@ wxWindow * CFrame::GetNootebookPageFromId(wxWindowID Id)
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::AddRemoveBlankPage()
|
void CFrame::AddRemoveBlankPage()
|
||||||
{
|
{
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||||
|
@ -1113,6 +1203,7 @@ void CFrame::AddRemoveBlankPage()
|
||||||
if (NB->GetPageCount() == 0) NB->AddPage(CreateEmptyPanel(), wxT("<>"), true);
|
if (NB->GetPageCount() == 0) NB->AddPage(CreateEmptyPanel(), wxT("<>"), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CFrame::GetNootebookAffiliation(wxString Name)
|
int CFrame::GetNootebookAffiliation(wxString Name)
|
||||||
{
|
{
|
||||||
for (u32 i = 0, j = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
for (u32 i = 0, j = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||||
|
@ -1127,6 +1218,7 @@ int CFrame::GetNootebookAffiliation(wxString Name)
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindowID CFrame::WindowParentIdFromChildId(int Id)
|
wxWindowID CFrame::WindowParentIdFromChildId(int Id)
|
||||||
{
|
{
|
||||||
switch(Id)
|
switch(Id)
|
||||||
|
@ -1143,6 +1235,7 @@ wxWindowID CFrame::WindowParentIdFromChildId(int Id)
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString CFrame::WindowNameFromId(int Id)
|
wxString CFrame::WindowNameFromId(int Id)
|
||||||
{
|
{
|
||||||
switch(Id)
|
switch(Id)
|
||||||
|
@ -1179,6 +1272,7 @@ void CFrame::CloseAllNotebooks()
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CFrame::GetNotebookCount()
|
int CFrame::GetNotebookCount()
|
||||||
{
|
{
|
||||||
int Ret = 0;
|
int Ret = 0;
|
||||||
|
@ -1199,6 +1293,7 @@ wxAuiNotebook * CFrame::GetNotebookFromId(u32 NBId)
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::ShowAllNotebooks(bool bShow)
|
void CFrame::ShowAllNotebooks(bool bShow)
|
||||||
{
|
{
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||||
|
@ -1213,6 +1308,7 @@ void CFrame::ShowAllNotebooks(bool bShow)
|
||||||
}
|
}
|
||||||
m_Mgr->Update();
|
m_Mgr->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::HideAllNotebooks(bool Window)
|
void CFrame::HideAllNotebooks(bool Window)
|
||||||
{
|
{
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||||
|
|
|
@ -905,6 +905,9 @@ void CFrame::DoStop()
|
||||||
// Clean framerate indications from the status bar.
|
// Clean framerate indications from the status bar.
|
||||||
m_pStatusBar->SetStatusText(wxT(" "), 0);
|
m_pStatusBar->SetStatusText(wxT(" "), 0);
|
||||||
|
|
||||||
|
// Clear wiimote connection status from the status bar.
|
||||||
|
m_pStatusBar->SetStatusText(wxT(" "), 1);
|
||||||
|
|
||||||
// If batch mode was specified on the command-line, exit now.
|
// If batch mode was specified on the command-line, exit now.
|
||||||
if (m_bBatchMode)
|
if (m_bBatchMode)
|
||||||
Close(true);
|
Close(true);
|
||||||
|
|
|
@ -482,22 +482,9 @@ CFrame* DolphinApp::GetCFrame()
|
||||||
}
|
}
|
||||||
|
|
||||||
void Host_Message(int Id)
|
void Host_Message(int Id)
|
||||||
{
|
|
||||||
|
|
||||||
switch(Id)
|
|
||||||
{
|
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
|
||||||
case WM_USER_STOP:
|
|
||||||
#endif
|
|
||||||
case WM_USER_CREATE:
|
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_HOST_COMMAND, Id);
|
wxCommandEvent event(wxEVT_HOST_COMMAND, Id);
|
||||||
main_frame->GetEventHandler()->AddPendingEvent(event);
|
main_frame->GetEventHandler()->AddPendingEvent(event);
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
main_frame->OnCustomHostMessage(Id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OK, this thread boundary is DANGEROUS on linux
|
// OK, this thread boundary is DANGEROUS on linux
|
||||||
|
|
|
@ -48,7 +48,6 @@ enum PLUGIN_COMM
|
||||||
// simulate something that looks like win32
|
// simulate something that looks like win32
|
||||||
// long term, kill these
|
// long term, kill these
|
||||||
#define HWND void*
|
#define HWND void*
|
||||||
#define HINSTANCE void*
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
@ -127,7 +126,7 @@ EXPORT void CALL DllConfig(HWND _hParent);
|
||||||
// input: a handle to the window that calls this function
|
// input: a handle to the window that calls this function
|
||||||
// output: none
|
// output: none
|
||||||
//
|
//
|
||||||
EXPORT void CALL DllDebugger(HWND _hParent, bool Show);
|
EXPORT void CALL DllDebugger(void *_hParent, bool Show);
|
||||||
|
|
||||||
// ___________________________________________________________________________
|
// ___________________________________________________________________________
|
||||||
// Function: DllSetGlobals
|
// Function: DllSetGlobals
|
||||||
|
|
|
@ -119,7 +119,7 @@ wxWindow* GetParentedWxWindow(HWND Parent)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void DllDebugger(HWND _hParent, bool Show)
|
void DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
void Host_NotifyMapLoaded() {}
|
void Host_NotifyMapLoaded() {}
|
||||||
void Host_UpdateBreakPointView() {}
|
void Host_UpdateBreakPointView() {}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxFrame)
|
BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxPanel)
|
||||||
EVT_CLOSE(DSPDebuggerLLE::OnClose)
|
EVT_CLOSE(DSPDebuggerLLE::OnClose)
|
||||||
EVT_MENU_RANGE(ID_RUNTOOL, ID_STEPTOOL, DSPDebuggerLLE::OnChangeState)
|
EVT_MENU_RANGE(ID_RUNTOOL, ID_STEPTOOL, DSPDebuggerLLE::OnChangeState)
|
||||||
EVT_MENU(ID_SHOWPCTOOL, DSPDebuggerLLE::OnShowPC)
|
EVT_MENU(ID_SHOWPCTOOL, DSPDebuggerLLE::OnShowPC)
|
||||||
|
@ -42,9 +42,8 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent)
|
DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent)
|
||||||
: wxFrame(parent, wxID_ANY, _("DSP LLE Debugger"),
|
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(700, 800),
|
||||||
wxDefaultPosition, wxSize(700, 800),
|
wxTAB_TRAVERSAL, _("Sound"))
|
||||||
wxDEFAULT_FRAME_STYLE)
|
|
||||||
, m_CachedStepCounter(-1)
|
, m_CachedStepCounter(-1)
|
||||||
{
|
{
|
||||||
// notify wxAUI which frame to use
|
// notify wxAUI which frame to use
|
||||||
|
|
|
@ -48,7 +48,7 @@ class DSPRegisterView;
|
||||||
class CCodeView;
|
class CCodeView;
|
||||||
class CMemoryView;
|
class CMemoryView;
|
||||||
|
|
||||||
class DSPDebuggerLLE : public wxFrame
|
class DSPDebuggerLLE : public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DSPDebuggerLLE(wxWindow *parent);
|
DSPDebuggerLLE(wxWindow *parent);
|
||||||
|
|
|
@ -201,16 +201,24 @@ void EmuStateChange(PLUGIN_EMUSTATE newState)
|
||||||
DSP_ClearAudioBuffer((newState == PLUGIN_EMUSTATE_PLAY) ? false : true);
|
DSP_ClearAudioBuffer((newState == PLUGIN_EMUSTATE_PLAY) ? false : true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DllDebugger(HWND _hParent, bool Show)
|
void DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (!m_DebuggerFrame)
|
|
||||||
m_DebuggerFrame = new DSPDebuggerLLE(GetParentedWxWindow(_hParent));
|
|
||||||
|
|
||||||
if (Show)
|
if (Show)
|
||||||
|
{
|
||||||
|
if (!m_DebuggerFrame)
|
||||||
|
m_DebuggerFrame = new DSPDebuggerLLE((wxWindow *)_hParent);
|
||||||
m_DebuggerFrame->Show();
|
m_DebuggerFrame->Show();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
m_DebuggerFrame->Hide();
|
{
|
||||||
|
if (m_DebuggerFrame)
|
||||||
|
{
|
||||||
|
m_DebuggerFrame->Close();
|
||||||
|
m_DebuggerFrame->Destroy();
|
||||||
|
m_DebuggerFrame = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ wxWindow* GetParentedWxWindow(HWND Parent)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DllDebugger(HWND _hParent, bool Show)
|
void DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
extern int g_Preset;
|
extern int g_Preset;
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(GFXDebuggerDX9,wxDialog)
|
BEGIN_EVENT_TABLE(GFXDebuggerDX9, wxPanel)
|
||||||
EVT_CLOSE(GFXDebuggerDX9::OnClose)
|
EVT_CLOSE(GFXDebuggerDX9::OnClose)
|
||||||
EVT_CHECKBOX(ID_SAVETOFILE,GFXDebuggerDX9::GeneralSettings)
|
EVT_CHECKBOX(ID_SAVETOFILE,GFXDebuggerDX9::GeneralSettings)
|
||||||
EVT_CHECKBOX(ID_INFOLOG,GFXDebuggerDX9::GeneralSettings)
|
EVT_CHECKBOX(ID_INFOLOG,GFXDebuggerDX9::GeneralSettings)
|
||||||
|
@ -51,9 +51,9 @@ BEGIN_EVENT_TABLE(GFXDebuggerDX9,wxDialog)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
GFXDebuggerDX9::GFXDebuggerDX9(wxWindow *parent, wxWindowID id, const wxString &title,
|
GFXDebuggerDX9::GFXDebuggerDX9(wxWindow *parent, wxWindowID id, const wxPoint &position,
|
||||||
const wxPoint &position, const wxSize& size, long style)
|
const wxSize& size, long style, const wxString &title)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxPanel(parent, id, position, size, style, title)
|
||||||
{
|
{
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
|
|
||||||
|
@ -167,7 +167,6 @@ void GFXDebuggerDX9::CreateGUIControls()
|
||||||
g_pdebugger = this;
|
g_pdebugger = this;
|
||||||
|
|
||||||
// Basic settings
|
// Basic settings
|
||||||
SetIcon(wxNullIcon);
|
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
// MainPanel
|
// MainPanel
|
||||||
|
|
|
@ -25,19 +25,15 @@
|
||||||
|
|
||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
class GFXDebuggerDX9 : public wxDialog
|
class GFXDebuggerDX9 : public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GFXDebuggerDX9(wxWindow *parent,
|
GFXDebuggerDX9(wxWindow *parent,
|
||||||
wxWindowID id = 1,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("Video"),
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
#ifdef _WIN32
|
long style = wxTAB_TRAVERSAL,
|
||||||
long style = wxNO_BORDER);
|
const wxString &title = wxT("Video"));
|
||||||
#else
|
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual ~GFXDebuggerDX9();
|
virtual ~GFXDebuggerDX9();
|
||||||
|
|
||||||
|
|
|
@ -97,16 +97,24 @@ wxWindow* GetParentedWxWindow(HWND Parent)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DllDebugger(HWND _hParent, bool Show)
|
void DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (!m_DebuggerFrame)
|
|
||||||
m_DebuggerFrame = new GFXDebuggerDX9(GetParentedWxWindow(_hParent));
|
|
||||||
|
|
||||||
if (Show)
|
if (Show)
|
||||||
|
{
|
||||||
|
if (!m_DebuggerFrame)
|
||||||
|
m_DebuggerFrame = new GFXDebuggerDX9((wxWindow *)_hParent);
|
||||||
m_DebuggerFrame->Show();
|
m_DebuggerFrame->Show();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
m_DebuggerFrame->Hide();
|
{
|
||||||
|
if (m_DebuggerFrame)
|
||||||
|
{
|
||||||
|
m_DebuggerFrame->Close();
|
||||||
|
m_DebuggerFrame->Destroy();
|
||||||
|
m_DebuggerFrame = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
extern int g_Preset;
|
extern int g_Preset;
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(GFXDebuggerOGL,wxDialog)
|
BEGIN_EVENT_TABLE(GFXDebuggerOGL,wxPanel)
|
||||||
EVT_CLOSE(GFXDebuggerOGL::OnClose)
|
EVT_CLOSE(GFXDebuggerOGL::OnClose)
|
||||||
EVT_CHECKBOX(ID_SAVETOFILE,GFXDebuggerOGL::GeneralSettings)
|
EVT_CHECKBOX(ID_SAVETOFILE,GFXDebuggerOGL::GeneralSettings)
|
||||||
EVT_CHECKBOX(ID_INFOLOG,GFXDebuggerOGL::GeneralSettings)
|
EVT_CHECKBOX(ID_INFOLOG,GFXDebuggerOGL::GeneralSettings)
|
||||||
|
@ -35,9 +35,9 @@ BEGIN_EVENT_TABLE(GFXDebuggerOGL,wxDialog)
|
||||||
EVT_CHECKBOX(ID_SAVESHADERS,GFXDebuggerOGL::GeneralSettings)
|
EVT_CHECKBOX(ID_SAVESHADERS,GFXDebuggerOGL::GeneralSettings)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
GFXDebuggerOGL::GFXDebuggerOGL(wxWindow *parent, wxWindowID id, const wxString &title,
|
GFXDebuggerOGL::GFXDebuggerOGL(wxWindow *parent, wxWindowID id, const wxPoint& pos,
|
||||||
const wxPoint &position, const wxSize& size, long style)
|
const wxSize& size, long style, const wxString &title)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxPanel(parent, id, pos, size, style, title)
|
||||||
{
|
{
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
|
|
||||||
|
@ -46,21 +46,14 @@ GFXDebuggerOGL::GFXDebuggerOGL(wxWindow *parent, wxWindowID id, const wxString &
|
||||||
|
|
||||||
GFXDebuggerOGL::~GFXDebuggerOGL()
|
GFXDebuggerOGL::~GFXDebuggerOGL()
|
||||||
{
|
{
|
||||||
SaveSettings();
|
|
||||||
m_DebuggerFrame = NULL;
|
|
||||||
NOTICE_LOG(CONSOLE, "Stop [Video Thread]: Closing OpenGL debugging window");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXDebuggerOGL::OnClose(wxCloseEvent& event)
|
void GFXDebuggerOGL::OnClose(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// This means wxDialog's Destroy is used
|
|
||||||
//event.Skip();
|
|
||||||
|
|
||||||
// Save the window position
|
// Save the window position
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
|
|
||||||
// Destroy
|
event.Skip();
|
||||||
delete this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXDebuggerOGL::SaveSettings() const
|
void GFXDebuggerOGL::SaveSettings() const
|
||||||
|
@ -122,29 +115,24 @@ void GFXDebuggerOGL::LoadSettings()
|
||||||
void GFXDebuggerOGL::CreateGUIControls()
|
void GFXDebuggerOGL::CreateGUIControls()
|
||||||
{
|
{
|
||||||
// Basic settings
|
// Basic settings
|
||||||
SetIcon(wxNullIcon);
|
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
// MainPanel
|
|
||||||
m_MainPanel = new wxPanel(this, ID_MAINPANEL, wxDefaultPosition, wxDefaultSize);
|
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
wxStaticBoxSizer *sOptions = new wxStaticBoxSizer(wxVERTICAL, m_MainPanel, wxT("Options"));
|
wxStaticBoxSizer *sOptions = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Options"));
|
||||||
m_Check[0] = new wxCheckBox(m_MainPanel, ID_SAVETOFILE, wxT("Save to file"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Check[0] = new wxCheckBox(this, ID_SAVETOFILE, wxT("Save to file"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Check[1] = new wxCheckBox(m_MainPanel, ID_INFOLOG, wxT("Info log"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Check[1] = new wxCheckBox(this, ID_INFOLOG, wxT("Info log"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Check[2] = new wxCheckBox(m_MainPanel, ID_PRIMLOG, wxT("Primary log"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Check[2] = new wxCheckBox(this, ID_PRIMLOG, wxT("Primary log"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Check[3] = new wxCheckBox(m_MainPanel, ID_SAVETEXTURES, wxT("Save Textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Check[3] = new wxCheckBox(this, ID_SAVETEXTURES, wxT("Save Textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Check[4] = new wxCheckBox(m_MainPanel, ID_SAVETARGETS, wxT("Save Targets"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Check[4] = new wxCheckBox(this, ID_SAVETARGETS, wxT("Save Targets"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Check[5] = new wxCheckBox(m_MainPanel, ID_SAVESHADERS, wxT("Save Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Check[5] = new wxCheckBox(this, ID_SAVESHADERS, wxT("Save Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
|
||||||
for (int i = 0; i < NUM_OPTIONS-ID_SAVETOFILE; ++i)
|
for (int i = 0; i < NUM_OPTIONS-ID_SAVETOFILE; ++i)
|
||||||
sOptions->Add(m_Check[i], 0, 0, 5);
|
sOptions->Add(m_Check[i], 0, 0, 5);
|
||||||
|
|
||||||
// Layout everything on m_MainPanel
|
// Layout everything
|
||||||
wxBoxSizer *sMain = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *sMain = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sMain->Add(sOptions);
|
sMain->Add(sOptions);
|
||||||
sMain->Add(100, 0); // Add some width so we can see the window title by default
|
SetSizerAndFit(sMain);
|
||||||
m_MainPanel->SetSizerAndFit(sMain);
|
|
||||||
Fit();
|
Fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,19 +25,15 @@
|
||||||
|
|
||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
class GFXDebuggerOGL : public wxDialog
|
class GFXDebuggerOGL : public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GFXDebuggerOGL(wxWindow *parent,
|
GFXDebuggerOGL(wxWindow *parent,
|
||||||
wxWindowID id = 1,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("Video"),
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
#ifdef _WIN32
|
long style = wxTAB_TRAVERSAL,
|
||||||
long style = wxNO_BORDER);
|
const wxString &title = wxT("Video"));
|
||||||
#else
|
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual ~GFXDebuggerOGL();
|
virtual ~GFXDebuggerOGL();
|
||||||
|
|
||||||
|
@ -53,8 +49,6 @@ public:
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE();
|
DECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
wxPanel* m_MainPanel;
|
|
||||||
|
|
||||||
wxCheckBox* m_Check[6];
|
wxCheckBox* m_Check[6];
|
||||||
|
|
||||||
// WARNING: Make sure these are not also elsewhere
|
// WARNING: Make sure these are not also elsewhere
|
||||||
|
|
|
@ -24,12 +24,6 @@
|
||||||
#include "VideoCommon.h"
|
#include "VideoCommon.h"
|
||||||
#include "pluginspecs_video.h"
|
#include "pluginspecs_video.h"
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
#include "Debugger/Debugger.h"
|
|
||||||
class GFXDebuggerOGL;
|
|
||||||
extern GFXDebuggerOGL *m_DebuggerFrame;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// A global plugin specification
|
// A global plugin specification
|
||||||
extern PLUGIN_GLOBALS* globals;
|
extern PLUGIN_GLOBALS* globals;
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ Make AA apply instantly during gameplay if possible
|
||||||
#include "GUI/ConfigDlg.h"
|
#include "GUI/ConfigDlg.h"
|
||||||
GFXConfigDialogOGL *m_ConfigFrame = NULL;
|
GFXConfigDialogOGL *m_ConfigFrame = NULL;
|
||||||
#include "Debugger/Debugger.h"
|
#include "Debugger/Debugger.h"
|
||||||
GFXDebuggerOGL *m_DebuggerFrame = NULL;
|
static GFXDebuggerOGL *m_DebuggerFrame = NULL;
|
||||||
#endif // HAVE_WX
|
#endif // HAVE_WX
|
||||||
|
|
||||||
#include "VideoConfig.h"
|
#include "VideoConfig.h"
|
||||||
|
@ -152,15 +152,23 @@ wxWindow* GetParentedWxWindow(HWND Parent)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DllDebugger(HWND _hParent, bool Show)
|
void DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (Show) {
|
if (Show)
|
||||||
|
{
|
||||||
if (!m_DebuggerFrame)
|
if (!m_DebuggerFrame)
|
||||||
m_DebuggerFrame = new GFXDebuggerOGL(NULL);
|
m_DebuggerFrame = new GFXDebuggerOGL((wxWindow *)_hParent);
|
||||||
m_DebuggerFrame->Show();
|
m_DebuggerFrame->Show();
|
||||||
} else {
|
}
|
||||||
if (m_DebuggerFrame) m_DebuggerFrame->Hide();
|
else
|
||||||
|
{
|
||||||
|
if (m_DebuggerFrame)
|
||||||
|
{
|
||||||
|
m_DebuggerFrame->Close();
|
||||||
|
m_DebuggerFrame->Destroy();
|
||||||
|
m_DebuggerFrame = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DllDebugger(HWND _hParent, bool Show)
|
void DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DllDebugger(HWND _hParent, bool Show) {}
|
void DllDebugger(void *_hParent, bool Show) {}
|
||||||
|
|
||||||
void DllConfig(HWND _hParent)
|
void DllConfig(HWND _hParent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,7 +62,9 @@ struct SRecordingAll
|
||||||
extern u32 g_ISOId;
|
extern u32 g_ISOId;
|
||||||
extern bool g_SearchDeviceDone;
|
extern bool g_SearchDeviceDone;
|
||||||
extern bool g_RealWiiMotePresent;
|
extern bool g_RealWiiMotePresent;
|
||||||
|
#ifdef _WIN32
|
||||||
extern HINSTANCE g_hInstance;
|
extern HINSTANCE g_hInstance;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Debugging
|
// Debugging
|
||||||
extern bool g_DebugAccelerometer;
|
extern bool g_DebugAccelerometer;
|
||||||
|
|
|
@ -48,10 +48,10 @@ class wxDLLApp : public wxApp
|
||||||
};
|
};
|
||||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||||
#endif
|
|
||||||
|
|
||||||
// copied from GCPad
|
// copied from GCPad
|
||||||
HINSTANCE g_hInstance;
|
HINSTANCE g_hInstance;
|
||||||
|
#endif
|
||||||
|
|
||||||
// copied from GCPad
|
// copied from GCPad
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
|
@ -320,7 +320,7 @@ void DllConfig(HWND _hParent)
|
||||||
// input: a handle to the window that calls this function
|
// input: a handle to the window that calls this function
|
||||||
// output: none
|
// output: none
|
||||||
//
|
//
|
||||||
void DllDebugger(HWND _hParent, bool Show)
|
void DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
// wut?
|
// wut?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue