Audacity  2.2.2
Public Member Functions | Private Attributes | List of all members
FindDialog Class Referencefinal
Inheritance diagram for FindDialog:
wxDialogWrapper wxTabTraversalWrapper< wxDialog >

Public Member Functions

 FindDialog (wxWindow *parent, wxString path, wxString name, wxString type)
 
void PopulateOrExchange (ShuttleGui &S)
 
void OnBrowse (wxCommandEvent &WXUNUSED(event))
 
void OnDownload (wxCommandEvent &WXUNUSED(event))
 
wxString GetLibPath ()
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=_("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=_("Dialog"))
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&...args)
 

Private Attributes

wxFileName mLibPath
 
wxString mPath
 
wxString mName
 
wxString mType
 
wxTextCtrl * mPathText
 

Detailed Description

Definition at line 579 of file ExportMP3.cpp.

Constructor & Destructor Documentation

FindDialog::FindDialog ( wxWindow *  parent,
wxString  path,
wxString  name,
wxString  type 
)
inline

Definition at line 585 of file ExportMP3.cpp.

References eIsCreating, mLibPath, mName, mPath, mType, name, and PopulateOrExchange().

586  : wxDialogWrapper(parent, wxID_ANY,
587  /* i18n-hint: LAME is the name of an MP3 converter and should not be translated*/
588  wxString(_("Locate LAME")))
589  {
590  SetName(GetTitle());
591  ShuttleGui S(this, eIsCreating);
592 
593  mPath = path;
594  mName = name;
595  mType = type;
596 
597  mLibPath.Assign(mPath, mName);
598 
600  }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
wxFileName mLibPath
Definition: ExportMP3.cpp:688
wxString mType
Definition: ExportMP3.cpp:692
wxString mName
Definition: ExportMP3.cpp:691
wxString mPath
Definition: ExportMP3.cpp:690
void PopulateOrExchange(ShuttleGui &S)
Definition: ExportMP3.cpp:602
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
const wxChar * name
Definition: Distortion.cpp:94

Member Function Documentation

wxString FindDialog::GetLibPath ( )
inline

Definition at line 678 of file ExportMP3.cpp.

References mLibPath.

Referenced by MP3Exporter::FindLibrary().

679  {
680  return mLibPath.GetFullPath();
681  }
wxFileName mLibPath
Definition: ExportMP3.cpp:688
void FindDialog::OnBrowse ( wxCommandEvent &  WXUNUSEDevent)
inline

Definition at line 651 of file ExportMP3.cpp.

References _(), FileNames::_None, mLibPath, mName, mPathText, mType, and FileNames::SelectFile().

652  {
653  wxString question;
654  /* i18n-hint: It's asking for the location of a file, for
655  * example, "Where is lame_enc.dll?" - you could translate
656  * "Where would I find the file %s" instead if you want. */
657  question.Printf(_("Where is %s?"), mName);
658 
660  question,
661  mLibPath.GetPath(),
662  mLibPath.GetName(),
663  wxT(""),
664  mType,
665  wxFD_OPEN | wxRESIZE_BORDER,
666  this);
667  if (!path.IsEmpty()) {
668  mLibPath = path;
669  mPathText->SetValue(path);
670  }
671  }
wxFileName mLibPath
Definition: ExportMP3.cpp:688
wxTextCtrl * mPathText
Definition: ExportMP3.cpp:695
wxString mType
Definition: ExportMP3.cpp:692
wxString mName
Definition: ExportMP3.cpp:691
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:411
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
void FindDialog::OnDownload ( wxCommandEvent &  WXUNUSEDevent)
inline

Definition at line 673 of file ExportMP3.cpp.

References HelpSystem::ShowHelp().

