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, int PositionFlags=wxALIGN_CENTRE)
 
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 ()
 
void StartWrapLay (int PositionFlags=wxEXPAND, int iProp=0)
 
void EndWrapLay ()
 
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 BoolSetting &Setting)
 
virtual wxCheckBox * TieCheckBoxOnRight (const TranslatableString &Prompt, const BoolSetting &Setting)
 
virtual wxChoice * TieChoice (const TranslatableString &Prompt, const ChoiceSetting &choiceSetting)
 
virtual wxChoice * TieNumberAsChoice (const TranslatableString &Prompt, const IntSetting &Setting, const TranslatableStrings &Choices, const std::vector< int > *pInternalChoices=nullptr, int iNoMatchSelector=0)
 
virtual wxTextCtrl * TieTextBox (const TranslatableString &Prompt, const StringSetting &Setting, const int nChars)
 
virtual wxTextCtrl * TieIntegerTextBox (const TranslatableString &Prompt, const IntSetting &Setting, const int nChars)
 
virtual wxTextCtrl * TieNumericTextBox (const TranslatableString &Prompt, const DoubleSetting &Setting, const int nChars)
 
virtual wxSlider * TieSlider (const TranslatableString &Prompt, const IntSetting &Setting, const int max, const int min=0)
 
virtual wxSpinCtrl * TieSpinCtrl (const TranslatableString &Prompt, const IntSetting &Setting, const int max, const int min)
 
void SetBorder (int Border)
 
int GetBorder () const noexcept
 
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 630 of file ShuttleGui.h.

Constructor & Destructor Documentation

◆ ShuttleGui()

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

Definition at line 2245 of file ShuttleGui.cpp.

2247  : ShuttleGuiBase( pParent, ShuttleMode, vertical, minSize )
2248 {
2249  if( ShuttleMode == eIsCreatingFromPrefs )
2250  {
2252  Init( vertical, minSize ); // Wasn't fully done in base constructor because it is only done when eIsCreating is set.
2253  }
2254  else if( ShuttleMode == eIsSavingToPrefs )
2255  {
2257  }
2258  else
2259  {
2260  return;
2261  }
2262 
2263  mpShuttle = std::make_unique<ShuttlePrefs>();
2264  // In this case the client is the GUI, so if creating we do want to
2265  // store in the client.
2266  mpShuttle->mbStoreInClient = (mShuttleMode == eIsCreating );
2267 };

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 2269 of file ShuttleGui.cpp.

2270 {
2271 }

Member Function Documentation

◆ AddSpace() [1/2]

wxSizerItem* ShuttleGui::AddSpace ( int  size)
inline

Definition at line 744 of file ShuttleGui.h.

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

References AddSpace(), and size.

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 2459 of file ShuttleGui.cpp.

2460 {
2461  if( mShuttleMode != eIsCreating )
2462  return NULL;
2463 
2464 // SetProportions(0);
2465  // return mpSizer->Add( width, height, miProp);
2466 
2467  return mpSizer->Add( width, height, prop );
2468 }

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

Referenced by NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ErrorReportDialog::ErrorReportDialog(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), TrackActions::Handler::OnResample(), FrequencyPlotDialog::Populate(), AccessibleLinksFormatter::Populate(), NyqBench::PopulateOrExchange(), 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(), SetWaveClipNameCommand::PopulateOrExchange(), SetTrackNameCommand::PopulateOrExchange(), LogWindow::Show(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), UpdateNoticeDialog::UpdateNoticeDialog(), and UpdatePopupDialog::UpdatePopupDialog().

◆ AddStandardButtons()

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

Definition at line 2444 of file ShuttleGui.cpp.

2445 {
2446  if( mShuttleMode != eIsCreating )
2447  return;
2448 
2449  StartVerticalLay( false );
2450 
2451  miSizerProp = false;
2452  mpSubSizer = CreateStdButtonSizer( mpParent, buttons, extra );
2453  UpdateSizers();
2454  PopSizer();
2455 
2456  EndVerticalLay();
2457 }

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(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), 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(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), and WarningDialog::WarningDialog().

Here is the call 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 699 of file ShuttleGui.h.

707  {
708  std::move( mItem ).ConnectRoot( eventType, func );
709  return *this;
710  }

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 650 of file ShuttleGui.h.

651  {
652  std::move( mItem ).Disable( disabled );
653  return *this;
654  }

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 644 of file ShuttleGui.h.

645  {
646  std::move( mItem ).Focus( focused );
647  return *this;
648  }

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 752 of file ShuttleGui.h.

752 { 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 2274 of file ShuttleGui.cpp.

2275 {
2276  miIdSetByUser = id;
2277  return *this;
2278 }

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(), ErrorReportDialog::ErrorReportDialog(), 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(), LogWindow::Show(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowHtmlText(), UpdateNoticeDialog::UpdateNoticeDialog(), UpdatePopupDialog::UpdatePopupDialog(), and AudacityFileConfig::Warn().

◆ MinSize() [1/2]

ShuttleGui& ShuttleGui::MinSize ( )
inline

◆ MinSize() [2/2]

ShuttleGui& ShuttleGui::MinSize ( wxSize  sz)
inline

Definition at line 735 of file ShuttleGui.h.

736  { 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 663 of file ShuttleGui.h.

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

References name, and Name().

Referenced by NyquistEffect::BuildEffectWindow(), ContrastDialog::ContrastDialog(), anonymous_namespace{NoiseReduction.cpp}::ControlInfo::CreateControls(), ErrorReportDialog::ErrorReportDialog(), 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 671 of file ShuttleGui.h.

672  {
673  std::move( mItem ).NameSuffix( suffix );
674  return *this;
675  }

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 2470 of file ShuttleGui.cpp.

2471 {
2472  SetMinSize( window,
2473  transform_container<wxArrayStringEx>(
2474  items, std::mem_fn( &TranslatableString::StrippedTranslation ) ) );
2475 }

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 2477 of file ShuttleGui.cpp.

2478 {
2479  int maxw = 0;
2480 
2481  for( size_t i = 0; i < items.size(); i++ )
2482  {
2483  int x;
2484  int y;
2485 
2486  window->GetTextExtent(items[i], &x, &y );
2487  if( x > maxw )
2488  {
2489  maxw = x;
2490  }
2491  }
2492 
2493  // Would be nice to know the sizes of the button and borders, but this is
2494  // the best we can do for now.
2495 #if defined(__WXMAC__)
2496  maxw += 50;
2497 #elif defined(__WXMSW__)
2498  maxw += 50;
2499 #elif defined(__WXGTK__)
2500  maxw += 50;
2501 #else
2502  maxw += 50;
2503 #endif
2504 
2505  window->SetMinSize( { maxw, -1 } );
2506 }

◆ Size()

ShuttleGui& ShuttleGui::Size ( wxSize  size)
inline

Definition at line 718 of file ShuttleGui.h.

719  {
720  std::move( mItem ).Size( size );
721  return *this;
722  }

References size, and 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 727 of file ShuttleGui.h.

728  {
729  std::move( mItem ).Style( iStyle );
730  return *this;
731  }

References Style().

Referenced by NyquistEffect::BuildEffectWindow(), anonymous_namespace{NoiseReduction.cpp}::ControlInfo::CreateControls(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ErrorDialog::ErrorDialog(), ErrorReportDialog::ErrorReportDialog(), 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(), LogWindow::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 656 of file ShuttleGui.h.

657  {
658  std::move( mItem ).ToolTip( tip );
659  return *this;
660  }

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 687 of file ShuttleGui.h.

688  {
689  if ( GetMode() == eIsCreating )
690  std::move( mItem ).Validator<V>( std::forward<Args>(args)... );
691  return *this;
692  }

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 678 of file ShuttleGui.h.

679  {
680  if ( GetMode() == eIsCreating )
681  std::move( mItem ).Validator( f );
682  return *this;
683  }

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:
size
size_t size
Definition: ffmpeg-2.3.6-single-header.h:412
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
ShuttleGuiBase::Init
void Init(bool vertical, wxSize minSize)
Definition: ShuttleGui.cpp:143
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1184
ShuttleGui::SetMinSize
static void SetMinSize(wxWindow *window, const TranslatableStrings &items)
Definition: ShuttleGui.cpp:2470
eIsGettingFromDialog
@ eIsGettingFromDialog
Definition: ShuttleGui.h:39
ShuttleGuiBase::miIdSetByUser
int miIdSetByUser
Definition: ShuttleGui.h:547
ShuttleGuiBase::mpShuttle
std::unique_ptr< Shuttle > mpShuttle
Definition: ShuttleGui.h:533
ShuttleGuiBase::ShuttleGuiBase
ShuttleGuiBase(wxWindow *pParent, teShuttleMode ShuttleMode, bool vertical, wxSize minSize)
Definition: ShuttleGui.cpp:128
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2459
ShuttleGuiBase::miSizerProp
int miSizerProp
Definition: ShuttleGui.h:539
ShuttleGuiBase::Prop
ShuttleGuiBase & Prop(int iProp)
Definition: ShuttleGui.cpp:882
ShuttleGuiBase::mpSizer
wxSizer * mpSizer
Definition: ShuttleGui.h:554
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1203
ShuttleGuiBase::UpdateSizers
void UpdateSizers()
Definition: ShuttleGui.cpp:2187
ShuttleGuiBase::mpParent
wxWindow * mpParent
Definition: ShuttleGui.h:555
name
const TranslatableString name
Definition: Distortion.cpp:98
ShuttleGuiBase::PopSizer
void PopSizer()
Definition: ShuttleGui.cpp:2199
ShuttleGuiBase::mpbOptionalFlag
bool * mpbOptionalFlag
Definition: ShuttleGui.h:551
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:48
id
int id
Definition: WaveTrackControls.cpp:591
ShuttleGuiBase::mShuttleMode
teShuttleMode mShuttleMode
Used in choices to determine which item to use on no match.
Definition: ShuttleGui.h:537
TranslatableString::StrippedTranslation
wxString StrippedTranslation() const
Definition: TranslatableString.h:201
ShuttleGuiBase::mItem
DialogDefinition::Item mItem
Definition: ShuttleGui.h:582
ShuttleGui::GetMode
teShuttleMode GetMode()
Definition: ShuttleGui.h:752
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
ShuttleGuiBase::mpSubSizer
std::unique_ptr< wxSizer > mpSubSizer
Definition: ShuttleGui.h:553
CreateStdButtonSizer
std::unique_ptr< wxSizer > CreateStdButtonSizer(wxWindow *parent, long buttons, wxWindow *extra)
Definition: ShuttleGui.cpp:2286