Audacity  3.0.3
Public Member Functions | Static Public Member Functions | List of all members
ShuttleGui Class Reference

Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI. More...

#include <ShuttleGui.h>

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

Public Member Functions

 ShuttleGui (wxWindow *pParent, teShuttleMode ShuttleMode, bool vertical=true, wxSize minSize={ 250, 100 })
 
 ~ShuttleGui (void)
 
ShuttleGuiOptional (bool &bVar)
 
ShuttleGuiId (int id)
 
ShuttleGuiFocus (bool focused=true)
 
ShuttleGuiDisable (bool disabled=true)
 
ShuttleGuiToolTip (const TranslatableString &tip)
 
ShuttleGuiName (const TranslatableString &name)
 
ShuttleGuiNameSuffix (const TranslatableString &suffix)
 
template<typename Factory >
ShuttleGuiValidator (const Factory &f)
 
template<typename V , typename... Args>
ShuttleGuiValidator (Args &&...args)
 
template<typename Tag , typename Argument , typename Handler >
auto ConnectRoot (wxEventTypeTag< Tag > eventType, void(Handler::*func)(Argument &)) -> typename std::enable_if< std::is_base_of< Argument, Tag >::value, ShuttleGui & >::type
 
ShuttleGuiPosition (int flags)
 
ShuttleGuiSize (wxSize size)
 
ShuttleGuiProp (int iProp)
 
ShuttleGuiStyle (long iStyle)
 
ShuttleGuiMinSize ()
 
ShuttleGuiMinSize (wxSize sz)
 
void AddStandardButtons (long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
 
wxSizerItem * AddSpace (int width, int height, int prop=0)
 
wxSizerItem * AddSpace (int size)
 
teShuttleMode GetMode ()
 
- Public Member Functions inherited from ShuttleGuiBase
 ShuttleGuiBase (wxWindow *pParent, teShuttleMode ShuttleMode, bool vertical, wxSize minSize)
 
virtual ~ShuttleGuiBase ()
 
void Init (bool vertical, wxSize minSize)
 
void ResetId ()
 
void HandleOptionality (const TranslatableString &Prompt)
 
void AddPrompt (const TranslatableString &Prompt, int wrapWidth=0)
 Right aligned text string. More...
 
void AddUnits (const TranslatableString &Prompt, int wrapWidth=0)
 Left aligned text string. More...
 
void AddTitle (const TranslatableString &Prompt, int wrapWidth=0)
 Centred text string. More...
 
wxWindow * AddWindow (wxWindow *pWindow)
 
wxSlider * AddSlider (const TranslatableString &Prompt, int pos, int Max, int Min=0)
 
wxSlider * AddVSlider (const TranslatableString &Prompt, int pos, int Max)
 
wxSpinCtrl * AddSpinCtrl (const TranslatableString &Prompt, int Value, int Max, int Min)
 
wxTreeCtrl * AddTree ()
 
wxRadioButton * AddRadioButton (const TranslatableString &Prompt, int selector=0, int initValue=0)
 
wxRadioButton * AddRadioButtonToGroup (const TranslatableString &Prompt, int selector=1, int initValue=0)
 
wxButton * AddButton (const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
 
wxBitmapButton * AddBitmapButton (const wxBitmap &Bitmap, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
 
wxStaticText * AddVariableText (const TranslatableString &Str, bool bCenter=false, int PositionFlags=0, int wrapWidth=0)
 
ReadOnlyTextAddReadOnlyText (const TranslatableString &Caption, const wxString &Value)
 
wxTextCtrl * AddTextBox (const TranslatableString &Caption, const wxString &Value, const int nChars)
 
wxTextCtrl * AddNumericTextBox (const TranslatableString &Caption, const wxString &Value, const int nChars)
 
wxTextCtrl * AddTextWindow (const wxString &Value)
 Multiline text box that grows. More...
 
wxListBox * AddListBox (const wxArrayStringEx &choices)
 
wxListCtrl * AddListControl (std::initializer_list< const ListControlColumn > columns={}, long listControlStyles=0)
 
wxListCtrl * AddListControlReportMode (std::initializer_list< const ListControlColumn > columns={}, long listControlStyles=0)
 
wxGrid * AddGrid ()
 
wxCheckBox * AddCheckBox (const TranslatableString &Prompt, bool Selected)
 
wxCheckBox * AddCheckBoxOnRight (const TranslatableString &Prompt, bool Selected)
 
wxCheckBox * AddCheckBox (const TranslatableString &Prompt, const wxChar *)=delete
 
wxCheckBox * AddCheckBox (const TranslatableString &Prompt, const char *)=delete
 
wxCheckBox * AddCheckBoxOnRight (const TranslatableString &Prompt, const wxChar *)=delete
 
wxCheckBox * AddCheckBoxOnRight (const TranslatableString &Prompt, const char *)=delete
 
wxComboBox * AddCombo (const TranslatableString &Prompt, const wxString &Selected, const wxArrayStringEx &choices)
 
wxChoice * AddChoice (const TranslatableString &Prompt, const TranslatableStrings &choices, int Selected=-1)
 
wxChoice * AddChoice (const TranslatableString &Prompt, const TranslatableStrings &choices, const TranslatableString &selected)
 
void AddIcon (wxBitmap *pBmp)
 
void AddFixedText (const TranslatableString &Str, bool bCenter=false, int wrapWidth=0)
 
void AddConstTextBox (const TranslatableString &Caption, const TranslatableString &Value)
 Single line text box of fixed size. More...
 
void StartHorizontalLay (int PositionFlags=wxALIGN_CENTRE, int iProp=1)
 
void EndHorizontalLay ()
 
void StartVerticalLay (int iProp=1)
 
void StartVerticalLay (int PositionFlags, int iProp)
 
void EndVerticalLay ()
 
wxScrolledWindow * StartScroller (int iStyle=0)
 
void EndScroller ()
 
wxPanel * StartPanel (int iStyle=0)
 
void EndPanel ()
 
void StartMultiColumn (int nCols, int PositionFlags=wxALIGN_LEFT)
 
void EndMultiColumn ()
 
void StartTwoColumn ()
 
void EndTwoColumn ()
 
void StartThreeColumn ()
 
void EndThreeColumn ()
 
wxStaticBox * StartStatic (const TranslatableString &Str, int iProp=0)
 
void EndStatic ()
 
wxNotebook * StartNotebook ()
 
void EndNotebook ()
 
wxSimplebook * StartSimplebook ()
 
void EndSimplebook ()
 
wxNotebookPageStartNotebookPage (const TranslatableString &Name)
 
void EndNotebookPage ()
 
wxPanel * StartInvisiblePanel ()
 
void EndInvisiblePanel ()
 
void StartRadioButtonGroup (const ChoiceSetting &Setting)
 Call this before any TieRadioButton calls. More...
 
void EndRadioButtonGroup ()
 
bool DoStep (int iStep)
 
int TranslateToIndex (const wxString &Value, const wxArrayStringEx &Choices)
 String-to-Index. More...
 
wxString TranslateFromIndex (const int nIn, const wxArrayStringEx &Choices)
 Index-to-String. More...
 
wxTextCtrl * TieTextBox (const TranslatableString &Caption, wxString &Value, const int nChars=0)
 
wxTextCtrl * TieTextBox (const TranslatableString &Prompt, int &Selected, const int nChars=0)
 
wxTextCtrl * TieTextBox (const TranslatableString &Prompt, double &Value, const int nChars=0)
 
wxTextCtrl * TieNumericTextBox (const TranslatableString &Prompt, int &Value, const int nChars=0)
 
wxTextCtrl * TieNumericTextBox (const TranslatableString &Prompt, double &Value, const int nChars=0)
 
wxCheckBox * TieCheckBox (const TranslatableString &Prompt, bool &Var)
 
wxCheckBox * TieCheckBoxOnRight (const TranslatableString &Prompt, bool &Var)
 
wxChoice * TieChoice (const TranslatableString &Prompt, TranslatableString &Selected, const TranslatableStrings &choices)
 
wxChoice * TieChoice (const TranslatableString &Prompt, int &Selected, const TranslatableStrings &choices)
 
wxSlider * TieSlider (const TranslatableString &Prompt, int &pos, const int max, const int min=0)
 
wxSlider * TieSlider (const TranslatableString &Prompt, double &pos, const double max, const double min=0.0)
 
wxSlider * TieSlider (const TranslatableString &Prompt, float &pos, const float fMin, const float fMax)
 
wxSlider * TieVSlider (const TranslatableString &Prompt, float &pos, const float fMin, const float fMax)
 
wxRadioButton * TieRadioButton ()
 This function must be within a StartRadioButtonGroup - EndRadioButtonGroup pair. More...
 
wxSpinCtrl * TieSpinCtrl (const TranslatableString &Prompt, int &Value, const int max, const int min=0)
 
virtual wxCheckBox * TieCheckBox (const TranslatableString &Prompt, const SettingSpec< bool > &Setting)
 
virtual wxCheckBox * TieCheckBoxOnRight (const TranslatableString &Prompt, const SettingSpec< bool > &Setting)
 
virtual wxChoice * TieChoice (const TranslatableString &Prompt, const ChoiceSetting &choiceSetting)
 
virtual wxChoice * TieNumberAsChoice (const TranslatableString &Prompt, const SettingSpec< int > &Setting, const TranslatableStrings &Choices, const std::vector< int > *pInternalChoices=nullptr, int iNoMatchSelector=0)
 
virtual wxTextCtrl * TieTextBox (const TranslatableString &Prompt, const SettingSpec< wxString > &Setting, const int nChars)
 
virtual wxTextCtrl * TieIntegerTextBox (const TranslatableString &Prompt, const SettingSpec< int > &Setting, const int nChars)
 
virtual wxTextCtrl * TieNumericTextBox (const TranslatableString &Prompt, const SettingSpec< double > &Setting, const int nChars)
 
virtual wxSlider * TieSlider (const TranslatableString &Prompt, const SettingSpec< int > &Setting, const int max, const int min=0)
 
virtual wxSpinCtrl * TieSpinCtrl (const TranslatableString &Prompt, const SettingSpec< int > &Setting, const int max, const int min)
 
void SetBorder (int Border)
 
void SetSizerProportion (int iProp)
 
void SetStretchyCol (int i)
 Used to modify an already placed FlexGridSizer to make a column stretchy. More...
 
void SetStretchyRow (int i)
 Used to modify an already placed FlexGridSizer to make a row stretchy. More...
 
wxWindow * GetParent ()
 
ShuttleGuiBaseProp (int iProp)
 
void UseUpId ()
 
wxSizer * GetSizer ()
 

Static Public Member Functions

static void SetMinSize (wxWindow *window, const TranslatableStrings &items)
 
static void SetMinSize (wxWindow *window, const wxArrayStringEx &items)
 
- Static Public Member Functions inherited from ShuttleGuiBase
static void ApplyItem (int step, const DialogDefinition::Item &item, wxWindow *pWind, wxWindow *pDlg)
 

Additional Inherited Members

- Protected Member Functions inherited from ShuttleGuiBase
void SetProportions (int Default)
 
void PushSizer ()
 
void PopSizer ()
 
void UpdateSizersCore (bool bPrepend, int Flags, bool prompt=false)
 
void UpdateSizers ()
 
void UpdateSizersC ()
 
void UpdateSizersAtStart ()
 
long GetStyle (long Style)
 
- Protected Attributes inherited from ShuttleGuiBase
wxWindow *const mpDlg
 
wxSizer * pSizerStack [nMaxNestedSizers]
 
std::unique_ptr< ShuttlempShuttle
 
int miNoMatchSelector
 
teShuttleMode mShuttleMode
 Used in choices to determine which item to use on no match. More...
 
int miSizerProp
 
int mSizerDepth
 
int miBorder
 
int miProp
 
int miId
 
int miIdNext
 
int miIdSetByUser
 
int miPropSetByUser
 
bool * mpbOptionalFlag
 
std::unique_ptr< wxSizer > mpSubSizer
 
wxSizer * mpSizer
 
wxWindow * mpParent
 
wxWindow * mpWind
 
DialogDefinition::Item mItem
 

Detailed Description

Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.

ShuttleGui extends the idea of the data Shuttle class to include creation of dialog controls. As part of this it provides an interface to sizers that leads to shorter more readable code.

It also allows the code that is used to create dialogs to be reused to shuttle information in and out.

Most of the ShuttleGui functions are actually defined in ShuttleGuiBase.

There is documentation on how to use this class in The Shuttle System

Definition at line 637 of file ShuttleGui.h.

Constructor & Destructor Documentation

◆ ShuttleGui()

ShuttleGui::ShuttleGui ( wxWindow *  pParent,
teShuttleMode  ShuttleMode,
bool  vertical = true,
wxSize  minSize = { 250, 100 } 
)

Definition at line 2219 of file ShuttleGui.cpp.

2221  : ShuttleGuiBase( pParent, ShuttleMode, vertical, minSize )
2222 {
2223  if( ShuttleMode == eIsCreatingFromPrefs )
2224  {
2226  Init( vertical, minSize ); // Wasn't fully done in base constructor because it is only done when eIsCreating is set.
2227  }
2228  else if( ShuttleMode == eIsSavingToPrefs )
2229  {
2231  }
2232  else
2233  {
2234  return;
2235  }
2236 
2237  mpShuttle = std::make_unique<ShuttlePrefs>();
2238  // In this case the client is the GUI, so if creating we do want to
2239  // store in the client.
2240  mpShuttle->mbStoreInClient = (mShuttleMode == eIsCreating );
2241 };

References eIsCreating, eIsCreatingFromPrefs, eIsGettingFromDialog, eIsSavingToPrefs, ShuttleGuiBase::Init(), ShuttleGuiBase::mpShuttle, and ShuttleGuiBase::mShuttleMode.

Here is the call graph for this function:

◆ ~ShuttleGui()

ShuttleGui::~ShuttleGui ( void  )

Definition at line 2243 of file ShuttleGui.cpp.

2244 {
2245 }

Member Function Documentation

◆ AddSpace() [1/2]

wxSizerItem* ShuttleGui::AddSpace ( int  size)
inline

Definition at line 751 of file ShuttleGui.h.

751 { return AddSpace( size, size ); };

References AddSpace().

Referenced by AddSpace().

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

◆ AddSpace() [2/2]

wxSizerItem * ShuttleGui::AddSpace ( int  width,
int  height,
int  prop = 0 
)

Definition at line 2421 of file ShuttleGui.cpp.

2422 {
2423  if( mShuttleMode != eIsCreating )
2424  return NULL;
2425 
2426 // SetProportions(0);
2427  // return mpSizer->Add( width, height, miProp);
2428 
2429  return mpSizer->Add( width, height, prop );
2430 }

References eIsCreating, ShuttleGuiBase::mpSizer, and ShuttleGuiBase::mShuttleMode.

Referenced by NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), TrackActions::Handler::OnResample(), FrequencyPlotDialog::Populate(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), CompareAudioCommand::PopulateOrExchange(), DemoCommand::PopulateOrExchange(), DragCommand::PopulateOrExchange(), GetInfoCommand::PopulateOrExchange(), GetTrackInfoCommand::PopulateOrExchange(), HelpCommand::PopulateOrExchange(), CommentCommand::PopulateOrExchange(), ImportCommand::PopulateOrExchange(), ExportCommand::PopulateOrExchange(), MessageCommand::PopulateOrExchange(), OpenProjectCommand::PopulateOrExchange(), SaveProjectCommand::PopulateOrExchange(), SaveCopyCommand::PopulateOrExchange(), SaveLogCommand::PopulateOrExchange(), GetPreferenceCommand::PopulateOrExchange(), SetPreferenceCommand::PopulateOrExchange(), ScreenshotCommand::PopulateOrExchange(), SelectTimeCommand::PopulateOrExchange(), SelectFrequenciesCommand::PopulateOrExchange(), SelectTracksCommand::PopulateOrExchange(), SetClipCommand::PopulateOrExchange(), SetEnvelopeCommand::PopulateOrExchange(), SetLabelCommand::PopulateOrExchange(), SetProjectCommand::PopulateOrExchange(), SetTrackBase::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEcho::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), EffectReverb::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), VampEffect::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), SetTrackNameCommand::PopulateOrExchange(), and AudacityLogger::Show().

