GUI make logwindow into a panel TODO: figure out how to make it
floatable git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4228 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5a99432f1b
commit
a9c9e9fa46
|
@ -975,7 +975,7 @@ void CFrame::ListTopWindows()
|
|||
for (i = wxTopLevelWindows.begin(); i != end; ++i)
|
||||
{
|
||||
wxTopLevelWindow * const Win = wx_static_cast(wxTopLevelWindow *, *i);
|
||||
NOTICE_LOG(CONSOLE, "%i: %i %s", j, Win, Win->GetTitle().mb_str());
|
||||
NOTICE_LOG(CONSOLE, "%i: %i %s", j, Win, (const char *)Win->GetTitle().mb_str());
|
||||
/*
|
||||
if ( win->ShouldPreventAppExit() )
|
||||
{
|
||||
|
@ -986,4 +986,4 @@ void CFrame::ListTopWindows()
|
|||
j++;
|
||||
}
|
||||
NOTICE_LOG(CONSOLE, "\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,19 +104,11 @@ void CFrame::ToggleLogWindow(bool bShow, int i)
|
|||
if (bShow)
|
||||
{
|
||||
if (!m_LogWindow) m_LogWindow = new CLogWindow(this, IDM_LOGWINDOW);
|
||||
#ifdef _WIN32
|
||||
DoAddPage(m_LogWindow, i, wxT("Log"), bFloatLogWindow);
|
||||
#else
|
||||
m_LogWindow->Show();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _WIN32
|
||||
DoRemovePage(m_LogWindow);
|
||||
#else
|
||||
if (m_LogWindow) m_LogWindow->Show();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Hide pane
|
||||
|
@ -1296,4 +1288,4 @@ void CFrame::HideAllNotebooks(bool Window)
|
|||
}
|
||||
m_Mgr->Update();
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
// Milliseconds between msgQueue flushes to wxTextCtrl
|
||||
#define UPDATETIME 200
|
||||
|
||||
BEGIN_EVENT_TABLE(CLogWindow, wxDialog)
|
||||
BEGIN_EVENT_TABLE(CLogWindow, wxPanel)
|
||||
EVT_CLOSE(CLogWindow::OnClose)
|
||||
EVT_TEXT_ENTER(IDM_SUBMITCMD, CLogWindow::OnSubmit)
|
||||
EVT_BUTTON(IDM_CLEARLOG, CLogWindow::OnClear)
|
||||
|
@ -45,7 +45,7 @@ BEGIN_EVENT_TABLE(CLogWindow, wxDialog)
|
|||
END_EVENT_TABLE()
|
||||
|
||||
CLogWindow::CLogWindow(CFrame *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)
|
||||
, Parent(parent), m_LogSection(1), m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
|
||||
, m_LogAccess(true)
|
||||
{
|
||||
|
@ -80,9 +80,9 @@ void CLogWindow::CreateGUIControls()
|
|||
m_FontChoice->Append(wxT("Monospaced font"));
|
||||
m_FontChoice->Append(wxT("Selected font"));
|
||||
m_FontChoice->SetSelection(0);
|
||||
wxTextCtrl *Tmp = CreateTextCtrl(this);
|
||||
DefaultFont = Tmp->GetFont();
|
||||
Tmp->Destroy();
|
||||
// wxTextCtrl *Tmp = CreateTextCtrl(this);
|
||||
// DefaultFont = Tmp->GetFont();
|
||||
// Tmp->Destroy();
|
||||
MonoSpaceFont.SetNativeFontInfoUserDesc(wxString::FromAscii("lucida console windows-1252"));
|
||||
Font.push_back(DefaultFont);
|
||||
Font.push_back(MonoSpaceFont);
|
||||
|
@ -132,7 +132,7 @@ void CLogWindow::CreateGUIControls()
|
|||
this->SetSizer(sUber);
|
||||
|
||||
// Settings
|
||||
SetAffirmativeId(IDM_SUBMITCMD);
|
||||
// SetAffirmativeId(IDM_SUBMITCMD);
|
||||
UpdateChecks();
|
||||
m_cmdline->SetFocus();
|
||||
|
||||
|
@ -302,7 +302,7 @@ void CLogWindow::PopulateRight()
|
|||
this->Layout();
|
||||
}
|
||||
|
||||
wxTextCtrl* CLogWindow::CreateTextCtrl(wxDialog* parent, wxWindowID id, long Style)
|
||||
wxTextCtrl* CLogWindow::CreateTextCtrl(wxPanel* parent, wxWindowID id, long Style)
|
||||
{
|
||||
wxTextCtrl* TC = new wxTextCtrl(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, Style);
|
||||
TC->SetBackgroundColour(*wxBLACK);
|
||||
|
|
|
@ -49,7 +49,7 @@ class wxString;
|
|||
class CFrame;
|
||||
|
||||
// Uses multiple inheritance - only sane because LogListener is a pure virtual interface.
|
||||
class CLogWindow : public wxDialog, LogListener
|
||||
class CLogWindow : public wxPanel, LogListener
|
||||
{
|
||||
public:
|
||||
CLogWindow(CFrame *parent,
|
||||
|
@ -57,11 +57,7 @@ public:
|
|||
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();
|
||||
void NotifyUpdate();
|
||||
|
||||
|
@ -92,7 +88,7 @@ private:
|
|||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
wxTextCtrl * CreateTextCtrl(wxDialog* parent, wxWindowID id = wxID_ANY, long Style = NULL);
|
||||
wxTextCtrl * CreateTextCtrl(wxPanel* parent, wxWindowID id = wxID_ANY, long Style = NULL);
|
||||
void CreateGUIControls();
|
||||
void PopulateRight(); void UnPopulateRight();
|
||||
void OnClose(wxCloseEvent& event);
|
||||
|
|
Loading…
Reference in New Issue