GUI: Linux problem, wxAuiNotebook can't have wxFrame pages
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4133 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a1dc78d5a8
commit
d50b4c2ffc
|
@ -34,7 +34,11 @@ class CBreakPointWindow
|
||||||
|
|
||||||
CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id = 1, const wxString& title = wxT("Breakpoints"),
|
CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id = 1, const wxString& title = wxT("Breakpoints"),
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400, 250),
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400, 250),
|
||||||
|
#ifdef _WIN32
|
||||||
long style = wxNO_BORDER);
|
long style = wxNO_BORDER);
|
||||||
|
#else
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual ~CBreakPointWindow();
|
virtual ~CBreakPointWindow();
|
||||||
|
|
||||||
|
|
|
@ -149,13 +149,11 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Class, input event handler and host message handler
|
// Class
|
||||||
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, CFrame *ParentObject, wxWindow* Parent,
|
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, CFrame *ParentObject, wxWindow* parent,
|
||||||
wxWindowID Id)
|
wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name)
|
||||||
: wxPanel(Parent, Id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxNO_BORDER, wxT("Dolphin-Debugger"))
|
: wxPanel(parent, id, position, size, style, name)
|
||||||
, Parent(ParentObject)
|
, Parent(ParentObject)
|
||||||
/* Remember to initialize potential new controls with NULL there, otherwise m_dialog = true and
|
|
||||||
things may crash */
|
|
||||||
, m_RegisterWindow(NULL)
|
, m_RegisterWindow(NULL)
|
||||||
, m_BreakpointWindow(NULL)
|
, m_BreakpointWindow(NULL)
|
||||||
, m_MemoryWindow(NULL)
|
, m_MemoryWindow(NULL)
|
||||||
|
|
|
@ -44,8 +44,14 @@ class CCodeWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, CFrame *, wxWindow* parent,
|
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, CFrame *,
|
||||||
wxWindowID id = wxID_ANY);
|
wxWindow* parent,
|
||||||
|
wxWindowID id = wxID_ANY,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||||
|
const wxString& name = wxT("Dolphin-Debugger")
|
||||||
|
);
|
||||||
/*
|
/*
|
||||||
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, wxWindow* parent,
|
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, wxWindow* parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
|
|
|
@ -365,10 +365,18 @@ void CCodeWindow::OnToggleBreakPointWindow(bool Show, int i)
|
||||||
if (Show)
|
if (Show)
|
||||||
{
|
{
|
||||||
if (!m_BreakpointWindow) m_BreakpointWindow = new CBreakPointWindow(this, Parent);
|
if (!m_BreakpointWindow) m_BreakpointWindow = new CBreakPointWindow(this, Parent);
|
||||||
|
#ifdef _WIN32
|
||||||
Parent->DoAddPage(m_BreakpointWindow, i, "Breakpoints");
|
Parent->DoAddPage(m_BreakpointWindow, i, "Breakpoints");
|
||||||
|
#else
|
||||||
|
m_BreakpointWindow->Show();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
|
#ifdef _WIN32
|
||||||
Parent->DoRemovePage(m_BreakpointWindow);
|
Parent->DoRemovePage(m_BreakpointWindow);
|
||||||
|
#else
|
||||||
|
if (m_BreakpointWindow) m_BreakpointWindow->Hide();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCodeWindow::OnToggleJitWindow(bool Show, int i)
|
void CCodeWindow::OnToggleJitWindow(bool Show, int i)
|
||||||
|
@ -376,10 +384,18 @@ void CCodeWindow::OnToggleJitWindow(bool Show, int i)
|
||||||
if (Show)
|
if (Show)
|
||||||
{
|
{
|
||||||
if (!m_JitWindow) m_JitWindow = new CJitWindow(Parent);
|
if (!m_JitWindow) m_JitWindow = new CJitWindow(Parent);
|
||||||
|
#ifdef _WIN32
|
||||||
Parent->DoAddPage(m_JitWindow, i, "JIT");
|
Parent->DoAddPage(m_JitWindow, i, "JIT");
|
||||||
|
#else
|
||||||
|
m_JitWindow->Show();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
|
#ifdef _WIN32
|
||||||
Parent->DoRemovePage(m_JitWindow);
|
Parent->DoRemovePage(m_JitWindow);
|
||||||
|
#else
|
||||||
|
if (m_JitWindow) m_JitWindow->Hide();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -388,10 +404,18 @@ void CCodeWindow::OnToggleMemoryWindow(bool Show, int i)
|
||||||
if (Show)
|
if (Show)
|
||||||
{
|
{
|
||||||
if (!m_MemoryWindow) m_MemoryWindow = new CMemoryWindow(Parent);
|
if (!m_MemoryWindow) m_MemoryWindow = new CMemoryWindow(Parent);
|
||||||
|
#ifdef _WIN32
|
||||||
Parent->DoAddPage(m_MemoryWindow, i, "Memory");
|
Parent->DoAddPage(m_MemoryWindow, i, "Memory");
|
||||||
|
#else
|
||||||
|
m_MemoryWindow->Show();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
|
#ifdef _WIN32
|
||||||
Parent->DoRemovePage(m_MemoryWindow);
|
Parent->DoRemovePage(m_MemoryWindow);
|
||||||
|
#else
|
||||||
|
if (m_MemoryWindow) m_MemoryWindow->Hide();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//Toggle Sound Debugging Window
|
//Toggle Sound Debugging Window
|
||||||
|
|
|
@ -49,7 +49,11 @@ public:
|
||||||
const wxString& title = _T("JIT block viewer"),
|
const wxString& title = _T("JIT block viewer"),
|
||||||
const wxPoint& pos = wxPoint(950, 100),
|
const wxPoint& pos = wxPoint(950, 100),
|
||||||
const wxSize& size = wxSize(400, 500),
|
const wxSize& size = wxSize(400, 500),
|
||||||
|
#ifdef _WIN32
|
||||||
long style = wxNO_BORDER);
|
long style = wxNO_BORDER);
|
||||||
|
#else
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||||
|
#endif
|
||||||
|
|
||||||
~CJitWindow();
|
~CJitWindow();
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,11 @@ class CMemoryWindow
|
||||||
const wxString& title = _T("Dolphin-Memory"),
|
const wxString& title = _T("Dolphin-Memory"),
|
||||||
const wxPoint& pos = wxPoint(950, 100),
|
const wxPoint& pos = wxPoint(950, 100),
|
||||||
const wxSize& size = wxSize(400, 500),
|
const wxSize& size = wxSize(400, 500),
|
||||||
|
#ifdef _WIN32
|
||||||
long style = wxNO_BORDER);
|
long style = wxNO_BORDER);
|
||||||
|
#else
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||||
|
#endif
|
||||||
|
|
||||||
~CMemoryWindow();
|
~CMemoryWindow();
|
||||||
|
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
|
|
||||||
extern const char* GetGRPName(unsigned int index);
|
extern const char* GetGRPName(unsigned int index);
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(CRegisterWindow, wxDialog)
|
BEGIN_EVENT_TABLE(CRegisterWindow, wxPanel)
|
||||||
EVT_CLOSE(CRegisterWindow::OnClose)
|
EVT_CLOSE(CRegisterWindow::OnClose)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxPanel(parent, id, position, size, style, title)
|
||||||
, m_GPRGridView(NULL)
|
, m_GPRGridView(NULL)
|
||||||
{
|
{
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
|
|
|
@ -22,14 +22,16 @@ class CRegisterView;
|
||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
class CRegisterWindow
|
class CRegisterWindow
|
||||||
: public wxDialog
|
: public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CRegisterWindow(wxWindow* parent, wxWindowID id = 1,
|
CRegisterWindow(wxWindow* parent,
|
||||||
const wxString& title = wxT("Registers"),
|
wxWindowID id = wxID_ANY,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxString& name = wxT("Registers"),
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
long style = wxNO_BORDER);
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER
|
||||||
|
);
|
||||||
|
|
||||||
virtual ~CRegisterWindow();
|
virtual ~CRegisterWindow();
|
||||||
|
|
||||||
|
|
|
@ -336,10 +336,6 @@ CFrame::CFrame(bool showLogWindow,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifndef _WIN32
|
|
||||||
m_bLogWindow = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Give it a console
|
// Give it a console
|
||||||
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
||||||
if (SConfig::GetInstance().m_InterfaceConsole) Console->Open();
|
if (SConfig::GetInstance().m_InterfaceConsole) Console->Open();
|
||||||
|
@ -558,6 +554,8 @@ void CFrame::OnClose(wxCloseEvent& event)
|
||||||
// Save GUI settings
|
// Save GUI settings
|
||||||
if (UseDebugger) g_pCodeWindow->Save();
|
if (UseDebugger) g_pCodeWindow->Save();
|
||||||
if (UseDebugger) Save();
|
if (UseDebugger) Save();
|
||||||
|
// Uninit
|
||||||
|
m_Mgr->UnInit();
|
||||||
|
|
||||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||||
{
|
{
|
||||||
|
|
|
@ -200,9 +200,6 @@ void CFrame::CreateMenu()
|
||||||
viewMenu->Check(IDM_TOGGLE_STATUSBAR, SConfig::GetInstance().m_InterfaceStatusbar);
|
viewMenu->Check(IDM_TOGGLE_STATUSBAR, SConfig::GetInstance().m_InterfaceStatusbar);
|
||||||
viewMenu->AppendCheckItem(IDM_LOGWINDOW, _T("Show &Logwindow"));
|
viewMenu->AppendCheckItem(IDM_LOGWINDOW, _T("Show &Logwindow"));
|
||||||
viewMenu->Check(IDM_LOGWINDOW, m_bLogWindow);
|
viewMenu->Check(IDM_LOGWINDOW, m_bLogWindow);
|
||||||
#ifndef _WIN32
|
|
||||||
viewMenu->Enable(IDM_LOGWINDOW, false);
|
|
||||||
#endif
|
|
||||||
viewMenu->AppendCheckItem(IDM_CONSOLEWINDOW, _T("Show &Console"));
|
viewMenu->AppendCheckItem(IDM_CONSOLEWINDOW, _T("Show &Console"));
|
||||||
viewMenu->Check(IDM_CONSOLEWINDOW, SConfig::GetInstance().m_InterfaceConsole);
|
viewMenu->Check(IDM_CONSOLEWINDOW, SConfig::GetInstance().m_InterfaceConsole);
|
||||||
viewMenu->AppendSeparator();
|
viewMenu->AppendSeparator();
|
||||||
|
@ -319,22 +316,6 @@ void CFrame::RecreateToolbar()
|
||||||
ToolbarPane().Top().
|
ToolbarPane().Top().
|
||||||
LeftDockable(false).RightDockable(false).Floatable(false));
|
LeftDockable(false).RightDockable(false).Floatable(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
//UpdateGUI();
|
|
||||||
|
|
||||||
/*
|
|
||||||
wxToolBarBase* ToolBar = GetToolBar();
|
|
||||||
long style = ToolBar ? ToolBar->GetWindowStyle() : wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
|
||||||
delete ToolBar;
|
|
||||||
SetToolBar(NULL);
|
|
||||||
|
|
||||||
style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT | wxTB_TOP);
|
|
||||||
m_ToolBar = CreateToolBar(style, ID_TOOLBAR);
|
|
||||||
|
|
||||||
PopulateToolbar(m_ToolBar);
|
|
||||||
SetToolBar(m_ToolBar);
|
|
||||||
UpdateGUI();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::InitBitmaps()
|
void CFrame::InitBitmaps()
|
||||||
|
@ -1225,7 +1206,7 @@ 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.
|
// 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.
|
// It should be true just after the menu item was selected, if there was no modeless dialog yet.
|
||||||
wxASSERT(Win != NULL);
|
//wxASSERT(Win != NULL);
|
||||||
|
|
||||||
if (Win)
|
if (Win)
|
||||||
{
|
{
|
||||||
|
@ -1282,11 +1263,19 @@ void CFrame::ToggleLogWindow(bool Show, int i)
|
||||||
if (Show)
|
if (Show)
|
||||||
{
|
{
|
||||||
if (!m_LogWindow) m_LogWindow = new CLogWindow(this);
|
if (!m_LogWindow) m_LogWindow = new CLogWindow(this);
|
||||||
|
#ifdef _WIN32
|
||||||
DoAddPage(m_LogWindow, i, "Log");
|
DoAddPage(m_LogWindow, i, "Log");
|
||||||
|
#else
|
||||||
|
m_LogWindow->Show();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
DoRemovePage(m_LogWindow);
|
DoRemovePage(m_LogWindow);
|
||||||
|
#else
|
||||||
|
if (m_LogWindow) m_LogWindow->Show();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide pane
|
// Hide pane
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "LogWindow.h"
|
#include "LogWindow.h"
|
||||||
#include "Console.h"
|
#include "Console.h"
|
||||||
|
|
||||||
// milliseconds between msgQueue flushes to wxTextCtrl
|
// Milliseconds between msgQueue flushes to wxTextCtrl
|
||||||
#define UPDATETIME 200
|
#define UPDATETIME 200
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(CLogWindow, wxDialog)
|
BEGIN_EVENT_TABLE(CLogWindow, wxDialog)
|
||||||
|
@ -42,10 +42,8 @@ BEGIN_EVENT_TABLE(CLogWindow, wxDialog)
|
||||||
EVT_TIMER(IDTM_UPDATELOG, CLogWindow::OnLogTimer)
|
EVT_TIMER(IDTM_UPDATELOG, CLogWindow::OnLogTimer)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CLogWindow::CLogWindow(wxWindow* parent)
|
CLogWindow::CLogWindow(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, wxID_ANY, wxT("Log"),
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
wxPoint(100, 700), wxSize(800, 270),
|
|
||||||
wxNO_BORDER)
|
|
||||||
, m_logSection(1)
|
, m_logSection(1)
|
||||||
{
|
{
|
||||||
m_logManager = LogManager::GetInstance();
|
m_logManager = LogManager::GetInstance();
|
||||||
|
|
|
@ -46,7 +46,16 @@ class wxString;
|
||||||
class CLogWindow : public wxDialog, LogListener
|
class CLogWindow : public wxDialog, LogListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CLogWindow(wxWindow* parent);
|
CLogWindow(wxWindow* parent,
|
||||||
|
wxWindowID id = wxID_ANY,
|
||||||
|
const wxString& title = wxT("Log"),
|
||||||
|
const wxPoint& pos = wxPoint(100, 700),
|
||||||
|
const wxSize& size = wxSize(800, 270),
|
||||||
|
#ifdef _WIN32
|
||||||
|
long style = wxNO_BORDER);
|
||||||
|
#else
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||||
|
#endif
|
||||||
~CLogWindow();
|
~CLogWindow();
|
||||||
void NotifyUpdate();
|
void NotifyUpdate();
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,11 @@ class DSPDebuggerHLE : public wxDialog
|
||||||
const wxString &title = wxT("Sound"),
|
const wxString &title = wxT("Sound"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
|
#ifdef _WIN32
|
||||||
long style = wxNO_BORDER);
|
long style = wxNO_BORDER);
|
||||||
|
#else
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual ~DSPDebuggerHLE();
|
virtual ~DSPDebuggerHLE();
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,11 @@ public:
|
||||||
const wxString &title = wxT("Video"),
|
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 = wxNO_BORDER);
|
long style = wxNO_BORDER);
|
||||||
|
#else
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual ~GFXDebuggerOGL();
|
virtual ~GFXDebuggerOGL();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue