Audacity  2.2.2
Public Member Functions | Private Member Functions | List of all members
SoundActivatedRecord Class Referencefinal

Configures sound activated recording. More...

#include <SoundActivatedRecord.h>

Inheritance diagram for SoundActivatedRecord:
wxDialogWrapper wxTabTraversalWrapper< wxDialog >

Public Member Functions

 SoundActivatedRecord (wxWindow *parent)
 
 ~SoundActivatedRecord ()
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=_("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=_("Dialog"))
 
- 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 PopulateOrExchange (ShuttleGui &S)
 

Detailed Description

Configures sound activated recording.

Definition at line 23 of file SoundActivatedRecord.h.

Constructor & Destructor Documentation

SoundActivatedRecord::SoundActivatedRecord ( wxWindow *  parent)

Definition at line 34 of file SoundActivatedRecord.cpp.

References eIsCreatingFromPrefs.

35 : wxDialogWrapper(parent, -1, _("Sound Activated Record"), wxDefaultPosition,
36  wxDefaultSize, wxCAPTION )
37 // wxDefaultSize, wxCAPTION | wxTHICK_FRAME)
38 {
39  SetName(GetTitle());
42  Fit();
43  Center();
44 }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void PopulateOrExchange(ShuttleGui &S)
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
SoundActivatedRecord::~SoundActivatedRecord ( )

Definition at line 46 of file SoundActivatedRecord.cpp.

47 {
48 }

Member Function Documentation

void SoundActivatedRecord::OnOK ( wxCommandEvent &  event)
private

Definition at line 67 of file SoundActivatedRecord.cpp.

References eIsSavingToPrefs, gPrefs, and PopulateOrExchange().

68 {
69  ShuttleGui S( this, eIsSavingToPrefs );
70  PopulateOrExchange( S );
71 
72  gPrefs->Flush();
73 
74  EndModal(0);
75 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void PopulateOrExchange(ShuttleGui &S)
void SoundActivatedRecord::PopulateOrExchange ( ShuttleGui S)
private

Definition at line 50 of file SoundActivatedRecord.cpp.

References _(), ShuttleGui::AddStandardButtons(), ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndVerticalLay(), ENV_DB_KEY, ENV_DB_RANGE, gPrefs, ShuttleGuiBase::SetBorder(), ShuttleGuiBase::SetStretchyCol(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartVerticalLay(), and ShuttleGuiBase::TieSlider().

Referenced by OnOK().

51 {
52  S.SetBorder(5);
53  int dBRange;
54 
55  S.StartVerticalLay();
56  {
57  S.StartMultiColumn(2, wxEXPAND);
58  S.SetStretchyCol(1);
59  dBRange = gPrefs->Read(ENV_DB_KEY, ENV_DB_RANGE);
60  S.TieSlider(_("Activation level (dB):"), wxT("/AudioIO/SilenceLevel"), -50, 0, -dBRange);
61  S.EndMultiColumn();
62  }
63  S.EndVerticalLay();
65 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
#define ENV_DB_KEY
Definition: GUISettings.h:15
wxSlider * TieSlider(const wxString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
void EndMultiColumn()
#define ENV_DB_RANGE
Definition: GUISettings.h:16
void EndVerticalLay()
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxButton *extra=NULL)
void SetBorder(int Border)
Definition: ShuttleGui.h:286
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:203
void StartVerticalLay(int iProp=1)

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