Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
ExportFFmpegCustomOptions Class Referencefinal

#include <ExportFFmpegDialogs.h>

Inheritance diagram for ExportFFmpegCustomOptions:
[legend]
Collaboration diagram for ExportFFmpegCustomOptions:
[legend]

Public Member Functions

 ExportFFmpegCustomOptions (wxWindow *parent, int format)
 
 ~ExportFFmpegCustomOptions ()
 
void PopulateOrExchange (ShuttleGui &S)
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
void OnOpen (wxCommandEvent &evt)
 
- Public Member Functions inherited from wxPanelWrapper
 wxPanelWrapper ()
 
 wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
void SetLabel (const TranslatableString &label)
 
void SetName (const TranslatableString &name)
 
void SetToolTip (const TranslatableString &toolTip)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Attributes

wxTextCtrl * mFormat
 
wxTextCtrl * mCodec
 

Detailed Description

Definition at line 174 of file ExportFFmpegDialogs.h.

Constructor & Destructor Documentation

◆ ExportFFmpegCustomOptions()

ExportFFmpegCustomOptions::ExportFFmpegCustomOptions ( wxWindow *  parent,
int  format 
)

Definition at line 769 of file ExportFFmpegDialogs.cpp.

770: wxPanelWrapper(parent, wxID_ANY),
771 mFormat(NULL),
772 mCodec(NULL)
773{
776
778}
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:48
#define S(N)
Definition: ToChars.cpp:64
void PopulateOrExchange(ShuttleGui &S)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628

References eIsCreatingFromPrefs, and S.

◆ ~ExportFFmpegCustomOptions()

ExportFFmpegCustomOptions::~ExportFFmpegCustomOptions ( )

Definition at line 780 of file ExportFFmpegDialogs.cpp.

781{
783}

References TransferDataFromWindow().

Here is the call graph for this function:

Member Function Documentation

◆ OnOpen()

void ExportFFmpegCustomOptions::OnOpen ( wxCommandEvent &  evt)

Definition at line 829 of file ExportFFmpegDialogs.cpp.

830{
831 // Show "Locate FFmpeg" dialog
832 auto ffmpeg = FFmpegFunctions::Load();
833 if (!ffmpeg)
834 {
836 if (!LoadFFmpeg(true))
837 {
838 return;
839 }
840 }
841
842#ifdef __WXMAC__
843 // Bug 2077 Must be a parent window on OSX or we will appear behind.
844 auto pWin = wxGetTopLevelParent( this );
845#else
846 // Use GetTopWindow on windows as there is no hWnd with top level parent.
847 auto pWin = wxTheApp->GetTopWindow();
848#endif
849
850 ExportFFmpegOptions od(pWin);
851 od.ShowModal();
852
854}
bool FindFFmpegLibs(wxWindow *parent)
Definition: FFmpeg.cpp:310
bool LoadFFmpeg(bool showerror)
Definition: FFmpeg.cpp:46
Custom FFmpeg export dialog.
static std::shared_ptr< FFmpegFunctions > Load(bool fromUserPathOnly=false)

References FindFFmpegLibs(), FFmpegFunctions::Load(), LoadFFmpeg(), and TransferDataToWindow().

Here is the call graph for this function:

◆ PopulateOrExchange()

void ExportFFmpegCustomOptions::PopulateOrExchange ( ShuttleGui S)

Definition at line 787 of file ExportFFmpegDialogs.cpp.

788{
789 S.StartHorizontalLay(wxCENTER);
790 {
791 S.StartVerticalLay(wxCENTER, 0);
792 {
793 S.Id(OpenID).AddButton(XXO("Open custom FFmpeg format options"));
794 S.StartMultiColumn(2, wxCENTER);
795 {
796 S.AddPrompt(XXO("Current Format:"));
797 mFormat = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 25);
798 S.AddPrompt(XXO("Current Codec:"));
799 mCodec = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 25);
800 }
801 S.EndMultiColumn();
802 }
803 S.EndHorizontalLay();
804 }
805 S.EndHorizontalLay();
806}
#define OpenID
#define XXO(s)
Definition: Internat.h:44

References mCodec, mFormat, OpenID, S, and XXO.

◆ TransferDataFromWindow()

bool ExportFFmpegCustomOptions::TransferDataFromWindow ( )
override

Definition at line 822 of file ExportFFmpegDialogs.cpp.

823{
824 return true;
825}

Referenced by ~ExportFFmpegCustomOptions().

Here is the caller graph for this function:

◆ TransferDataToWindow()

bool ExportFFmpegCustomOptions::TransferDataToWindow ( )
override

Definition at line 810 of file ExportFFmpegDialogs.cpp.

811{
812 if (mFormat)
813 {
814 mFormat->SetValue(gPrefs->Read(wxT("/FileFormats/FFmpegFormat"), wxT("")));
815 mCodec->SetValue(gPrefs->Read(wxT("/FileFormats/FFmpegCodec"), wxT("")));
816 }
817 return true;
818}
FileConfig * gPrefs
Definition: Prefs.cpp:71

References gPrefs, mCodec, and mFormat.

Referenced by OnOpen().

Here is the caller graph for this function:

Member Data Documentation

◆ mCodec

wxTextCtrl* ExportFFmpegCustomOptions::mCodec
private

Definition at line 189 of file ExportFFmpegDialogs.h.

Referenced by PopulateOrExchange(), and TransferDataToWindow().

◆ mFormat

wxTextCtrl* ExportFFmpegCustomOptions::mFormat
private

Definition at line 188 of file ExportFFmpegDialogs.h.

Referenced by PopulateOrExchange(), and TransferDataToWindow().


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