Audacity  3.0.3
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 175 of file ExportFFmpegDialogs.h.

Constructor & Destructor Documentation

◆ ExportFFmpegCustomOptions()

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

Definition at line 778 of file ExportFFmpegDialogs.cpp.

779 : wxPanelWrapper(parent, wxID_ANY),
780  mFormat(NULL),
781  mCodec(NULL)
782 {
785 
787 }

References eIsCreatingFromPrefs.

◆ ~ExportFFmpegCustomOptions()

ExportFFmpegCustomOptions::~ExportFFmpegCustomOptions ( )

Definition at line 789 of file ExportFFmpegDialogs.cpp.

790 {
792 }

References TransferDataFromWindow().

Here is the call graph for this function:

Member Function Documentation

◆ OnOpen()

void ExportFFmpegCustomOptions::OnOpen ( wxCommandEvent &  evt)

Definition at line 838 of file ExportFFmpegDialogs.cpp.

839 {
840  // Show "Locate FFmpeg" dialog
841  PickFFmpegLibs();
842  if (!FFmpegLibsInst()->ValidLibsLoaded())
843  {
844  FFmpegLibsInst()->FindLibs(NULL);
846  if (!LoadFFmpeg(true))
847  {
848  return;
849  }
850  }
851  DropFFmpegLibs();
852 
853 #ifdef __WXMAC__
854  // Bug 2077 Must be a parent window on OSX or we will appear behind.
855  auto pWin = wxGetTopLevelParent( this );
856 #else
857  // Use GetTopWindow on windows as there is no hWnd with top level parent.
858  auto pWin = wxTheApp->GetTopWindow();
859 #endif
860 
861  ExportFFmpegOptions od(pWin);
862  od.ShowModal();
863 
865 }

References DropFFmpegLibs(), FFmpegLibsInst(), FFmpegLibs::FindLibs(), FFmpegLibs::FreeLibs(), LoadFFmpeg(), PickFFmpegLibs(), and TransferDataToWindow().

Here is the call graph for this function:

◆ PopulateOrExchange()

void ExportFFmpegCustomOptions::PopulateOrExchange ( ShuttleGui S)

Definition at line 796 of file ExportFFmpegDialogs.cpp.

797 {
798  S.StartHorizontalLay(wxCENTER);
799  {
800  S.StartVerticalLay(wxCENTER, 0);
801  {
802  S.Id(OpenID).AddButton(XXO("Open custom FFmpeg format options"));
803  S.StartMultiColumn(2, wxCENTER);
804  {
805  S.AddPrompt(XXO("Current Format:"));
806  mFormat = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 25);
807  S.AddPrompt(XXO("Current Codec:"));
808  mCodec = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 25);
809  }
810  S.EndMultiColumn();
811  }
812  S.EndHorizontalLay();
813  }
814  S.EndHorizontalLay();
815 }

References ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddPrompt(), ShuttleGuiBase::AddTextBox(), ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndMultiColumn(), ShuttleGui::Id(), mCodec, mFormat, OpenID, ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartVerticalLay(), ShuttleGui::Style(), and XXO.

Here is the call graph for this function:

◆ TransferDataFromWindow()

bool ExportFFmpegCustomOptions::TransferDataFromWindow ( )
override

Definition at line 831 of file ExportFFmpegDialogs.cpp.

832 {
833  return true;
834 }

Referenced by ~ExportFFmpegCustomOptions().

Here is the caller graph for this function:

◆ TransferDataToWindow()

bool ExportFFmpegCustomOptions::TransferDataToWindow ( )
override

Definition at line 819 of file ExportFFmpegDialogs.cpp.

820 {
821  if (mFormat)
822  {
823  mFormat->SetValue(gPrefs->Read(wxT("/FileFormats/FFmpegFormat"), wxT("")));
824  mCodec->SetValue(gPrefs->Read(wxT("/FileFormats/FFmpegCodec"), wxT("")));
825  }
826  return true;
827 }

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 190 of file ExportFFmpegDialogs.h.

Referenced by PopulateOrExchange(), and TransferDataToWindow().

◆ mFormat

wxTextCtrl* ExportFFmpegCustomOptions::mFormat
private

Definition at line 189 of file ExportFFmpegDialogs.h.

Referenced by PopulateOrExchange(), and TransferDataToWindow().


The documentation for this class was generated from the following files:
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1184
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:70
FFmpegLibs::FreeLibs
void FreeLibs()
! Frees (unloads) loaded libraries
Definition: FFmpeg.cpp:1017
FFmpegLibs::FindLibs
bool FindLibs(wxWindow *parent)
Definition: FFmpeg.cpp:645
OpenID
#define OpenID
Definition: ExportFFmpegDialogs.cpp:772
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
PickFFmpegLibs
FFmpegLibs * PickFFmpegLibs()
Definition: FFmpeg.cpp:52
ExportFFmpegCustomOptions::TransferDataToWindow
bool TransferDataToWindow() override
Definition: ExportFFmpegDialogs.cpp:819
ShuttleGui::Id
ShuttleGui & Id(int id)
Definition: ShuttleGui.cpp:2274
LoadFFmpeg
bool LoadFFmpeg(bool showerror)
Definition: FFmpeg.cpp:72
ShuttleGui::Style
ShuttleGui & Style(long iStyle)
Definition: ShuttleGui.h:727
ExportFFmpegCustomOptions::mFormat
wxTextCtrl * mFormat
Definition: ExportFFmpegDialogs.h:189
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1177
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1167
ShuttleGuiBase::AddTextBox
wxTextCtrl * AddTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:638
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
ExportFFmpegOptions
Custom FFmpeg export dialog.
Definition: ExportFFmpegDialogs.h:208
ShuttleGuiBase::AddButton
wxButton * AddButton(const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
Definition: ShuttleGui.cpp:360
ExportFFmpegCustomOptions::mCodec
wxTextCtrl * mCodec
Definition: ExportFFmpegDialogs.h:190
FFmpegLibsInst
FFmpegLibs * FFmpegLibsInst()
Definition: FFmpeg.cpp:47
wxPanelWrapper::wxPanelWrapper
wxPanelWrapper()
Definition: wxPanelWrapper.h:44
DropFFmpegLibs
void DropFFmpegLibs()
Definition: FFmpeg.cpp:62
ShuttleGuiBase::AddPrompt
void AddPrompt(const TranslatableString &Prompt, int wrapWidth=0)
Right aligned text string.
Definition: ShuttleGui.cpp:238
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
ExportFFmpegCustomOptions::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S)
Definition: ExportFFmpegDialogs.cpp:796
ExportFFmpegCustomOptions::TransferDataFromWindow
bool TransferDataFromWindow() override
Definition: ExportFFmpegDialogs.cpp:831
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631