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

#include <Import.h>

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

Public Member Functions

 ImportStreamDialog (ImportFileHandle *_mFile, wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
 
virtual ~ImportStreamDialog ()
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Member Functions

void OnOk (wxCommandEvent &event)
 
void OnCancel (wxCommandEvent &event)
 

Private Attributes

ImportFileHandlemFile
 
wxInt32 scount
 
wxListBox * StreamList
 

Detailed Description

Definition at line 190 of file Import.h.

Constructor & Destructor Documentation

◆ ImportStreamDialog()

ImportStreamDialog::ImportStreamDialog ( ImportFileHandle _mFile,
wxWindow *  parent,
wxWindowID  id,
const TranslatableString title,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER 
)

Definition at line 840 of file Import.cpp.

841 :
842wxDialogWrapper( parent, id, title, position, size, style | wxRESIZE_BORDER )
843{
844 SetName();
845
846 mFile = _mFile;
848 for (wxInt32 i = 0; i < scount; i++)
849 mFile->SetStreamUsage(i, FALSE);
850
851 ShuttleGui S{ this, eIsCreating };
852 {
853 S.SetBorder( 5 );
854
855 StreamList =
856 S
857 .Prop(1)
858 .Position(wxEXPAND | wxALIGN_LEFT | wxALL)
859 .Style(wxLB_EXTENDED | wxLB_ALWAYS_SB)
860 .AddListBox(
861 transform_container<wxArrayStringEx>(
863 std::mem_fn( &TranslatableString::Translation ) ) );
864
865 S.AddStandardButtons();
866 }
867
868 SetAutoLayout(true);
869 GetSizer()->Fit( this );
870
871 SetSize( 400, 200 );
872}
static const auto title
@ eIsCreating
Definition: ShuttleGui.h:39
#define S(N)
Definition: ToChars.cpp:64
virtual wxInt32 GetStreamCount()=0
virtual const TranslatableStrings & GetStreamInfo()=0
virtual void SetStreamUsage(wxInt32 StreamID, bool Use)=0
ImportFileHandle * mFile
Definition: Import.h:202
wxListBox * StreamList
Definition: Import.h:204
wxInt32 scount
Definition: Import.h:203
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628
wxString Translation() const

References eIsCreating, S, and TranslatableString::Translation().

Here is the call graph for this function:

◆ ~ImportStreamDialog()

ImportStreamDialog::~ImportStreamDialog ( )
virtual

Definition at line 874 of file Import.cpp.

875{
876
877}

Member Function Documentation

◆ OnCancel()

void ImportStreamDialog::OnCancel ( wxCommandEvent &  event)
private

Definition at line 888 of file Import.cpp.

889{
890 EndModal( wxID_CANCEL );
891}

◆ OnOk()

void ImportStreamDialog::OnOk ( wxCommandEvent &  event)
private

Definition at line 879 of file Import.cpp.

880{
881 wxArrayInt selitems;
882 int sels = StreamList->GetSelections(selitems);
883 for (wxInt32 i = 0; i < sels; i++)
884 mFile->SetStreamUsage(selitems[i],TRUE);
885 EndModal( wxID_OK );
886}

Member Data Documentation

◆ mFile

ImportFileHandle* ImportStreamDialog::mFile
private

Definition at line 202 of file Import.h.

◆ scount

wxInt32 ImportStreamDialog::scount
private

Definition at line 203 of file Import.h.

◆ StreamList

wxListBox* ImportStreamDialog::StreamList
private

Definition at line 204 of file Import.h.


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