Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
cloud::audiocom::ShareAudioDialog::ProgressPanel Struct Referencefinal

Public Member Functions

void PopulateProgressPanel (ShuttleGui &s)
 

Public Attributes

wxWindow * root { nullptr }
 
wxStaticText * title { nullptr }
 
wxGauge * progress { nullptr }
 
wxWindow * timePanel { nullptr }
 
wxStaticText * elapsedTime { nullptr }
 
wxStaticText * remainingTime { nullptr }
 
wxWindow * linkPanel { nullptr }
 
wxTextCtrl * link { nullptr }
 
wxButton * copyButton { nullptr }
 
wxStaticText * info { nullptr }
 

Detailed Description

Definition at line 88 of file ShareAudioDialog.h.

Member Function Documentation

◆ PopulateProgressPanel()

void cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel ( ShuttleGui s)

Definition at line 792 of file ShareAudioDialog.cpp.

793{
795 root->Hide();
796 s.StartVerticalLay(wxEXPAND, 1);
797 {
798 s.SetBorder(0);
799
800 title = s.AddVariableText(XO("Preparing audio..."));
801 s.AddSpace(0, 16, 0);
802
803 progress = safenew wxGauge { s.GetParent(), wxID_ANY, 100 };
804 s.AddWindow(progress, wxEXPAND);
805
807 {
808 s.AddSpace(0, 16, 0);
809
810 s.StartWrapLay();
811 {
812 s.AddFixedText(XO("Elapsed Time:"));
813 elapsedTime = s.AddVariableText(Verbatim(" 00:00:00"));
814 }
815 s.EndWrapLay();
816
817 s.StartWrapLay();
818 {
819 s.AddFixedText(XO("Remaining Time:"));
820 remainingTime = s.AddVariableText(Verbatim(" 00:00:00"));
821 }
822 s.EndWrapLay();
823 }
825
827 {
828 s.AddSpace(0, 16, 0);
829
830 s.AddFixedText(XO("Shareable link"));
831
832 s.StartHorizontalLay(wxEXPAND, 0);
833 {
834 link = s.AddTextBox(TranslatableString {}, "https://audio.com", 0);
835 link->SetName(XO("Shareable link").Translation());
836 link->SetEditable(false);
837 link->SetMinSize({ 360, -1 });
838
839 s.AddSpace(1, 0, 1);
840
841 copyButton = s.AddButton(XO("Copy"));
842 copyButton->Bind(
843 wxEVT_BUTTON,
844 [this](auto)
845 {
846 if (wxTheClipboard->Open())
847 {
848 wxTheClipboard->SetData(
849 safenew wxTextDataObject(link->GetValue()));
850 wxTheClipboard->Close();
851 }
852 });
853 }
855 }
857
858 s.AddSpace(0, 16, 0);
859
861 }
862
863 s.EndVerticalLay();
865
866 wxFont font = elapsedTime->GetFont();
867 font.MakeBold();
868
869 elapsedTime->SetFont(font);
870 remainingTime->SetFont(font);
871}
XO("Cut/Copy/Paste")
#define safenew
Definition: MemoryX.h:10
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
void SetBorder(int Border)
Definition: ShuttleGui.h:486
void EndVerticalLay()
void EndInvisiblePanel()
wxPanel * StartInvisiblePanel(int border=0)
wxWindow * GetParent()
Definition: ShuttleGui.h:493
wxTextCtrl * AddTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:639
void StartVerticalLay(int iProp=1)
wxButton * AddButton(const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
Definition: ShuttleGui.cpp:361
void EndHorizontalLay()
void StartWrapLay(int PositionFlags=wxEXPAND, int iProp=0)
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
wxWindow * AddWindow(wxWindow *pWindow, int PositionFlags=wxALIGN_CENTRE)
Definition: ShuttleGui.cpp:300
void AddFixedText(const TranslatableString &Str, bool bCenter=false, int wrapWidth=0)
Definition: ShuttleGui.cpp:441
wxStaticText * AddVariableText(const TranslatableString &Str, bool bCenter=false, int PositionFlags=0, int wrapWidth=0)
Definition: ShuttleGui.cpp:464
wxSizerItem * AddSpace(int width, int height, int prop=0)
Holds a msgid for the translation catalog; may also bind format arguments.

References ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddFixedText(), ShuttleGui::AddSpace(), ShuttleGuiBase::AddTextBox(), ShuttleGuiBase::AddVariableText(), ShuttleGuiBase::AddWindow(), ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndInvisiblePanel(), ShuttleGuiBase::EndVerticalLay(), ShuttleGuiBase::EndWrapLay(), ShuttleGuiBase::GetParent(), cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::publicDescriptionText, safenew, ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartInvisiblePanel(), ShuttleGuiBase::StartVerticalLay(), ShuttleGuiBase::StartWrapLay(), title, Verbatim(), and XO().

Referenced by cloud::audiocom::ShareAudioDialog::Populate().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ copyButton

wxButton* cloud::audiocom::ShareAudioDialog::ProgressPanel::copyButton { nullptr }

Definition at line 101 of file ShareAudioDialog.h.

◆ elapsedTime

wxStaticText* cloud::audiocom::ShareAudioDialog::ProgressPanel::elapsedTime { nullptr }

Definition at line 96 of file ShareAudioDialog.h.

◆ info

wxStaticText* cloud::audiocom::ShareAudioDialog::ProgressPanel::info { nullptr }

◆ link

wxTextCtrl* cloud::audiocom::ShareAudioDialog::ProgressPanel::link { nullptr }

Definition at line 100 of file ShareAudioDialog.h.

◆ linkPanel

wxWindow* cloud::audiocom::ShareAudioDialog::ProgressPanel::linkPanel { nullptr }

◆ progress

wxGauge* cloud::audiocom::ShareAudioDialog::ProgressPanel::progress { nullptr }

Definition at line 93 of file ShareAudioDialog.h.

◆ remainingTime

wxStaticText* cloud::audiocom::ShareAudioDialog::ProgressPanel::remainingTime { nullptr }

Definition at line 97 of file ShareAudioDialog.h.

◆ root

wxWindow* cloud::audiocom::ShareAudioDialog::ProgressPanel::root { nullptr }

◆ timePanel

wxWindow* cloud::audiocom::ShareAudioDialog::ProgressPanel::timePanel { nullptr }

Definition at line 95 of file ShareAudioDialog.h.

◆ title

wxStaticText* cloud::audiocom::ShareAudioDialog::ProgressPanel::title { nullptr }

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