◆ AddStandardButtons()

void ShuttleGui::AddStandardButtons ( long  buttons = eOkButton | eCancelButton,
wxWindow *  extra = NULL 
)

Definition at line 2406 of file ShuttleGui.cpp.

2407 {
2408  if( mShuttleMode != eIsCreating )
2409  return;
2410 
2411  StartVerticalLay( false );
2412 
2413  miSizerProp = false;
2414  mpSubSizer = CreateStdButtonSizer( mpParent, buttons, extra );
2415  UpdateSizers();
2416  PopSizer();
2417 
2418  EndVerticalLay();
2419 }

References CreateStdButtonSizer(), eIsCreating, ShuttleGuiBase::EndVerticalLay(), ShuttleGuiBase::miSizerProp, ShuttleGuiBase::mpParent, ShuttleGuiBase::mpSubSizer, ShuttleGuiBase::mShuttleMode, ShuttleGuiBase::PopSizer(), ShuttleGuiBase::StartVerticalLay(), and ShuttleGuiBase::UpdateSizers().

Referenced by ExportMP3::AskResample(), ExportFFmpeg::AskResample(), anonymous_namespace{ProjectFileManager.cpp}::CompactDialog::CompactDialog(), ContrastDialog::ContrastDialog(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ErrorDialog::ErrorDialog(), ExportMixerDialog::ExportMixerDialog(), ImportRawDialog::ImportRawDialog(), AudacityCommandDialog::Init(), LongMessageDialog::Init(), EffectDialog::Init(), LangChoiceDialog::LangChoiceDialog(), TagsEditorDialog::OnEdit(), MeterPanel::OnPreferences(), RateMenuTable::OnRateOther(), TrackActions::Handler::OnResample(), EffectUIHost::OnSaveAs(), LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), MacroCommandDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), FFmpegNotFoundDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), SoundActivatedRecordDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimeDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), PrefsDialog::PrefsDialog(), DeviceToolBar::ShowComboDialog(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowInfoDialog(), SliderDialog::SliderDialog(), and WarningDialog::WarningDialog().

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

◆ ConnectRoot()

template<typename Tag , typename Argument , typename Handler >
auto ShuttleGui::ConnectRoot ( wxEventTypeTag< Tag >  eventType,
void(Handler::*)(Argument &)  func 
) -> typename std::enable_if< std::is_base_of<Argument, Tag>::value, ShuttleGui& >::type
inline

Definition at line 706 of file ShuttleGui.h.

714  {
715  std::move( mItem ).ConnectRoot( eventType, func );
716  return *this;
717  }

References ConnectRoot().

Referenced by ConnectRoot(), ContrastDialog::ContrastDialog(), HistoryDialog::Populate(), SplashDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), and KeyConfigPrefs::PopulateOrExchange().

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

