mirror of https://github.com/PCSX2/pcsx2.git
gui: Use Bind instead of Connect for panels and dialogs
This commit is contained in:
parent
3904c67e6e
commit
2436480d9b
|
@ -108,7 +108,7 @@ wxString BaseApplicableDialog::GetDialogName() const
|
|||
|
||||
void BaseApplicableDialog::Init()
|
||||
{
|
||||
Connect( pxEvt_ApplySettings, wxCommandEventHandler (BaseApplicableDialog::OnSettingsApplied) );
|
||||
Bind(pxEvt_ApplySettings, &BaseApplicableDialog::OnSettingsApplied, this);
|
||||
|
||||
wxCommandEvent applyEvent( pxEvt_ApplySettings );
|
||||
applyEvent.SetId( GetId() );
|
||||
|
@ -135,34 +135,31 @@ Dialogs::BaseConfigurationDialog::BaseConfigurationDialog( wxWindow* parent, con
|
|||
m_listbook = NULL;
|
||||
m_allowApplyActivation = true;
|
||||
|
||||
Connect( wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BaseConfigurationDialog::OnOk_Click ) );
|
||||
Connect( wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BaseConfigurationDialog::OnCancel_Click ) );
|
||||
Connect( wxID_APPLY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BaseConfigurationDialog::OnApply_Click ) );
|
||||
Connect( wxID_SAVE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BaseConfigurationDialog::OnScreenshot_Click ) );
|
||||
Bind(wxEVT_BUTTON, &BaseConfigurationDialog::OnOk_Click, this, wxID_OK);
|
||||
Bind(wxEVT_BUTTON, &BaseConfigurationDialog::OnCancel_Click, this, wxID_CANCEL);
|
||||
Bind(wxEVT_BUTTON, &BaseConfigurationDialog::OnApply_Click, this, wxID_APPLY);
|
||||
Bind(wxEVT_BUTTON, &BaseConfigurationDialog::OnScreenshot_Click, this, wxID_SAVE);
|
||||
|
||||
Connect( pxEvt_SetSettingsPage, wxCommandEventHandler( BaseConfigurationDialog::OnSetSettingsPage ) );
|
||||
Bind(pxEvt_SetSettingsPage, &BaseConfigurationDialog::OnSetSettingsPage, this);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Bind a variety of standard "something probably changed" events. If the user invokes
|
||||
// any of these, we'll automatically de-gray the Apply button for this dialog box. :)
|
||||
|
||||
#define ConnectSomethingChanged( command ) \
|
||||
Connect( wxEVT_COMMAND_##command, wxCommandEventHandler( BaseConfigurationDialog::OnSomethingChanged ) );
|
||||
Bind(wxEVT_TEXT, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_TEXT_ENTER, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
|
||||
ConnectSomethingChanged( TEXT_UPDATED );
|
||||
ConnectSomethingChanged( TEXT_ENTER );
|
||||
Bind(wxEVT_RADIOBUTTON, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_COMBOBOX, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_CHECKBOX, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_BUTTON, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_CHOICE, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_LISTBOX, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_SPINCTRL, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_SLIDER, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
Bind(wxEVT_DIRPICKER_CHANGED, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
|
||||
ConnectSomethingChanged( RADIOBUTTON_SELECTED );
|
||||
ConnectSomethingChanged( COMBOBOX_SELECTED );
|
||||
ConnectSomethingChanged( CHECKBOX_CLICKED );
|
||||
ConnectSomethingChanged( BUTTON_CLICKED );
|
||||
ConnectSomethingChanged( CHOICE_SELECTED );
|
||||
ConnectSomethingChanged( LISTBOX_SELECTED );
|
||||
ConnectSomethingChanged( SPINCTRL_UPDATED );
|
||||
ConnectSomethingChanged( SLIDER_UPDATED );
|
||||
ConnectSomethingChanged( DIRPICKER_CHANGED );
|
||||
|
||||
Connect( pxEvt_SomethingChanged, wxCommandEventHandler( BaseConfigurationDialog::OnSomethingChanged ) );
|
||||
Bind(pxEvt_SomethingChanged, &BaseConfigurationDialog::OnSomethingChanged, this);
|
||||
}
|
||||
|
||||
void Dialogs::BaseConfigurationDialog::AddListbook( wxSizer* sizer )
|
||||
|
|
|
@ -310,7 +310,7 @@ void ModalButtonPanel::OnActionButtonClicked( wxCommandEvent& evt )
|
|||
void ModalButtonPanel::AddCustomButton( wxWindowID id, const wxString& label )
|
||||
{
|
||||
*this += new wxButton( this, id, label ) | StdButton().Proportion(6);
|
||||
Connect( id, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalButtonPanel::OnActionButtonClicked ) );
|
||||
Bind(wxEVT_BUTTON, &ModalButtonPanel::OnActionButtonClicked, this, id);
|
||||
}
|
||||
|
||||
// This is for buttons that are defined internally by wxWidgets, such as wxID_CANCEL, wxID_ABORT, etc.
|
||||
|
@ -318,6 +318,5 @@ void ModalButtonPanel::AddCustomButton( wxWindowID id, const wxString& label )
|
|||
void ModalButtonPanel::AddActionButton( wxWindowID id )
|
||||
{
|
||||
*this += new wxButton( this, id ) | StdButton().Proportion(6);
|
||||
Connect( id, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalButtonPanel::OnActionButtonClicked ) );
|
||||
Bind(wxEVT_BUTTON, &ModalButtonPanel::OnActionButtonClicked, this, id);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,8 +72,8 @@ Dialogs::ConvertMemoryCardDialog::ConvertMemoryCardDialog( wxWindow* parent, con
|
|||
|
||||
*this += s_padding | pxSizerFlags::StdExpand();
|
||||
|
||||
Connect( wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConvertMemoryCardDialog::OnOk_Click ) );
|
||||
Connect( m_text_filenameInput->GetId(), wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ConvertMemoryCardDialog::OnOk_Click ) );
|
||||
Bind(wxEVT_BUTTON, &ConvertMemoryCardDialog::OnOk_Click, this, wxID_OK);
|
||||
Bind(wxEVT_TEXT_ENTER, &ConvertMemoryCardDialog::OnOk_Click, this, m_text_filenameInput->GetId());
|
||||
|
||||
SetSizerAndFit(GetSizer());
|
||||
|
||||
|
|
|
@ -92,8 +92,8 @@ Dialogs::CreateMemoryCardDialog::CreateMemoryCardDialog( wxWindow* parent, const
|
|||
|
||||
*this += s_padding | StdExpand();
|
||||
|
||||
Connect( wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CreateMemoryCardDialog::OnOk_Click ) );
|
||||
Connect( m_text_filenameInput->GetId(), wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( CreateMemoryCardDialog::OnOk_Click ) );
|
||||
Bind(wxEVT_BUTTON, &CreateMemoryCardDialog::OnOk_Click, this, wxID_OK);
|
||||
Bind(wxEVT_TEXT_ENTER, &CreateMemoryCardDialog::OnOk_Click, this, m_text_filenameInput->GetId());
|
||||
|
||||
// ...Typical solution to everything? Or are we doing something weird?
|
||||
SetSizerAndFit(GetSizer());
|
||||
|
|
|
@ -156,11 +156,11 @@ FirstTimeWizard::FirstTimeWizard( wxWindow* parent )
|
|||
// this doesn't descent from wxDialogWithHelpers, so we need to explicitly
|
||||
// fit and center it. :(
|
||||
|
||||
Connect( wxEVT_WIZARD_PAGE_CHANGED, wxWizardEventHandler (FirstTimeWizard::OnPageChanged) );
|
||||
Connect( wxEVT_WIZARD_PAGE_CHANGING, wxWizardEventHandler (FirstTimeWizard::OnPageChanging) );
|
||||
Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler (FirstTimeWizard::OnDoubleClicked) );
|
||||
Bind(wxEVT_WIZARD_PAGE_CHANGED, &FirstTimeWizard::OnPageChanged, this);
|
||||
Bind(wxEVT_WIZARD_PAGE_CHANGING, &FirstTimeWizard::OnPageChanging, this);
|
||||
Bind(wxEVT_LISTBOX_DCLICK, &FirstTimeWizard::OnDoubleClicked, this);
|
||||
|
||||
Connect( pxID_RestartWizard, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FirstTimeWizard::OnRestartWizard ) );
|
||||
Bind(wxEVT_BUTTON, &FirstTimeWizard::OnRestartWizard, this, pxID_RestartWizard);
|
||||
}
|
||||
|
||||
FirstTimeWizard::~FirstTimeWizard() throw()
|
||||
|
|
|
@ -50,8 +50,8 @@ Dialogs::ImportSettingsDialog::ImportSettingsDialog( wxWindow* parent )
|
|||
*this += 12;
|
||||
*this += &s_buttons | StdCenter();
|
||||
|
||||
Connect( b_import->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ImportSettingsDialog::OnImport_Click) );
|
||||
Connect( b_over->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ImportSettingsDialog::OnOverwrite_Click) );
|
||||
Bind(wxEVT_BUTTON, &ImportSettingsDialog::OnImport_Click, this, b_import->GetId());
|
||||
Bind(wxEVT_BUTTON, &ImportSettingsDialog::OnOverwrite_Click, this, b_over->GetId());
|
||||
}
|
||||
|
||||
void Dialogs::ImportSettingsDialog::OnImport_Click( wxCommandEvent& /* evt */ )
|
||||
|
|
|
@ -131,7 +131,7 @@ Dialogs::McdConfigDialog::McdConfigDialog( wxWindow* parent )
|
|||
for( uint i=0; i<2; ++i )
|
||||
{
|
||||
if( pxCheckBox* check = (pxCheckBox*)FindWindow(pxsFmt( L"CheckBox::Multitap%u", i )) )
|
||||
Connect( check->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(McdConfigDialog::OnMultitapClicked) );
|
||||
Bind(wxEVT_CHECKBOX, &McdConfigDialog::OnMultitapClicked, this, check->GetId());
|
||||
}
|
||||
*/
|
||||
AddOkCancel(s_bottom);
|
||||
|
|
|
@ -32,7 +32,7 @@ Dialogs::PickUserModeDialog::PickUserModeDialog( wxWindow* parent )
|
|||
|
||||
AddOkCancel( *GetSizer() );
|
||||
|
||||
Connect( wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PickUserModeDialog::OnOk_Click ) );
|
||||
Bind(wxEVT_BUTTON, &PickUserModeDialog::OnOk_Click, this, wxID_OK);
|
||||
// TODO : Add a command event handler for language changes, that dynamically re-update contents of this window.
|
||||
}
|
||||
|
||||
|
|
|
@ -157,9 +157,9 @@ void Dialogs::SysConfigDialog::AddPresetsControl()
|
|||
*m_extraButtonSizer += 5;
|
||||
*m_extraButtonSizer += m_msg_preset | pxMiddle;
|
||||
|
||||
Connect( m_slider_presets->GetId(), wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( Dialogs::SysConfigDialog::Preset_Scroll ) );
|
||||
Connect( m_slider_presets->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( Dialogs::SysConfigDialog::Preset_Scroll ) );
|
||||
Connect( m_check_presets->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( Dialogs::SysConfigDialog::Presets_Toggled ) );
|
||||
Bind(wxEVT_SCROLL_THUMBTRACK, &Dialogs::SysConfigDialog::Preset_Scroll, this, m_slider_presets->GetId());
|
||||
Bind(wxEVT_SCROLL_CHANGED, &Dialogs::SysConfigDialog::Preset_Scroll, this, m_slider_presets->GetId());
|
||||
Bind(wxEVT_CHECKBOX, &Dialogs::SysConfigDialog::Presets_Toggled, this, m_check_presets->GetId());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -180,8 +180,8 @@ void BaseApplicableConfigPanel::Init()
|
|||
// is immediate, and depends on the platform for how it "works", and thus
|
||||
// useless. Solution: Create our own! :)
|
||||
|
||||
//Connect( wxEVT_CREATE, wxWindowCreateEventHandler (BaseApplicableConfigPanel::OnCreateWindow) );
|
||||
Connect( pxEvt_ApplySettings, wxCommandEventHandler (BaseApplicableConfigPanel::OnSettingsApplied) );
|
||||
//Bind( wxEVT_CREATE, &BaseApplicableConfigPanel::OnCreateWindow, this);
|
||||
Bind(pxEvt_ApplySettings, &BaseApplicableConfigPanel::OnSettingsApplied, this);
|
||||
|
||||
if( IApplyState* iapp = FindApplyStateManager() )
|
||||
{
|
||||
|
|
|
@ -44,8 +44,8 @@ using namespace pxSizerFlags;
|
|||
Panels::BaseSelectorPanel::BaseSelectorPanel( wxWindow* parent )
|
||||
: BaseApplicableConfigPanel( parent, wxVERTICAL )
|
||||
{
|
||||
Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler (BaseSelectorPanel::OnFolderChanged) );
|
||||
Connect( wxEVT_SHOW, wxShowEventHandler (BaseSelectorPanel::OnShow) );
|
||||
Bind(wxEVT_DIRPICKER_CHANGED, &BaseSelectorPanel::OnFolderChanged, this);
|
||||
Bind(wxEVT_SHOW, &BaseSelectorPanel::OnShow, this);
|
||||
}
|
||||
|
||||
Panels::BaseSelectorPanel::~BaseSelectorPanel() throw()
|
||||
|
@ -119,7 +119,7 @@ Panels::BiosSelectorPanel::BiosSelectorPanel( wxWindow* parent )
|
|||
*this += 8;
|
||||
*this += m_FolderPicker | StdExpand();
|
||||
|
||||
Connect( refreshButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BiosSelectorPanel::OnRefreshSelections) );
|
||||
Bind(wxEVT_BUTTON, &BiosSelectorPanel::OnRefreshSelections, this, refreshButton->GetId());
|
||||
}
|
||||
|
||||
Panels::BiosSelectorPanel::~BiosSelectorPanel() throw ()
|
||||
|
|
|
@ -170,8 +170,8 @@ Panels::CpuPanelEE::CpuPanelEE( wxWindow* parent )
|
|||
m_button_RestoreDefaults = new wxButton(this, wxID_DEFAULT, _("Restore Defaults"));
|
||||
*this += m_button_RestoreDefaults | StdButton();
|
||||
|
||||
Connect( wxID_DEFAULT, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CpuPanelEE::OnRestoreDefaults ) );
|
||||
Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &CpuPanelEE::EECache_Event, this);
|
||||
Bind(wxEVT_BUTTON, &CpuPanelEE::OnRestoreDefaults, this, wxID_DEFAULT);
|
||||
Bind(wxEVT_RADIOBUTTON, &CpuPanelEE::EECache_Event, this);
|
||||
}
|
||||
|
||||
Panels::CpuPanelVU::CpuPanelVU( wxWindow* parent )
|
||||
|
@ -226,7 +226,7 @@ Panels::CpuPanelVU::CpuPanelVU( wxWindow* parent )
|
|||
m_button_RestoreDefaults = new wxButton(this, wxID_DEFAULT, _("Restore Defaults"));
|
||||
*this += m_button_RestoreDefaults | StdButton();
|
||||
|
||||
Connect( wxID_DEFAULT, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CpuPanelVU::OnRestoreDefaults ) );
|
||||
Bind(wxEVT_BUTTON, &CpuPanelVU::OnRestoreDefaults, this, wxID_DEFAULT);
|
||||
}
|
||||
|
||||
void Panels::CpuPanelEE::Apply()
|
||||
|
|
|
@ -157,7 +157,7 @@ void Panels::DirPickerPanel::InitForRegisteredMode( const wxString& normalized,
|
|||
pxSetToolTip( m_checkCtrl, pxEt( L"When checked this folder will automatically reflect the default associated with PCSX2's current usermode setting. " )
|
||||
);
|
||||
|
||||
Connect( m_checkCtrl->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DirPickerPanel::UseDefaultPath_Click ) );
|
||||
Bind(wxEVT_CHECKBOX, &DirPickerPanel::UseDefaultPath_Click, this, m_checkCtrl->GetId());
|
||||
}
|
||||
|
||||
// Force the Dir Picker to use a text control. This isn't standard on Linux/GTK but it's much
|
||||
|
@ -173,7 +173,7 @@ void Panels::DirPickerPanel::InitForRegisteredMode( const wxString& normalized,
|
|||
|
||||
wxButton* b_explore( new wxButton( this, wxID_ANY, _("Open in Explorer") ) );
|
||||
pxSetToolTip( b_explore, _("Open an explorer window to this folder.") );
|
||||
Connect( b_explore->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DirPickerPanel::Explore_Click ) );
|
||||
Bind(wxEVT_BUTTON, &DirPickerPanel::Explore_Click, this, b_explore->GetId());
|
||||
#endif
|
||||
|
||||
if (isCompact)
|
||||
|
|
|
@ -377,7 +377,7 @@ Panels::GameDatabasePanel::GameDatabasePanel( wxWindow* parent )
|
|||
*this += sizer1 | pxCenter;
|
||||
*this += sizer2 | pxCenter;
|
||||
|
||||
Connect(searchBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GameDatabasePanel::Search_Click));
|
||||
Bind(wxEVT_BUTTON, &GameDatabasePanel::Search_Click, this, searchBtn->GetId());
|
||||
PopulateFields();
|
||||
}
|
||||
|
||||
|
|
|
@ -127,8 +127,7 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent )
|
|||
*this += m_check_Enable | StdExpand();
|
||||
*this += groupSizer | pxCenter;
|
||||
|
||||
|
||||
Connect( m_check_Enable->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesPanel::OnEnable_Toggled ) );
|
||||
Bind(wxEVT_CHECKBOX, &GameFixesPanel::OnEnable_Toggled, this, m_check_Enable->GetId());
|
||||
|
||||
EnableStuff();
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ Panels::LogOptionsPanel::LogOptionsPanel(wxWindow* parent )
|
|||
*this += topSizer | StdExpand();
|
||||
*this += s_misc | StdSpace().Centre();
|
||||
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(LogOptionsPanel::OnCheckBoxClicked) );
|
||||
Bind(wxEVT_CHECKBOX, &LogOptionsPanel::OnCheckBoxClicked, this);
|
||||
}
|
||||
|
||||
Panels::BaseCpuLogOptionsPanel* Panels::LogOptionsPanel::GetCpuPanel( const wxString& token ) const
|
||||
|
@ -346,4 +346,3 @@ void Panels::iopLogOptionsPanel::Apply()
|
|||
conf.m_EnableRegisters = m_hwPanel->GetValue();
|
||||
conf.m_EnableEvents = m_evtPanel->GetValue();
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ Panels::BaseMcdListPanel::BaseMcdListPanel( wxWindow* parent )
|
|||
|
||||
m_btn_Refresh = new wxButton( this, wxID_ANY, _("Refresh list") );
|
||||
|
||||
Connect( m_btn_Refresh->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BaseMcdListPanel::OnRefreshSelections) );
|
||||
Bind(wxEVT_BUTTON, &BaseMcdListPanel::OnRefreshSelections, this, m_btn_Refresh->GetId());
|
||||
}
|
||||
|
||||
void Panels::BaseMcdListPanel::RefreshMcds() const
|
||||
|
@ -418,31 +418,31 @@ Panels::MemoryCardListPanel_Simple::MemoryCardListPanel_Simple( wxWindow* parent
|
|||
|
||||
parent->SetWindowStyle(parent->GetWindowStyle() | wxRESIZE_BORDER);
|
||||
|
||||
Connect( m_listview->GetId(), wxEVT_COMMAND_LIST_BEGIN_DRAG, wxListEventHandler(MemoryCardListPanel_Simple::OnListDrag));
|
||||
Connect( m_listview->GetId(), wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(MemoryCardListPanel_Simple::OnListSelectionChanged));
|
||||
Connect( m_listview->GetId(), wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(MemoryCardListPanel_Simple::OnItemActivated));//enter or double click
|
||||
Bind(wxEVT_LIST_BEGIN_DRAG, &MemoryCardListPanel_Simple::OnListDrag, this, m_listview->GetId());
|
||||
Bind(wxEVT_LIST_ITEM_SELECTED, &MemoryCardListPanel_Simple::OnListSelectionChanged, this, m_listview->GetId());
|
||||
Bind(wxEVT_LIST_ITEM_ACTIVATED, &MemoryCardListPanel_Simple::OnItemActivated, this, m_listview->GetId()); //enter or double click
|
||||
|
||||
//Deselected is not working for some reason (e.g. when clicking an empty row at the table?) - avih
|
||||
Connect( m_listview->GetId(), wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(MemoryCardListPanel_Simple::OnListSelectionChanged));
|
||||
Bind(wxEVT_LIST_ITEM_DESELECTED, &MemoryCardListPanel_Simple::OnListSelectionChanged, this, m_listview->GetId());
|
||||
|
||||
Connect( m_listview->GetId(), wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler(MemoryCardListPanel_Simple::OnOpenItemContextMenu) );
|
||||
Bind(wxEVT_LIST_ITEM_RIGHT_CLICK, &MemoryCardListPanel_Simple::OnOpenItemContextMenu, this, m_listview->GetId());
|
||||
|
||||
// Connect( m_button_Mount->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnMountCard));
|
||||
Connect( m_button_Create->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnCreateOrDeleteCard));
|
||||
Connect( m_button_Convert->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnConvertCard));
|
||||
Connect( m_button_Rename->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnRenameFile));
|
||||
Connect( m_button_Duplicate->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnDuplicateFile));
|
||||
Connect( m_button_AssignUnassign->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnAssignUnassignFile));
|
||||
//Bind(wxEVT_BUTTON, &MemoryCardListPanel_Simple::OnMountCard, this, m_button_Mount->GetId());
|
||||
Bind(wxEVT_BUTTON, &MemoryCardListPanel_Simple::OnCreateOrDeleteCard, this, m_button_Create->GetId());
|
||||
Bind(wxEVT_BUTTON, &MemoryCardListPanel_Simple::OnConvertCard, this, m_button_Convert->GetId());
|
||||
Bind(wxEVT_BUTTON, &MemoryCardListPanel_Simple::OnRenameFile, this, m_button_Rename->GetId());
|
||||
Bind(wxEVT_BUTTON, &MemoryCardListPanel_Simple::OnDuplicateFile, this, m_button_Duplicate->GetId());
|
||||
Bind(wxEVT_BUTTON, &MemoryCardListPanel_Simple::OnAssignUnassignFile, this, m_button_AssignUnassign->GetId());
|
||||
|
||||
// Popup Menu Connections!
|
||||
Connect( McdMenuId_Create, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnCreateOrDeleteCard) );
|
||||
Connect( McdMenuId_Convert, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnConvertCard) );
|
||||
//Connect( McdMenuId_Mount, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnMountCard) );
|
||||
Connect( McdMenuId_Rename, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnRenameFile) );
|
||||
Connect( McdMenuId_AssignUnassign, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnAssignUnassignFile) );
|
||||
Connect( McdMenuId_Duplicate, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnDuplicateFile) );
|
||||
//Bind(McdMenuId_Mount, &MemoryCardListPanel_Simple::OnMountCard, this, McdMenuId_Mount);
|
||||
Bind(wxEVT_MENU, &MemoryCardListPanel_Simple::OnCreateOrDeleteCard, this, McdMenuId_Create);
|
||||
Bind(wxEVT_MENU, &MemoryCardListPanel_Simple::OnConvertCard, this, McdMenuId_Convert);
|
||||
Bind(wxEVT_MENU, &MemoryCardListPanel_Simple::OnRenameFile, this, McdMenuId_Rename);
|
||||
Bind(wxEVT_MENU, &MemoryCardListPanel_Simple::OnDuplicateFile, this, McdMenuId_Duplicate);
|
||||
Bind(wxEVT_MENU, &MemoryCardListPanel_Simple::OnAssignUnassignFile, this, McdMenuId_AssignUnassign);
|
||||
|
||||
Connect( McdMenuId_RefreshList, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryCardListPanel_Simple::OnRefreshSelections) );
|
||||
Bind(wxEVT_MENU, &MemoryCardListPanel_Simple::OnRefreshSelections, this, McdMenuId_RefreshList);
|
||||
|
||||
//because the wxEVT_COMMAND_LIST_ITEM_DESELECTED doesn't work (buttons stay enabled when clicking an empty area of the list),
|
||||
// m_listview can send us an event that indicates a change at the list. Ugly, but works.
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
: _parent( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_VIRTUAL )
|
||||
{
|
||||
m_externHandler=NULL;
|
||||
Connect( this->GetId(), wxEVT_LEFT_UP, wxEventHandler(BaseMcdListView::OnChanged));
|
||||
Bind(wxEVT_LEFT_UP, &BaseMcdListView::OnChanged, this, this->GetId());
|
||||
|
||||
m_CardProvider = NULL;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ Panels::DocsFolderPickerPanel::DocsFolderPickerPanel( wxWindow* parent, bool isF
|
|||
*this += m_dirpicker_custom | pxExpand.Border( wxLEFT, StdPadding + m_radio_UserMode->GetIndentation() );
|
||||
*this += 4;
|
||||
|
||||
Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler(DocsFolderPickerPanel::OnRadioChanged) );
|
||||
Bind(wxEVT_RADIOBUTTON, &DocsFolderPickerPanel::OnRadioChanged, this);
|
||||
}
|
||||
|
||||
DocsModeType Panels::DocsFolderPickerPanel::GetDocsMode() const
|
||||
|
@ -129,7 +129,7 @@ Panels::LanguageSelectionPanel::LanguageSelectionPanel( wxWindow* parent, bool s
|
|||
*this += 5;
|
||||
}
|
||||
|
||||
Connect( pxID_RestartWizard, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LanguageSelectionPanel::OnApplyLanguage_Clicked ) );
|
||||
Bind(wxEVT_BUTTON, &LanguageSelectionPanel::OnApplyLanguage_Clicked, this, pxID_RestartWizard);
|
||||
|
||||
m_picker->SetSelection( 0 ); // always default to System Default
|
||||
}
|
||||
|
|
|
@ -429,14 +429,14 @@ Panels::PluginSelectorPanel::PluginSelectorPanel( wxWindow* parent )
|
|||
// refresh button used for diagnostics... (don't think there's a point to having one otherwise) --air
|
||||
//wxButton* refresh = new wxButton( this, wxID_ANY, L"Refresh" );
|
||||
//s_main.Add( refresh );
|
||||
//Connect( refresh->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PluginSelectorPanel::OnRefresh ) );
|
||||
//Bind(wxEVT_BUTTON, &PluginSelectorPanel::OnRefresh, this, refresh->GetId());
|
||||
|
||||
Connect( pxEvt_EnumeratedNext, wxCommandEventHandler( PluginSelectorPanel::OnProgress ) );
|
||||
Connect( pxEvt_EnumerationFinished, wxCommandEventHandler( PluginSelectorPanel::OnEnumComplete ) );
|
||||
Connect( pxEVT_ShowStatusBar, wxCommandEventHandler( PluginSelectorPanel::OnShowStatusBar ) );
|
||||
Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( PluginSelectorPanel::OnPluginSelected ) );
|
||||
Bind(pxEvt_EnumeratedNext, &PluginSelectorPanel::OnProgress, this);
|
||||
Bind(pxEvt_EnumerationFinished, &PluginSelectorPanel::OnEnumComplete, this);
|
||||
Bind(pxEVT_ShowStatusBar, &PluginSelectorPanel::OnShowStatusBar, this);
|
||||
Bind(wxEVT_COMBOBOX, &PluginSelectorPanel::OnPluginSelected, this);
|
||||
|
||||
Connect( ButtonId_Configure, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PluginSelectorPanel::OnConfigure_Clicked ) );
|
||||
Bind(wxEVT_BUTTON, &PluginSelectorPanel::OnConfigure_Clicked, this, ButtonId_Configure);
|
||||
}
|
||||
|
||||
Panels::PluginSelectorPanel::~PluginSelectorPanel() throw()
|
||||
|
|
|
@ -242,10 +242,10 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent )
|
|||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
Connect( m_slider_eecycle->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( SpeedHacksPanel::EECycleRate_Scroll ) );
|
||||
Connect( m_slider_vustealer->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( SpeedHacksPanel::VUCycleRate_Scroll ) );
|
||||
Connect( m_check_Enable->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksPanel::OnEnable_Toggled ) );
|
||||
Connect( wxID_DEFAULT, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SpeedHacksPanel::Defaults_Click ) );
|
||||
Bind(wxEVT_SCROLL_CHANGED, &SpeedHacksPanel::EECycleRate_Scroll, this, m_slider_eecycle->GetId());
|
||||
Bind(wxEVT_SCROLL_CHANGED, &SpeedHacksPanel::VUCycleRate_Scroll, this, m_slider_vustealer->GetId());
|
||||
Bind(wxEVT_CHECKBOX, &SpeedHacksPanel::OnEnable_Toggled, this, m_check_Enable->GetId());
|
||||
Bind(wxEVT_BUTTON, &SpeedHacksPanel::Defaults_Click, this, wxID_DEFAULT);
|
||||
}
|
||||
|
||||
// Doesn't modify values - only locks(gray out)/unlocks as necessary.
|
||||
|
|
|
@ -53,7 +53,7 @@ Panels::ThemeSelectorPanel::ThemeSelectorPanel( wxWindow* parent )
|
|||
*this += 8;
|
||||
*this += m_FolderPicker | StdExpand();
|
||||
|
||||
Connect( refreshButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ThemeSelectorPanel::OnRefreshSelections) );
|
||||
Bind(wxEVT_BUTTON, &ThemeSelectorPanel::OnRefreshSelections, this, refreshButton->GetId());
|
||||
}
|
||||
|
||||
Panels::ThemeSelectorPanel::~ThemeSelectorPanel() throw ()
|
||||
|
|
Loading…
Reference in New Issue