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

#include <ImportStreamDialog.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 20 of file ImportStreamDialog.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 27 of file ImportStreamDialog.cpp.

28 :
29wxDialogWrapper( parent, id, title, position, size, style | wxRESIZE_BORDER )
30{
31 SetName();
32
33 mFile = _mFile;
35 for (wxInt32 i = 0; i < scount; i++)
36 mFile->SetStreamUsage(i, FALSE);
37
38 ShuttleGui S{ this, eIsCreating };
39 {
40 S.SetBorder( 5 );
41
43 S
44 .Prop(1)
45 .Position(wxEXPAND | wxALIGN_LEFT | wxALL)
46 .Style(wxLB_EXTENDED | wxLB_ALWAYS_SB)
47 .AddListBox(
48 transform_container<wxArrayStringEx>(
50 std::mem_fn( &TranslatableString::Translation ) ) );
51
52 S.AddStandardButtons();
53 }
54
55 SetAutoLayout(true);
56 GetSizer()->Fit( this );
57
58 SetSize( 400, 200 );
59}
static const auto title
@ eIsCreating
Definition: ShuttleGui.h:37
#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
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
wxString Translation() const

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

Here is the call graph for this function:

◆ ~ImportStreamDialog()

ImportStreamDialog::~ImportStreamDialog ( )
virtual

Definition at line 61 of file ImportStreamDialog.cpp.

62{
63
64}

Member Function Documentation

◆ OnCancel()

void ImportStreamDialog::OnCancel ( wxCommandEvent &  event)
private

Definition at line 75 of file ImportStreamDialog.cpp.

76{
77 EndModal( wxID_CANCEL );
78}

◆ OnOk()

void ImportStreamDialog::OnOk ( wxCommandEvent &  event)
private

Definition at line 66 of file ImportStreamDialog.cpp.

67{
68 wxArrayInt selitems;
69 int sels = StreamList->GetSelections(selitems);
70 for (wxInt32 i = 0; i < sels; i++)
71 mFile->SetStreamUsage(selitems[i],TRUE);
72 EndModal( wxID_OK );
73}

References mFile, ImportFileHandle::SetStreamUsage(), and StreamList.

Here is the call graph for this function:

Member Data Documentation

◆ mFile

ImportFileHandle* ImportStreamDialog::mFile
private

Definition at line 32 of file ImportStreamDialog.h.

Referenced by OnOk().

◆ scount

wxInt32 ImportStreamDialog::scount
private

Definition at line 33 of file ImportStreamDialog.h.

◆ StreamList

wxListBox* ImportStreamDialog::StreamList
private

Definition at line 34 of file ImportStreamDialog.h.

Referenced by OnOk().


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