674  {
675  HelpSystem::ShowHelp(this, wxT("FAQ:Installing_the_LAME_MP3_Encoder"));
676  }
static void ShowHelp(wxWindow *parent, const wxString &localFileName, const wxString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Definition: HelpSystem.cpp:195
void FindDialog::PopulateOrExchange ( ShuttleGui S)
inline

Definition at line 602 of file ExportMP3.cpp.

References _(), ShuttleGuiBase::AddButton(), ShuttleGui::AddStandardButtons(), ShuttleGuiBase::AddTextBox(), ShuttleGuiBase::AddTitle(), ShuttleGuiBase::AddVariableText(), ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndVerticalLay(), ShuttleGui::Id(), ID_BROWSE, ID_DLOAD, mLibPath, mName, mPathText, ShuttleGuiBase::SetBorder(), ShuttleGuiBase::SetStretchyCol(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartMultiColumn(), and ShuttleGuiBase::StartVerticalLay().

Referenced by FindDialog().

603  {
604  wxString text;
605 
606  S.SetBorder(10);
607  S.StartVerticalLay(true);
608  {
609  text.Printf(_("Audacity needs the file %s to create MP3s."), mName);
610  S.AddTitle(text);
611 
612  S.SetBorder(3);
613  S.StartHorizontalLay(wxALIGN_LEFT, true);
614  {
615  text.Printf(_("Location of %s:"), mName);
616  S.AddTitle(text);
617  }
618  S.EndHorizontalLay();
619 
620  S.StartMultiColumn(2, wxEXPAND);
621  S.SetStretchyCol(0);
622  {
623  if (mLibPath.GetFullPath().IsEmpty()) {
624  /* i18n-hint: There is a button to the right of the arrow.*/
625  text.Printf(_("To find %s, click here -->"), mName);
626  mPathText = S.AddTextBox( {}, text, 0);
627  }
628  else {
629  mPathText = S.AddTextBox( {}, mLibPath.GetFullPath(), 0);
630  }
631  S.Id(ID_BROWSE).AddButton(_("Browse..."), wxALIGN_RIGHT);
632  /* i18n-hint: There is a button to the right of the arrow.*/
633  S.AddVariableText(_("To get a free copy of LAME, click here -->"), true);
634  /* i18n-hint: (verb)*/
635  S.Id(ID_DLOAD).AddButton(_("Download"), wxALIGN_RIGHT);
636  }
637  S.EndMultiColumn();
638 
639  S.AddStandardButtons();
640  }
641  S.EndVerticalLay();
642 
643  Layout();
644  Fit();
645  SetMinSize(GetSize());
646  Center();
647 
648  return;
649  }
wxFileName mLibPath
Definition: ExportMP3.cpp:688
void EndMultiColumn()
wxTextCtrl * mPathText
Definition: ExportMP3.cpp:695
#define ID_DLOAD
Definition: ExportMP3.cpp:577
void EndHorizontalLay()
void EndVerticalLay()
wxTextCtrl * AddTextBox(const wxString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:540
wxString mName
Definition: ExportMP3.cpp:691
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
#define ID_BROWSE
Definition: ExportMP3.cpp:576
ShuttleGui & Id(int id)
void AddTitle(const wxString &Prompt)
Centred text string.
Definition: ShuttleGui.cpp:274
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxStaticText * AddVariableText(const wxString &Str, bool bCenter=false, int PositionFlags=0)
Definition: ShuttleGui.cpp:414
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxButton *extra=NULL)
void SetBorder(int Border)
Definition: ShuttleGui.h:286
wxButton * AddButton(const wxString &Text, int PositionFlags=wxALIGN_CENTRE)
Definition: ShuttleGui.cpp:341
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:203
void StartVerticalLay(int iProp=1)

Member Data Documentation

wxFileName FindDialog::mLibPath
private

Definition at line 688 of file ExportMP3.cpp.

Referenced by FindDialog(), GetLibPath(), OnBrowse(), and PopulateOrExchange().

wxString FindDialog::mName
private

Definition at line 691 of file ExportMP3.cpp.

Referenced by FindDialog(), OnBrowse(), and PopulateOrExchange().

wxString FindDialog::mPath
private

Definition at line 690 of file ExportMP3.cpp.

Referenced by FindDialog().

wxTextCtrl* FindDialog::mPathText
private

Definition at line 695 of file ExportMP3.cpp.

Referenced by OnBrowse(), and PopulateOrExchange().

wxString FindDialog::mType
private

Definition at line 692 of file ExportMP3.cpp.

Referenced by FindDialog(), and OnBrowse().


The documentation for this class was generated from the following file: