From ab104520d7d90214bf94637e4eb852944c9fb335 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Wed, 29 Apr 2009 03:31:02 +0000 Subject: [PATCH] wxGui: Start work on a Speed Hack dialog. Update the Game Hack dialog. git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1082 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Linux/pcsx2.cbp | 13 +++- pcsx2/NewGUI/GameFixesDialog.cpp | 22 ++++--- pcsx2/NewGUI/GameFixesDialog.h | 7 ++- pcsx2/NewGUI/MainFrame.cpp | 40 +++++++----- pcsx2/NewGUI/MainFrame.h | 17 ++--- pcsx2/NewGUI/SpeedHacksDialog.cpp | 101 ++++++++++++++++++++++++++++++ pcsx2/NewGUI/SpeedHacksDialog.h | 47 ++++++++++++++ pcsx2/NewGUI/wxHelpers.cpp | 19 +++++- pcsx2/NewGUI/wxHelpers.h | 4 +- 9 files changed, 230 insertions(+), 40 deletions(-) create mode 100644 pcsx2/NewGUI/SpeedHacksDialog.cpp create mode 100644 pcsx2/NewGUI/SpeedHacksDialog.h diff --git a/pcsx2/Linux/pcsx2.cbp b/pcsx2/Linux/pcsx2.cbp index 6164343c59..c95e7b328b 100644 --- a/pcsx2/Linux/pcsx2.cbp +++ b/pcsx2/Linux/pcsx2.cbp @@ -17,6 +17,9 @@ + + + @@ -39,6 +42,9 @@ + + + @@ -60,6 +66,9 @@ + + + @@ -78,8 +87,6 @@ - - @@ -204,6 +211,8 @@ + + diff --git a/pcsx2/NewGUI/GameFixesDialog.cpp b/pcsx2/NewGUI/GameFixesDialog.cpp index 0e8c80b334..0d62f3bdf6 100644 --- a/pcsx2/NewGUI/GameFixesDialog.cpp +++ b/pcsx2/NewGUI/GameFixesDialog.cpp @@ -19,6 +19,7 @@ #include "PrecompiledHeader.h" #include "Misc.h" #include "GameFixesDialog.h" +#include "System.h" using namespace wxHelpers; @@ -35,6 +36,7 @@ GameFixesDialog::GameFixesDialog( wxWindow* parent, int id ): wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("PCSX2 Gamefixes") ); AddCheckBox( groupSizer, _T("FPU Compare Hack - Special fix for Digimon Rumble Arena 2.") ); + AddCheckBox( groupSizer, _T("FPU Multiply Hack - Special fix for Tales of Destiny.") ); AddCheckBox( groupSizer, _T("VU Add / Sub Hack - Special fix for Tri-Ace games!") ); AddCheckBox( groupSizer, _T("VU Clip Hack - Special fix for God of War") ); @@ -45,33 +47,35 @@ GameFixesDialog::GameFixesDialog( wxWindow* parent, int id ): SetSizerAndFit( &mainSizer ); Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::FPUCompareHack_Click ) ); + Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::FPUMultHack_Click ) ); Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::TriAce_Click ) ); Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::GodWar_Click ) ); -} -/* -BEGIN_EVENT_TABLE(GameFixesDialog, wxDialog) - EVT_CHECKBOX(wxID_ANY, FPUCompareHack_Click) - EVT_CHECKBOX(wxID_ANY, TriAce_Click) - EVT_CHECKBOX(wxID_ANY, GodWar_Click) -END_EVENT_TABLE(); -*/ +} void GameFixesDialog::FPUCompareHack_Click(wxCommandEvent &event) { + //Config.GameFixes |= is_checked ? FLAG_FPU_Compare : 0; event.Skip(); } +void GameFixesDialog::FPUMultHack_Click(wxCommandEvent &event) +{ + //Config.GameFixes |= is_checked ? FLAG_FPU_MUL : 0; + event.Skip(); +} void GameFixesDialog::TriAce_Click(wxCommandEvent &event) { + //Config.GameFixes |= is_checked ? FLAG_VU_ADD_SUB : 0; event.Skip(); } void GameFixesDialog::GodWar_Click(wxCommandEvent &event) { + //Config.GameFixes |= is_checked ? FLAG_VU_CLIP : 0; event.Skip(); } -} // end namespace Dialogs \ No newline at end of file +} // end namespace Dialogs diff --git a/pcsx2/NewGUI/GameFixesDialog.h b/pcsx2/NewGUI/GameFixesDialog.h index fc75f21396..9735226994 100644 --- a/pcsx2/NewGUI/GameFixesDialog.h +++ b/pcsx2/NewGUI/GameFixesDialog.h @@ -23,6 +23,11 @@ #include "wxHelpers.h" +#define FLAG_VU_ADD_SUB 0x1 //Tri-Ace - IDC_GAMEFIX2 +#define FLAG_VU_CLIP 0x2 // Persona3/4 - IDC_GAMEFIX4 +#define FLAG_FPU_Compare 0x4 // Digimon Rumble Arena - IDC_GAMEFIX3 +#define FLAG_FPU_MUL 0x8 //Tales of Destiny - IDC_GAMEFIX5 + namespace Dialogs { class GameFixesDialog: public wxDialogWithHelpers @@ -31,10 +36,10 @@ namespace Dialogs GameFixesDialog(wxWindow* parent, int id); protected: - //DECLARE_EVENT_TABLE(); public: void FPUCompareHack_Click(wxCommandEvent &event); + void FPUMultHack_Click(wxCommandEvent &event); void TriAce_Click(wxCommandEvent &event); void GodWar_Click(wxCommandEvent &event); void Ok_Click(wxCommandEvent &event); diff --git a/pcsx2/NewGUI/MainFrame.cpp b/pcsx2/NewGUI/MainFrame.cpp index 23cb640931..7d0e6673ea 100644 --- a/pcsx2/NewGUI/MainFrame.cpp +++ b/pcsx2/NewGUI/MainFrame.cpp @@ -19,6 +19,7 @@ #include "PrecompiledHeader.h" #include "MainFrame.h" #include "GameFixesDialog.h" +#include "SpeedHacksDialog.h" #include "LogOptionsDialog.h" #include "AboutBoxDialog.h" @@ -32,7 +33,7 @@ using namespace Dialogs; wxMenu* MainEmuFrame::MakeLanguagesMenu() const { wxMenu* menuLangs = new wxMenu(); - + // TODO : Index languages out of the resources and Langs folder. menuLangs->Append(Menu_Language_Start, _T("English"), wxEmptyString, wxITEM_RADIO); @@ -71,7 +72,7 @@ void MainEmuFrame::PopulateVideoMenu() m_menuVideo.AppendSeparator(); // Populate options from the plugin here. - + m_menuVideo.Append( Menu_Video_Advanced, _T("Advanced..."), wxEmptyString, wxITEM_NORMAL ); } @@ -105,29 +106,31 @@ void MainEmuFrame::ConnectMenus() Connect( wxEVT_MOVE, wxMoveEventHandler(MainEmuFrame::OnMoveAround) ); // This just seems a bit more flexible & intuitive to me, if overly verbose. - + ConnectMenu( Menu_QuickBootCD, Menu_QuickBootCD_Click ); ConnectMenu( Menu_FullBootCD, Menu_BootCD_Click ); ConnectMenu( Menu_BootNoCD, Menu_BootNoCD_Click ); - + ConnectMenu( Menu_RunELF, Menu_OpenELF_Click ); ConnectMenu( Menu_Run_Exit, Menu_Exit_Click ); - + ConnectMenu( Menu_SuspendExec, Menu_Suspend_Click ); ConnectMenu( Menu_ResumeExec, Menu_Resume_Click ); ConnectMenu( Menu_Reset, Menu_Reset_Click ); - + ConnectMenu( Menu_State_LoadOther, Menu_LoadStateOther_Click ); ConnectMenu( Menu_State_SaveOther, Menu_SaveStateOther_Click ); - + ConnectMenu( Menu_Config_Gamefixes, Menu_Gamefixes_Click ); - + ConnectMenu( Menu_Config_SpeedHacks, Menu_Speedhacks_Click ); + + ConnectMenu( Menu_Debug_Open, Menu_Debug_Open_Click ); ConnectMenu( Menu_Debug_MemoryDump, Menu_Debug_MemoryDump_Click ); ConnectMenu( Menu_Debug_Logging, Menu_Debug_Logging_Click ); - + ConnectMenu( Menu_Console, Menu_ShowConsole ); - + ConnectMenu( Menu_About, Menu_ShowAboutBox ); } @@ -157,10 +160,10 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons m_menuAudio( *new wxMenu() ), m_menuPad( *new wxMenu() ), m_menuDebug( *new wxMenu() ), - + m_LoadStatesSubmenu( *MakeStatesSubMenu( Menu_State_Load01 ) ), m_SaveStatesSubmenu( *MakeStatesSubMenu( Menu_State_Save01 ) ), - + m_MenuItem_Console( *new wxMenuItem( &m_menuMisc, Menu_Console, L"Show Console", wxEmptyString, wxITEM_CHECK ) ) { @@ -197,7 +200,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons wxBoxSizer& joe( *new wxBoxSizer( wxVERTICAL ) ); joe.Add( &m_background ); SetSizerAndFit( &joe ); - + // Valid zone for window positioning. // Top/Left boundaries are fairly strict, since any more offscreen and the window titlebar // would be obscured from being grabbable. @@ -233,7 +236,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons m_logbox.Show( g_Conf.ConLogBox.Visible ); // ------------------------------------------------------------------------ - + m_menuRun.Append(Menu_QuickBootCD, _T("Boot CDVD (Quick)"), wxEmptyString, wxITEM_NORMAL); m_menuRun.Append(Menu_FullBootCD, _T("Boot CDVD (Full)"), wxEmptyString, wxITEM_NORMAL); m_menuRun.Append(Menu_BootNoCD, _T("Boot without CDVD"), wxEmptyString, wxITEM_NORMAL); @@ -295,7 +298,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons m_menuDebug.Append(Menu_Debug_Logging, _T("Logging..."), wxEmptyString, wxITEM_NORMAL); ConnectMenus(); - + m_MenuItem_Console.Check( g_Conf.ConLogBox.Visible ); } @@ -346,6 +349,11 @@ void MainEmuFrame::Menu_Gamefixes_Click( wxCommandEvent& event ) GameFixesDialog( this, wxID_ANY ).ShowModal(); } +void MainEmuFrame::Menu_Speedhacks_Click( wxCommandEvent& event ) +{ + SpeedHacksDialog( this, wxID_ANY ).ShowModal(); +} + void MainEmuFrame::Menu_Debug_Open_Click(wxCommandEvent &event) { } @@ -367,4 +375,4 @@ void MainEmuFrame::Menu_ShowConsole(wxCommandEvent &event) void MainEmuFrame::Menu_ShowAboutBox(wxCommandEvent &event) { AboutBoxDialog( this, wxID_ANY ).ShowModal(); -} \ No newline at end of file +} diff --git a/pcsx2/NewGUI/MainFrame.h b/pcsx2/NewGUI/MainFrame.h index 4d69e06a25..b8adbab6fe 100644 --- a/pcsx2/NewGUI/MainFrame.h +++ b/pcsx2/NewGUI/MainFrame.h @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - + #pragma once #include @@ -36,7 +36,7 @@ protected: enum Identifiers { - // Main Menu Section + // Main Menu Section Menu_Run = 1, Menu_Config, // General config, plus non audio/video plugins. Menu_Video, // Video options filled in by GS plugin @@ -101,13 +101,13 @@ protected: Menu_Profiler, // Enable profiler Menu_Console, // Enable console Menu_Patches, - + // Debug Subsection Menu_Debug_Open = 600, // opens the debugger window / starts a debug session Menu_Debug_MemoryDump, Menu_Debug_Logging, // dialog for selection additional log options Menu_Languages, - + // Language Menu // (Updated entirely dynamically, all values from range 1000 onward are reserved for languages) Menu_Language_Start = 1000 @@ -116,7 +116,7 @@ protected: wxMenu* MakeStatesSubMenu( int baseid ) const; wxMenu* MakeStatesMenu(); wxMenu* MakeLanguagesMenu() const; - + void PopulateVideoMenu(); void PopulateAudioMenu(); void PopulatePadMenu(); @@ -140,12 +140,12 @@ protected: wxMenu& m_LoadStatesSubmenu; wxMenu& m_SaveStatesSubmenu; - + wxMenuItem& m_MenuItem_Console; ////////////////////////////////////////////////////////////////////////////////////////// // Menu Options for the Main Window! :D - + protected: void OnMoveAround( wxMoveEvent& evt ); @@ -163,11 +163,12 @@ protected: void Menu_Reset_Click(wxCommandEvent &event); void Menu_Gamefixes_Click( wxCommandEvent& event ); + void Menu_Speedhacks_Click( wxCommandEvent& event ); void Menu_Debug_Open_Click(wxCommandEvent &event); void Menu_Debug_MemoryDump_Click(wxCommandEvent &event); void Menu_Debug_Logging_Click(wxCommandEvent &event); - + void Menu_ShowConsole(wxCommandEvent &event); void Menu_ShowAboutBox(wxCommandEvent &event); }; diff --git a/pcsx2/NewGUI/SpeedHacksDialog.cpp b/pcsx2/NewGUI/SpeedHacksDialog.cpp new file mode 100644 index 0000000000..1060afb5cd --- /dev/null +++ b/pcsx2/NewGUI/SpeedHacksDialog.cpp @@ -0,0 +1,101 @@ +/* Pcsx2 - Pc Ps2 Emulator + * Copyright (C) 2002-2009 Pcsx2 Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "PrecompiledHeader.h" +#include "Misc.h" +#include "SpeedHacksDialog.h" +#include "System.h" + +using namespace wxHelpers; + +namespace Dialogs { + +SpeedHacksDialog::SpeedHacksDialog( wxWindow* parent, int id ): + wxDialogWithHelpers( parent, id, _T("Speed Hacks"), true ) +{ + wxBoxSizer& mainSizer = *new wxBoxSizer( wxVERTICAL ); + wxBoxSizer& secondarySizer = *new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer& sliderSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("Cycle Hacks") ); + wxStaticBoxSizer& miscSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("Misc Speed Hacks") ); + + AddStaticText(mainSizer, _T("These hacks will affect the speed of PCSX2, but compromise compatability.")); + AddStaticText(mainSizer, _T("If you have issues, disable all of these and try again.")); + + wxSlider* vuScale = new wxSlider(this, wxID_ANY, Config.Hacks.VUCycleSteal, 0, 4 ); + wxSlider* eeScale = new wxSlider(this, wxID_ANY, Config.Hacks.EECycleRate, 0, 2); + + AddStaticText(sliderSizer, _T("EE Cycle")); + sliderSizer.Add( eeScale, wxEXPAND ); + AddStaticText(sliderSizer, _T("Placeholder text for EE scale position.")); + + AddStaticText(sliderSizer, _T("VU Cycle")); + sliderSizer.Add( vuScale, wxEXPAND ); + AddStaticText(sliderSizer, _T("Placeholder text for VU scale position.")); + + + AddCheckBox(miscSizer, _T("Enable IOP x2 Cycle rate")); + AddStaticText(miscSizer, _T(" Small Speedup, and works well with most games."), 400); + + AddCheckBox(miscSizer, _T("WaitCycles Sync Hack") ); + AddStaticText(miscSizer, _T(" Small Speedup. Works well with most games, but it may cause certain games to crash, or freeze up during bootup or stage changes."), 400); + + AddCheckBox(miscSizer, _T("INTC Sync Hack") ); + AddStaticText(miscSizer, _T(" Huge speedup in many games, and a pretty high compatability rate (some games still work better with EE sync hacks)."), 400); + + AddCheckBox(miscSizer, _T("Idle Loop Fast-Forward (experimental)") ); + AddStaticText(miscSizer, _T(" Speedup for a few games, including FFX with no known side effects. More later."), 400); + + secondarySizer.Add( &sliderSizer, wxEXPAND ); + secondarySizer.Add( &miscSizer, wxEXPAND ); + mainSizer.Add( &secondarySizer, stdCenteredFlags ); + + AddOkCancel( mainSizer ); + + SetSizerAndFit( &mainSizer ); + + Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksDialog::IOPCycleDouble_Click ) ); + Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksDialog::WaitCycleExt_Click ) ); + Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksDialog::INTCSTATSlow_Click ) ); + Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksDialog::IdleLoopFF_Click ) ); +} + +void SpeedHacksDialog::IOPCycleDouble_Click(wxCommandEvent &event) +{ + //Config.Hacks.IOPCycleDouble = if it is clicked. + event.Skip(); +} + +void SpeedHacksDialog::WaitCycleExt_Click(wxCommandEvent &event) +{ + //Config.Hacks.WaitCycleExt = if it is clicked. + event.Skip(); +} + +void SpeedHacksDialog::INTCSTATSlow_Click(wxCommandEvent &event) +{ + //Config.Hacks.INTCSTATSlow = if it is clicked. + event.Skip(); +} + +void SpeedHacksDialog::IdleLoopFF_Click(wxCommandEvent &event) +{ + //Config.Hacks.IdleLoopFF = if it is clicked. + event.Skip(); +} +} // end namespace Dialogs diff --git a/pcsx2/NewGUI/SpeedHacksDialog.h b/pcsx2/NewGUI/SpeedHacksDialog.h new file mode 100644 index 0000000000..46a01759fa --- /dev/null +++ b/pcsx2/NewGUI/SpeedHacksDialog.h @@ -0,0 +1,47 @@ +/* Pcsx2 - Pc Ps2 Emulator + * Copyright (C) 2002-2009 Pcsx2 Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#ifndef SPEEDHACKSDIALOG_H_INCLUDED +#define SPEEDHACKSDIALOG_H_INCLUDED + +#pragma once + +#include +#include + +#include "wxHelpers.h" + +namespace Dialogs +{ + class SpeedHacksDialog: public wxDialogWithHelpers + { + public: + SpeedHacksDialog(wxWindow* parent, int id); + + protected: + + public: + void IOPCycleDouble_Click(wxCommandEvent &event); + void WaitCycleExt_Click(wxCommandEvent &event); + void INTCSTATSlow_Click(wxCommandEvent &event); + void IdleLoopFF_Click(wxCommandEvent &event); + }; +} + +#endif // SPEEDHACKSDIALOG_H_INCLUDED diff --git a/pcsx2/NewGUI/wxHelpers.cpp b/pcsx2/NewGUI/wxHelpers.cpp index c4d287120a..f89d214d11 100644 --- a/pcsx2/NewGUI/wxHelpers.cpp +++ b/pcsx2/NewGUI/wxHelpers.cpp @@ -37,13 +37,21 @@ namespace wxHelpers wxCheckBox* retval = new wxCheckBox( parent, id, label ); sizer.Add( retval, CheckboxFlags ); return *retval; - } + } + + wxStaticText& AddStaticTextTo(wxWindow* parent, wxBoxSizer& sizer, const wxString& label, int size ) + { + wxStaticText *temp = new wxStaticText(parent, wxID_ANY, label); + if (size > 0) temp->Wrap(size); + sizer.Add(temp); + return *temp; + } } ////////////////////////////////////////////////////////////////////////////////////////// // wxDialogWithHelpers::wxDialogWithHelpers( wxWindow* parent, int id, const wxString& title, bool hasContextHelp, const wxPoint& pos, const wxSize& size ) : - wxDialog( parent, id, title, pos, size ), //, (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxRESIZE_BORDER) ), // flags for resizable dialogs, currently unused. + wxDialog( parent, id, title, pos, size , wxDEFAULT_DIALOG_STYLE), //, (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxRESIZE_BORDER) ), // flags for resizable dialogs, currently unused. m_hasContextHelp( hasContextHelp ) { if( hasContextHelp ) @@ -58,7 +66,12 @@ wxDialogWithHelpers::wxDialogWithHelpers( wxWindow* parent, int id, const wxStr wxCheckBox& wxDialogWithHelpers::AddCheckBox( wxBoxSizer& sizer, const wxString& label, wxWindowID id ) { return wxHelpers::AddCheckBoxTo( this, sizer, label, id ); -} +} + +wxStaticText& wxDialogWithHelpers::AddStaticText(wxBoxSizer& sizer, const wxString& label, int size ) +{ + return wxHelpers::AddStaticTextTo( this, sizer, label, size ); +} void wxDialogWithHelpers::AddOkCancel( wxBoxSizer &sizer ) { diff --git a/pcsx2/NewGUI/wxHelpers.h b/pcsx2/NewGUI/wxHelpers.h index ab3f56c7c6..0508aebc64 100644 --- a/pcsx2/NewGUI/wxHelpers.h +++ b/pcsx2/NewGUI/wxHelpers.h @@ -7,6 +7,7 @@ namespace wxHelpers // Creates a new checkbox and adds it to the specified sizer/parent combo. // Uses the default spacer setting for adding checkboxes. extern wxCheckBox& AddCheckBoxTo( wxWindow* parent, wxBoxSizer& sizer, const wxString& label, wxWindowID id=wxID_ANY ); + extern wxStaticText& AddWrappedStaticTextTo(wxWindow* parent, wxBoxSizer& sizer, const wxString& label, int size ); extern wxSizerFlags stdCenteredFlags; extern wxSizerFlags stdSpacingFlags; @@ -31,6 +32,7 @@ public: protected: wxCheckBox& AddCheckBox( wxBoxSizer& sizer, const wxString& label, wxWindowID id=wxID_ANY ); - void AddOkCancel( wxBoxSizer& sizer ); + wxStaticText& AddStaticText(wxBoxSizer& sizer, const wxString& label, int size=0 ); + void AddOkCancel( wxBoxSizer& sizer ); };