◆ Disable()

ShuttleGui& ShuttleGui::Disable ( bool  disabled = true)
inline

Definition at line 657 of file ShuttleGui.h.

658  {
659  std::move( mItem ).Disable( disabled );
660  return *this;
661  }

References Disable().

Referenced by Disable(), MacroCommandDialog::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), and HelpSystem::ShowHtmlText().

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

◆ Focus()

ShuttleGui& ShuttleGui::Focus ( bool  focused = true)
inline

Definition at line 651 of file ShuttleGui.h.

652  {
653  std::move( mItem ).Focus( focused );
654  return *this;
655  }

References Focus().

Referenced by NyquistEffect::BuildPromptWindow(), Focus(), FrequencyPlotDialog::Populate(), DependencyDialog::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), and HelpSystem::ShowHtmlText().

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

◆ GetMode()

teShuttleMode ShuttleGui::GetMode ( )
inline

Definition at line 759 of file ShuttleGui.h.

759 { return mShuttleMode; };

References ShuttleGuiBase::mShuttleMode.

Referenced by ContrastDialog::ContrastDialog(), ExportMultipleDialog::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), and SpectrumPrefs::PopulateOrExchange().

Here is the caller graph for this function:

◆ Id()

ShuttleGui & ShuttleGui::Id ( int  id)

