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)
 
 ~wxTabTraversalWrapper ()
 

Private Attributes

wxFileName mLibPath
 
wxString mPath
 
wxString mName
 
wxString mType
 
wxTextCtrl * mPathText
 

Detailed Description

Definition at line 584 of file ExportMP3.cpp.

Constructor & Destructor Documentation

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

Definition at line 590 of file ExportMP3.cpp.

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

591  : wxDialogWrapper(parent, wxID_ANY,
592  /* i18n-hint: LAME is the name of an MP3 converter and should not be translated*/
593  wxString(_("Locate LAME")))
594  {
595  SetName(GetTitle());
596  ShuttleGui S(this, eIsCreating);
597 
598  mPath = path;
599  mName = name;
600  mType = type;
601 
602  mLibPath.Assign(mPath, mName);
603 
605  }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:366
wxFileName mLibPath
Definition: ExportMP3.cpp:693
wxString mType
Definition: ExportMP3.cpp:697
wxString mName
Definition: ExportMP3.cpp:696
wxString mPath
Definition: ExportMP3.cpp:695
void PopulateOrExchange(ShuttleGui &S)
Definition: ExportMP3.cpp:607
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
const wxChar * name
Definition: Distortion.cpp:94

Member Function Documentation

wxString FindDialog::GetLibPath ( )
inline

Definition at line 683 of file ExportMP3.cpp.

References mLibPath.

Referenced by MP3Exporter::FindLibrary().

684  {
685  return mLibPath.GetFullPath();
686  }
wxFileName mLibPath
Definition: ExportMP3.cpp:693
void FindDialog::OnBrowse ( wxCommandEvent &  WXUNUSEDevent)
inline

Definition at line 656 of file ExportMP3.cpp.

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

657  {
658  wxString question;
659  /* i18n-hint: It's asking for the location of a file, for
660  * example, "Where is lame_enc.dll?" - you could translate
661  * "Where would I find the file %s" instead if you want. */
662  question.Printf(_("Where is %s?"), mName);
663 
665  question,
666  mLibPath.GetPath(),
667  mLibPath.GetName(),
668  wxT(""),
669  mType,
670  wxFD_OPEN | wxRESIZE_BORDER,
671  this);
672  if (!path.IsEmpty()) {
673  mLibPath = path;
674  mPathText->SetValue(path);
675  }
676  }
wxFileName mLibPath
Definition: ExportMP3.cpp:693
wxTextCtrl * mPathText
Definition: ExportMP3.cpp:700
wxString mType
Definition: ExportMP3.cpp:697
wxString mName
Definition: ExportMP3.cpp:696
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
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:405
void FindDialog::OnDownload ( wxCommandEvent &  WXUNUSEDevent)
inline

Definition at line 678 of file ExportMP3.cpp.

References HelpSystem::ShowHelp().

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

Definition at line 607 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().

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

Member Data Documentation

wxFileName FindDialog::mLibPath
private

Definition at line 693 of file ExportMP3.cpp.

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

wxString FindDialog::mName
private

Definition at line 696 of file ExportMP3.cpp.

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

wxString FindDialog::mPath
private

Definition at line 695 of file ExportMP3.cpp.

Referenced by FindDialog().

wxTextCtrl* FindDialog::mPathText
private

Definition at line 700 of file ExportMP3.cpp.

Referenced by OnBrowse(), and PopulateOrExchange().

wxString FindDialog::mType
private

Definition at line 697 of file ExportMP3.cpp.

Referenced by FindDialog(), and OnBrowse().


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