Merge pull request #96 from lioncash/remove-console-correctly

Remove console correctly
This commit is contained in:
Matthew Parlane 2014-03-08 15:54:06 +13:00
commit 886060aaf7
15 changed files with 14 additions and 311 deletions

View File

@ -2,7 +2,6 @@ set(SRCS ActionReplay.cpp
ARDecrypt.cpp
BootManager.cpp
ConfigManager.cpp
Console.cpp
Core.cpp
CoreParameter.cpp
CoreTiming.cpp

View File

@ -184,7 +184,6 @@ void SConfig::SaveSettings()
ini.Set("Interface", "ShowStatusbar", m_InterfaceStatusbar);
ini.Set("Interface", "ShowLogWindow", m_InterfaceLogWindow);
ini.Set("Interface", "ShowLogConfigWindow", m_InterfaceLogConfigWindow);
ini.Set("Interface", "ShowConsole", m_InterfaceConsole);
ini.Set("Interface", "ThemeName40", m_LocalCoreStartupParameter.theme_name);
// Hotkeys
@ -332,7 +331,6 @@ void SConfig::LoadSettings()
ini.Get("Interface", "ShowStatusbar", &m_InterfaceStatusbar, true);
ini.Get("Interface", "ShowLogWindow", &m_InterfaceLogWindow, false);
ini.Get("Interface", "ShowLogConfigWindow", &m_InterfaceLogConfigWindow, false);
ini.Get("Interface", "ShowConsole", &m_InterfaceConsole, false);
ini.Get("Interface", "ThemeName40", &m_LocalCoreStartupParameter.theme_name, "Clean");
// Hotkeys

View File

@ -55,7 +55,6 @@ struct SConfig : NonCopyable
bool m_InterfaceStatusbar;
bool m_InterfaceLogWindow;
bool m_InterfaceLogConfigWindow;
bool m_InterfaceConsole;
bool m_ListDrives;
bool m_ListWad;

View File

@ -1,146 +0,0 @@
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <cstring>
#include <iostream>
#include <PowerPCDisasm.h> // Bochs
#include "Common/Common.h"
#include "Common/Thread.h"
#include "Core/Console.h"
#include "Core/Core.h"
#include "Core/CoreTiming.h"
#include "Core/HW/Memmap.h"
#include "Core/PowerPC/PPCAnalyst.h"
#include "Core/PowerPC/PPCSymbolDB.h"
#include "Core/PowerPC/PPCTables.h"
#include "Core/PowerPC/JitCommon/JitBase.h"
#define CASE1(x) if (!strcmp(cmd, (x)))
#define CASE(x) else if (!strcmp(cmd, (x)))
void Console_Submit(const char *cmd)
{
CASE1("r")
{
Core::StartTrace(false);
INFO_LOG(CONSOLE, "Read tracing started.");
}
CASE("w")
{
Core::StartTrace(true);
INFO_LOG(CONSOLE, "Write tracing started.");
}
CASE("trans")
{
TCHAR temp[256];
u32 addr;
sscanf(cmd, "%s %08x", temp, &addr);
if (addr)
{
#if MAX_LOGLEVEL >= INFO_LEVEL
u32 EA =
Memory::TranslateAddress(addr, Memory::FLAG_NO_EXCEPTION);
INFO_LOG(CONSOLE, "EA 0x%08x to 0x%08x", addr, EA);
#endif
}
else
{
DEBUG_LOG(CONSOLE, "Syntax: trans ADDR");
}
}
CASE("call")
{
TCHAR temp[256];
u32 addr;
sscanf(cmd, "%s %08x", temp, &addr);
if (addr)
{
g_symbolDB.PrintCalls(addr);
}
else
{
DEBUG_LOG(CONSOLE, "Syntax: call ADDR");
}
}
CASE("llac")
{
TCHAR temp[256];
u32 addr;
sscanf(cmd, "%s %08x", temp, &addr);
if (addr)
{
g_symbolDB.PrintCallers(addr);
}
else
{
DEBUG_LOG(CONSOLE, "Syntax: llac ADDR");
}
}
CASE("pend")
{
CoreTiming::LogPendingEvents();
}
CASE("dump")
{
char temp[256];
char filename[256];
u32 start;
u32 end;
sscanf(cmd, "%s %08x %08x %s", temp, &start, &end, filename);
File::IOFile f(filename, "wb");
for (u32 i = start; i < end; i++)
{
u8 b = Memory::ReadUnchecked_U8(i);
fputc(b, f.GetHandle());
}
INFO_LOG(CONSOLE, "Dumped from %08x to %08x to %s",start,end,filename);
}
CASE("disa")
{
u32 start;
u32 end;
TCHAR temp[256];
sscanf(cmd, "%s %08x %08x", temp, &start, &end);
char disasm[256];
for (u32 addr = start; addr <= end; addr += 4)
{
u32 data = Memory::ReadUnchecked_U32(addr);
DisassembleGekko(data, addr, disasm, 256);
DEBUG_LOG(CONSOLE, "%08x: %08x: %s\n", addr, data, disasm);
}
}
CASE("help")
{
ERROR_LOG(CONSOLE, "Dolphin Console Command List");
ERROR_LOG(CONSOLE, "scan ADDR - will find functions that are called by this function");
ERROR_LOG(CONSOLE, "call ADDR - will find functions that call this function");
ERROR_LOG(CONSOLE, "dump START_A END_A FILENAME - will dump memory between START_A and END_A");
ERROR_LOG(CONSOLE, "help - guess what this does :P");
ERROR_LOG(CONSOLE, "lisd - list signature database");
ERROR_LOG(CONSOLE, "lisf - list functions");
ERROR_LOG(CONSOLE, "trans ADDR - translate address");
}
CASE("lisd")
{
// PPCAnalyst::ListDB();
}
CASE("ipro")
{
PPCTables::PrintInstructionRunCounts();
}
CASE("lisf")
{
g_symbolDB.List();
}
else
{
ERROR_LOG(CONSOLE, "Invalid command");
}
}
#undef CASE1
#undef CASE

View File

@ -1,10 +0,0 @@
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
// Simple debugging console currently residing in the Logging window. Not used much.
#pragma once
void Console_Submit(const char *cmd);

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@ -53,7 +53,6 @@
<ClCompile Include="Boot\Boot_WiiWAD.cpp" />
<ClCompile Include="Boot\ElfReader.cpp" />
<ClCompile Include="ConfigManager.cpp" />
<ClCompile Include="Console.cpp" />
<ClCompile Include="Core.cpp" />
<ClCompile Include="CoreParameter.cpp" />
<ClCompile Include="CoreTiming.cpp" />
@ -258,7 +257,6 @@
<ClInclude Include="Boot\ElfReader.h" />
<ClInclude Include="Boot\ElfTypes.h" />
<ClInclude Include="ConfigManager.h" />
<ClInclude Include="Console.h" />
<ClInclude Include="Core.h" />
<ClInclude Include="CoreParameter.h" />
<ClInclude Include="CoreTiming.h" />
@ -474,4 +472,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="ActionReplay">
@ -137,7 +137,6 @@
<ItemGroup>
<ClCompile Include="BootManager.cpp" />
<ClCompile Include="ConfigManager.cpp" />
<ClCompile Include="Console.cpp" />
<ClCompile Include="Core.cpp" />
<ClCompile Include="CoreParameter.cpp" />
<ClCompile Include="CoreTiming.cpp" />
@ -710,7 +709,6 @@
<ItemGroup>
<ClInclude Include="BootManager.h" />
<ClInclude Include="ConfigManager.h" />
<ClInclude Include="Console.h" />
<ClInclude Include="Core.h" />
<ClInclude Include="CoreParameter.h" />
<ClInclude Include="CoreTiming.h" />
@ -1219,4 +1217,4 @@
<ItemGroup>
<Text Include="CMakeLists.txt" />
</ItemGroup>
</Project>
</Project>

View File

@ -418,8 +418,6 @@ void CCodeWindow::OpenPages()
Parent->ToggleLogWindow(true);
if (bShowOnStart[IDM_LOGCONFIGWINDOW - IDM_LOGWINDOW])
Parent->ToggleLogConfigWindow(true);
if (bShowOnStart[IDM_CONSOLEWINDOW - IDM_LOGWINDOW])
Parent->ToggleConsole(true);
if (bShowOnStart[IDM_REGISTERWINDOW - IDM_LOGWINDOW])
ToggleRegisterWindow(true);
if (bShowOnStart[IDM_BREAKPOINTWINDOW - IDM_LOGWINDOW])

View File

@ -310,14 +310,13 @@ CFrame::CFrame(wxFrame* parent,
for (int i = 0; i <= IDM_CODEWINDOW - IDM_LOGWINDOW; i++)
bFloatWindow[i] = false;
if (ShowLogWindow) SConfig::GetInstance().m_InterfaceLogWindow = true;
// Give it a console early to show potential messages from this onward
ConsoleListener *Console = LogManager::GetInstance()->GetConsoleListener();
if (SConfig::GetInstance().m_InterfaceConsole) Console->Open();
if (ShowLogWindow)
SConfig::GetInstance().m_InterfaceLogWindow = true;
// Start debugging maximized
if (UseDebugger) this->Maximize(true);
if (UseDebugger)
this->Maximize(true);
// Debugger class
if (UseDebugger)
{
@ -392,8 +391,6 @@ CFrame::CFrame(wxFrame* parent,
ToggleLogWindow(true);
if (SConfig::GetInstance().m_InterfaceLogConfigWindow)
ToggleLogConfigWindow(true);
if (SConfig::GetInstance().m_InterfaceConsole)
ToggleConsole(true);
}
// Show window
@ -681,7 +678,6 @@ void CFrame::OnRenderWindowSizeRequest(int width, int height)
// Add space for the log/console/debugger window
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
(SConfig::GetInstance().m_InterfaceLogWindow ||
SConfig::GetInstance().m_InterfaceConsole ||
SConfig::GetInstance().m_InterfaceLogConfigWindow) &&
!m_Mgr->GetPane(wxT("Pane 1")).IsFloating())
{

View File

@ -127,7 +127,6 @@ public:
void UpdateGameList();
void ToggleLogWindow(bool bShow);
void ToggleLogConfigWindow(bool bShow);
void ToggleConsole(bool bShow);
void PostEvent(wxCommandEvent& event);
void StatusBarMessage(const char * Text, ...);
void ClearStatusBar();
@ -238,7 +237,6 @@ private:
void ResetToolbarStyle();
void TogglePaneStyle(bool On, int EventId);
void ToggleNotebookStyle(bool On, long Style);
void ResizeConsole();
// Float window
void DoUnfloatPage(int Id);
void OnFloatingPageClosed(wxCloseEvent& event);

View File

@ -57,7 +57,6 @@ void CFrame::OnManagerResize(wxAuiManagerEvent& event)
m_LogWindow->winpos = m_Mgr->GetPane(_T("Pane 1")).dock_direction;
}
event.Skip();
ResizeConsole();
}
void CFrame::OnPaneClose(wxAuiManagerEvent& event)
@ -70,14 +69,11 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event)
if (!g_pCodeWindow)
{
if (nb->GetPage(0)->GetId() == IDM_LOGWINDOW ||
nb->GetPage(0)->GetId() == IDM_LOGCONFIGWINDOW ||
nb->GetPage(0)->GetId() == IDM_CONSOLEWINDOW)
nb->GetPage(0)->GetId() == IDM_LOGCONFIGWINDOW)
{
// Closing a pane containing the logwindow or a console closes both
SConfig::GetInstance().m_InterfaceConsole = false;
SConfig::GetInstance().m_InterfaceLogWindow = false;
SConfig::GetInstance().m_InterfaceLogConfigWindow = false;
ToggleConsole(false);
ToggleLogWindow(false);
ToggleLogConfigWindow(false);
}
@ -163,59 +159,6 @@ void CFrame::ToggleLogConfigWindow(bool bShow)
TogglePane();
}
void CFrame::ToggleConsole(bool bShow)
{
#ifdef _WIN32
GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(bShow);
if (bShow)
{
// If the console doesn't exist, we create it
if (!GetConsoleWindow())
{
ConsoleListener *Console = LogManager::GetInstance()->GetConsoleListener();
Console->Open();
}
else
{
ShowWindow(GetConsoleWindow(), SW_SHOW);
}
// Create the parent window if it doesn't exist
wxPanel *ConsoleParent = (wxPanel*)FindWindowById(IDM_CONSOLEWINDOW);
if (!ConsoleParent) ConsoleParent = new wxPanel(this, IDM_CONSOLEWINDOW,
wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _("Console"));
wxWindow *ConsoleWin = new wxWindow();
ConsoleWin->SetHWND((WXHWND)GetConsoleWindow());
ConsoleWin->AdoptAttributesFromHWND();
ConsoleWin->Reparent(ConsoleParent);
ConsoleParent->Enable();
const int nbIndex = IDM_CONSOLEWINDOW - IDM_LOGWINDOW;
DoAddPage(ConsoleParent,
g_pCodeWindow ? g_pCodeWindow->iNbAffiliation[nbIndex] : 0,
g_pCodeWindow ? bFloatWindow[nbIndex] : false);
}
else // Hide
{
if(GetConsoleWindow())
ShowWindow(GetConsoleWindow(), SW_HIDE); // WIN32
wxPanel *ConsoleParent = (wxPanel*)FindWindowById(IDM_CONSOLEWINDOW);
if (ConsoleParent)
ConsoleParent->Disable();
// Then close the page
DoRemovePage(ConsoleParent, true);
}
// Hide or Show the pane
if (!g_pCodeWindow)
TogglePane();
#endif
}
void CFrame::OnToggleWindow(wxCommandEvent& event)
{
bool bShow = GetMenuBar()->IsChecked(event.GetId());
@ -232,11 +175,6 @@ void CFrame::OnToggleWindow(wxCommandEvent& event)
SConfig::GetInstance().m_InterfaceLogConfigWindow = bShow;
ToggleLogConfigWindow(bShow);
break;
case IDM_CONSOLEWINDOW:
if (!g_pCodeWindow)
SConfig::GetInstance().m_InterfaceConsole = bShow;
ToggleConsole(bShow);
break;
case IDM_REGISTERWINDOW:
g_pCodeWindow->ToggleRegisterWindow(bShow);
break;
@ -264,7 +202,7 @@ void CFrame::ClosePages()
{
ToggleLogWindow(false);
ToggleLogConfigWindow(false);
ToggleConsole(false);
if (g_pCodeWindow)
{
g_pCodeWindow->ToggleCodeWindow(false);
@ -306,8 +244,6 @@ void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
ToggleLogWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_LOGCONFIGWINDOW)
ToggleLogConfigWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_CONSOLEWINDOW)
ToggleConsole(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_REGISTERWINDOW)
g_pCodeWindow->ToggleRegisterWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_BREAKPOINTWINDOW)
@ -330,7 +266,6 @@ void CFrame::OnFloatingPageClosed(wxCloseEvent& event)
void CFrame::OnFloatingPageSize(wxSizeEvent& event)
{
event.Skip();
ResizeConsole();
}
void CFrame::OnFloatWindow(wxCommandEvent& event)
@ -393,8 +328,7 @@ void CFrame::OnTab(wxAuiNotebookEvent& event)
// Create the popup menu
wxMenu* MenuPopup = new wxMenu;
wxMenuItem* Item = new wxMenuItem(MenuPopup, wxID_ANY,
_("Select floating windows"));
wxMenuItem* Item = new wxMenuItem(MenuPopup, wxID_ANY, _("Select floating windows"));
MenuPopup->Append(Item);
Item->Enable(false);
MenuPopup->Append(new wxMenuItem(MenuPopup));
@ -423,7 +357,6 @@ void CFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& event)
{
event.Skip();
event.Allow();
ResizeConsole();
}
void CFrame::ShowResizePane()
@ -803,33 +736,6 @@ void CFrame::OnSelectPerspective(wxCommandEvent& event)
DoLoadPerspective();
}
void CFrame::ResizeConsole()
{
#ifdef _WIN32
// Get the console parent window
wxWindow * Win = FindWindowById(IDM_CONSOLEWINDOW);
if (!Win) return;
const int wxBorder = 2, Border = 4,
MenuBar = 30, ScrollBar = 19;
// Get the client size
int X = Win->GetSize().GetX();
int Y = Win->GetSize().GetY();
int InternalWidth = X - wxBorder*2 - ScrollBar;
int InternalHeight = Y - wxBorder*2;
int WindowWidth = InternalWidth + Border*2 +
/*max out the width in the word wrap mode*/ 100;
int WindowHeight = InternalHeight + MenuBar;
// Resize buffer
ConsoleListener* Console = LogManager::GetInstance()->GetConsoleListener();
Console->PixelSpace(0,0, InternalWidth, InternalHeight, false);
// Move the window to hide the border
MoveWindow(GetConsoleWindow(), -Border-wxBorder, -MenuBar-wxBorder,
WindowWidth + 100, WindowHeight, true);
#endif
}
static int Limit(int i, int Low, int High)
{
if (i < Low) return Low;
@ -1092,11 +998,6 @@ wxFrame* CFrame::CreateParentFrame(wxWindowID Id, const wxString& Title, wxWindo
Frame->Bind(wxEVT_CLOSE_WINDOW, &CFrame::OnFloatingPageClosed, this);
if (Id == IDM_CONSOLEWINDOW_PARENT)
{
Frame->Bind(wxEVT_SIZE, &CFrame::OnFloatingPageSize, this);
}
// Main sizer
Frame->SetSizer(m_MainSizer);
// Minimum frame size

View File

@ -258,17 +258,11 @@ void CFrame::CreateMenu()
viewMenu->AppendSeparator();
viewMenu->AppendCheckItem(IDM_LOGWINDOW, _("Show &Log"));
viewMenu->AppendCheckItem(IDM_LOGCONFIGWINDOW, _("Show Log &Configuration"));
viewMenu->AppendCheckItem(IDM_CONSOLEWINDOW, _("Show &Console"));
viewMenu->AppendSeparator();
#ifndef _WIN32
viewMenu->Enable(IDM_CONSOLEWINDOW, false);
#endif
if (g_pCodeWindow)
{
viewMenu->Check(IDM_LOGWINDOW, g_pCodeWindow->bShowOnStart[0]);
viewMenu->Check(IDM_CONSOLEWINDOW, g_pCodeWindow->bShowOnStart[1]);
const wxString MenuText[] = {
wxTRANSLATE("&Registers"),
@ -291,7 +285,6 @@ void CFrame::CreateMenu()
{
viewMenu->Check(IDM_LOGWINDOW, SConfig::GetInstance().m_InterfaceLogWindow);
viewMenu->Check(IDM_LOGCONFIGWINDOW, SConfig::GetInstance().m_InterfaceLogConfigWindow);
viewMenu->Check(IDM_CONSOLEWINDOW, SConfig::GetInstance().m_InterfaceConsole);
}
wxMenu *platformMenu = new wxMenu;

View File

@ -130,7 +130,6 @@ enum
// Views
IDM_LOGWINDOW,
IDM_LOGCONFIGWINDOW,
IDM_CONSOLEWINDOW,
IDM_REGISTERWINDOW,
IDM_BREAKPOINTWINDOW,
IDM_MEMORYWINDOW,
@ -142,7 +141,6 @@ enum
// Float Window IDs
IDM_LOGWINDOW_PARENT,
IDM_LOGCONFIGWINDOW_PARENT,
IDM_CONSOLEWINDOW_PARENT,
IDM_REGISTERWINDOW_PARENT,
IDM_BREAKPOINTWINDOW_PARENT,
IDM_MEMORYWINDOW_PARENT,
@ -154,7 +152,6 @@ enum
// Float popup menu IDs
IDM_FLOAT_LOGWINDOW,
IDM_FLOAT_LOGCONFIGWINDOW,
IDM_FLOAT_CONSOLEWINDOW,
IDM_FLOAT_REGISTERWINDOW,
IDM_FLOAT_BREAKPOINTWINDOW,
IDM_FLOAT_MEMORYWINDOW,

View File

@ -33,7 +33,6 @@
#include "Common/FileUtil.h"
#include "Common/IniFile.h"
#include "Common/LogManager.h"
#include "Core/Console.h"
#include "DolphinWX/Frame.h"
#include "DolphinWX/LogWindow.h"
#include "DolphinWX/WxUtils.h"
@ -44,7 +43,6 @@
BEGIN_EVENT_TABLE(CLogWindow, wxPanel)
EVT_CLOSE(CLogWindow::OnClose)
EVT_TEXT_ENTER(IDM_SUBMITCMD, CLogWindow::OnSubmit)
EVT_BUTTON(IDM_CLEARLOG, CLogWindow::OnClear)
EVT_CHOICE(IDM_FONT, CLogWindow::OnFontChange)
EVT_CHECKBOX(IDM_WRAPLINE, CLogWindow::OnWrapLineCheck)
@ -87,7 +85,6 @@ void CLogWindow::CreateGUIControls()
// Get the logger output settings from the config ini file.
ini.Get("Options", "WriteToFile", &m_writeFile, false);
ini.Get("Options", "WriteToConsole", &m_writeConsole, true);
ini.Get("Options", "WriteToWindow", &m_writeWindow, true);
#ifdef _MSC_VER
if (IsDebuggerPresent())
@ -115,11 +112,6 @@ void CLogWindow::CreateGUIControls()
else
m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, m_LogManager->GetFileListener());
if (m_writeConsole && enable)
m_LogManager->AddListener((LogTypes::LOG_TYPE)i, m_LogManager->GetConsoleListener());
else
m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, m_LogManager->GetConsoleListener());
if (m_writeDebugger && enable)
m_LogManager->AddListener((LogTypes::LOG_TYPE)i, m_LogManager->GetDebuggerListener());
else
@ -207,13 +199,6 @@ void CLogWindow::SaveSettings()
ini.Save(File::GetUserPath(F_LOGGERCONFIG_IDX));
}
void CLogWindow::OnSubmit(wxCommandEvent& WXUNUSED (event))
{
if (!m_cmdline) return;
Console_Submit(WxStrToStr(m_cmdline->GetValue()).c_str());
m_cmdline->SetValue(wxEmptyString);
}
void CLogWindow::OnClear(wxCommandEvent& WXUNUSED (event))
{
m_Log->Clear();

View File

@ -65,7 +65,7 @@ private:
bool m_ignoreLogTimer;
LogManager *m_LogManager;
std::queue<std::pair<u8, wxString> > msgQueue;
bool m_writeFile, m_writeConsole, m_writeWindow, m_writeDebugger, m_LogAccess;
bool m_writeFile, m_writeWindow, m_writeDebugger, m_LogAccess;
// Controls
wxBoxSizer *sBottom;
@ -82,7 +82,6 @@ private:
void PopulateBottom();
void UnPopulateBottom();
void OnClose(wxCloseEvent& event);
void OnSubmit(wxCommandEvent& event);
void OnFontChange(wxCommandEvent& event);
void OnWrapLineCheck(wxCommandEvent& event);
void OnClear(wxCommandEvent& event);