Definition at line 2248 of file ShuttleGui.cpp.

2249 {
2250  miIdSetByUser = id;
2251  return *this;
2252 }

References id, and ShuttleGuiBase::miIdSetByUser.

Referenced by anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::AddStuck(), NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), anonymous_namespace{NoiseReduction.cpp}::ControlInfo::CreateControls(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ExportCL::Export(), ExportMixerDialog::ExportMixerDialog(), ImportRawDialog::ImportRawDialog(), BenchmarkDialog::MakeBenchmarkDialog(), ApplyMacroDialog::OnApplyToFiles(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), MacroCommandDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), EffectReverb::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), VampEffect::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), WaveformPrefs::PopulateOrExchange(), AudacityLogger::Show(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowHtmlText(), and AudacityFileConfig::Warn().

◆ MinSize() [1/2]

ShuttleGui& ShuttleGui::MinSize ( )
inline

◆ MinSize() [2/2]

ShuttleGui& ShuttleGui::MinSize ( wxSize  sz)
inline

Definition at line 742 of file ShuttleGui.h.

743  { std::move( mItem ).MinSize( sz ); return *this; }

References MinSize().

Here is the call graph for this function:

◆ Name()

ShuttleGui& ShuttleGui::Name ( const TranslatableString name)
inline

Definition at line 670 of file ShuttleGui.h.

671  {
672  std::move( mItem ).Name( name );
673  return *this;
674  }

References name, and Name().

Referenced by NyquistEffect::BuildEffectWindow(), ContrastDialog::ContrastDialog(), anonymous_namespace{NoiseReduction.cpp}::ControlInfo::CreateControls(), ExportMixerDialog::ExportMixerDialog(), BenchmarkDialog::MakeBenchmarkDialog(), Name(), MeterPanel::OnPreferences(), LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), MacroCommandDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), VampEffect::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), and RecordingPrefs::PopulateOrExchange().

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

