mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 16:09:28 +02:00
Add buttons. Help and Cancel.
This commit is contained in:
parent
7c819595bf
commit
a137885769
@ -52,6 +52,7 @@ ShuttleGui.
|
|||||||
#include "../widgets/LinkingHtmlWindow.h"
|
#include "../widgets/LinkingHtmlWindow.h"
|
||||||
#include "../widgets/ErrorDialog.h"
|
#include "../widgets/ErrorDialog.h"
|
||||||
#include "../FileNames.h"
|
#include "../FileNames.h"
|
||||||
|
#include "../widgets/HelpSystem.h"
|
||||||
|
|
||||||
#include "../commands/CommandTargets.h"
|
#include "../commands/CommandTargets.h"
|
||||||
|
|
||||||
@ -256,6 +257,8 @@ int AudacityCommand::MessageBox(const wxString& message, long style, const wxStr
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(AudacityCommandDialog, wxDialogWrapper)
|
BEGIN_EVENT_TABLE(AudacityCommandDialog, wxDialogWrapper)
|
||||||
EVT_BUTTON(wxID_OK, AudacityCommandDialog::OnOk)
|
EVT_BUTTON(wxID_OK, AudacityCommandDialog::OnOk)
|
||||||
|
EVT_BUTTON(wxID_HELP, AudacityCommandDialog::OnHelp)
|
||||||
|
EVT_BUTTON(wxID_CANCEL, AudacityCommandDialog::OnCancel)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
AudacityCommandDialog::AudacityCommandDialog(wxWindow * parent,
|
AudacityCommandDialog::AudacityCommandDialog(wxWindow * parent,
|
||||||
@ -269,7 +272,7 @@ AudacityCommandDialog::AudacityCommandDialog(wxWindow * parent,
|
|||||||
mType = type;
|
mType = type;
|
||||||
wxASSERT( pCommand );
|
wxASSERT( pCommand );
|
||||||
mpCommand = pCommand;
|
mpCommand = pCommand;
|
||||||
mAdditionalButtons = additionalButtons;
|
mAdditionalButtons = additionalButtons |eCancelButton | eHelpButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudacityCommandDialog::Init()
|
bool AudacityCommandDialog::Init()
|
||||||
@ -340,3 +343,13 @@ void AudacityCommandDialog::OnCancel(wxCommandEvent & WXUNUSED(evt))
|
|||||||
EndModal(false);
|
EndModal(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AudacityCommandDialog::OnHelp(wxCommandEvent & WXUNUSED(event))
|
||||||
|
{
|
||||||
|
if( mpCommand )
|
||||||
|
{
|
||||||
|
// otherwise use ShowHelp
|
||||||
|
HelpSystem::ShowHelp(FindWindow(wxID_HELP), mpCommand->ManualPage(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,6 +172,7 @@ public:
|
|||||||
virtual void PopulateOrExchange(ShuttleGui & S);
|
virtual void PopulateOrExchange(ShuttleGui & S);
|
||||||
virtual void OnOk(wxCommandEvent & evt);
|
virtual void OnOk(wxCommandEvent & evt);
|
||||||
virtual void OnCancel(wxCommandEvent & evt);
|
virtual void OnCancel(wxCommandEvent & evt);
|
||||||
|
virtual void OnHelp(wxCommandEvent & evt);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int mType;
|
int mType;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user