Audacity  3.0.3
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 844 of file Import.cpp.

845  :
846 wxDialogWrapper( parent, id, title, position, size, style | wxRESIZE_BORDER )
847 {
848  SetName();
849 
850  mFile = _mFile;
852  for (wxInt32 i = 0; i < scount; i++)
853  mFile->SetStreamUsage(i, FALSE);
854 
855  ShuttleGui S{ this, eIsCreating };
856  {
857  S.SetBorder( 5 );
858 
859  StreamList =
860  S
861  .Prop(1)
862  .Position(wxEXPAND | wxALIGN_LEFT | wxALL)
863  .Style(wxLB_EXTENDED | wxLB_ALWAYS_SB)
864  .AddListBox(
865  transform_container<wxArrayStringEx>(
866  mFile->GetStreamInfo(),
867  std::mem_fn( &TranslatableString::Translation ) ) );
868 
869  S.AddStandardButtons();
870  }
871 
872  SetAutoLayout(true);
873  GetSizer()->Fit( this );
874 
875  SetSize( 400, 200 );
876 }

References eIsCreating, and TranslatableString::Translation().

Here is the call graph for this function:

◆ ~ImportStreamDialog()

ImportStreamDialog::~ImportStreamDialog ( )
virtual

Definition at line 878 of file Import.cpp.

879 {
880 
881 }

Member Function Documentation

◆ OnCancel()

void ImportStreamDialog::OnCancel ( wxCommandEvent &  event)
private

Definition at line 892 of file Import.cpp.

893 {
894  EndModal( wxID_CANCEL );
895 }

◆ OnOk()

void ImportStreamDialog::OnOk ( wxCommandEvent &  event)
private

Definition at line 883 of file Import.cpp.

884 {
885  wxArrayInt selitems;
886  int sels = StreamList->GetSelections(selitems);
887  for (wxInt32 i = 0; i < sels; i++)
888  mFile->SetStreamUsage(selitems[i],TRUE);
889  EndModal( wxID_OK );
890 }

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:
size
size_t size
Definition: ffmpeg-2.3.6-single-header.h:412
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
ImportFileHandle::GetStreamInfo
virtual const TranslatableStrings & GetStreamInfo()=0
ImportStreamDialog::mFile
ImportFileHandle * mFile
Definition: Import.h:202
ImportStreamDialog::StreamList
wxListBox * StreamList
Definition: Import.h:204
ImportFileHandle::SetStreamUsage
virtual void SetStreamUsage(wxInt32 StreamID, bool Use)=0
ImportStreamDialog::scount
wxInt32 scount
Definition: Import.h:203
title
static const auto title
Definition: NoUpdatesAvailableDialog.cpp:22
ImportFileHandle::GetStreamCount
virtual wxInt32 GetStreamCount()=0
wxDialogWrapper::wxDialogWrapper
wxDialogWrapper()
Definition: wxPanelWrapper.h:84
TranslatableString::Translation
wxString Translation() const
Definition: TranslatableString.h:79
wxDialogWrapper::SetName
void SetName()
Definition: wxPanelWrapper.cpp:81
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631