◆ NameSuffix()

ShuttleGui& ShuttleGui::NameSuffix ( const TranslatableString suffix)
inline

Definition at line 678 of file ShuttleGui.h.

679  {
680  std::move( mItem ).NameSuffix( suffix );
681  return *this;
682  }

References NameSuffix().

Referenced by NameSuffix(), DevicePrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), and RecordingPrefs::PopulateOrExchange().

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

◆ Optional()

ShuttleGui & ShuttleGui::Optional ( bool &  bVar)

◆ Position()

ShuttleGui& ShuttleGui::Position ( int  flags)
inline

◆ Prop()

ShuttleGui& ShuttleGui::Prop ( int  iProp)
inline

◆ SetMinSize() [1/2]

void ShuttleGui::SetMinSize ( wxWindow *  window,
const TranslatableStrings items 
)
static

Definition at line 2432 of file ShuttleGui.cpp.

2433 {
2434  SetMinSize( window,
2435  transform_container<wxArrayStringEx>(
2436  items, std::mem_fn( &TranslatableString::StrippedTranslation ) ) );
2437 }

References TranslatableString::StrippedTranslation().

Referenced by DevicePrefs::OnDevice(), DevicePrefs::OnHost(), and ShuttleGuiBase::TieChoice().

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

◆ SetMinSize() [2/2]

void ShuttleGui::SetMinSize ( wxWindow *  window,
const wxArrayStringEx items 
)
static

Definition at line 2439 of file ShuttleGui.cpp.

2440 {
2441  int maxw = 0;
2442 
2443  for( size_t i = 0; i < items.size(); i++ )
2444  {
2445  int x;
2446  int y;
2447 
2448  window->GetTextExtent(items[i], &x, &y );
2449  if( x > maxw )
2450  {
2451  maxw = x;
2452  }
2453  }
2454 
2455  // Would be nice to know the sizes of the button and borders, but this is
2456  // the best we can do for now.
2457 #if defined(__WXMAC__)
2458  maxw += 50;
2459 #elif defined(__WXMSW__)
2460  maxw += 50;
2461 #elif defined(__WXGTK__)
2462  maxw += 50;
2463 #else
2464  maxw += 50;
2465 #endif
2466 
2467  window->SetMinSize( { maxw, -1 } );
2468 }

◆ Size()

ShuttleGui& ShuttleGui::Size ( wxSize  size)
inline

Definition at line 725 of file ShuttleGui.h.

726  {
727  std::move( mItem ).Size( size );
728  return *this;
729  }

References Size().

Referenced by ExportMixerDialog::ExportMixerDialog(), and Size().

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

◆ Style()

ShuttleGui& ShuttleGui::Style ( long  iStyle)
inline

Definition at line 734 of file ShuttleGui.h.

735  {
736  std::move( mItem ).Style( iStyle );
737  return *this;
738  }

References Style().

Referenced by NyquistEffect::BuildEffectWindow(), anonymous_namespace{NoiseReduction.cpp}::ControlInfo::CreateControls(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ErrorDialog::ErrorDialog(), ExportCL::Export(), ApplyMacroDialog::OnApplyToFiles(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), MacroCommandDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), VampEffect::PopulateOrExchange(), AudacityLogger::Show(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowHtmlText(), HelpSystem::ShowInfoDialog(), and Style().

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

◆ ToolTip()

ShuttleGui& ShuttleGui::ToolTip ( const TranslatableString tip)
inline

Definition at line 663 of file ShuttleGui.h.

664  {
665  std::move( mItem ).ToolTip( tip );
666  return *this;
667  }

References ToolTip().

Referenced by ExportFFmpegOptions::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), VampEffect::PopulateOrExchange(), HelpSystem::ShowHtmlText(), and ToolTip().

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

◆ Validator() [1/2]

template<typename V , typename... Args>
ShuttleGui& ShuttleGui::Validator ( Args &&...  args)
inline

Definition at line 694 of file ShuttleGui.h.

695  {
696  if ( GetMode() == eIsCreating )
697  std::move( mItem ).Validator<V>( std::forward<Args>(args)... );
698  return *this;
699  }

References eIsCreating, and Validator().

Here is the call graph for this function:

◆ Validator() [2/2]

template<typename Factory >
ShuttleGui& ShuttleGui::Validator ( const Factory &  f)
inline

Definition at line 685 of file ShuttleGui.h.

686  {
687  if ( GetMode() == eIsCreating )
688  std::move( mItem ).Validator( f );
689  return *this;
690  }

References eIsCreating, and Validator().

Referenced by NyquistEffect::BuildEffectWindow(), anonymous_namespace{NoiseReduction.cpp}::ControlInfo::CreateControls(), BenchmarkDialog::MakeBenchmarkDialog(), MeterPanel::OnPreferences(), VSTEffectOptionsDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEcho::PopulateOrExchange(), EffectFindClipping::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectPaulstretch::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), EffectRepeat::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), VampEffect::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), SliderDialog::SliderDialog(), and Validator().

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

The documentation for this class was generated from the following files:
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:36
ShuttleGuiBase::Init
void Init(bool vertical, wxSize minSize)
Definition: ShuttleGui.cpp:141
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1177
ShuttleGui::SetMinSize
static void SetMinSize(wxWindow *window, const TranslatableStrings &items)
Definition: ShuttleGui.cpp:2432
eIsGettingFromDialog
@ eIsGettingFromDialog
Definition: ShuttleGui.h:37
ShuttleGuiBase::miIdSetByUser
int miIdSetByUser
Definition: ShuttleGui.h:554
ShuttleGuiBase::mpShuttle
std::unique_ptr< Shuttle > mpShuttle
Definition: ShuttleGui.h:540
ShuttleGuiBase::ShuttleGuiBase
ShuttleGuiBase(wxWindow *pParent, teShuttleMode ShuttleMode, bool vertical, wxSize minSize)
Definition: ShuttleGui.cpp:126
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2421
ShuttleGuiBase::miSizerProp
int miSizerProp
Definition: ShuttleGui.h:546
ShuttleGuiBase::Prop
ShuttleGuiBase & Prop(int iProp)
Definition: ShuttleGui.cpp:875
ShuttleGuiBase::mpSizer
wxSizer * mpSizer
Definition: ShuttleGui.h:561
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1196
ShuttleGuiBase::UpdateSizers
void UpdateSizers()
Definition: ShuttleGui.cpp:2161
ShuttleGuiBase::mpParent
wxWindow * mpParent
Definition: ShuttleGui.h:562
name
const TranslatableString name
Definition: Distortion.cpp:98
ShuttleGuiBase::PopSizer
void PopSizer()
Definition: ShuttleGui.cpp:2173
ShuttleGuiBase::mpbOptionalFlag
bool * mpbOptionalFlag
Definition: ShuttleGui.h:558
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:46
id
int id
Definition: WaveTrackControls.cpp:589
ShuttleGuiBase::mShuttleMode
teShuttleMode mShuttleMode
Used in choices to determine which item to use on no match.
Definition: ShuttleGui.h:544
TranslatableString::StrippedTranslation
wxString StrippedTranslation() const
Definition: Types.h:460
ShuttleGuiBase::mItem
DialogDefinition::Item mItem
Definition: ShuttleGui.h:589
ShuttleGui::GetMode
teShuttleMode GetMode()
Definition: ShuttleGui.h:759
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:45
ShuttleGuiBase::mpSubSizer
std::unique_ptr< wxSizer > mpSubSizer
Definition: ShuttleGui.h:560
CreateStdButtonSizer
std::unique_ptr< wxSizer > CreateStdButtonSizer(wxWindow *parent, long buttons, wxWindow *extra)
Definition: ShuttleGui.cpp:2260