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 766 of file ExportFFmpegDialogs.cpp.

767: wxPanelWrapper(parent, wxID_ANY),
768 mFormat(NULL),
769 mCodec(NULL)
770{
773
775}
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
#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:625

References eIsCreatingFromPrefs, and S.

◆ ~ExportFFmpegCustomOptions()

ExportFFmpegCustomOptions::~ExportFFmpegCustomOptions ( )

Definition at line 777 of file ExportFFmpegDialogs.cpp.

778{
780}

References TransferDataFromWindow().

Here is the call graph for this function:

Member Function Documentation

◆ OnOpen()

void ExportFFmpegCustomOptions::OnOpen ( wxCommandEvent &  evt)

Definition at line 826 of file ExportFFmpegDialogs.cpp.

827{
828 // Show "Locate FFmpeg" dialog
829 auto ffmpeg = FFmpegFunctions::Load();
830 if (!ffmpeg)
831 {
833 if (!LoadFFmpeg(true))
834 {
835 return;
836 }
837 }
838
839#ifdef __WXMAC__
840 // Bug 2077 Must be a parent window on OSX or we will appear behind.
841 auto pWin = wxGetTopLevelParent( this );
842#else
843 // Use GetTopWindow on windows as there is no hWnd with top level parent.
844 auto pWin = wxTheApp->GetTopWindow();
845#endif
846
847 ExportFFmpegOptions od(pWin);
848 od.ShowModal();
849
851}
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 784 of file ExportFFmpegDialogs.cpp.

785{
786 S.StartHorizontalLay(wxCENTER);
787 {
788 S.StartVerticalLay(wxCENTER, 0);
789 {
790 S.Id(OpenID).AddButton(XXO("Open custom FFmpeg format options"));
791 S.StartMultiColumn(2, wxCENTER);
792 {
793 S.AddPrompt(XXO("Current Format:"));
794 mFormat = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 25);
795 S.AddPrompt(XXO("Current Codec:"));
796 mCodec = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 25);
797 }
798 S.EndMultiColumn();
799 }
800 S.EndHorizontalLay();
801 }
802 S.EndHorizontalLay();
803}
wxT("CloseDown"))
#define OpenID
XXO("&Cut/Copy/Paste Toolbar")

References mCodec, mFormat, OpenID, S, wxT(), and XXO().

Here is the call graph for this function:

◆ TransferDataFromWindow()

bool ExportFFmpegCustomOptions::TransferDataFromWindow ( )
override

Definition at line 819 of file ExportFFmpegDialogs.cpp.

820{
821 return true;
822}

Referenced by ~ExportFFmpegCustomOptions().

Here is the caller graph for this function:

◆ TransferDataToWindow()

bool ExportFFmpegCustomOptions::TransferDataToWindow ( )
override

Definition at line 807 of file ExportFFmpegDialogs.cpp.

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

References gPrefs, mCodec, mFormat, and wxT().

Referenced by OnOpen().

Here is the call graph for this function:
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: